pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk Migrate several USE_* logic blocks, previously spri...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/b1bc4d41ab41
branches:  trunk
changeset: 488894:b1bc4d41ab41
user:      tv <tv%pkgsrc.org@localhost>
date:      Fri Feb 11 16:11:36 2005 +0000

description:
Migrate several USE_* logic blocks, previously sprinkled liberally
throughout bsd.pkg.mk, to labelled blocks in bsd.pkg.use.mk.

diffstat:

 mk/bsd.pkg.mk     |  75 +---------------------------------------------
 mk/bsd.pkg.use.mk |  90 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 mk/bsd.prefs.mk   |   4 +-
 3 files changed, 91 insertions(+), 78 deletions(-)

diffs (253 lines):

diff -r e05e40d5bcf6 -r b1bc4d41ab41 mk/bsd.pkg.mk
--- a/mk/bsd.pkg.mk     Fri Feb 11 15:59:41 2005 +0000
+++ b/mk/bsd.pkg.mk     Fri Feb 11 16:11:36 2005 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.pkg.mk,v 1.1581 2005/02/11 15:55:13 tv Exp $
+#      $NetBSD: bsd.pkg.mk,v 1.1582 2005/02/11 16:11:36 tv Exp $
 #
 # This file is in the public domain.
 #
@@ -214,15 +214,6 @@
 PKG_FAIL_REASON+=      "PLIST_TYPE must be \`\`static'' for \`\`overwrite'' packages."
 .endif
 
-# If USE_XPKGWEDGE is set, then add a build dependency on xpkgwedge for
-# X11 packages.
-#
-.if defined(USE_X11BASE)
-.  if !empty(USE_XPKGWEDGE:M[yY][eE][sS])
-BUILD_DEPENDS+=                xpkgwedge>=${_XPKGWEDGE_REQD}:../../pkgtools/xpkgwedge
-.  endif
-.endif
-
 .if empty(DEPOT_SUBDIR)
 PKG_FAIL_REASON+=      "DEPOT_SUBDIR may not be empty."
 .endif
@@ -270,11 +261,6 @@
 .endif
 CONFIGURE_ENV+=                MAKE="${MAKE_PROGRAM:T}"
 
-.if defined(PKG_USE_KERBEROS)
-CRYPTO?=               uses Kerberos encryption code
-BUILD_DEFS+=           KERBEROS
-.endif
-
 # Distill the PERL5_REQD list into a single _PERL5_REQD value that is the
 # highest version of Perl required.
 #
@@ -369,35 +355,6 @@
 .  endif
 .endif
 
