summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2006-11-26 11:54:19 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2006-11-26 11:54:19 +0000
commit61fda81ebb25022ff5b1ca8b5bb1b2f0547b3873 (patch)
tree02a456202b5b2d7f91b30dd78d06f4fd9ba49551 /lib
parent6495477d13d8d1838b5148ebac4204d56658b390 (diff)
build infrastructure and OpenBSD customisation for Freetype 2.2.1
Diffstat (limited to 'lib')
-rw-r--r--lib/freetype/Makefile100
-rw-r--r--lib/freetype/include/Makefile6
-rw-r--r--lib/freetype/include/freetype/Makefile21
-rw-r--r--lib/freetype/include/freetype/Makefile.inc14
-rw-r--r--lib/freetype/include/freetype/config/Makefile7
-rw-r--r--lib/freetype/include/freetype/config/ftoption.h4
-rw-r--r--lib/freetype/include/freetype/internal/Makefile13
-rw-r--r--lib/freetype/include/freetype/internal/services/Makefile9
-rw-r--r--lib/freetype/shlib_version2
9 files changed, 149 insertions, 27 deletions
diff --git a/lib/freetype/Makefile b/lib/freetype/Makefile
index c1fa16cee..f88e2d131 100644
--- a/lib/freetype/Makefile
+++ b/lib/freetype/Makefile
@@ -1,34 +1,84 @@
-#
-# FreeType 2 build system -- top-level Makefile
-#
+# $Xenocara: Makefile,v 1.8 2006/04/17 21:35:40 matthieu Exp $
+FREETYPESRC= ${.CURDIR}/src
-# Copyright 1996-2000, 2002, 2006 by
-# David Turner, Robert Wilhelm, and Werner Lemberg.
-#
-# This file is part of the FreeType project, and may only be used, modified,
-# and distributed under the terms of the FreeType project license,
-# LICENSE.TXT. By continuing to use, modify, or distribute this file you
-# indicate that you have read the license and understand and accept it
-# fully.
+.ifmake includes
+SUBDIR= include
+.endif
+LIB= freetype
-# Project names
-#
-PROJECT := freetype
-PROJECT_TITLE := FreeType
+SRCS= ftapi.c ftbase.c ftbbox.c ftbdf.c ftbitmap.c ftdebug.c ftglyph.c \
+ ftinit.c ftlzw.c ftmm.c ftpfr.c ftstroke.c ftsynth.c ftsystem.c \
+ fttype1.c ftwinfnt.c ftxf86.c autofit.c bdf.c cff.c \
+ type1cid.c ftgzip.c pcf.c pfr.c psaux.c pshinter.c psnames.c \
+ raster.c sfnt.c smooth.c truetype.c type1.c type42.c winfnt.c
-# The variable TOP_DIR holds the path to the topmost directory in the project
-# engine source hierarchy. If it is not defined, default it to `.'.
-#
-TOP_DIR ?= .
+CPPFLAGS+= -I${.CURDIR}/include -I${.CURDIR}/src/lzw -DFT2_BUILD_LIBRARY
-# The variable OBJ_DIR gives the location where object files and the
-# FreeType library are built.
-#
-OBJ_DIR ?= $(TOP_DIR)/objs
+CLEANFILES+= freetype-config freetype2.pc
+build:
+ cd ${.CURDIR} && ${MAKE} clean
+ cd ${.CURDIR} && ${SUDO} ${MAKE} includes
+ cd ${.CURDIR} && ${MAKE} all
+ cd ${.CURDIR} && ${SUDO} ${MAKE} install
-include $(TOP_DIR)/builds/toplevel.mk
+includes:: _SUBDIRUSE
+ @cmp -s ${DESTDIR}${X11BASE}/include/ft2build.h \
+ ${.CURDIR}/builds/unix/ft2unix.h || \
+ ${INSTALL} ${INSTALL_COPY} -m 444 -o $(BINOWN) -g $(BINGRP) \
+ ${.CURDIR}/builds/unix/ft2unix.h \
+ ${DESTDIR}${X11BASE}/include/ft2build.h
+
+includes:: freetype2.pc
+ ${INSTALL} ${INSTALL_COPY} -m 444 -o $(BINOWN) -g $(BINGRP) \
+ freetype2.pc ${DESTDIR}${X11BASE}/lib/pkgconfig
+
+includes:: freetype-config
+ ${INSTALL} ${INSTALL_COPY} -m 755 -o $(BINOWN) -g $(BINGRP) \
+ freetype-config ${DESTDIR}${X11BASE}/bin
+
+freetype2.pc: freetype2.in
+ sed -e s%@prefix@%${X11BASE}% -e s%@exec_prefix@%${XORG_PREFIX}% \
+ -e s%@includedir@%${INCSDIR}% -e s%@libdir@%${LIBDIR}% \
+ -e s%@LIBZ@%-lz% < ${.CURDIR}/builds/unix/freetype2.in \
+ > freetype2.pc
+
+freetype-config: freetype-config.in
+ sed -e s%@prefix@%${X11BASE}% -e s%@exec_prefix@%${XORG_PREFIX}% \
+ -e s%@includedir@%${INCSDIR}% -e s%@libdir@%${LIBDIR}% \
+ -e s%@LIBZ@%-lz% -e s%@enable_shared@%yes% \
+ -e 's%@hardcode_libdir_flag_spec@%%' \
+ -e 's%@ft_version@%9.7.3%' -e 's%@wl@%%' \
+ < ${.CURDIR}/builds/unix/freetype-config.in \
+ > freetype-config
+
+.include <bsd.lib.mk>
+.include <bsd.xorg.mk>
+
+.PATH: ${FREETYPESRC}/autofit
+.PATH: ${FREETYPESRC}/base
+.PATH: ${FREETYPESRC}/bdf
+.PATH: ${FREETYPESRC}/cff
+.PATH: ${FREETYPESRC}/cid
+.PATH: ${FREETYPESRC}/gzip
+.PATH: ${FREETYPESRC}/lzw
+.PATH: ${FREETYPESRC}/pcf
+.PATH: ${FREETYPESRC}/pfr
+.PATH: ${FREETYPESRC}/psaux
+.PATH: ${FREETYPESRC}/pshinter
+.PATH: ${FREETYPESRC}/psnames
+.PATH: ${FREETYPESRC}/raster
+.PATH: ${FREETYPESRC}/sfnt
+.PATH: ${FREETYPESRC}/smooth
+.PATH: ${FREETYPESRC}/truetype
+.PATH: ${FREETYPESRC}/type1
+.PATH: ${FREETYPESRC}/type42
+.PATH: ${FREETYPESRC}/winfonts
+.PATH: ${.CURDIR}
+.PATH: ${.CURDIR}/builds/unix
+
+
+.include <bsd.subdir.mk>
-# EOF
diff --git a/lib/freetype/include/Makefile b/lib/freetype/include/Makefile
new file mode 100644
index 000000000..42dea1f05
--- /dev/null
+++ b/lib/freetype/include/Makefile
@@ -0,0 +1,6 @@
+# $Xenocara
+.include <bsd.own.mk>
+
+SUBDIR= freetype
+
+.include <bsd.subdir.mk>
diff --git a/lib/freetype/include/freetype/Makefile b/lib/freetype/include/freetype/Makefile
new file mode 100644
index 000000000..b4050345d
--- /dev/null
+++ b/lib/freetype/include/freetype/Makefile
@@ -0,0 +1,21 @@
+# $Xenocara: Makefile,v 1.5 2006/04/17 21:35:40 matthieu Exp $
+
+
+.include <bsd.xorg.mk>
+
+SUBDIR= config internal
+
+
+INCSDIR=${X11BASE}/include/freetype2/freetype
+
+INCS= freetype.h ftbbox.h ftbdf.h ftbitmap.h \
+ ftcache.h ftchapters.h fterrdef.h \
+ fterrors.h ftglyph.h ftgzip.h ftimage.h ftincrem.h ftlist.h \
+ ftlzw.h ftmac.h ftmm.h ftmodapi.h ftmoderr.h ftoutln.h ftpfr.h \
+ ftrender.h ftsizes.h ftsnames.h ftstroke.h ftsynth.h \
+ ftsystem.h fttrigon.h fttypes.h ftwinfnt.h ftxf86.h \
+ t1tables.h ttnameid.h tttables.h tttags.h ttunpat.h
+
+.include "Makefile.inc"
+.include <bsd.subdir.mk>
+
diff --git a/lib/freetype/include/freetype/Makefile.inc b/lib/freetype/include/freetype/Makefile.inc
new file mode 100644
index 000000000..68bbfa595
--- /dev/null
+++ b/lib/freetype/include/freetype/Makefile.inc
@@ -0,0 +1,14 @@
+includes: ${INCS} incinstall _SUBDIRUSE
+
+incinstall:
+ @cd ${DIST}; for i in ${INCS}; do \
+ j="cmp -s $$i ${DESTDIR}${INCSDIR}/$$i || \
+ ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 444 \
+ $$i ${DESTDIR}${INCSDIR}"; \
+ echo "\tinstalling $$i"; \
+ eval "$$j"; \
+ done
+
+.if !target(_SUBDIRUSE)
+_SUBDIRUSE:
+.endif
diff --git a/lib/freetype/include/freetype/config/Makefile b/lib/freetype/include/freetype/config/Makefile
new file mode 100644
index 000000000..54104dfa1
--- /dev/null
+++ b/lib/freetype/include/freetype/config/Makefile
@@ -0,0 +1,7 @@
+# $Xenocara: Makefile,v 1.6 2006/04/17 21:35:40 matthieu Exp $
+.include <bsd.xorg.mk>
+
+INCSDIR=${X11BASE}/include/freetype2/freetype/config
+
+INCS= ftconfig.h ftheader.h ftmodule.h ftoption.h ftstdlib.h
+
diff --git a/lib/freetype/include/freetype/config/ftoption.h b/lib/freetype/include/freetype/config/ftoption.h
index 62bcd505f..5d72e8293 100644
--- a/lib/freetype/include/freetype/config/ftoption.h
+++ b/lib/freetype/include/freetype/config/ftoption.h
@@ -143,7 +143,7 @@ FT_BEGIN_HEADER
/* Do not #undef this macro here since the build system might define */
/* it for certain configurations only. */
/* */
-/* #define FT_CONFIG_OPTION_SYSTEM_ZLIB */
+#define FT_CONFIG_OPTION_SYSTEM_ZLIB
/*************************************************************************/
@@ -436,7 +436,7 @@ FT_BEGIN_HEADER
/* Do not #undef this macro here, since the build system might */
/* define it for certain configurations only. */
/* */
-/* #define TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
+#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER
/*************************************************************************/
diff --git a/lib/freetype/include/freetype/internal/Makefile b/lib/freetype/include/freetype/internal/Makefile
new file mode 100644
index 000000000..2eace235a
--- /dev/null
+++ b/lib/freetype/include/freetype/internal/Makefile
@@ -0,0 +1,13 @@
+# $Xenocara: Makefile,v 1.5 2006/04/17 21:35:40 matthieu Exp $
+.include <bsd.xorg.mk>
+
+SUBDIR= services
+
+INCSDIR=${X11BASE}/include/freetype2/freetype/internal
+
+INCS= autohint.h ftcalc.h ftdebug.h ftdriver.h ftgloadr.h \
+ ftmemory.h ftobjs.h ftrfork.h ftserv.h ftstream.h \
+ fttrace.h ftvalid.h internal.h pcftypes.h psaux.h pshints.h \
+ sfnt.h t1types.h tttypes.h
+
+.include <bsd.subdir.mk>
diff --git a/lib/freetype/include/freetype/internal/services/Makefile b/lib/freetype/include/freetype/internal/services/Makefile
new file mode 100644
index 000000000..c05b4942f
--- /dev/null
+++ b/lib/freetype/include/freetype/internal/services/Makefile
@@ -0,0 +1,9 @@
+# $Xenocara: Makefile,v 1.5 2006/04/17 21:35:40 matthieu Exp $
+.include <bsd.xorg.mk>
+
+INCSDIR=${X11BASE}/include/freetype2/freetype/internal/services
+
+INCS= svbdf.h svgldict.h svkern.h svmm.h svpfr.h svpostnm.h svpscmap.h \
+ svpsinfo.h svsfnt.h svttcmap.h svtteng.h svwinfnt.h svxf86nm.h
+
+.include "../../Makefile.inc"
diff --git a/lib/freetype/shlib_version b/lib/freetype/shlib_version
new file mode 100644
index 000000000..d85251eba
--- /dev/null
+++ b/lib/freetype/shlib_version
@@ -0,0 +1,2 @@
+major=14
+minor=0