diff options
author | jlam <jlam@pkgsrc.org> | 2001-07-02 14:16:54 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2001-07-02 14:16:54 +0000 |
commit | ce1c571588f0a712b9a044dfc14016c9979582e2 (patch) | |
tree | 741e21fc8274c9edf7abe980b8d6897993518507 /graphics | |
parent | e6ddc645625ab76dd1d0c9215dfa9d9e3024bea9 (diff) | |
download | pkgsrc-ce1c571588f0a712b9a044dfc14016c9979582e2.tar.gz |
Copy the checks for built-in freetype2 and xpm into the buildlink.mk files
as they can't always use the logic in bsd.prefs.mk.
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/freetype2/buildlink.mk | 22 | ||||
-rw-r--r-- | graphics/xpm/buildlink.mk | 18 |
2 files changed, 32 insertions, 8 deletions
diff --git a/graphics/freetype2/buildlink.mk b/graphics/freetype2/buildlink.mk index a2ae6ca7a25..5836d7ea83e 100644 --- a/graphics/freetype2/buildlink.mk +++ b/graphics/freetype2/buildlink.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink.mk,v 1.5 2001/07/02 08:06:16 jlam Exp $ +# $NetBSD: buildlink.mk,v 1.6 2001/07/02 14:16:54 jlam Exp $ # # This Makefile fragment is included by packages that use freetype2. # @@ -18,11 +18,23 @@ FREETYPE2_BUILDLINK_MK= # defined .include "../../mk/bsd.buildlink.mk" BUILDLINK_DEPENDS.freetype2?= freetype2>=2.0.1 -CHECK_FREETYPE2= # defined +# Check if we got FreeType2 distributed with XFree86 4.x or if we need to +# depend on the freetype2 package. +# .include "../../mk/bsd.prefs.mk" +.if exists(${X11BASE}/include/freetype2/freetype/freetype.h) +_IS_BUILTIN_FREETYPE2!= ${EGREP} -c BuildFreetype2Library ${X11BASE}/lib/X11/config/X11.tmpl || ${TRUE} +.else +_IS_BUILTIN_FREETYPE2= 0 +.endif +.if ${_IS_BUILTIN_FREETYPE2} == "0" +_NEED_FREETYPE2= YES +.else +_NEED_FREETYPE2= NO +.endif -.if ${HAVE_BUILTIN_FREETYPE2} == "NO" +.if ${_NEED_FREETYPE2} == "YES" DEPENDS+= ${BUILDLINK_DEPENDS.freetype2}:../../graphics/freetype2 BUILDLINK_PREFIX.freetype2= ${LOCALBASE} .else @@ -39,7 +51,7 @@ BUILDLINK_FILES.freetype2+= lib/libfreetype.* BUILDLINK_TARGETS+= ${BUILDLINK_TARGETS.freetype2} BUILDLINK_TARGETS.freetype2= freetype2-buildlink -.if ${HAVE_BUILTIN_FREETYPE2} == "NO" +.if ${_NEED_FREETYPE2} == "YES" BUILDLINK_TARGETS.freetype2+= freetype2-buildlink-config-wrapper BUILDLINK_CONFIG.freetype2= ${LOCALBASE}/bin/freetype-config @@ -51,7 +63,7 @@ CONFIGURE_ENV+= FREETYPE_CONFIG="${FREETYPE_CONFIG}" .endif freetype2-buildlink-config-wrapper: _BUILDLINK_CONFIG_WRAPPER_USE -.endif # HAVE_BUILTIN_FREETYPE +.endif # _NEED_FREETYPE2 pre-configure: ${BUILDLINK_TARGETS.freetype2} freetype2-buildlink: _BUILDLINK_USE diff --git a/graphics/xpm/buildlink.mk b/graphics/xpm/buildlink.mk index 9ce7c2215a7..2fa947d92be 100644 --- a/graphics/xpm/buildlink.mk +++ b/graphics/xpm/buildlink.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink.mk,v 1.4 2001/07/02 08:05:06 jlam Exp $ +# $NetBSD: buildlink.mk,v 1.5 2001/07/02 14:16:55 jlam Exp $ # # This Makefile fragment is included by packages that use xpm. # @@ -16,11 +16,23 @@ XPM_BUILDLINK_MK= # defined .include "../../mk/bsd.buildlink.mk" BUILDLINK_DEPENDS.xpm?= xpm-3.4k -CHECK_XPM= # defined +# Check if we got Xpm distributed with XFree86 4.x or if we need to +# depend on the Xpm package. +# .include "../../mk/bsd.prefs.mk" +.if exists(${X11BASE}/include/X11/xpm.h) +_IS_BUILTIN_XPM!= ${EGREP} -c NormalLibXpm ${X11BASE}/lib/X11/config/X11.tmpl || ${TRUE} +.else +_IS_BUILTIN_XPM= 0 +.endif +.if ${_IS_BUILTIN_XPM} == "0" +_NEED_XPM= YES +.else +_NEED_XPM= NO +.endif -.if ${HAVE_BUILTIN_XPM} == "NO" +.if ${_NEED_XPM} == "YES" DEPENDS+= ${BUILDLINK_DEPENDS.xpm}:../../graphics/xpm BUILDLINK_PREFIX.xpm= ${X11PREFIX} .else |