-#
-# PKG_LIBTOOL is the path to the libtool script installed by libtool-base.
-# _LIBTOOL is the path the libtool used by the build, which could be the
-#      path to a libtool wrapper script.
-# LIBTOOL is the publicly-readable variable that should be used by
-#      Makefiles to invoke the proper libtool.
-#
-PKG_LIBTOOL?=          ${LOCALBASE}/bin/libtool
-PKG_SHLIBTOOL?=                ${LOCALBASE}/bin/shlibtool
-_LIBTOOL?=             ${PKG_LIBTOOL}
-_SHLIBTOOL?=           ${PKG_SHLIBTOOL}
-LIBTOOL?=              ${PKG_LIBTOOL}
-SHLIBTOOL?=            ${PKG_SHLIBTOOL}
-.if defined(USE_LIBTOOL)
-.  if defined(USE_LANGUAGES) && !empty(USE_LANGUAGES:Mfortran)
-LIBTOOL_REQD?=         1.5.10nb7
-.  endif
-LIBTOOL_REQD?=         1.5.10nb1
-BUILD_DEPENDS+=                libtool-base>=${_OPSYS_LIBTOOL_REQD:U${LIBTOOL_REQD}}:../../devel/libtool-base
-CONFIGURE_ENV+=                LIBTOOL="${LIBTOOL} ${LIBTOOL_FLAGS}"
-MAKE_ENV+=             LIBTOOL="${LIBTOOL} ${LIBTOOL_FLAGS}"
-LIBTOOL_OVERRIDE?=     libtool */libtool */*/libtool
-.endif
-
-.if defined(BUILD_USES_MSGFMT) && \
-    (!exists(/usr/bin/msgfmt) || ${_USE_GNU_GETTEXT} == "yes")
-BUILD_DEPENDS+=                gettext>=0.10.35nb1:../../devel/gettext
-.endif
-
 EXTRACT_COOKIE=                ${WRKDIR}/.extract_done
 WRAPPER_COOKIE=                ${WRKDIR}/.wrapper_done
 CONFIGURE_COOKIE=      ${WRKDIR}/.configure_done
@@ -415,16 +372,9 @@
 
 LIBABISUFFIX?=
 
-.if defined(USE_X11)
-X11_LDFLAGS+=          ${COMPILER_RPATH_FLAG}${X11BASE}/lib${LIBABISUFFIX}
-X11_LDFLAGS+=          -L${X11BASE}/lib${LIBABISUFFIX}
-.endif
 .if !empty(USE_BUILDLINK3:M[nN][oO])
 LDFLAGS+=              ${COMPILER_RPATH_FLAG}${LOCALBASE}/lib
 LDFLAGS+=              -L${LOCALBASE}/lib
-.  if defined(USE_X11)
-LDFLAGS+=              ${X11_LDFLAGS}
-.  endif
 .endif
 MAKE_ENV+=             LDFLAGS="${LDFLAGS}"
 MAKE_ENV+=             LINKER_RPATH_FLAG="${LINKER_RPATH_FLAG}"
@@ -710,14 +660,6 @@
 PLIST_SUBST+=  PERL5_ARCHLIB=${PERL5_ARCHLIB:S/^${LOCALBASE}\///}
 .endif
 
-# Handle info files
-#
-INFO_FILES?=                   # default to no info files to handle
-USE_MAKEINFO?= no              # default to not using makeinfo
-.if !empty(INFO_FILES) || empty(USE_MAKEINFO:M[nN][oO])
-. include "../../mk/texinfo.mk"
-.endif
-
 # Handle alternatives
 #
 .include "../../mk/alternatives.mk"
@@ -888,16 +830,6 @@
 FETCH_BEFORE_ARGS += -p
 .endif
 
-# Check if we got "rman" with XFree86, for packages that need "rman".
-.if defined(USE_RMAN)
-.  if !exists(${X11BASE}/bin/rman)
-DEPENDS+=              rman-3.0.9:../../textproc/rman
-RMAN?=                 ${LOCALBASE}/bin/rman
-.  else
-RMAN?=                 ${X11BASE}/bin/rman
-.  endif
-.endif
-
 # Include popular master sites
 .include "../../mk/bsd.sites.mk"
 
@@ -1100,11 +1032,6 @@
 .include "../../mk/reduce-depends.mk"
 DEPENDS:=      ${REDUCED_DEPENDS}
 
-.if defined(USE_DIRS) && !empty(USE_DIRS) && \
-    ${PKG_INSTALLATION_TYPE} == "overwrite"
-.  include "../../mk/dirs.mk"
-.endif
-
 # Find out the PREFIX of dependencies where the PREFIX is needed at build time.
 .if defined(EVAL_PREFIX)
 .  for def in ${EVAL_PREFIX}
diff -r e05e40d5bcf6 -r b1bc4d41ab41 mk/bsd.pkg.use.mk
--- a/mk/bsd.pkg.use.mk Fri Feb 11 15:59:41 2005 +0000
+++ b/mk/bsd.pkg.use.mk Fri Feb 11 16:11:36 2005 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.pkg.use.mk,v 1.2 2005/02/11 15:55:13 tv Exp $
+#      $NetBSD: bsd.pkg.use.mk,v 1.3 2005/02/11 16:11:36 tv Exp $
 #
 # Turn USE_* macros into proper depedency logic.  Included near the top of
 # bsd.pkg.mk, after bsd.prefs.mk.
@@ -51,3 +51,91 @@
 .if (${PKG_INSTALLATION_TYPE} == "pkgviews") && defined(INSTALLATION_PREFIX)
 PKG_SKIP_REASON=       "INSTALLATION_PREFIX can't be used in a pkgviews package"
 .endif
+
+############################################################################
+# General settings
+############################################################################
+
+### BUILD_USES_MSGFMT
+
+.if defined(BUILD_USES_MSGFMT) && \
+    (!exists(/usr/bin/msgfmt) || ${_USE_GNU_GETTEXT} == "yes")
+BUILD_DEPENDS+=                gettext>=0.10.35nb1:../../devel/gettext
+.endif
+
+### PKG_USE_KERBEROS
+
+.if defined(PKG_USE_KERBEROS)
+CRYPTO?=               uses Kerberos encryption code
+BUILD_DEFS+=           KERBEROS
+.endif
+
+### USE_DIRS
+
+USE_DIRS?=             # empty
+.if !empty(USE_DIRS) && ${PKG_INSTALLATION_TYPE} == "overwrite"
+.  include "../../mk/dirs.mk"
+.endif
+
+### USE_LIBTOOL, PKG_[SH]LIBTOOL
+
+#
+# PKG_LIBTOOL is the path to the libtool script installed by libtool-base.
+# _LIBTOOL is the path the libtool used by the build, which could be the
+#      path to a libtool wrapper script.
+# LIBTOOL is the publicly-readable variable that should be used by
+#      Makefiles to invoke the proper libtool.
+#
+PKG_LIBTOOL?=          ${LOCALBASE}/bin/libtool
+PKG_SHLIBTOOL?=                ${LOCALBASE}/bin/shlibtool
+_LIBTOOL?=             ${PKG_LIBTOOL}
+_SHLIBTOOL?=           ${PKG_SHLIBTOOL}
+LIBTOOL?=              ${PKG_LIBTOOL}
+SHLIBTOOL?=            ${PKG_SHLIBTOOL}
+.if defined(USE_LIBTOOL)
+.  if defined(USE_LANGUAGES) && !empty(USE_LANGUAGES:Mfortran)
+LIBTOOL_REQD?=         1.5.10nb7
+.  endif
+LIBTOOL_REQD?=         1.5.10nb1
+BUILD_DEPENDS+=                libtool-base>=${_OPSYS_LIBTOOL_REQD:U${LIBTOOL_REQD}}:../../devel/libtool-base
+CONFIGURE_ENV+=                LIBTOOL="${LIBTOOL} ${LIBTOOL_FLAGS}"
+MAKE_ENV+=             LIBTOOL="${LIBTOOL} ${LIBTOOL_FLAGS}"
+LIBTOOL_OVERRIDE?=     libtool */libtool */*/libtool
+.endif
+
+### USE_MAKEINFO, INFO_FILES
+
+INFO_FILES?=           # empty
+USE_MAKEINFO?=         no
+
+.if !empty(INFO_FILES) || empty(USE_MAKEINFO:M[nN][oO])
+.  include "../../mk/texinfo.mk"
+.endif
+
+### USE_RMAN
+
+# Check if we got "rman" with XFree86, for packages that need "rman".
+.if defined(USE_RMAN)
+.  if !exists(${X11BASE}/bin/rman)
+DEPENDS+=              rman-3.0.9:../../textproc/rman
+RMAN?=                 ${LOCALBASE}/bin/rman
+.  else
+RMAN?=                 ${X11BASE}/bin/rman
+.  endif
+.endif
+
+### USE_X11
+
+.if defined(USE_X11)
+X11_LDFLAGS+=          ${COMPILER_RPATH_FLAG}${X11BASE}/lib${LIBABISUFFIX}
+X11_LDFLAGS+=          -L${X11BASE}/lib${LIBABISUFFIX}
+.  if !empty(USE_BUILDLINK3:M[nN][oO])
+LDFLAGS+=              ${X11_LDFLAGS}
+.  endif
+.endif
+
+### USE_XPKGWEDGE
+
+.if defined(USE_X11BASE) && !empty(USE_XPKGWEDGE:M[yY][eE][sS])
+BUILD_DEPENDS+=                xpkgwedge>=${_XPKGWEDGE_REQD:U1.5}:../../pkgtools/xpkgwedge
+.endif
diff -r e05e40d5bcf6 -r b1bc4d41ab41 mk/bsd.prefs.mk
--- a/mk/bsd.prefs.mk   Fri Feb 11 15:59:41 2005 +0000
+++ b/mk/bsd.prefs.mk   Fri Feb 11 16:11:36 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.prefs.mk,v 1.179 2005/01/27 04:16:47 tv Exp $
+# $NetBSD: bsd.prefs.mk,v 1.180 2005/02/11 16:11:36 tv Exp $
 #
 # Make file, included to get the site preferences, if any.  Should
 # only be included by package Makefiles before any .if defined()
@@ -352,8 +352,6 @@
 .if ${PKG_INSTALLATION_TYPE} == "pkgviews"
 USE_XPKGWEDGE=         yes
 _XPKGWEDGE_REQD=       1.9
-.else
-_XPKGWEDGE_REQD=       1.5
 .endif
 
 # Set X11PREFIX to reflect the install directory of X11 packages.



Home | Main Index | Thread Index | Old Index