diff options
author | jlam <jlam@pkgsrc.org> | 2003-09-02 07:12:16 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2003-09-02 07:12:16 +0000 |
commit | c01995348352ebfefc461535e338b79a101b5792 (patch) | |
tree | f42bdfb851a85ba9f8fea9806d0ab808804a0ec9 /graphics/freetype2 | |
parent | fc470397960fb47b86aad7911aa48f3fb942e4be (diff) | |
download | pkgsrc-c01995348352ebfefc461535e338b79a101b5792.tar.gz |
Add some buildlink3.mk files needed by x11-links>=0.13.
Diffstat (limited to 'graphics/freetype2')
-rw-r--r-- | graphics/freetype2/buildlink3.mk | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/graphics/freetype2/buildlink3.mk b/graphics/freetype2/buildlink3.mk new file mode 100644 index 00000000000..d75e715c41f --- /dev/null +++ b/graphics/freetype2/buildlink3.mk @@ -0,0 +1,78 @@ +# $NetBSD: buildlink3.mk,v 1.1 2003/09/02 07:12:17 jlam Exp $ + +.if !defined(FREETYPE2_BUILDLINK3_MK) +FREETYPE2_BUILDLINK3_MK= # defined +BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ + +.include "../../mk/bsd.prefs.mk" + +BUILDLINK_DEPENDS.freetype2?= freetype2>=2.0.1 +BUILDLINK_PKGSRCDIR.freetype2?= ../../graphics/freetype2 + +# If BUILDLINK_CHECK_BUILTIN.<pkg> is "YES", then _only_ run the check +# to see whether this is builtin to the system. The result can be found +# by checking the value of BUILDLINK_IS_BUILTIN.<pkg> (either "YES" or +# "NO"). +# +BUILDLINK_CHECK_BUILTIN.freetype2?= NO + +_FREETYPE2_FREETYPE_H= ${X11BASE}/include/freetype2/freetype/freetype.h +_X11_TMPL= ${X11BASE}/lib/X11/config/X11.tmpl + +.if !defined(BUILDLINK_IS_BUILTIN.freetype2) +BUILDLINK_IS_BUILTIN.freetype2= NO +. if exists(${_FREETYPE2_FREETYPE_H}) && exists(${_X11_TMPL}) +BUILDLINK_IS_BUILTIN.freetype2!= \ + if ${GREP} -q BuildFreetype2Library ${_X11_TMPL}; then \ + ${ECHO} YES; \ + else \ + ${ECHO} NO; \ + fi +. endif +MAKEFLAGS+= BUILDLINK_IS_BUILTIN.freetype2=${BUILDLINK_IS_BUILTIN.freetype2} +.endif + +.if !empty(BUILDLINK_CHECK_BUILTIN.freetype2:M[yY][eE][sS]) +_NEED_FREETYPE2= NO +.else +. if !empty(BUILDLINK_IS_BUILTIN.freetype2:M[nN][oO]) +_NEED_FREETYPE2= YES +. else +# +# Create an appropriate package name for the built-in freetype2 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. +# +_FREETYPE2_MAJOR!= \ + ${AWK} '/\#define[ ]*FREETYPE_MAJOR/ { print $$3 }' ${_FREETYPE2_FREETYPE_H} +_FREETYPE2_MINOR!= \ + ${AWK} '/\#define[ ]*FREETYPE_MINOR/ { print "."$$3 }' ${_FREETYPE2_FREETYPE_H} +_FREETYPE2_PATCH!= \ + ${AWK} 'BEGIN { patch=0; } /\#define[ ]*FREETYPE_PATCH/ { patch=$$3; } END { print "."patch; }' ${_FREETYPE2_FREETYPE_H} +_FREETYPE2_VERSION= ${_FREETYPE2_MAJOR}${_FREETYPE2_MINOR}${_FREETYPE2_PATCH} +_FREETYPE2_PKG= freetype2-${_FREETYPE2_VERSION} +_FREETYPE2_DEPENDS= ${BUILDLINK_DEPENDS.freetype2} +_NEED_FREETYPE2!= \ + if ${PKG_ADMIN} pmatch '${_FREETYPE2_DEPENDS}' ${_FREETYPE2_PKG}; then \ + ${ECHO} "NO"; \ + else \ + ${ECHO} "YES"; \ + fi +. endif +.endif + +.if ${_NEED_FREETYPE2} == "YES" +# +# If we depend on the package, depend on the latest version with a library +# major number bump. +# +BUILDLINK_DEPENDS.freetype2= freetype2>=2.1.3 +. if !empty(BUILDLINK_DEPTH:M\+) +BUILDLINK_DEPENDS+= freetype2 +. endif +BUILDLINK_PACKAGES+= freetype2 +.endif + +BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/\+$//} +.endif # FREETYPE2_BUILDLINK3_MK |