pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc Conform to latest buildlink3.mk guidelines using *_BUI...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/df5796a61c7a
branches:  trunk
changeset: 462288:df5796a61c7a
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Tue Sep 30 00:42:32 2003 +0000

description:
Conform to latest buildlink3.mk guidelines using *_BUILDLINK3_MK guards
to protect more parts of buildlink3.mk files against multiple inclusion.

diffstat:

 graphics/MesaLib/buildlink3.mk   |  30 +++++++++++++++++++-----------
 graphics/freetype2/buildlink3.mk |  27 ++++++++++++++++++---------
 graphics/glu/buildlink3.mk       |  28 ++++++++++++++++++----------
 graphics/xpm/buildlink3.mk       |  28 ++++++++++++++++++----------
 x11/Xrender/buildlink3.mk        |  30 +++++++++++++++++++-----------
 5 files changed, 92 insertions(+), 51 deletions(-)

diffs (truncated from 341 to 300 lines):

diff -r d949c94262aa -r df5796a61c7a graphics/MesaLib/buildlink3.mk
--- a/graphics/MesaLib/buildlink3.mk    Tue Sep 30 00:32:57 2003 +0000
+++ b/graphics/MesaLib/buildlink3.mk    Tue Sep 30 00:42:32 2003 +0000
@@ -1,13 +1,17 @@
-# $NetBSD: buildlink3.mk,v 1.6 2003/09/28 12:54:52 jlam Exp $
+# $NetBSD: buildlink3.mk,v 1.7 2003/09/30 00:42:32 jlam Exp $
 
 BUILDLINK_DEPTH:=      ${BUILDLINK_DEPTH}+
 
-.include "../../mk/bsd.prefs.mk"
+.if !defined(MESALIB_BUILDLINK3_MK)
+MESALIB_BUILDLINK3_MK= YES
+
+.  include "../../mk/bsd.prefs.mk"
 
 MESA_REQD?=            3.4.2
 
 BUILDLINK_DEPENDS.MesaLib?=    MesaLib>=${MESA_REQD}
 BUILDLINK_PKGSRCDIR.MesaLib?=  ../../graphics/MesaLib
+.endif # MESALIB_BUILDLINK3_MK
 
 BUILDLINK_CHECK_BUILTIN.MesaLib?=      NO
 
@@ -27,6 +31,10 @@
 MAKEFLAGS+=    BUILDLINK_IS_BUILTIN.MesaLib=${BUILDLINK_IS_BUILTIN.MesaLib}
 .endif
 
+.if !empty(BUILDLINK_CHECK_BUILTIN.MesaLib:M[yY][eE][sS])
+_NEED_MESALIB= NO
+.endif
+
 .if !defined(_NEED_MESALIB)
 .  if !empty(BUILDLINK_IS_BUILTIN.MesaLib:M[nN][oO])
 _NEED_MESALIB= YES
@@ -37,7 +45,7 @@
 # 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"
+.    include "../../graphics/Mesa/version.mk"
 _MESALIB_PKG=          MesaLib-${_MESA_VERSION}
 _MESALIB_DEPENDS=      ${BUILDLINK_DEPENDS.MesaLib}
 _NEED_MESALIB!=        \
@@ -47,12 +55,9 @@
                ${ECHO} "YES";                                          \
        fi
 .  endif
+MAKEFLAGS+=    _NEED_MESALIB="${_NEED_MESALIB}"
 .endif # _NEED_MESALIB
 
-.if !empty(BUILDLINK_CHECK_BUILTIN.MesaLib:M[yY][eE][sS])
-_NEED_MESALIB= NO
-.endif
-
 .if ${_NEED_MESALIB} == "YES"
 #
 # If we depend on the package, depend on the latest version with a library
@@ -62,12 +67,15 @@
 .  if !empty(BUILDLINK_DEPTH:M\+)
 BUILDLINK_DEPENDS+=            MesaLib
 .  endif
