summaryrefslogtreecommitdiff
Side-by-side diff
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
@@ -82,96 +82,99 @@ ifeq ($(CONFIG_QT_QWS_ALLOW_CLOCK),y)
echo DEFINES += QT_QWS_ALLOW_OVERCLOCK >> $@
endif
ifeq ($(CONFIG_OPIE_NEW_ALLOC),y)
echo DEFINES += OPIE_NEW_MALLOC >> $@
endif
ifeq ($(CONFIG_OPIE_NO_SOUND_PCM_READ_BITS),y)
echo DEFINES += OPIE_NO_SOUND_PCM_READ_BITS >> $@
endif
echo DEFINES += OPIE_SOUND_FRAGMENT_SHIFT=$(CONFIG_OPIE_SOUND_FRAGMENT_SHIFT) >> $@
ifeq ($(CONFIG_OPIE_WE_VERSION_OVERRIDE),y)
echo DEFINES += OPIE_WE_VERSION=$(CONFIG_OPIE_WE_VERSION) >> $@
endif
ifeq ($(CONFIG_OPIE_TASKBAR_LOCK_KEY_STATE),y)
echo DEFINES += OPIE_TASKBAR_LOCK_KEY_STATE >> $@
endif
# Write LIB dirs and INC dirs...
ifeq ($(CONFIG_LIBETPAN_DEP),y)
echo LIBETPAN_LIB_DIR = $(CONFIG_LIBETPAN_LIB_DIR) >> $@
echo LIBETPAN_INC_DIR = $(CONFIG_LIBETPAN_INC_DIR) >> $@
endif
ifeq ($(CONFIG_LIBPCAP_DEP),y)
echo LIBPCAP_LIB_DIR = $(CONFIG_LIBPCAP_LIB_DIR) >> $@
echo LIBPCAP_INC_DIR = $(CONFIG_LIBPCAP_INC_DIR) >> $@
endif
ifeq ($(CONFIG_LIBSQLITE_DEP),y)
echo LIBSQLITE_LIB_DIR = $(CONFIG_LIBSQLITE_LIB_DIR) >> $@
echo LIBSQLITE_INC_DIR = $(CONFIG_LIBSQLITE_INC_DIR) >> $@
endif
ifeq ($(CONFIG_LIBXINE_DEP),y)
echo LIBXINE_LIB_DIR = $(CONFIG_LIBXINE_LIB_DIR) >> $@
echo LIBXINE_INC_DIR = $(CONFIG_LIBXINE_INC_DIR) >> $@
endif
ifeq ($(CONFIG_LIBBLUEZ_DEP),y)
echo LIBBLUEZ_LIB_DIR = $(CONFIG_LIBBLUEZ_LIB_DIR) >> $@
echo LIBBLUEZ_INC_DIR = $(CONFIG_LIBBLUEZ_INC_DIR) >> $@
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
@cat $(TOPDIR)/packages | \
$(TOPDIR)/scripts/deps.pl >> $(TOPDIR)/.depends
$(TOPDIR)/.depends.cfgs:
# config.in interdependencies
@echo $(configs) | sed -e 's,/config.in,,g' | ( for i in `cat`; do echo $$i; done ) > dirs
@cat dirs | ( for i in `cat`; do if [ "`cat dirs|grep $$i 2>/dev/null|wc -l`" -ne "1" ]; then deps=`cat dirs|grep $$i| grep -v "^$$i$$"|for i in \`cat|sed -e's,^$(TOPDIR)/,$$(TOPDIR)/,g'\`; do echo $$i/config.in; done`; echo `echo $$i/config.in|sed -e 's,^$(TOPDIR)/,$$(TOPDIR)/,'` : $$deps; fi; done ) >> $@
@-rm -f dirs
$(QTDIR)/stamp-headers :
@-rm -f $(QTDIR)/stamp-headers*
( cd $(QTDIR)/include; \
$(patsubst %,ln -sf ../src/kernel/%;,qgfx_qws.h qwsmouse_qws.h \
qcopchannel_qws.h qwindowsystem_qws.h \
qfontmanager_qws.h qwsdefaultdecoration_qws.h))
touch $@
$(QTDIR)/stamp-headers-x11 :
@-rm -f $(QTDIR)/stamp-headers*
cd $(QTDIR)/include; $(patsubst %,ln -sf $(OPIEDIR)/x11/libqpe-x11/qt/%;,qgfx_qws.h qwsmouse_qws.h qcopchannel_qws.h qwindowsystem_qws.h qfontmanager_qws.h qwsdefaultdecoration_qws.h)
touch $@
$(OPIEDIR)/stamp-headers :
@-rm -f $(OPIEDIR)/stamp-headers*
mkdir -p $(TOPDIR)/include/qpe \
$(TOPDIR)/include/qtopia \
$(TOPDIR)/include/opie \
$(TOPDIR)/include/opie2 \
$(TOPDIR)/include/opie2/private \
$(TOPDIR)/include/qtopia/private \
$(TOPDIR)/include/sl
( cd include/qpe && rm -f *.h; ln -sf ../../library/*.h .; ln -sf ../../library/backend/*.h .; rm -f *_p.h; )
( cd include/qtopia && rm -f *.h; ln -sf ../../library/*.h .; )
( cd include/qtopia/private && rm -f *.h; ln -sf ../../../library/backend/*.h .; )
# libopie2
( cd include/opie2 && ln -sf ../../libopie2/opiecore/*.h .; )
diff --git a/dependencies.in b/dependencies.in
index 357d994..4c758d3 100644
--- a/dependencies.in
+++ b/dependencies.in
@@ -49,48 +49,56 @@
config LIBIPK_DEP
boolean "Have libipkg >= 0.99.120"
default "n"
config LIBIPK_LIB_DIR
string "libipkg library dir"
depends LIBIPK_DEP
config LIBIPK_INC_DIR
string "libipkg include dir"
depends LIBIPK_DEP
config LIBSDL_DEP
boolean "Have libsdl12 and sdlimage"
default "n"
config LIBSDL_LIB_DIR
string "LIBSDL library dir"
depends LIBSDL_DEP
config LIBSDL_INC_DIR
string "LIBSDL include dir"
depends LIBSDL_DEP
config LIBSWORD_DEP
boolean "Have libsword > = 1.5.0"
default "n"
config LIBSWORD_LIB_DIR
string "libsword library dir"
depends LIBSWORD_DEP
config LIBSWORD_INC_DIR
string "libsword include dir"
depends LIBSWORD_DEP
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
@@ -1,85 +1,89 @@
/**********************************************************************
** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
**
** This file is part of the Qtopia Environment.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#include "fontfactoryttf_qws.h"
#include <opie2/odebug.h>
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 {
public:
QRenderedFontFT(QDiskFont* f, const QFontDef &d) :
QRenderedFont(f,d)
{
QDiskFontFT *df = (QDiskFontFT*)(f->p);
myface=df->face;
selectThisSize();
// A 1-pixel baseline is excluded in Qt/Windows/X11 fontmetrics
// (see QFontMetrics::height())
//
fascent=CEIL(myface->size->metrics.ascender)/64;
fdescent=-FLOOR(myface->size->metrics.descender)/64-1;
fmaxwidth=CEIL(myface->size->metrics.max_advance)/64;
fleading=CEIL(myface->size->metrics.height)/64
- fascent - fdescent + 1;
// FT has these in font units
funderlinepos = ptsize/200+1;
funderlinewidth = ptsize/200+1;
}
~QRenderedFontFT()
{
// When inter-process glyph sharing is implemented, the glyph data
// for this font can be dereferenced here.
}
bool unicode(int & i) const
{
int ret;
FT_Face theface=myface;
ret=FT_Get_Char_Index(theface,i);
if (ret==0) {
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
@@ -1,63 +1,67 @@
/**********************************************************************
** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
**
** This file is part of the Qtopia Environment.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#ifndef FONTFACTORY_FT_H
#define FONTFACTORY_FT_H
#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();
virtual ~QFontFactoryFT();
QRenderedFont * get(const QFontDef &,QDiskFont *);
virtual void load(QDiskFont *) const;
virtual QString name();
private:
friend class QRenderedFontFT;
FT_Library library;
};
#endif // QT_NO_FREETYPE
#endif // QFONTFACTORY_FT_H
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,61 +1,61 @@
#
# $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
QMAKE_CFLAGS_SHLIB = -fPIC
QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
QMAKE_CFLAGS_THREAD = -D_REENTRANT
QMAKE_CXX = $(CCACHE) $(DISTCC) $$STAGING_CROSSDIR/arm-linux-g++ -DQT_QWS_SL5XX -DQT_QWS_SHARP -DQT_QWS_EBX -DQT_QWS_CUSTOM
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -DQWS -fno-exceptions -fno-rtti $(CXXFLAGS_EXTRA)
QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
QMAKE_INCDIR = $$STAGING_INCDIR
QMAKE_LIBDIR = $$STAGING_LIBDIR
QMAKE_INCDIR_X11 =
QMAKE_LIBDIR_X11 =
QMAKE_INCDIR_QT = $(QTDIR)/include
QMAKE_LIBDIR_QT = $(QTDIR)/lib
QMAKE_INCDIR_OPENGL =
QMAKE_LIBDIR_OPENGL =
QMAKE_INCDIR_QTOPIA =
QMAKE_LIBDIR_QTOPIA =
QMAKE_LINK = $$STAGING_CROSSDIR/arm-linux-g++
QMAKE_LINK_SHLIB = $$STAGING_CROSSDIR/arm-linux-g++
QMAKE_LFLAGS = $(LFLAGS_EXTRA)
QMAKE_LFLAGS_RELEASE =
QMAKE_LFLAGS_DEBUG =
QMAKE_LFLAGS_SHLIB = -shared
QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
QMAKE_LFLAGS_SONAME = -Wl,-soname,
QMAKE_LFLAGS_THREAD =
QMAKE_RPATH = -Wl,-rpath-link,