-rw-r--r-- | Rules.make | 3 | ||||
-rw-r--r-- | dependencies.in | 8 | ||||
-rw-r--r-- | freetype/config.in | 2 | ||||
-rw-r--r-- | freetype/fontfactoryttf_qws.cpp | 4 | ||||
-rw-r--r-- | freetype/fontfactoryttf_qws.h | 4 | ||||
-rw-r--r-- | freetype/freetype.pro | 6 | ||||
-rw-r--r-- | mkspecs/qws/linux-oe-g++/qmake.conf | 2 |
7 files changed, 26 insertions, 3 deletions
@@ -118,24 +118,27 @@ endif ifeq ($(CONFIG_LIBIPK_DEP),y) echo LIBIPK_LIB_DIR = $(CONFIG_LIBIPK_LIB_DIR) >> $@ echo LIBIPK_INC_DIR = $(CONFIG_LIBIPK_INC_DIR) >> $@ endif ifeq ($(CONFIG_LIBSDK_DEP),y) echo LIBSDL_LIB_DIR = $(CONFIG_LIBSDL_LIB_DIR) >> $@ echo LIBSDL_INC_DIR = $(CONFIG_LIBSDL_INC_DIR) >> $@ endif ifeq ($(CONFIG_LIBSWORD_DEP),y) echo LIBSWORD_LIB_DIR = $(CONFIG_LIBSWORD_LIB_DIR) >> $@ echo LIBSWORD_INC_DIR = $(CONFIG_LIBSWORD_INC_DIR) >> $@ endif +ifeq ($(CONFIG_LIBFREETYPE2_DEP),y) + echo LIBFREETYPE2_INC_DIR = $(CONFIG_LIBFREETYPE2_INC_DIR) >> $@ +endif $(TOPDIR)/.depends : $(shell if [ -e $(TOPDIR)/config.in ]\; then echo $(TOPDIR)/config.in\; fi\;) $(TOPDIR)/.config $(TOPDIR)/packages @echo Generating dependency information... # add to subdir-y, and add descend rules @cat $(TOPDIR)/packages | grep -v '^#' | \ awk '{print \ ".PHONY : " $$2 "\n" \ "subdir-$$(" $$1 ") += " $$2 "\n\n"; \ print $$2 " : " $$2 "/Makefile\n\t+$$(call descend,$$@,$(filter-out $$@,$$(filter-out $$@,$$(MAKECMDGOALS))))\n"; }' > $(TOPDIR)/.depends cat $(TOPDIR)/packages | grep -v '^#' | \ 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"; }' \ >> $(TOPDIR)/.depends # 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 @@ config LIBBLUEZ_DEP boolean "Have bluez library" default "n" config LIBBLUEZ_LIB_DIR string "libbluez library dir" depends LIBBLUEZ_DEP config LIBBLUEZ_INC_DIR string "libbluez include dir" depends LIBBLUEZ_DEP + config LIBFREETYPE2_DEP + boolean "Have freetype2" + default "n" + + config LIBFREETYPE2_INC_DIR + string "freetype2 include dir" + depends LIBFREETYPE2_DEP + 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 @@ config FREETYPE boolean "opie-freetype (support for fonts used via the freetype library)" default "y" - depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE + 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; #ifdef QT_NO_FREETYPE #include "qfontdata_p.h" #include <string.h> #include <stdio.h> #define FLOOR(x) ((x) & -64) #define CEIL(x) (((x)+63) & -64) #define TRUNC(x) ((x) >> 6) extern "C" { + +#include <ft2build.h> +#include FT_FREETYPE_H + #include <freetype/freetype.h> #include <freetype/ftglyph.h> #include <freetype/ftoutln.h> #include <freetype/ftbbox.h> } class QDiskFontFT : public QDiskFontPrivate { public: FT_Face face; }; class 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 @@ #include <qfontmanager_qws.h> #if QT_VERSION >= 0x030000 # include <private/qfontdata_p.h> #else # include "qfontdata_p.h" #endif #ifdef QT_NO_FREETYPE extern "C" { + +#include <ft2build.h> +#include FT_FREETYPE_H + #include <freetype/freetype.h> } // ascent, descent, width(ch), width(string), maxwidth? // leftbearing, rightbearing, minleftbearing,minrightbearing // leading class QFontFactoryFT : public QFontFactory { public: 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 @@ TEMPLATE = lib CONFIG += qt warn_on HEADERS = fontfactoryttf_qws.h freetypefactoryimpl.h SOURCES = fontfactoryttf_qws.cpp freetypefactoryimpl.cpp qt2:HEADERS += qfontdata_p.h TARGET = freetypefactory DESTDIR = $(OPIEDIR)/plugins/fontfactories -INCLUDEPATH += $(QTDIR)/src/3rdparty/freetype/include $(QTDIR)/src/3rdparty/freetype/include/freetype/config $(OPIEDIR)/include +INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include LIBS += -lqpe -lfreetype -lopiecore2 VERSION = 1.0.1 include( $(OPIEDIR)/include.pro ) + +!isEmpty( LIBFREETYPE2_INC_DIR ) { + INCLUDEPATH = $$LIBFREETYPE2_INC_DIR $$INCLUDEPATH +} 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 @@ # # $Id$ # # qmake configuration for linux-g++ using the arm-linux-g++ crosscompiler # MAKEFILE_GENERATOR = UNIX TEMPLATE = app CONFIG += qt link_prl STAGING_BINDIR = $(OEDIR)/tmp/staging/$(OEHOSTSYS)/bin STAGING_CROSSDIR = $(OEDIR)/tmp/cross/bin -STAGING_INCDIR = $(OEDIR)/tmp/staging/arm-linux/include +STAGING_INCDIR = $(OEDIR)/tmp/staging/arm-linux/include $(OEDIR)/tmp/staging/arm-linux/include/freetype2/include STAGING_LIBDIR = $(OEDIR)/tmp/staging/arm-linux/lib QMAKE_CC = $(CCACHE) $(DISTCC) $$STAGING_CROSSDIR/arm-linux-gcc QMAKE_LEX = flex QMAKE_LEXFLAGS = QMAKE_YACC = yacc QMAKE_YACCFLAGS = -d QMAKE_CFLAGS = -pipe $(CFLAGS_EXTRA) QMAKE_CFLAGS_WARN_ON = -Wall -W QMAKE_CFLAGS_WARN_OFF = QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O2) QMAKE_CFLAGS_DEBUG = -g |