-.  if !defined(BUILDLINK_PACKAGES) || empty(BUILDLINK_PACKAGES:MMesaLib)
+.endif
+
+.if !defined(MESALIB_BUILDLINK3_MK)
+.  if ${_NEED_MESALIB} == "YES"
 BUILDLINK_PACKAGES+=           MesaLib
 BUILDLINK_CPPFLAGS.MesaLib=    -DGLX_GLXEXT_LEGACY
+.  else
+BUILDLINK_PREFIX.MesaLib=      ${X11BASE}
 .  endif
-.else
-BUILDLINK_PREFIX.MesaLib=      ${X11BASE}
-.endif
+.endif # MESALIB_BUILDLINK3_MK
 
 BUILDLINK_DEPTH:=      ${BUILDLINK_DEPTH:C/\+$//}
diff -r d949c94262aa -r df5796a61c7a graphics/freetype2/buildlink3.mk
--- a/graphics/freetype2/buildlink3.mk  Tue Sep 30 00:32:57 2003 +0000
+++ b/graphics/freetype2/buildlink3.mk  Tue Sep 30 00:42:32 2003 +0000
@@ -1,13 +1,15 @@
-# $NetBSD: buildlink3.mk,v 1.4 2003/09/14 01:47:51 jlam Exp $
+# $NetBSD: buildlink3.mk,v 1.5 2003/09/30 00:42:32 jlam Exp $
+
+BUILDLINK_DEPTH:=      ${BUILDLINK_DEPTH}+
 
 .if !defined(FREETYPE2_BUILDLINK3_MK)
-FREETYPE2_BUILDLINK3_MK=       # defined
-BUILDLINK_DEPTH:=      ${BUILDLINK_DEPTH}+
+FREETYPE2_BUILDLINK3_MK=       YES
 
-.include "../../mk/bsd.prefs.mk"
+.  include "../../mk/bsd.prefs.mk"
 
 BUILDLINK_DEPENDS.freetype2?=  freetype2>=2.0.1
 BUILDLINK_PKGSRCDIR.freetype2?=        ../../graphics/freetype2
+.endif # FREETYPE2_BUILDLINK3_MK
 
 BUILDLINK_CHECK_BUILTIN.freetype2?=    NO
 
@@ -29,7 +31,9 @@
 
 .if !empty(BUILDLINK_CHECK_BUILTIN.freetype2:M[yY][eE][sS])
 _NEED_FREETYPE2=       NO
-.else
+.endif
+
+.if !defined(_NEED_FREETYPE2)
 .  if !empty(BUILDLINK_IS_BUILTIN.freetype2:M[nN][oO])
 _NEED_FREETYPE2=       YES
 .  else
@@ -55,6 +59,7 @@
                ${ECHO} "YES";                                          \
        fi
 .  endif
+MAKEFLAGS+=    _NEED_FREETYPE2="${_NEED_FREETYPE2}"
 .endif
 
 .if ${_NEED_FREETYPE2} == "YES"
@@ -66,10 +71,14 @@
 .  if !empty(BUILDLINK_DEPTH:M\+)
 BUILDLINK_DEPENDS+=            freetype2
 .  endif
-BUILDLINK_PACKAGES+=           freetype2
-.else
-BUILDLINK_PREFIX.freetype2=    ${X11BASE}
 .endif
 
+.if !defined(FREETYPE2_BUILDLINK3_MK)
+.  if ${_NEED_FREETYPE2} == "YES"
+BUILDLINK_PACKAGES+=           freetype2
+.  else
+BUILDLINK_PREFIX.freetype2=    ${X11BASE}
+.  endif
+.endif # FREETYPE2_BUILDLINK3_MK
+
 BUILDLINK_DEPTH:=      ${BUILDLINK_DEPTH:C/\+$//}
-.endif # FREETYPE2_BUILDLINK3_MK
diff -r d949c94262aa -r df5796a61c7a graphics/glu/buildlink3.mk
--- a/graphics/glu/buildlink3.mk        Tue Sep 30 00:32:57 2003 +0000
+++ b/graphics/glu/buildlink3.mk        Tue Sep 30 00:42:32 2003 +0000
@@ -1,13 +1,17 @@
-# $NetBSD: buildlink3.mk,v 1.4 2003/09/28 12:54:52 jlam Exp $
+# $NetBSD: buildlink3.mk,v 1.5 2003/09/30 00:42:32 jlam Exp $
 
 BUILDLINK_DEPTH:=      ${BUILDLINK_DEPTH}+
 
-.include "../../mk/bsd.prefs.mk"
+.if !defined(GLU_BUILDLINK3_MK)
+GLU_BUILDLINK3_MK=     YES
+
+.  include "../../mk/bsd.prefs.mk"
 
 MESA_REQD?=            3.4.2
 
 BUILDLINK_DEPENDS.glu?=                glu>=${MESA_REQD}
 BUILDLINK_PKGSRCDIR.glu?=      ../../graphics/glu
+.endif # GLU_BUILDLINK3_MK
 
 BUILDLINK_CHECK_BUILTIN.glu?=  NO
 
@@ -27,6 +31,10 @@
 MAKEFLAGS+=    BUILDLINK_IS_BUILTIN.glu=${BUILDLINK_IS_BUILTIN.glu}
 .endif
 
+.if !empty(BUILDLINK_CHECK_BUILTIN.glu:M[yY][eE][sS])
+_NEED_GLU=     NO
+.endif
+
 .if !defined(_NEED_GLU)
 .  if !empty(BUILDLINK_IS_BUILTIN.glu:M[nN][oO])
 _NEED_GLU=     YES
@@ -37,7 +45,7 @@
 # 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"
+.    include "../../graphics/Mesa/version.mk"
 _GLU_PKG=      glu-${_MESA_VERSION}
 _GLU_DEPENDS=  ${BUILDLINK_DEPENDS.glu}
 _NEED_GLU!=    \
@@ -47,12 +55,9 @@
                ${ECHO} "YES";                                          \
        fi
 .  endif
+MAKEFLAGS+=    _NEED_GLU="${_NEED_GLU}"
 .endif # _NEED_GLU
 
-.if !empty(BUILDLINK_CHECK_BUILTIN.glu:M[yY][eE][sS])
-_NEED_GLU=     NO
-.endif
-
 .if ${_NEED_GLU} == "YES"
 #
 # If we depend on the package, depend on the latest version with a library
@@ -62,11 +67,14 @@
 .  if !empty(BUILDLINK_DEPTH:M\+)
 BUILDLINK_DEPENDS+=    glu
 .  endif
-.  if !defined(BUILDLINK_PACKAGES) || empty(BUILDLINK_PACKAGES:Mglu)
+.endif
+
+.if !defined(GLU_BUILDLINK3_MK)
+.  if ${_NEED_GLU} == "YES"
 BUILDLINK_PACKAGES+=   glu
+.  else
+BUILDLINK_PREFIX.glu=  ${X11BASE}
 .  endif
-.else
-BUILDLINK_PREFIX.glu=  ${X11BASE}
 .endif
 
 BUILDLINK_DEPTH:=      ${BUILDLINK_DEPTH:C/\+$//}
diff -r d949c94262aa -r df5796a61c7a graphics/xpm/buildlink3.mk
--- a/graphics/xpm/buildlink3.mk        Tue Sep 30 00:32:57 2003 +0000
+++ b/graphics/xpm/buildlink3.mk        Tue Sep 30 00:42:32 2003 +0000
@@ -1,11 +1,15 @@
-# $NetBSD: buildlink3.mk,v 1.5 2003/09/28 12:54:52 jlam Exp $
+# $NetBSD: buildlink3.mk,v 1.6 2003/09/30 00:42:32 jlam Exp $
 
 BUILDLINK_DEPTH:=      ${BUILDLINK_DEPTH}+
 
 .include "../../mk/bsd.prefs.mk"
 
+.if !defined(XPM_BUILDLINK3_MK)
+XPM_BUILDLINK3_MK=     YES
+
 BUILDLINK_DEPENDS.xpm?=                xpm>=3.4k
 BUILDLINK_PKGSRCDIR.xpm?=      ../../graphics/xpm
+.endif # XPM_BUILDLINK3_MK
 
 BUILDLINK_CHECK_BUILTIN.xpm?=  NO
 
@@ -36,6 +40,10 @@
 MAKEFLAGS+=    BUILDLINK_IS_BUILTIN.xpm=${BUILDLINK_IS_BUILTIN.xpm}
 .endif
 
+.if !empty(BUILDLINK_CHECK_BUILTIN.xpm:M[yY][eE][sS])
+_NEED_XPM=     NO
+.endif
+
 .if !defined(_NEED_XPM)
 .  if !empty(BUILDLINK_IS_BUILTIN.xpm:M[nN][oO])
 _NEED_XPM=     YES
@@ -62,21 +70,21 @@
                ${ECHO} "YES";                                          \
        fi
 .  endif
+MAKEFLAGS+=    _NEED_XPM="${_NEED_XPM}"
 .endif # _NEED_XPM
 
-.if !empty(BUILDLINK_CHECK_BUILTIN.xpm:M[yY][eE][sS])
-_NEED_XPM=     NO
-.endif
-
 .if ${_NEED_XPM} == "YES"
 .  if !empty(BUILDLINK_DEPTH:M\+)
 BUILDLINK_DEPENDS+=    xpm
 .  endif
-.  if !defined(BUILDLINK_PACKAGES) || empty(BUILDLINK_PACKAGES:Mxpm)
-BUILDLINK_PACKAGES+=   xpm
-.  endif
-.else
-BUILDLINK_PREFIX.xpm=  ${X11BASE}
 .endif
 
+.if !defined(XPM_BUILDLINK3_MK)
+.  if ${_NEED_XPM} == "YES"
+BUILDLINK_PACKAGES+=   xpm
+.  else
+BUILDLINK_PREFIX.xpm=  ${X11BASE}
+.  endif
+.endif # XPM_BUILDLINK3_MK
+
 BUILDLINK_DEPTH:=      ${BUILDLINK_DEPTH:C/\+$//}
diff -r d949c94262aa -r df5796a61c7a x11/Xrender/buildlink3.mk
--- a/x11/Xrender/buildlink3.mk Tue Sep 30 00:32:57 2003 +0000
+++ b/x11/Xrender/buildlink3.mk Tue Sep 30 00:42:32 2003 +0000
@@ -1,11 +1,15 @@
-# $NetBSD: buildlink3.mk,v 1.5 2003/09/28 12:54:52 jlam Exp $
+# $NetBSD: buildlink3.mk,v 1.6 2003/09/30 00:42:32 jlam Exp $
 
 BUILDLINK_DEPTH:=      ${BUILDLINK_DEPTH}+
 
-.include "../../mk/bsd.prefs.mk"
+.if !defined(XRENDER_BUILDLINK3_MK)
+XRENDER_BUILDLINK3_MK= YES
+
+.  include "../../mk/bsd.prefs.mk"
 
 BUILDLINK_DEPENDS.Xrender?=    Xrender>=0.2
 BUILDLINK_PKGSRCDIR.Xrender?=  ../../x11/Xrender
+.endif # XRENDER_BUILDLINK3_MK
 
 BUILDLINK_CHECK_BUILTIN.Xrender?=      NO
 
@@ -25,6 +29,10 @@
 MAKEFLAGS+=    BUILDLINK_IS_BUILTIN.Xrender=${BUILDLINK_IS_BUILTIN.Xrender}
 .endif
 



Home | Main Index | Thread Index | Old Index