diff options
Diffstat (limited to 'fonts/fontconfig')
-rw-r--r-- | fonts/fontconfig/buildlink3.mk | 120 | ||||
-rw-r--r-- | fonts/fontconfig/builtin.mk | 75 |
2 files changed, 86 insertions, 109 deletions
diff --git a/fonts/fontconfig/buildlink3.mk b/fonts/fontconfig/buildlink3.mk index f39cfb4e8c9..5ceb235e08f 100644 --- a/fonts/fontconfig/buildlink3.mk +++ b/fonts/fontconfig/buildlink3.mk @@ -1,121 +1,23 @@ -# $NetBSD: buildlink3.mk,v 1.14 2004/02/19 19:12:26 jlam Exp $ +# $NetBSD: buildlink3.mk,v 1.15 2004/03/10 17:57:14 jlam Exp $ -BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ +BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ FONTCONFIG_BUILDLINK3_MK:= ${FONTCONFIG_BUILDLINK3_MK}+ -.include "../../mk/bsd.prefs.mk" +.if !empty(BUILDLINK_DEPTH:M+) +BUILDLINK_DEPENDS+= fontconfig +.endif + +BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nfontconfig} +BUILDLINK_PACKAGES+= fontconfig .if !empty(FONTCONFIG_BUILDLINK3_MK:M+) -BUILDLINK_PACKAGES+= fontconfig BUILDLINK_DEPENDS.fontconfig+= fontconfig>=1.0.1 BUILDLINK_PKGSRCDIR.fontconfig?= ../../fonts/fontconfig -.endif # FONTCONFIG_BUILDLINK3_MK - -BUILDLINK_CHECK_BUILTIN.fontconfig?= NO - -_FONTCONFIG_FONTCONFIG_H= ${X11BASE}/include/fontconfig/fontconfig.h -_X11_TMPL= ${X11BASE}/lib/X11/config/X11.tmpl -.if !defined(BUILDLINK_IS_BUILTIN.fontconfig) -BUILDLINK_IS_BUILTIN.fontconfig= NO -. if exists(${_FONTCONFIG_FONTCONFIG_H}) && exists(${_X11_TMPL}) -_IS_BUILTIN.fontconfig!= \ - if ${GREP} -q BuildFontconfigLibrary ${_X11_TMPL}; then \ - ${ECHO} "YES"; \ - else \ - ${ECHO} "NO"; \ - fi -BUILDLINK_IS_BUILTIN.fontconfig= ${_IS_BUILTIN.fontconfig} -. if !empty(BUILDLINK_CHECK_BUILTIN.fontconfig:M[nN][oO]) && \ - !empty(_IS_BUILTIN.fontconfig:M[yY][eE][sS]) -# -# Create an appropriate package name for the built-in fontconfig distributed -# with the system. This package name can be used to check against -# BUILDLINK_DEPENDS.<pkg> to see if we need to install the pkgsrc version -# or if the built-in one is sufficient. -# -_FONTCONFIG_MAJOR!= \ - ${AWK} '/\#define[ ]*FC_MAJOR/ { print $$3 }' \ - ${_FONTCONFIG_FONTCONFIG_H} -_FONTCONFIG_MINOR!= \ - ${AWK} '/\#define[ ]*FC_MINOR/ { print $$3 }' \ - ${_FONTCONFIG_FONTCONFIG_H} -_FONTCONFIG_REVISION!= \ - ${AWK} '/\#define[ ]*FC_REVISION/ { print $$3 }' \ - ${_FONTCONFIG_FONTCONFIG_H} -_FONTCONFIG_VERSION= \ - ${_FONTCONFIG_MAJOR}.${_FONTCONFIG_MINOR}.${_FONTCONFIG_REVISION} -_FONTCONFIG_PKG= fontconfig-${_FONTCONFIG_VERSION} - -BUILDLINK_IS_BUILTIN.fontconfig?= YES -. for _depend_ in ${BUILDLINK_DEPENDS.fontconfig} -. if !empty(BUILDLINK_IS_BUILTIN.fontconfig:M[yY][eE][sS]) -BUILDLINK_IS_BUILTIN.fontconfig!= \ - if ${PKG_ADMIN} pmatch '${_depend_}' ${_FONTCONFIG_PKG}; then \ - ${ECHO} "YES"; \ - else \ - ${ECHO} "NO"; \ - fi -. endif -. endfor -. endif -. endif -MAKEFLAGS+= \ - BUILDLINK_IS_BUILTIN.fontconfig=${BUILDLINK_IS_BUILTIN.fontconfig} -.endif - -.if !empty(BUILDLINK_CHECK_BUILTIN.fontconfig:M[yY][eE][sS]) -BUILDLINK_USE_BUILTIN.fontconfig= YES -.endif +.include "../../devel/zlib/buildlink3.mk" +.include "../../graphics/freetype2/buildlink3.mk" +.include "../../textproc/expat/buildlink3.mk" -.if !defined(BUILDLINK_USE_BUILTIN.fontconfig) -. if !empty(BUILDLINK_IS_BUILTIN.fontconfig:M[yY][eE][sS]) -BUILDLINK_USE_BUILTIN.fontconfig= YES -. else -BUILDLINK_USE_BUILTIN.fontconfig= NO -. endif - -. if !empty(PREFER_NATIVE:M[yY][eE][sS]) && \ - !empty(BUILDLINK_IS_BUILTIN.fontconfig:M[yY][eE][sS]) -BUILDLINK_USE_BUILTIN.fontconfig= YES -. endif -. if !empty(PREFER_PKGSRC:M[yY][eE][sS]) -BUILDLINK_USE_BUILTIN.fontconfig= NO -. endif -. if !empty(PREFER_NATIVE:Mfontconfig) && \ - !empty(BUILDLINK_IS_BUILTIN.fontconfig:M[yY][eE][sS]) -BUILDLINK_USE_BUILTIN.fontconfig= YES -. endif -. if !empty(PREFER_PKGSRC:Mfontconfig) -BUILDLINK_USE_BUILTIN.fontconfig= NO -. endif -.endif - -.if !empty(BUILDLINK_USE_BUILTIN.fontconfig:M[nN][oO]) -BUILDLINK_DEPENDS.fontconfig+= fontconfig>=2.1nb2 -BUILDLINK_DEPENDS.freetype2+= freetype2>=2.1.3 -. if !empty(BUILDLINK_DEPTH:M+) -BUILDLINK_DEPENDS+= fontconfig -. endif -.endif - -.if !empty(BUILDLINK_USE_BUILTIN.fontconfig:M[yY][eE][sS]) -BUILDLINK_USE_BUILTIN.zlib= yes -BUILDLINK_USE_BUILTIN.freetype2= yes -BUILDLINK_USE_BUILTIN.expat= yes -.endif - -.if !empty(FONTCONFIG_BUILDLINK3_MK:M+) -. if !empty(BUILDLINK_USE_BUILTIN.fontconfig:M[yY][eE][sS]) -BUILDLINK_PREFIX.fontconfig= ${X11BASE} -BUILDLINK_FILES.fontconfig+= lib/pkgconfig/fontconfig.pc -. endif -USE_X11= yes -. if !empty(BUILDLINK_CHECK_BUILTIN.fontconfig:M[nN][oO]) -. include "../../devel/zlib/buildlink3.mk" -. include "../../graphics/freetype2/buildlink3.mk" -. include "../../textproc/expat/buildlink3.mk" -. endif .endif # FONTCONFIG_BUILDLINK3_MK BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//} diff --git a/fonts/fontconfig/builtin.mk b/fonts/fontconfig/builtin.mk new file mode 100644 index 00000000000..3a832e349bd --- /dev/null +++ b/fonts/fontconfig/builtin.mk @@ -0,0 +1,75 @@ +# $NetBSD: builtin.mk,v 1.1 2004/03/10 17:57:14 jlam Exp $ + +_FONTCONFIG_FONTCONFIG_H= ${X11BASE}/include/fontconfig/fontconfig.h +_X11_TMPL= ${X11BASE}/lib/X11/config/X11.tmpl + +.if !defined(IS_BUILTIN.fontconfig) +IS_BUILTIN.fontconfig= no +. if exists(${_FONTCONFIG_FONTCONFIG_H}) && exists(${_X11_TMPL}) +IS_BUILTIN.fontconfig!= \ + if ${GREP} -q BuildFontconfigLibrary ${_X11_TMPL}; then \ + ${ECHO} "yes"; \ + else \ + ${ECHO} "no"; \ + fi +. if !empty(IS_BUILTIN.fontconfig:M[yY][eE][sS]) +# +# Create an appropriate package name for the built-in fontconfig distributed +# with the system. This package name can be used to check against +# BUILDLINK_DEPENDS.<pkg> to see if we need to install the pkgsrc version +# or if the built-in one is sufficient. +# +_FONTCONFIG_MAJOR!= \ + ${AWK} '/\#define[ ]*FC_MAJOR/ { print $$3 }' \ + ${_FONTCONFIG_FONTCONFIG_H} +_FONTCONFIG_MINOR!= \ + ${AWK} '/\#define[ ]*FC_MINOR/ { print $$3 }' \ + ${_FONTCONFIG_FONTCONFIG_H} +_FONTCONFIG_REVISION!= \ + ${AWK} '/\#define[ ]*FC_REVISION/ { print $$3 }' \ + ${_FONTCONFIG_FONTCONFIG_H} +_FONTCONFIG_VERSION= \ + ${_FONTCONFIG_MAJOR}.${_FONTCONFIG_MINOR}.${_FONTCONFIG_REVISION} +BUILTIN_PKG.fontconfig= fontconfig-${_FONTCONFIG_VERSION} +MAKEFLAGS+= BUILTIN_PKG.fontconfig=${BUILTIN_PKG.fontconfig} +. endif +. endif +MAKEFLAGS+= IS_BUILTIN.fontconfig=${IS_BUILTIN.fontconfig} +.endif + +CHECK_BUILTIN.fontconfig?= no +.if !empty(CHECK_BUILTIN.fontconfig:M[yY][eE][sS]) +USE_BUILTIN.fontconfig= yes +.endif + +.if !defined(USE_BUILTIN.fontconfig) +USE_BUILTIN.fontconfig?= ${IS_BUILTIN.fontconfig} + +. if defined(BUILTIN_PKG.fontconfig) +USE_BUILTIN.fontconfig= yes +. for _depend_ in ${BUILDLINK_DEPENDS.fontconfig} +. if !empty(USE_BUILTIN.fontconfig:M[yY][eE][sS]) +USE_BUILTIN.fontconfig!= \ + if ${PKG_ADMIN} pmatch '${_depend_}' ${BUILTIN_PKG.fontconfig}; then \ + ${ECHO} "yes"; \ + else \ + ${ECHO} "no"; \ + fi +. endif +. endfor +. endif +.endif # USE_BUILTIN.fontconfig + +.if !empty(USE_BUILTIN.fontconfig:M[nN][oO]) +BUILDLINK_DEPENDS.fontconfig+= fontconfig>=2.1nb2 +BUILDLINK_DEPENDS.freetype2+= freetype2>=2.1.3 +.endif + +.if !empty(USE_BUILTIN.fontconfig:M[yY][eE][sS]) +BUILDLINK_PREFIX.fontconfig= ${X11BASE} +BUILDLINK_FILES.fontconfig+= lib/pkgconfig/fontconfig.pc + +USE_BUILTIN.expat= yes +USE_BUILTIN.freetype2= yes +USE_BUILTIN.zlib= yes +.endif |