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 | |
parent | fc470397960fb47b86aad7911aa48f3fb942e4be (diff) | |
download | pkgsrc-c01995348352ebfefc461535e338b79a101b5792.tar.gz |
Add some buildlink3.mk files needed by x11-links>=0.13.
-rw-r--r-- | graphics/MesaLib/buildlink3.mk | 75 | ||||
-rw-r--r-- | graphics/freetype2/buildlink3.mk | 78 | ||||
-rw-r--r-- | graphics/xpm/buildlink3.mk | 84 | ||||
-rw-r--r-- | x11/Xrender/buildlink3.mk | 76 |
4 files changed, 313 insertions, 0 deletions
diff --git a/graphics/MesaLib/buildlink3.mk b/graphics/MesaLib/buildlink3.mk new file mode 100644 index 00000000000..8e16382a684 --- /dev/null +++ b/graphics/MesaLib/buildlink3.mk @@ -0,0 +1,75 @@ +# $NetBSD: buildlink3.mk,v 1.1 2003/09/02 07:12:16 jlam Exp $ + +.if !defined(MESALIB_BUILDLINK3_MK) +MESALIB_BUILDLINK3_MK= # defined +BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ + +.include "../../mk/bsd.prefs.mk" + +MESA_REQD?= 3.4.2 + +BUILDLINK_DEPENDS.MesaLib?= MesaLib>=${MESA_REQD} +BUILDLINK_PKGSRCDIR.MesaLib?= ../../graphics/MesaLib + +# 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.MesaLib?= NO + +_GL_GLX_H= ${X11BASE}/include/GL/glx.h +_X11_TMPL= ${X11BASE}/lib/X11/config/X11.tmpl + +.if !defined(BUILDLINK_IS_BUILTIN.MesaLib) +BUILDLINK_IS_BUILTIN.MesaLib= NO +. if exists(${_GL_GLX_H}) && exists(${_X11_TMPL}) +BUILDLINK_IS_BUILTIN.MesaLib!= \ + if ${GREP} -q BuildGLXLibrary ${_X11_TMPL}; then \ + ${ECHO} YES; \ + else \ + ${ECHO} NO; \ + fi +. endif +MAKEFLAGS+= BUILDLINK_IS_BUILTIN.MesaLib=${BUILDLINK_IS_BUILTIN.MesaLib} +.endif + +.if !empty(BUILDLINK_CHECK_BUILTIN.MesaLib:M[yY][eE][sS]) +_NEED_MESALIB= NO +.else +. if !empty(BUILDLINK_IS_BUILTIN.MesaLib:M[nN][oO]) +_NEED_MESALIB= 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. +# +. include "../../graphics/Mesa/version.mk" +_MESALIB_PKG= MesaLib-${_MESA_VERSION} +_MESALIB_DEPENDS= ${BUILDLINK_DEPENDS.MesaLib} +_NEED_MESALIB!= \ + if ${PKG_ADMIN} pmatch '${_MESALIB_DEPENDS}' ${_MESALIB_PKG}; then \ + ${ECHO} "NO"; \ + else \ + ${ECHO} "YES"; \ + fi +. endif +.endif + +.if ${_NEED_MESALIB} == "YES" +# +# If we depend on the package, depend on the latest version with a library +# major number bump. +# +BUILDLINK_DEPENDS.MesaLib= MesaLib>=5.0 +. if !empty(BUILDLINK_DEPTH:M\+) +BUILDLINK_DEPENDS+= MesaLib +. endif +BUILDLINK_PACKAGES+= MesaLib +BUILDLINK_CPPFLAGS.MesaLib= -DGLX_GLXEXT_LEGACY +.endif + +BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/\+$//} +.endif # MESALIB_BUILDLINK3_MK 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 diff --git a/graphics/xpm/buildlink3.mk b/graphics/xpm/buildlink3.mk new file mode 100644 index 00000000000..26b6b97fb51 --- /dev/null +++ b/graphics/xpm/buildlink3.mk @@ -0,0 +1,84 @@ +# $NetBSD: buildlink3.mk,v 1.1 2003/09/02 07:12:18 jlam Exp $ + +.if !defined(XPM_BUILDLINK3_MK) +XPM_BUILDLINK3_MK= # defined +BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ + +.include "../../mk/bsd.prefs.mk" + +BUILDLINK_DEPENDS.xpm?= xpm>=3.4k +BUILDLINK_PKGSRCDIR.xpm?= ../../graphics/xpm + +# 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.xpm?= NO + +_X11_XPM_H= ${X11BASE}/include/X11/xpm.h +_X11_TMPL= ${X11BASE}/lib/X11/config/X11.tmpl + +.if !defined(BUILDLINK_IS_BUILTIN.xpm) +BUILDLINK_IS_BUILTIN.xpm= NO +. if exists(${_X11_XPM_H}) +. if !empty(X11BASE:M*openwin) +BUILDLINK_IS_BUILTIN.xpm!= \ + if /usr/sbin/pkgchk -l SUNWxwinc | ${GREP} -q xpm.h; then \ + ${ECHO} YES; \ + else \ + ${ECHO} NO; \ + fi +. elif exists(${_X11_TMPL}) +BUILDLINK_IS_BUILTIN.xpm!= \ + if ${GREP} -q NormalLibXpm ${_X11_TMPL}; then \ + ${ECHO} YES; \ + else \ + ${ECHO} NO; \ + fi +. else +BUILDLINK_IS_BUILTIN.xpm= NO +. endif +. endif +MAKEFLAGS+= BUILDLINK_IS_BUILTIN.xpm=${BUILDLINK_IS_BUILTIN.xpm} +.endif + +.if !empty(BUILDLINK_CHECK_BUILTIN.xpm:M[yY][eE][sS]) +_NEED_XPM= NO +.else +. if !empty(BUILDLINK_IS_BUILTIN.xpm:M[nN][oO]) +_NEED_XPM= YES +. else +# +# Create an appropriate package name for the built-in xpm 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. +# +_XPM_MAJOR!= \ + ${AWK} '/\#define[ ]*XpmFormat/ { print $$3 }' ${_X11_XPM_H} +_XPM_MINOR!= \ + ${AWK} '/\#define[ ]*XpmVersion/ { print "."$$3 }' ${_X11_XPM_H} +_XPM_PATCH!= \ + ${AWK} 'BEGIN { split("abcdefghijklmnopqrstuvwxyz", alpha, "") } /\#define[ ]*XpmRevision/ { print alpha[$$3] }' ${_X11_XPM_H} +_XPM_VERSION= ${_XPM_MAJOR}${_XPM_MINOR}${_XPM_PATCH} +_XPM_PKG= xpm-${_XPM_VERSION} +_XPM_DEPENDS= ${BUILDLINK_DEPENDS.xpm} +_NEED_XPM!= \ + if ${PKG_ADMIN} pmatch '${_XPM_DEPENDS}' ${_XPM_PKG}; then \ + ${ECHO} "NO"; \ + else \ + ${ECHO} "YES"; \ + fi +. endif +.endif + +.if ${_NEED_XPM} == "YES" +. if !empty(BUILDLINK_DEPTH:M\+) +BUILDLINK_DEPENDS+= xpm +. endif +BUILDLINK_PACKAGES+= xpm +.endif + +BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/\+$//} +.endif # XPM_BUILDLINK3_MK diff --git a/x11/Xrender/buildlink3.mk b/x11/Xrender/buildlink3.mk new file mode 100644 index 00000000000..dcbf1aa157a --- /dev/null +++ b/x11/Xrender/buildlink3.mk @@ -0,0 +1,76 @@ +# $NetBSD: buildlink3.mk,v 1.1 2003/09/02 07:12:19 jlam Exp $ + +.if !defined(XRENDER_BUILDLINK3_MK) +XRENDER_BUILDLINK3_MK= # defined +BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ + +.include "../../mk/bsd.prefs.mk" + +BUILDLINK_DEPENDS.Xrender?= Xrender>=0.2 +BUILDLINK_PKGSRCDIR.Xrender?= ../../x11/Xrender + +# 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.Xrender?= NO + +_X11_EXTENSIONS_RENDER_H= ${X11BASE}/include/X11/extensions/render.h +_X11_TMPL= ${X11BASE}/lib/X11/config/X11.tmpl + +.if !defined(BUILDLINK_IS_BUILTIN.Xrender) +BUILDLINK_IS_BUILTIN.Xrender= NO +. if exists(${_X11_EXTENSIONS_RENDER_H}) && exists(${_X11_TMPL}) +BUILDLINK_IS_BUILTIN.Xrender!= \ + if ${GREP} -q BuildRenderLibrary ${_X11_TMPL}; then \ + ${ECHO} YES; \ + else \ + ${ECHO} NO; \ + fi +. endif +MAKEFLAGS+= BUILDLINK_IS_BUILTIN.Xrender=${BUILDLINK_IS_BUILTIN.Xrender} +.endif + +.if !empty(BUILDLINK_CHECK_BUILTIN.Xrender:M[yY][eE][sS]) +_NEED_XRENDER= NO +.else +. if !empty(BUILDLINK_IS_BUILTIN.Xrender:M[nN][oO]) +_NEED_XRENDER= YES +. else +# +# Create an appropriate package name for the built-in Xrender 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. +# +_XRENDER_MAJOR!= \ + ${AWK} '/\#define[ ]*RENDER_MAJOR/ { print $$3 }' ${_X11_EXTENSIONS_RENDER_H} +_XRENDER_MINOR!= \ + ${AWK} '/\#define[ ]*RENDER_MINOR/ { print "."$$3 }' ${_X11_EXTENSIONS_RENDER_H} +_XRENDER_VERSION= ${_XRENDER_MAJOR}${_XRENDER_MINOR} +_XRENDER_PKG= Xrender-${_XRENDER_VERSION} +_XRENDER_DEPENDS= ${BUILDLINK_DEPENDS.Xrender} +_NEED_XRENDER!= \ + if ${PKG_ADMIN} pmatch '${_XRENDER_DEPENDS}' ${_XRENDER_PKG}; then \ + ${ECHO} "NO"; \ + else \ + ${ECHO} "YES"; \ + fi +. endif +.endif + +.if ${_NEED_XRENDER} == "YES" +# +# If we depend on the package, depend on the latest version with a library +# major number bump. +# +BUILDLINK_DEPENDS.Xrender= Xrender>=0.7 +. if !empty(BUILDLINK_DEPTH:M\+) +BUILDLINK_DEPENDS+= Xrender +. endif +BUILDLINK_PACKAGES+= Xrender +.endif + +BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/\+$//} +.endif # XRENDER_BUILDLINK3_MK |