summaryrefslogtreecommitdiff
authorar <ar>2005-01-22 21:53:54 (UTC)
committer ar <ar>2005-01-22 21:53:54 (UTC)
commit687b18f07228aac2b168ea5e3204c1c3518929a7 (patch) (unidiff)
tree485b49ef6150e7aad4bde0a942c0b17d863b240c
parent6d08fa658ab487426eebe934fdd92cd3bbb925b3 (diff)
downloadopie-687b18f07228aac2b168ea5e3204c1c3518929a7.zip
opie-687b18f07228aac2b168ea5e3204c1c3518929a7.tar.gz
opie-687b18f07228aac2b168ea5e3204c1c3518929a7.tar.bz2
- build opie-freetype against freetype2
you must specified <prefix>/include/freetype2 in dependencies menu (make menuconfig)
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--Rules.make3
-rw-r--r--dependencies.in8
-rw-r--r--freetype/config.in2
-rw-r--r--freetype/fontfactoryttf_qws.cpp4
-rw-r--r--freetype/fontfactoryttf_qws.h4
-rw-r--r--freetype/freetype.pro6
-rw-r--r--mkspecs/qws/linux-oe-g++/qmake.conf2
7 files changed, 26 insertions, 3 deletions
diff --git a/Rules.make b/Rules.make
index bdfe6d4..3fbce76 100644
--- a/Rules.make
+++ b/Rules.make
@@ -118,24 +118,27 @@ endif
118ifeq ($(CONFIG_LIBIPK_DEP),y) 118ifeq ($(CONFIG_LIBIPK_DEP),y)
119 echo LIBIPK_LIB_DIR = $(CONFIG_LIBIPK_LIB_DIR) >> $@ 119 echo LIBIPK_LIB_DIR = $(CONFIG_LIBIPK_LIB_DIR) >> $@
120 echo LIBIPK_INC_DIR = $(CONFIG_LIBIPK_INC_DIR) >> $@ 120 echo LIBIPK_INC_DIR = $(CONFIG_LIBIPK_INC_DIR) >> $@
121endif 121endif
122ifeq ($(CONFIG_LIBSDK_DEP),y) 122ifeq ($(CONFIG_LIBSDK_DEP),y)
123 echo LIBSDL_LIB_DIR = $(CONFIG_LIBSDL_LIB_DIR) >> $@ 123 echo LIBSDL_LIB_DIR = $(CONFIG_LIBSDL_LIB_DIR) >> $@
124 echo LIBSDL_INC_DIR = $(CONFIG_LIBSDL_INC_DIR) >> $@ 124 echo LIBSDL_INC_DIR = $(CONFIG_LIBSDL_INC_DIR) >> $@
125endif 125endif
126ifeq ($(CONFIG_LIBSWORD_DEP),y) 126ifeq ($(CONFIG_LIBSWORD_DEP),y)
127 echo LIBSWORD_LIB_DIR = $(CONFIG_LIBSWORD_LIB_DIR) >> $@ 127 echo LIBSWORD_LIB_DIR = $(CONFIG_LIBSWORD_LIB_DIR) >> $@
128 echo LIBSWORD_INC_DIR = $(CONFIG_LIBSWORD_INC_DIR) >> $@ 128 echo LIBSWORD_INC_DIR = $(CONFIG_LIBSWORD_INC_DIR) >> $@
129endif 129endif
130ifeq ($(CONFIG_LIBFREETYPE2_DEP),y)
131 echo LIBFREETYPE2_INC_DIR = $(CONFIG_LIBFREETYPE2_INC_DIR) >> $@
132endif
130$(TOPDIR)/.depends : $(shell if [ -e $(TOPDIR)/config.in ]\; then echo $(TOPDIR)/config.in\; fi\;) $(TOPDIR)/.config $(TOPDIR)/packages 133$(TOPDIR)/.depends : $(shell if [ -e $(TOPDIR)/config.in ]\; then echo $(TOPDIR)/config.in\; fi\;) $(TOPDIR)/.config $(TOPDIR)/packages
131 @echo Generating dependency information... 134 @echo Generating dependency information...
132# add to subdir-y, and add descend rules 135# add to subdir-y, and add descend rules
133 @cat $(TOPDIR)/packages | grep -v '^#' | \ 136 @cat $(TOPDIR)/packages | grep -v '^#' | \
134 awk '{print \ 137 awk '{print \
135 ".PHONY : " $$2 "\n" \ 138 ".PHONY : " $$2 "\n" \
136 "subdir-$$(" $$1 ") += " $$2 "\n\n"; \ 139 "subdir-$$(" $$1 ") += " $$2 "\n\n"; \
137 print $$2 " : " $$2 "/Makefile\n\t+$$(call descend,$$@,$(filter-out $$@,$$(filter-out $$@,$$(MAKECMDGOALS))))\n"; }' > $(TOPDIR)/.depends 140 print $$2 " : " $$2 "/Makefile\n\t+$$(call descend,$$@,$(filter-out $$@,$$(filter-out $$@,$$(MAKECMDGOALS))))\n"; }' > $(TOPDIR)/.depends
138 cat $(TOPDIR)/packages | grep -v '^#' | \ 141 cat $(TOPDIR)/packages | grep -v '^#' | \
139 perl -ne '($$cfg, $$dir, $$pro) = $$_ =~ /^(\S+)\s+(\S+)\s+(\S+)/; if ( -e "$$dir/$$pro" ) { print "$$dir/Makefile : $$dir/$$pro \$$(QMAKE) \$$(OPIEDIR)/gen.pro \$$(OPIEDIR)/.config\n\t\$$(call makefilegen,\$$@)\n\n"; }' \ 142 perl -ne '($$cfg, $$dir, $$pro) = $$_ =~ /^(\S+)\s+(\S+)\s+(\S+)/; if ( -e "$$dir/$$pro" ) { print "$$dir/Makefile : $$dir/$$pro \$$(QMAKE) \$$(OPIEDIR)/gen.pro \$$(OPIEDIR)/.config\n\t\$$(call makefilegen,\$$@)\n\n"; }' \
140 >> $(TOPDIR)/.depends 143 >> $(TOPDIR)/.depends
141# interpackage dependency generation 144# interpackage dependency generation
diff --git a/dependencies.in b/dependencies.in
index 357d994..4c758d3 100644
--- a/dependencies.in
+++ b/dependencies.in
@@ -85,12 +85,20 @@
85 config LIBBLUEZ_DEP 85 config LIBBLUEZ_DEP
86 boolean "Have bluez library" 86 boolean "Have bluez library"
87 default "n" 87 default "n"
88 88
89 config LIBBLUEZ_LIB_DIR 89 config LIBBLUEZ_LIB_DIR
90 string "libbluez library dir" 90 string "libbluez library dir"
91 depends LIBBLUEZ_DEP 91 depends LIBBLUEZ_DEP
92 92
93 config LIBBLUEZ_INC_DIR 93 config LIBBLUEZ_INC_DIR
94 string "libbluez include dir" 94 string "libbluez include dir"
95 depends LIBBLUEZ_DEP 95 depends LIBBLUEZ_DEP
96 96
97 config LIBFREETYPE2_DEP
98 boolean "Have freetype2"
99 default "n"
100
101 config LIBFREETYPE2_INC_DIR
102 string "freetype2 include dir"
103 depends LIBFREETYPE2_DEP
104
diff --git a/freetype/config.in b/freetype/config.in
index 68b659a..16d00eb 100644
--- a/freetype/config.in
+++ b/freetype/config.in
@@ -1,4 +1,4 @@
1 config FREETYPE 1 config FREETYPE
2 boolean "opie-freetype (support for fonts used via the freetype library)" 2 boolean "opie-freetype (support for fonts used via the freetype library)"
3 default "y" 3 default "y"
4 depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE 4 depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBFREETYPE2_DEP
diff --git a/freetype/fontfactoryttf_qws.cpp b/freetype/fontfactoryttf_qws.cpp
index 1ed0d2c..6d41c33 100644
--- a/freetype/fontfactoryttf_qws.cpp
+++ b/freetype/fontfactoryttf_qws.cpp
@@ -26,24 +26,28 @@ using namespace Opie::Core;
26#ifdef QT_NO_FREETYPE 26#ifdef QT_NO_FREETYPE
27 27
28#include "qfontdata_p.h" 28#include "qfontdata_p.h"
29#include <string.h> 29#include <string.h>
30#include <stdio.h> 30#include <stdio.h>
31 31
32#define FLOOR(x) ((x) & -64) 32#define FLOOR(x) ((x) & -64)
33#define CEIL(x) (((x)+63) & -64) 33#define CEIL(x) (((x)+63) & -64)
34#define TRUNC(x) ((x) >> 6) 34#define TRUNC(x) ((x) >> 6)
35 35
36 36
37extern "C" { 37extern "C" {
38
39#include <ft2build.h>
40#include FT_FREETYPE_H
41
38#include <freetype/freetype.h> 42#include <freetype/freetype.h>
39#include <freetype/ftglyph.h> 43#include <freetype/ftglyph.h>
40#include <freetype/ftoutln.h> 44#include <freetype/ftoutln.h>
41#include <freetype/ftbbox.h> 45#include <freetype/ftbbox.h>
42} 46}
43 47
44class QDiskFontFT : public QDiskFontPrivate { 48class QDiskFontFT : public QDiskFontPrivate {
45public: 49public:
46 FT_Face face; 50 FT_Face face;
47}; 51};
48 52
49class QRenderedFontFT : public QRenderedFont { 53class QRenderedFontFT : public QRenderedFont {
diff --git a/freetype/fontfactoryttf_qws.h b/freetype/fontfactoryttf_qws.h
index ff0fcfc..ddf5b57 100644
--- a/freetype/fontfactoryttf_qws.h
+++ b/freetype/fontfactoryttf_qws.h
@@ -24,24 +24,28 @@
24 24
25#include <qfontmanager_qws.h> 25#include <qfontmanager_qws.h>
26#if QT_VERSION >= 0x030000 26#if QT_VERSION >= 0x030000
27# include <private/qfontdata_p.h> 27# include <private/qfontdata_p.h>
28#else 28#else
29# include "qfontdata_p.h" 29# include "qfontdata_p.h"
30#endif 30#endif
31 31
32 32
33#ifdef QT_NO_FREETYPE 33#ifdef QT_NO_FREETYPE
34 34
35extern "C" { 35extern "C" {
36
37#include <ft2build.h>
38#include FT_FREETYPE_H
39
36#include <freetype/freetype.h> 40#include <freetype/freetype.h>
37} 41}
38 42
39// ascent, descent, width(ch), width(string), maxwidth? 43// ascent, descent, width(ch), width(string), maxwidth?
40// leftbearing, rightbearing, minleftbearing,minrightbearing 44// leftbearing, rightbearing, minleftbearing,minrightbearing
41// leading 45// leading
42 46
43class QFontFactoryFT : public QFontFactory { 47class QFontFactoryFT : public QFontFactory {
44 48
45public: 49public:
46 50
47 QFontFactoryFT(); 51 QFontFactoryFT();
diff --git a/freetype/freetype.pro b/freetype/freetype.pro
index c409577..87aaf9e 100644
--- a/freetype/freetype.pro
+++ b/freetype/freetype.pro
@@ -1,13 +1,17 @@
1 TEMPLATE= lib 1 TEMPLATE= lib
2 CONFIG += qt warn_on 2 CONFIG += qt warn_on
3 HEADERS = fontfactoryttf_qws.h freetypefactoryimpl.h 3 HEADERS = fontfactoryttf_qws.h freetypefactoryimpl.h
4 SOURCES = fontfactoryttf_qws.cpp freetypefactoryimpl.cpp 4 SOURCES = fontfactoryttf_qws.cpp freetypefactoryimpl.cpp
5 qt2:HEADERS+= qfontdata_p.h 5 qt2:HEADERS+= qfontdata_p.h
6 TARGET = freetypefactory 6 TARGET = freetypefactory
7 DESTDIR = $(OPIEDIR)/plugins/fontfactories 7 DESTDIR = $(OPIEDIR)/plugins/fontfactories
8 INCLUDEPATH+= $(QTDIR)/src/3rdparty/freetype/include $(QTDIR)/src/3rdparty/freetype/include/freetype/config $(OPIEDIR)/include 8 INCLUDEPATH+= $(OPIEDIR)/include
9DEPENDPATH += $(OPIEDIR)/include 9DEPENDPATH += $(OPIEDIR)/include
10LIBS += -lqpe -lfreetype -lopiecore2 10LIBS += -lqpe -lfreetype -lopiecore2
11 VERSION = 1.0.1 11 VERSION = 1.0.1
12 12
13include( $(OPIEDIR)/include.pro ) 13include( $(OPIEDIR)/include.pro )
14
15!isEmpty( LIBFREETYPE2_INC_DIR ) {
16 INCLUDEPATH = $$LIBFREETYPE2_INC_DIR $$INCLUDEPATH
17}
diff --git a/mkspecs/qws/linux-oe-g++/qmake.conf b/mkspecs/qws/linux-oe-g++/qmake.conf
index 90166b0..72bb489 100644
--- a/mkspecs/qws/linux-oe-g++/qmake.conf
+++ b/mkspecs/qws/linux-oe-g++/qmake.conf
@@ -1,25 +1,25 @@
1# 1#
2# $Id$ 2# $Id$
3# 3#
4# qmake configuration for linux-g++ using the arm-linux-g++ crosscompiler 4# qmake configuration for linux-g++ using the arm-linux-g++ crosscompiler
5# 5#
6 6
7 MAKEFILE_GENERATOR= UNIX 7 MAKEFILE_GENERATOR= UNIX
8 TEMPLATE = app 8 TEMPLATE = app
9 CONFIG += qt link_prl 9 CONFIG += qt link_prl
10 10
11STAGING_BINDIR = $(OEDIR)/tmp/staging/$(OEHOSTSYS)/bin 11STAGING_BINDIR = $(OEDIR)/tmp/staging/$(OEHOSTSYS)/bin
12STAGING_CROSSDIR = $(OEDIR)/tmp/cross/bin 12STAGING_CROSSDIR = $(OEDIR)/tmp/cross/bin
13STAGING_INCDIR = $(OEDIR)/tmp/staging/arm-linux/include 13STAGING_INCDIR = $(OEDIR)/tmp/staging/arm-linux/include $(OEDIR)/tmp/staging/arm-linux/include/freetype2/include
14STAGING_LIBDIR = $(OEDIR)/tmp/staging/arm-linux/lib 14STAGING_LIBDIR = $(OEDIR)/tmp/staging/arm-linux/lib
15 15
16 QMAKE_CC = $(CCACHE) $(DISTCC) $$STAGING_CROSSDIR/arm-linux-gcc 16 QMAKE_CC = $(CCACHE) $(DISTCC) $$STAGING_CROSSDIR/arm-linux-gcc
17 QMAKE_LEX = flex 17 QMAKE_LEX = flex
18 QMAKE_LEXFLAGS = 18 QMAKE_LEXFLAGS =
19 QMAKE_YACC = yacc 19 QMAKE_YACC = yacc
20 QMAKE_YACCFLAGS = -d 20 QMAKE_YACCFLAGS = -d
21 QMAKE_CFLAGS = -pipe $(CFLAGS_EXTRA) 21 QMAKE_CFLAGS = -pipe $(CFLAGS_EXTRA)
22 QMAKE_CFLAGS_WARN_ON= -Wall -W 22 QMAKE_CFLAGS_WARN_ON= -Wall -W
23 QMAKE_CFLAGS_WARN_OFF= 23 QMAKE_CFLAGS_WARN_OFF=
24 QMAKE_CFLAGS_RELEASE= $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O2) 24 QMAKE_CFLAGS_RELEASE= $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O2)
25 QMAKE_CFLAGS_DEBUG= -g 25 QMAKE_CFLAGS_DEBUG= -g