summaryrefslogtreecommitdiff
path: root/graphics/freetype2
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2004-08-05 02:51:09 +0000
committerjlam <jlam@pkgsrc.org>2004-08-05 02:51:09 +0000
commit6150201fb31b36a5cd619c59296fab288c3331aa (patch)
treeed924e5f455270aa355a933dfeace6d41fd7d876 /graphics/freetype2
parent6d66af44569bea5054cc169eb6da24df5a521be9 (diff)
downloadpkgsrc-6150201fb31b36a5cd619c59296fab288c3331aa.tar.gz
Convert to use bsd.options.mk.
Diffstat (limited to 'graphics/freetype2')
-rw-r--r--graphics/freetype2/Makefile47
1 files changed, 30 insertions, 17 deletions
diff --git a/graphics/freetype2/Makefile b/graphics/freetype2/Makefile
index 60fc262ddfd..efd3f517b7b 100644
--- a/graphics/freetype2/Makefile
+++ b/graphics/freetype2/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.35 2004/08/02 12:30:01 adam Exp $
+# $NetBSD: Makefile,v 1.36 2004/08/05 02:51:09 jlam Exp $
DISTNAME= freetype-2.1.9
PKGNAME= freetype2-2.1.9
@@ -17,10 +17,10 @@ COMMENT= Font rendering engine and library API
PKG_INSTALLATION_TYPES= overwrite pkgviews
-USE_BUILDLINK3= YES
-USE_LIBTOOL= YES
+USE_BUILDLINK3= yes
+USE_LIBTOOL= yes
USE_GNU_TOOLS+= grep make
-GNU_CONFIGURE= YES
+GNU_CONFIGURE= yes
CONFIGURE_DIRS= ${WRKSRC}/builds/unix
CONFIGURE_ARGS+= --includedir=${PREFIX}/include
@@ -29,35 +29,48 @@ PKGCONFIG_OVERRIDE= builds/unix/freetype2.in
.include "../../mk/bsd.prefs.mk"
.include "../../mk/compiler.mk"
-.if defined(MKTTINTERP) && \
- !empty(MKTTINTERP:M[yY][eE][sS])
-CFLAGS+= -DTT_CONFIG_OPTION_BYTECODE_INTERPRETER
+# Global and legacy options
+.if defined(MKTTINTERP)
+. if !defined(PKG_OPTIONS.freetype2)
+. if defined(MKTTINTERP) && !empty(MKTTINTERP:M[yY][eE][sS])
+PKG_OPTIONS.freetype2+= truetype
+. endif
+. endif
+.endif
+PKG_OPTIONS_VAR+= PKG_OPTIONS.freetype2
+PKG_SUPPORTED_OPTIONS= truetype
+.include "../../mk/bsd.options.mk"
+
+###
+### This builds freetype2 with the TrueType bytecode interpreter. Note
+### that there are important patent issues related to the use of the
+### interpreter:
+###
+### http://www.freetype.org/patents.html
+###
+.if !empty(PKG_OPTIONS:Mtruetype)
+CFLAGS+= -DTT_CONFIG_OPTION_BYTECODE_INTERPRETER
.endif
-BUILD_DEFS+= MKTTINTERP
# reduce optimization level on alpha to avoid compiler bugs
-.if ${OPSYS} == "NetBSD"
-. if ${MACHINE_ARCH} == "alpha"
+.if !empty(MACHINE_PLATFORM:MNetBSD-*-alpha)
CPPFLAGS:= ${CPPFLAGS:C/-O[0-9]*/-O/g}
CFLAGS:= ${CFLAGS:C/-O[0-9]*/-O/g}
CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}"
CONFIGURE_ENV+= CFLAGS="${CFLAGS}"
-. endif
.endif
-# source code breaks strict aliasing in gcc >= 2.95
-.if !empty(CC_VERSION:Mgcc-*)
-. if empty(CC_VERSION:Mgcc-2.*) \
- || !empty(CC_VERSION:Mgcc-2.95*)
+# source code breaks strict aliasing in gcc>=2.95
+.if !empty(CC_VERSION:Mgcc-[3-9]*) || !empty(CC_VERSION:Mgcc-2.95*)
CFLAGS+= -fno-strict-aliasing
-. endif
.endif
+.include "../../devel/zlib/buildlink3.mk"
+
post-configure:
cd ${WRKSRC} && ${LN} -s builds/unix/unix.mk config.mk
.if ${OPSYS} == "IRIX"
${MKDIR} ${WRKSRC}/.libs
.endif
-.include "../../devel/zlib/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"