diff options
author | tv <tv@pkgsrc.org> | 2005-03-24 17:46:00 +0000 |
---|---|---|
committer | tv <tv@pkgsrc.org> | 2005-03-24 17:46:00 +0000 |
commit | fe3c1321bf998d62a4552a591092b48ed03f7428 (patch) | |
tree | d810c92114f578110af57e0a04897d51e7bceb57 | |
parent | 0b69fc27e289d5731e25e95b5792dd9b266a5653 (diff) | |
download | pkgsrc-fe3c1321bf998d62a4552a591092b48ed03f7428.tar.gz |
USE_BUILDLINK3 is no longer optional (and cannot be turned off). Per mail
to tech-pkg:
=====
* USE_BUILDLINK3=YES will be unconditional. (In fact, USE_BUILDLINK3 will
be ignored altogether by mk/; but see below.)
* NO_BUILDLINK and NO_WRAPPER will be ignored by mk/. If a build happens,
these phases will happen.
* The existing NO_BUILD will imply the previous NO_BUILDLINK and NO_WRAPPER.
If no build happens, those phases are not needed.
* NO_TOOLS will be ignored by mk/. The tools phase, which provides much
more than just the C compiler, will always happen regardless of package.
This will make metapackage builds only slightly slower, in trade for far
less user error.
-rw-r--r-- | mk/apache.mk | 22 | ||||
-rw-r--r-- | mk/bsd.pkg.mk | 18 | ||||
-rw-r--r-- | mk/bsd.pkg.use.mk | 8 | ||||
-rw-r--r-- | mk/bsd.prefs.mk | 7 | ||||
-rw-r--r-- | mk/buildlink3/BUILDLINK3_DG | 26 | ||||
-rw-r--r-- | mk/buildlink3/README | 32 | ||||
-rw-r--r-- | mk/compiler/f2c.mk | 8 | ||||
-rw-r--r-- | mk/compiler/gcc.mk | 16 | ||||
-rw-r--r-- | mk/java-vm.mk | 20 | ||||
-rw-r--r-- | mk/mysql.buildlink3.mk | 6 | ||||
-rw-r--r-- | mk/pgsql.buildlink3.mk | 6 | ||||
-rw-r--r-- | mk/tools.mk | 6 | ||||
-rw-r--r-- | mk/wrapper/bsd.wrapper.mk | 8 |
13 files changed, 34 insertions, 149 deletions
diff --git a/mk/apache.mk b/mk/apache.mk index 57aaf9630af..028dd5daed2 100644 --- a/mk/apache.mk +++ b/mk/apache.mk @@ -1,4 +1,4 @@ -# $NetBSD: apache.mk,v 1.7 2005/01/03 13:20:28 seb Exp $ +# $NetBSD: apache.mk,v 1.8 2005/03/24 17:46:00 tv Exp $ # # This Makefile fragment handles Apache dependencies and make variables, # and is meant to be included by packages that require Apache either at @@ -120,36 +120,20 @@ _APACHE_BL_SRCDIR= ${_APACHE_PKGSRCDIR} _APACHE_BL_SRCDIR?= ../../www/apache -_APACHE_DEPENDENCY?= ${BUILDLINK_DEPENDS.${_PKG_APACHE}}:${_APACHE_PKGSRCDIR} - # Add a runtime dependency on the apache server. # This may or may not create an actual dependency depending on # what the apache buildlink[23].mk file does. # .if defined(_APACHE_PKGSRCDIR) -. if defined(USE_BUILDLINK3) && empty(USE_BUILDLINK3:M[nN][oO]) -. include "${_APACHE_BL_SRCDIR}/buildlink3.mk" -. else -DEPENDS+= ${_APACHE_DEPENDENCY} -. endif +. include "${_APACHE_BL_SRCDIR}/buildlink3.mk" .endif # If we are building apache modules, then we might need a build-time # dependency on apr, and the apache sources? # -.if defined(_APACHE_PKGSRCDIR) -. if defined(USE_BUILDLINK3) && empty(USE_BUILDLINK3:M[nN][oO]) -. include "${_APACHE_BL_SRCDIR}/buildlink3.mk" -. else -BUILD_DEPENDS+= ${_APACHE_DEPENDENCY} -. endif -.endif - .if ${_PKG_APACHE} == "apache2" . if defined(USE_APR) && !empty(USE_APR:M[yY][eE][sS]) -. if defined(USE_BUILDLINK3) && empty(USE_BUILDLINK3:M[nN][oO]) -. include "../../devel/apr/buildlink3.mk" -. endif +. include "../../devel/apr/buildlink3.mk" . endif .endif diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index ddf3748e29f..f155c3c2037 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.1603 2005/03/22 22:49:15 xtraeme Exp $ +# $NetBSD: bsd.pkg.mk,v 1.1604 2005/03/24 17:46:00 tv Exp $ # # This file is in the public domain. # @@ -290,11 +290,6 @@ ${_var_}+= ${${_var_}.*} CPPFLAGS+= ${CPP_PRECOMP_FLAGS} -.if !empty(USE_BUILDLINK3:M[nN][oO]) -LDFLAGS+= ${COMPILER_RPATH_FLAG}${LOCALBASE}/lib -LDFLAGS+= -L${LOCALBASE}/lib -.endif - ALL_ENV+= CC=${CC:Q} ALL_ENV+= CFLAGS=${CFLAGS:Q} ALL_ENV+= CPPFLAGS=${CPPFLAGS:Q} @@ -933,7 +928,7 @@ USE_LANGUAGES?= # empty .include "../../mk/tools.mk" -.if !defined(NO_WRAPPER) +.if !defined(NO_BUILD) . include "../../mk/wrapper/bsd.wrapper.mk" .endif @@ -1146,16 +1141,9 @@ checksum: fetch @${DO_NADA} .endif -# Disable tools -.PHONY: tools -.if defined(NO_TOOLS) && !target(tools) -tools: patch - ${_PKG_SILENT}${_PKG_DEBUG}${TOUCH} ${TOUCH_FLAGS} ${TOOLS_COOKIE} -.endif - # Disable wrapper .PHONY: wrapper -.if defined(NO_WRAPPER) && !target(wrapper) +.if defined(NO_BUILD) && !target(wrapper) wrapper: tools ${_PKG_SILENT}${_PKG_DEBUG}${TOUCH} ${TOUCH_FLAGS} ${WRAPPER_COOKIE} .endif diff --git a/mk/bsd.pkg.use.mk b/mk/bsd.pkg.use.mk index 4fc245b04f8..f4c928162f5 100644 --- a/mk/bsd.pkg.use.mk +++ b/mk/bsd.pkg.use.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.use.mk,v 1.6 2005/03/22 15:40:06 tv Exp $ +# $NetBSD: bsd.pkg.use.mk,v 1.7 2005/03/24 17:46:00 tv Exp $ # # Turn USE_* macros into proper depedency logic. Included near the top of # bsd.pkg.mk, after bsd.prefs.mk. @@ -22,9 +22,7 @@ PLIST_SUBST+= IMAKE_KERNMAN_SUFFIX=${IMAKE_KERNMAN_SUFFIX} PLIST_SUBST+= IMAKE_FILEMAN_SUFFIX=${IMAKE_FILEMAN_SUFFIX} PLIST_SUBST+= IMAKE_MISCMAN_SUFFIX=${IMAKE_MISCMAN_SUFFIX} PLIST_SUBST+= IMAKE_MANNEWSUFFIX=${IMAKE_MANNEWSUFFIX} -. if !empty(USE_BUILDLINK3:M[yY][eE][sS]) -MAKE_FLAGS+= CC="${CC}" CXX="${CXX}" -. endif +MAKE_FLAGS+= CC=${CC:Q} CXX=${CXX:Q} .endif .if defined(USE_X11BASE) @@ -189,9 +187,7 @@ RMAN?= ${X11BASE}/bin/rman .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 diff --git a/mk/bsd.prefs.mk b/mk/bsd.prefs.mk index 8e7b71a4589..ffef373cd2c 100644 --- a/mk/bsd.prefs.mk +++ b/mk/bsd.prefs.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.prefs.mk,v 1.182 2005/02/19 01:28:14 grant Exp $ +# $NetBSD: bsd.prefs.mk,v 1.183 2005/03/24 17:46:00 tv Exp $ # # Make file, included to get the site preferences, if any. Should # only be included by package Makefiles before any .if defined() @@ -490,11 +490,6 @@ LINKFARM?= ${LINKFARM_CMD} # PKG_BEST_EXISTS?= ${PKG_ADMIN} -b -d ${_PKG_DBDIR} -S lsbest -USE_BUILDLINK3?= no # default to not using buildlink3 -.if ${PKG_INSTALLATION_TYPE} == "pkgviews" -USE_BUILDLINK3= yes # pkgviews requires buildlink3 -.endif - .if exists(${LOCALBASE}/bsd/share/mk/zoularis.mk) PKG_FAIL_REASON+= 'You appear to have a deprecated Zoularis installation.' PKG_FAIL_REASON+= 'Please update your system to bootstrap-pkgsrc and remove the' diff --git a/mk/buildlink3/BUILDLINK3_DG b/mk/buildlink3/BUILDLINK3_DG index 866ba4b8546..6f7f4d05d4d 100644 --- a/mk/buildlink3/BUILDLINK3_DG +++ b/mk/buildlink3/BUILDLINK3_DG @@ -1,4 +1,4 @@ -$NetBSD: BUILDLINK3_DG,v 1.6 2004/09/21 15:01:40 jlam Exp $ +$NetBSD: BUILDLINK3_DG,v 1.7 2005/03/24 17:46:01 tv Exp $ 0 Developer's guide to buildlink3 ================================= @@ -59,35 +59,19 @@ to build against the viewed instance of a depoted package. 2 Troubleshooting ================= -Q1: I'm trying to bl3ify a package but I get an error that looks like: - - make: don't know how to make _BUILDLINK_USE. Stop - -A1: You forgot to change a reference to a buildlink2.mk file into a - buildlink3.mk file. - - -Q2: Dependencies are added for every single buildlink3.mk file I - include, including for when it's supposed to use the base system - software. What's going on? - -A2: You forgot to change USE_BUILDLINK2 to USE_BUILDLINK3 in the - package Makefile. - - -Q3: Where can I see the actual command executed by the wrapper +Q1: Where can I see the actual command executed by the wrapper scripts? -A3: You should examine the contents of the ${WRKDIR}/.work.log file. +A1: You should examine the contents of the ${WRKDIR}/.work.log file. The lines preceded with [*] are the commands that are intercepted by the wrapper scripts, and the lines preceded with <.> are the commands that are executed by the wrapper scripts. -Q4: Why can't I check the values of variables set by the buildlink3 +Q2: Why can't I check the values of variables set by the buildlink3 framework using 'make show-var VARNAME=...'? -A4: Some variables are only defined for a subset of the package build +A2: Some variables are only defined for a subset of the package build phases. Try instead: make show-var PKG_PHASE=wrapper VARNAME=... diff --git a/mk/buildlink3/README b/mk/buildlink3/README index 7bb37a4105e..eba31172821 100644 --- a/mk/buildlink3/README +++ b/mk/buildlink3/README @@ -1,4 +1,4 @@ -$NetBSD: README,v 1.5 2004/12/01 09:53:01 wiz Exp $ +$NetBSD: README,v 1.6 2005/03/24 17:46:01 tv Exp $ 0 Package Views =============== @@ -115,36 +115,8 @@ implementation currently allows "overwrite" to depend on either "overwrite" or pkgviews packages, but pkgviews packages are restricted to only being able to depend on other pkgviews packages. -Packages that have been converted to use buildlink3 should add the -following line to their Makefiles: - - USE_BUILDLINK3= YES - -A package must be converted to use the buildlink3 framework before it -can support the pkgviews installation style. - - - 0.5 Package conversion issues - ============================= - -The conversion process for a package to use buildlink3 and pkgviews -essentially consists of changing USE_BUILDLINK2 to USE_BUILDLINK3, -including buildlink3.mk files instead of buildlink2.mk files, and -adding the PKG_INSTALLATION_TYPES line to the package Makefile. It's -extremely easy and painless. - -Since the idea is that the user can choose to install a package using -either installation style, the package Makefiles have to explicitly -support this. This means that "hard" packages just got harder to -maintain, but easy packages stay about the same. In this case, "hard" -packages are the ones that have module packages, e.g. PHP4, perl5, -Apache, Cyrus-SASL, etc. A package of this type must support finding -shared modules or configuration files in directories shared with all -of its module packages, thus requiring some hard-coding of paths -across different packages. - - 0.6 Future Work + 0.5 Future Work =============== There may be some way around the problem of pkgviews packages not diff --git a/mk/compiler/f2c.mk b/mk/compiler/f2c.mk index 13134219f1e..18e22f59ddc 100644 --- a/mk/compiler/f2c.mk +++ b/mk/compiler/f2c.mk @@ -1,4 +1,4 @@ -# $NetBSD: f2c.mk,v 1.4 2005/01/24 18:20:57 tv Exp $ +# $NetBSD: f2c.mk,v 1.5 2005/03/24 17:46:01 tv Exp $ # # Copyright (c) 2005 The NetBSD Foundation, Inc. # All rights reserved. @@ -96,11 +96,7 @@ PREPEND_PATH+= ${_F2C_DIR}/bin . endif # Add the dependency on f2c. -. if !empty(USE_BUILDLINK3:M[yY][eE][sS]) -. include "../../lang/f2c/buildlink3.mk" -. else -DEPENDS+= f2c>=20001205nb3:../../lang/f2c -. endif +. include "../../lang/f2c/buildlink3.mk" . if defined(F2C_DIR) && !empty(F2C_DIR) BUILD_ENV+= F2C_DIR=${F2C_DIR:Q} diff --git a/mk/compiler/gcc.mk b/mk/compiler/gcc.mk index 60b47b13a0e..559c4bf4854 100644 --- a/mk/compiler/gcc.mk +++ b/mk/compiler/gcc.mk @@ -1,4 +1,4 @@ -# $NetBSD: gcc.mk,v 1.79 2005/01/21 21:59:14 tv Exp $ +# $NetBSD: gcc.mk,v 1.80 2005/03/24 17:46:01 tv Exp $ .if !defined(COMPILER_GCC_MK) COMPILER_GCC_MK= defined @@ -403,17 +403,9 @@ PREPEND_PATH+= ${_GCC_DIR}/bin # Add the dependency on GCC. .if !empty(_USE_PKGSRC_GCC:M[yY][eE][sS]) -. if !empty(USE_BUILDLINK3:M[yY][eE][sS]) -. for _dir_ in ${_GCC_PKGSRCDIR} -. include "${_dir_}/buildlink3.mk" -. endfor -. else -. if defined(_USE_GCC_SHLIB) -DEPENDS+= ${_GCC_DEPENDENCY} -. else -BUILD_DEPENDS+= ${_GCC_DEPENDENCY} -. endif -. endif +. for _dir_ in ${_GCC_PKGSRCDIR} +. include "${_dir_}/buildlink3.mk" +. endfor .endif # Create compiler driver scripts in ${WRKDIR}. diff --git a/mk/java-vm.mk b/mk/java-vm.mk index 7afc83010da..8190471ce41 100644 --- a/mk/java-vm.mk +++ b/mk/java-vm.mk @@ -1,4 +1,4 @@ -# $NetBSD: java-vm.mk,v 1.38 2005/02/11 16:36:49 tv Exp $ +# $NetBSD: java-vm.mk,v 1.39 2005/03/24 17:46:01 tv Exp $ # # This Makefile fragment handles Java dependencies and make variables, # and is meant to be included by packages that require Java either at @@ -268,8 +268,6 @@ _JAVA_HOME_DEFAULT= ${LOCALBASE}/java/wonka _JAVA_BASE_CLASSES= wre.jar SCRIPTS_ENV+= JAVAC="jikes" .endif -_JDK_DEPENDENCY?= ${BUILDLINK_DEPENDS.${_PKG_JVM}}:${_JDK_PKGSRCDIR} -_JRE_DEPENDENCY?= ${BUILDLINK_DEPENDS.${_JRE.${_PKG_JVM}}}:${_JRE_PKGSRCDIR} .if defined(_JAVA_HOME_DEFAULT) _JAVA_HOME= ${_JAVA_HOME_DEFAULT} @@ -279,12 +277,8 @@ EVAL_PREFIX+= _JAVA_HOME=${_JAVA_PKGBASE.${_PKG_JVM}} # We always need a run-time dependency on the JRE. .if defined(_JRE_PKGSRCDIR) -. if defined(USE_BUILDLINK3) && empty(USE_BUILDLINK3:M[Nn][Oo]) -. if exists(${_JRE_PKGSRCDIR}/buildlink3.mk) -. include "${_JRE_PKGSRCDIR}/buildlink3.mk" -. endif -. else -DEPENDS+= ${_JRE_DEPENDENCY} +. if exists(${_JRE_PKGSRCDIR}/buildlink3.mk) +. include "${_JRE_PKGSRCDIR}/buildlink3.mk" . endif .endif @@ -293,12 +287,8 @@ DEPENDS+= ${_JRE_DEPENDENCY} # .if empty(USE_JAVA:M[rR][uU][nN]) . if defined(_JDK_PKGSRCDIR) -. if defined(USE_BUILDLINK3) && empty(USE_BUILDLINK3:M[Nn][Oo]) -. if exists(${_JDK_PKGSRCDIR}/buildlink3.mk) -. include "${_JDK_PKGSRCDIR}/buildlink3.mk" -. endif -. else -BUILD_DEPENDS+= ${_JDK_DEPENDENCY} +. if exists(${_JDK_PKGSRCDIR}/buildlink3.mk) +. include "${_JDK_PKGSRCDIR}/buildlink3.mk" . endif . endif .endif diff --git a/mk/mysql.buildlink3.mk b/mk/mysql.buildlink3.mk index 36507426532..01439386fb5 100644 --- a/mk/mysql.buildlink3.mk +++ b/mk/mysql.buildlink3.mk @@ -1,4 +1,4 @@ -# $NetBSD: mysql.buildlink3.mk,v 1.1 2004/10/28 11:28:27 xtraeme Exp $ +# $NetBSD: mysql.buildlink3.mk,v 1.2 2005/03/24 17:46:01 tv Exp $ .if !defined(MYSQL_VERSION_MK) MYSQL_VERSION_MK= # defined @@ -74,8 +74,6 @@ MYSQL_PKGSRCDIR= ../../databases/mysql3-client PKG_SKIP_REASON+= "${_MYSQL_VERSION} is not a valid mysql package." .endif -.if (defined(USE_BUILDLINK3) && empty(USE_BUILDLINK3:M[nN][oO])) -. include "${MYSQL_PKGSRCDIR}/buildlink3.mk" -.endif +.include "${MYSQL_PKGSRCDIR}/buildlink3.mk" .endif # MYSQL_VERSION_MK diff --git a/mk/pgsql.buildlink3.mk b/mk/pgsql.buildlink3.mk index 3d647350f7e..d1b4c69ffe7 100644 --- a/mk/pgsql.buildlink3.mk +++ b/mk/pgsql.buildlink3.mk @@ -1,4 +1,4 @@ -# $NetBSD: pgsql.buildlink3.mk,v 1.7 2005/03/17 21:44:58 jlam Exp $ +# $NetBSD: pgsql.buildlink3.mk,v 1.8 2005/03/24 17:46:01 tv Exp $ .if !defined(PGVERSION_MK) PGVERSION_MK= defined @@ -76,9 +76,7 @@ PGSQL_TYPE= none PKG_SKIP_REASON+= "${_PGSQL_VERSION} is not a valid package" .endif -.if (defined(USE_BUILDLINK3) && empty(USE_BUILDLINK3:M[nN][oO])) -. include "${PGPKGSRCDIR}/buildlink3.mk" +.include "${PGPKGSRCDIR}/buildlink3.mk" PGSQL_PREFIX= ${BUILDLINK_PREFIX.${PGSQL_TYPE}} -.endif .endif # PGVERSION_MK diff --git a/mk/tools.mk b/mk/tools.mk index 30d08af518b..8b7fdba7e95 100644 --- a/mk/tools.mk +++ b/mk/tools.mk @@ -1,4 +1,4 @@ -# $NetBSD: tools.mk,v 1.53 2005/03/21 13:58:22 tv Exp $ +# $NetBSD: tools.mk,v 1.54 2005/03/24 17:46:01 tv Exp $ # # This Makefile creates a ${TOOLS_DIR} directory and populates the bin # subdir with tools that hide the ones outside of ${TOOLS_DIR}. @@ -251,11 +251,7 @@ _TOOLS_OVERRIDE.lex= YES _TOOLS_PROGNAME.lex= ${LEX} .endif .if (${_TOOLS_NEED_GNU.lex} == "YES") && empty(PKGPATH:Mdevel/flex) -.if defined(USE_BUILDLINK3) && empty(USE_BUILDLINK3:M[nN][oO]) .include "../../devel/flex/buildlink3.mk" -.else -BUILD_DEPENDS+= flex>=2.5:../../devel/flex -.endif _TOOLS_OVERRIDE.lex= YES _TOOLS_PROGNAME.lex= ${LOCALBASE}/bin/flex . if exists(${_TOOLS_PROGNAME.lex}) diff --git a/mk/wrapper/bsd.wrapper.mk b/mk/wrapper/bsd.wrapper.mk index ba43c51e292..fb9e2af946e 100644 --- a/mk/wrapper/bsd.wrapper.mk +++ b/mk/wrapper/bsd.wrapper.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.wrapper.mk,v 1.26 2005/03/08 00:52:31 grant Exp $ +# $NetBSD: bsd.wrapper.mk,v 1.27 2005/03/24 17:46:01 tv Exp $ # # Copyright (c) 2004 The NetBSD Foundation, Inc. # All rights reserved. @@ -52,11 +52,7 @@ _WRAP_VARS_MK= ${WRAPPER_DIR}/vars.mk .PHONY: do-wrapper -# USE_BUILDLINK3 == "no" implies NO_BUILDLINK -.if !empty(USE_BUILDLINK3:M[nN][oO]) -NO_BUILDLINK= yes -.endif -.if !defined(NO_BUILDLINK) +.if !defined(NO_BUILD) . include "../../mk/buildlink3/bsd.buildlink3.mk" .endif |