diff options
author | tv <tv@pkgsrc.org> | 2005-01-24 18:40:01 +0000 |
---|---|---|
committer | tv <tv@pkgsrc.org> | 2005-01-24 18:40:01 +0000 |
commit | abaf35905b64e87fead4d3fa0eb3acf873e8fb2a (patch) | |
tree | 9219020effabd2e53771a46a608514be854e4b15 | |
parent | 06848bdcf1f99f2666ccea79120779fa773f2567 (diff) | |
download | pkgsrc-abaf35905b64e87fead4d3fa0eb3acf873e8fb2a.tar.gz |
sync with HEAD
35 files changed, 815 insertions, 234 deletions
diff --git a/mk/AIX.pkg.dist b/mk/AIX.pkg.dist index fc3e9115777..46bb8edc142 100644 --- a/mk/AIX.pkg.dist +++ b/mk/AIX.pkg.dist @@ -1,5 +1,5 @@ # Id: BSD.local.dist,v 1.30 1997/08/01 13:16:39 phk Exp -# $NetBSD: AIX.pkg.dist,v 1.25.2.2 2005/01/10 16:15:24 tv Exp $ +# $NetBSD: AIX.pkg.dist,v 1.25.2.3 2005/01/24 18:40:01 tv Exp $ # /set type=dir uname=root gname=system mode=0755 @@ -612,6 +612,10 @@ LC_MESSAGES .. .. + hsb + LC_MESSAGES + .. + .. hu LC_MESSAGES .. @@ -696,6 +700,10 @@ LC_MESSAGES .. .. + nds + LC_MESSAGES + .. + .. ne LC_MESSAGES .. @@ -724,6 +732,10 @@ LC_MESSAGES .. .. + no_NY + LC_MESSAGES + .. + .. nso LC_MESSAGES .. diff --git a/mk/BSDOS.pkg.dist b/mk/BSDOS.pkg.dist index b1192f39a78..403b6eec645 100644 --- a/mk/BSDOS.pkg.dist +++ b/mk/BSDOS.pkg.dist @@ -1,5 +1,5 @@ # Id: BSD.local.dist,v 1.30 1997/08/01 13:16:39 phk Exp -# $NetBSD: BSDOS.pkg.dist,v 1.25.2.2 2005/01/10 16:15:24 tv Exp $ +# $NetBSD: BSDOS.pkg.dist,v 1.25.2.3 2005/01/24 18:40:01 tv Exp $ # /set type=dir uname=root gname=wheel mode=0755 @@ -612,6 +612,10 @@ LC_MESSAGES .. .. + hsb + LC_MESSAGES + .. + .. hu LC_MESSAGES .. @@ -696,6 +700,10 @@ LC_MESSAGES .. .. + nds + LC_MESSAGES + .. + .. ne LC_MESSAGES .. @@ -724,6 +732,10 @@ LC_MESSAGES .. .. + no_NY + LC_MESSAGES + .. + .. nso LC_MESSAGES .. diff --git a/mk/Darwin.pkg.dist b/mk/Darwin.pkg.dist index 5a45f91e7ad..d5df5fc8aaa 100644 --- a/mk/Darwin.pkg.dist +++ b/mk/Darwin.pkg.dist @@ -1,5 +1,5 @@ # Id: BSD.local.dist,v 1.30 1997/08/01 13:16:39 phk Exp -# $NetBSD: Darwin.pkg.dist,v 1.60.2.2 2005/01/10 16:15:24 tv Exp $ +# $NetBSD: Darwin.pkg.dist,v 1.60.2.3 2005/01/24 18:40:01 tv Exp $ # /set type=dir uname=root gname=wheel mode=0755 @@ -658,6 +658,10 @@ LC_MESSAGES .. .. + hsb + LC_MESSAGES + .. + .. hu LC_MESSAGES .. @@ -746,6 +750,10 @@ LC_MESSAGES .. .. + nds + LC_MESSAGES + .. + .. ne LC_MESSAGES .. @@ -774,6 +782,10 @@ LC_MESSAGES .. .. + no_NY + LC_MESSAGES + .. + .. nso LC_MESSAGES .. diff --git a/mk/DragonFly.pkg.dist b/mk/DragonFly.pkg.dist index 323822fb454..cbf8449f2fb 100644 --- a/mk/DragonFly.pkg.dist +++ b/mk/DragonFly.pkg.dist @@ -1,4 +1,4 @@ -# $NetBSD: DragonFly.pkg.dist,v 1.1.2.2 2005/01/10 16:15:24 tv Exp $ +# $NetBSD: DragonFly.pkg.dist,v 1.1.2.3 2005/01/24 18:40:01 tv Exp $ # /set type=dir uname=root gname=wheel mode=0755 @@ -657,6 +657,10 @@ LC_MESSAGES .. .. + hsb + LC_MESSAGES + .. + .. hu LC_MESSAGES .. @@ -745,6 +749,10 @@ LC_MESSAGES .. .. + nds + LC_MESSAGES + .. + .. ne LC_MESSAGES .. @@ -773,6 +781,10 @@ LC_MESSAGES .. .. + no_NY + LC_MESSAGES + .. + .. nso LC_MESSAGES .. diff --git a/mk/FreeBSD.pkg.dist b/mk/FreeBSD.pkg.dist index 31a9d9cd862..3ade7e90382 100644 --- a/mk/FreeBSD.pkg.dist +++ b/mk/FreeBSD.pkg.dist @@ -1,4 +1,4 @@ -# $NetBSD: FreeBSD.pkg.dist,v 1.51.2.2 2005/01/10 16:15:24 tv Exp $ +# $NetBSD: FreeBSD.pkg.dist,v 1.51.2.3 2005/01/24 18:40:01 tv Exp $ # /set type=dir uname=root gname=wheel mode=0755 @@ -657,6 +657,10 @@ LC_MESSAGES .. .. + hsb + LC_MESSAGES + .. + .. hu LC_MESSAGES .. @@ -745,6 +749,10 @@ LC_MESSAGES .. .. + nds + LC_MESSAGES + .. + .. ne LC_MESSAGES .. @@ -773,6 +781,10 @@ LC_MESSAGES .. .. + no_NY + LC_MESSAGES + .. + .. nso LC_MESSAGES .. diff --git a/mk/IRIX.pkg.dist b/mk/IRIX.pkg.dist index 5ed251bd3b5..fd4758c9e4d 100644 --- a/mk/IRIX.pkg.dist +++ b/mk/IRIX.pkg.dist @@ -1,4 +1,4 @@ -# $NetBSD: IRIX.pkg.dist,v 1.50.2.2 2005/01/10 16:15:24 tv Exp $ +# $NetBSD: IRIX.pkg.dist,v 1.50.2.3 2005/01/24 18:40:01 tv Exp $ # /set type=dir uname=root gname=sys mode=0755 @@ -657,6 +657,10 @@ LC_MESSAGES .. .. + hsb + LC_MESSAGES + .. + .. hu LC_MESSAGES .. @@ -745,6 +749,10 @@ LC_MESSAGES .. .. + nds + LC_MESSAGES + .. + .. ne LC_MESSAGES .. @@ -773,6 +781,10 @@ LC_MESSAGES .. .. + no_NY + LC_MESSAGES + .. + .. nso LC_MESSAGES .. diff --git a/mk/Interix.pkg.dist b/mk/Interix.pkg.dist index 30a43a1c68c..59b95d639c1 100644 --- a/mk/Interix.pkg.dist +++ b/mk/Interix.pkg.dist @@ -1,5 +1,5 @@ # Id: BSD.local.dist,v 1.30 1997/08/01 13:16:39 phk Exp -# $NetBSD: Interix.pkg.dist,v 1.15.2.2 2005/01/10 16:15:24 tv Exp $ +# $NetBSD: Interix.pkg.dist,v 1.15.2.3 2005/01/24 18:40:01 tv Exp $ # /set type=dir uid=197108 gid=131616 mode=0775 @@ -658,6 +658,10 @@ LC_MESSAGES .. .. + hsb + LC_MESSAGES + .. + .. hu LC_MESSAGES .. @@ -742,6 +746,10 @@ LC_MESSAGES .. .. + nds + LC_MESSAGES + .. + .. ne LC_MESSAGES .. @@ -770,6 +778,10 @@ LC_MESSAGES .. .. + no_NY + LC_MESSAGES + .. + .. nso LC_MESSAGES .. diff --git a/mk/Linux.pkg.dist b/mk/Linux.pkg.dist index 002704d67ad..5e63db3fee9 100644 --- a/mk/Linux.pkg.dist +++ b/mk/Linux.pkg.dist @@ -1,5 +1,5 @@ # Id: BSD.local.dist,v 1.30 1997/08/01 13:16:39 phk Exp -# $NetBSD: Linux.pkg.dist,v 1.67.2.2 2005/01/10 16:15:25 tv Exp $ +# $NetBSD: Linux.pkg.dist,v 1.67.2.3 2005/01/24 18:40:01 tv Exp $ # /set type=dir uname=root gname=sys mode=0755 @@ -658,6 +658,10 @@ LC_MESSAGES .. .. + hsb + LC_MESSAGES + .. + .. hu LC_MESSAGES .. @@ -746,6 +750,10 @@ LC_MESSAGES .. .. + nds + LC_MESSAGES + .. + .. ne LC_MESSAGES .. @@ -774,6 +782,10 @@ LC_MESSAGES .. .. + no_NY + LC_MESSAGES + .. + .. nso LC_MESSAGES .. diff --git a/mk/NetBSD.pkg.dist b/mk/NetBSD.pkg.dist index 7ae128d9232..c5875b9e449 100644 --- a/mk/NetBSD.pkg.dist +++ b/mk/NetBSD.pkg.dist @@ -1,5 +1,5 @@ # Id: BSD.local.dist,v 1.30 1997/08/01 13:16:39 phk Exp -# $NetBSD: NetBSD.pkg.dist,v 1.78.2.2 2005/01/10 16:15:25 tv Exp $ +# $NetBSD: NetBSD.pkg.dist,v 1.78.2.3 2005/01/24 18:40:01 tv Exp $ # /set type=dir uname=root gname=wheel mode=0755 @@ -658,6 +658,10 @@ LC_MESSAGES .. .. + hsb + LC_MESSAGES + .. + .. hu LC_MESSAGES .. @@ -742,6 +746,10 @@ LC_MESSAGES .. .. + nds + LC_MESSAGES + .. + .. ne LC_MESSAGES .. @@ -770,6 +778,10 @@ LC_MESSAGES .. .. + no_NY + LC_MESSAGES + .. + .. nso LC_MESSAGES .. diff --git a/mk/OSF1.pkg.dist b/mk/OSF1.pkg.dist index 4af4904a569..c93060875c5 100644 --- a/mk/OSF1.pkg.dist +++ b/mk/OSF1.pkg.dist @@ -1,4 +1,4 @@ -# $NetBSD: OSF1.pkg.dist,v 1.1.2.2 2005/01/10 16:15:25 tv Exp $ +# $NetBSD: OSF1.pkg.dist,v 1.1.2.3 2005/01/24 18:40:01 tv Exp $ # /set type=dir uname=root gname=system mode=0755 @@ -657,6 +657,10 @@ LC_MESSAGES .. .. + hsb + LC_MESSAGES + .. + .. hu LC_MESSAGES .. @@ -745,6 +749,10 @@ LC_MESSAGES .. .. + nds + LC_MESSAGES + .. + .. ne LC_MESSAGES .. @@ -773,6 +781,10 @@ LC_MESSAGES .. .. + no_NY + LC_MESSAGES + .. + .. nso LC_MESSAGES .. diff --git a/mk/OpenBSD.pkg.dist b/mk/OpenBSD.pkg.dist index fdd58b4b4e2..697da7078f8 100644 --- a/mk/OpenBSD.pkg.dist +++ b/mk/OpenBSD.pkg.dist @@ -1,4 +1,4 @@ -# $NetBSD: OpenBSD.pkg.dist,v 1.50.2.2 2005/01/10 16:15:25 tv Exp $ +# $NetBSD: OpenBSD.pkg.dist,v 1.50.2.3 2005/01/24 18:40:01 tv Exp $ # /set type=dir uname=root gname=wheel mode=0755 @@ -657,6 +657,10 @@ LC_MESSAGES .. .. + hsb + LC_MESSAGES + .. + .. hu LC_MESSAGES .. @@ -745,6 +749,10 @@ LC_MESSAGES .. .. + nds + LC_MESSAGES + .. + .. ne LC_MESSAGES .. @@ -773,6 +781,10 @@ LC_MESSAGES .. .. + no_NY + LC_MESSAGES + .. + .. nso LC_MESSAGES .. diff --git a/mk/SunOS.pkg.dist b/mk/SunOS.pkg.dist index 41bb303ee5e..76b476055af 100644 --- a/mk/SunOS.pkg.dist +++ b/mk/SunOS.pkg.dist @@ -1,5 +1,5 @@ # Id: BSD.local.dist,v 1.30 1997/08/01 13:16:39 phk Exp -# $NetBSD: SunOS.pkg.dist,v 1.72.2.2 2005/01/10 16:15:25 tv Exp $ +# $NetBSD: SunOS.pkg.dist,v 1.72.2.3 2005/01/24 18:40:01 tv Exp $ # /set type=dir uname=root gname=sys mode=0755 @@ -218,6 +218,10 @@ LC_MESSAGES .. .. + hsb + LC_MESSAGES + .. + .. hu LC_MESSAGES .. @@ -306,6 +310,10 @@ LC_MESSAGES .. .. + nds + LC_MESSAGES + .. + .. ne LC_MESSAGES .. @@ -334,6 +342,10 @@ LC_MESSAGES .. .. + no_NY + LC_MESSAGES + .. + .. nso LC_MESSAGES .. diff --git a/mk/UnixWare.pkg.dist b/mk/UnixWare.pkg.dist index 59222ee720b..75b3a9fffe0 100644 --- a/mk/UnixWare.pkg.dist +++ b/mk/UnixWare.pkg.dist @@ -1,6 +1,6 @@ # Id: BSD.local.dist,v 1.30 1997/08/01 13:16:39 phk Exp # NetBSD: SunOS.pkg.dist,v 1.64 2004/04/01 12:19:09 jmmv Exp -# $NetBSD: UnixWare.pkg.dist,v 1.9.2.2 2005/01/10 16:15:25 tv Exp $ +# $NetBSD: UnixWare.pkg.dist,v 1.9.2.3 2005/01/24 18:40:01 tv Exp $ # /set type=dir uname=root gname=sys mode=0755 @@ -219,6 +219,10 @@ LC_MESSAGES .. .. + hsb + LC_MESSAGES + .. + .. hu LC_MESSAGES .. @@ -307,6 +311,10 @@ LC_MESSAGES .. .. + nds + LC_MESSAGES + .. + .. ne LC_MESSAGES .. @@ -335,6 +343,10 @@ LC_MESSAGES .. .. + no_NY + LC_MESSAGES + .. + .. nso LC_MESSAGES .. diff --git a/mk/bsd.pkg.install.mk b/mk/bsd.pkg.install.mk index e0989a1cd8b..9f135dec69f 100644 --- a/mk/bsd.pkg.install.mk +++ b/mk/bsd.pkg.install.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.install.mk,v 1.65.2.1 2004/12/31 20:25:30 tv Exp $ +# $NetBSD: bsd.pkg.install.mk,v 1.65.2.2 2005/01/24 18:40:01 tv Exp $ # # This Makefile fragment is included by bsd.pkg.mk to use the common # INSTALL/DEINSTALL scripts. To use this Makefile fragment, simply: @@ -13,8 +13,8 @@ BSD_PKG_INSTALL_MK= 1 .include "../../mk/bsd.prefs.mk" -DEINSTALL_FILE= ${WRKDIR}/.DEINSTALL -INSTALL_FILE= ${WRKDIR}/.INSTALL +DEINSTALL_FILE= ${PKG_DB_TMPDIR}/+DEINSTALL +INSTALL_FILE= ${PKG_DB_TMPDIR}/+INSTALL # These are the template scripts for the INSTALL/DEINSTALL scripts. Packages # may do additional work in the INSTALL/DEINSTALL scripts by overriding the @@ -299,11 +299,13 @@ INSTALL_SCRIPTS_ENV= PKG_PREFIX=${PREFIX} .PHONY: pre-install-script post-install-script pre-install-script: generate-install-scripts - ${_PKG_SILENT}${_PKG_DEBUG}${SETENV} ${INSTALL_SCRIPTS_ENV} \ + ${_PKG_SILENT}${_PKG_DEBUG}cd ${PKG_DB_TMPDIR} && \ + ${SETENV} ${INSTALL_SCRIPTS_ENV} \ ${_PKG_DEBUG_SCRIPT} ${INSTALL_FILE} ${PKGNAME} PRE-INSTALL post-install-script: - ${_PKG_SILENT}${_PKG_DEBUG}${SETENV} ${INSTALL_SCRIPTS_ENV} \ + ${_PKG_SILENT}${_PKG_DEBUG}cd ${PKG_DB_TMPDIR} && \ + ${SETENV} ${INSTALL_SCRIPTS_ENV} \ ${_PKG_DEBUG_SCRIPT} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL .PHONY: generate-install-scripts @@ -313,6 +315,7 @@ generate-install-scripts: # do nothing .if !empty(DEINSTALL_SRC) generate-install-scripts: ${DEINSTALL_FILE} ${DEINSTALL_FILE}: ${DEINSTALL_SRC} + ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H} ${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC} | \ ${SED} ${FILES_SUBST_SED} > ${.TARGET} ${_PKG_SILENT}${_PKG_DEBUG}${CHMOD} +x ${.TARGET} @@ -321,6 +324,7 @@ ${DEINSTALL_FILE}: ${DEINSTALL_SRC} .if !empty(INSTALL_SRC) generate-install-scripts: ${INSTALL_FILE} ${INSTALL_FILE}: ${INSTALL_SRC} + ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H} ${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC} | \ ${SED} ${FILES_SUBST_SED} > ${.TARGET} ${_PKG_SILENT}${_PKG_DEBUG}${CHMOD} +x ${.TARGET} diff --git a/mk/bulk/bsd.bulk-pkg.mk b/mk/bulk/bsd.bulk-pkg.mk index 52bbf4f960a..91bd8a7cc1f 100644 --- a/mk/bulk/bsd.bulk-pkg.mk +++ b/mk/bulk/bsd.bulk-pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.bulk-pkg.mk,v 1.65.2.2 2005/01/13 20:11:55 tv Exp $ +# $NetBSD: bsd.bulk-pkg.mk,v 1.65.2.3 2005/01/24 18:40:01 tv Exp $ # # Copyright (c) 1999, 2000 Hubert Feyrer <hubertf@NetBSD.org> @@ -53,6 +53,12 @@ WC?= wc # they're known to exist and be up to date, don't use them. USE_BULK_CACHE?= no +# This variable may be set to 'no' to avoid automatic rebuilding of dependent +# packages based solely on timestamps of the package's pkgsrc files and/or +# its dependency binary packages. This will cause rebuilding only when the +# full version number of the package changes (e.g., via PKGREVISION bump). +USE_BULK_TIMESTAMPS?= yes + # Shall we remove any packages which are installed, but not required # to build this package PRECLEAN?= yes @@ -118,6 +124,10 @@ ORDERFILE?= ${BULKFILESDIR}/.order${BULK_ID} # eventually for looking for leftover files (files not properly deinstalled) STARTFILE?= ${BULKFILESDIR}/.start${BULK_ID} +# File created and used by lintpkgsrc(8) to cache package metadata for +# pruning and bulk-upload exclusions. +LINTPKGSRC_DB?= ${BULKFILESDIR}/.lintpkgsrc.db${BULK_ID} + # File which is used as a database for bulk builds in which SPECIFIC_PKGS is # defined. This database is used to hold all the dependency and index # information for the specific packages as well as their dependencies. In a @@ -190,39 +200,46 @@ clean-bulk-cache: # check if the $REF file is uptodate, i.e. is newer than any of # the pkg files; prints "1" if upto date, "0" if not. bulk-check-uptodate: - @uptodate=1 ; \ + @uptodate=1; \ if [ -f "${REF}" ]; then \ - ${SHCOMMENT} "Check files of this package" ; \ - newfiles="`${FIND} . -type f -newer "${REF}" -print | ${EGREP} -v -e ./work -e COMMENT -e DESCR -e README.html -e CVS -e '^\./\.' || ${TRUE}`" ; \ - nnewfiles="`${FIND} . -type f -newer "${REF}" -print | ${EGREP} -v -e ./work -e COMMENT -e DESCR -e README.html -e CVS -e '^\./\.' | ${WC} -l`" ; \ - if [ "$$nnewfiles" -gt 0 ]; then \ - ${ECHO_MSG} >&2 "BULK> Package ${PKGNAME} ($$newfiles) modified since last 'make package' re-packaging..." ; \ - uptodate=0 ; \ + if [ "${REF:T}" != "${PKGFILE:T}" ]; then \ + ${ECHO_MSG} >&2 "BULK> ${REF} is out of date (new version ${PKGNAME}); rebuilding..."; \ + uptodate=0; \ + elif [ "${USE_BULK_TIMESTAMPS}" = "yes" ]; then \ + ${SHCOMMENT} "Check files of this package"; \ + newfiles="`${FIND} . -type f -newer "${REF}" -print | ${EGREP} -v -e ./work -e COMMENT -e DESCR -e README.html -e CVS -e '^\./\.' || ${TRUE}`"; \ + nnewfiles="`${FIND} . -type f -newer "${REF}" -print | ${EGREP} -v -e ./work -e COMMENT -e DESCR -e README.html -e CVS -e '^\./\.' | ${WC} -l`"; \ + if [ "$$nnewfiles" -gt 0 ]; then \ + ${ECHO_MSG} >&2 "BULK> Package ${PKGNAME} ($$newfiles) modified since last 'make package' re-packaging..."; \ + uptodate=0; \ + else \ + ${ECHO_MSG} >&2 "BULK> ${REF} is up to date."; \ + fi; \ else \ - ${ECHO_MSG} >&2 "BULK> ${REF} is up to date." ; \ - fi ; \ + ${ECHO_MSG} >&2 "BULK> ${REF} is up to date."; \ + fi; \ else \ - ${ECHO_MSG} >&2 "BULK> Package ${PKGNAME} not built yet, packaging..." ; \ - uptodate=0 ; \ - fi ; \ + ${ECHO_MSG} >&2 "BULK> Package ${PKGNAME} not built yet, packaging..."; \ + uptodate=0; \ + fi; \ if [ "$$uptodate" = "1" ]; then \ - ${SHCOMMENT} "Check required binary packages" ; \ + ${SHCOMMENT} "Check required binary packages"; \ (${DEPENDS:C/:.*$//:@d@${ECHO} ${d:Q};@} ${TRUE}) | \ - while read dep; do \ - ${SHCOMMENT} "check against the binary pkg that pkg_add would pick, too:" ; \ - ${SHCOMMENT} "(Only one should be returned here, really...)" ; \ - pkg=`${PKG_ADMIN} lsbest "${PACKAGES}/All/$$dep"` ; \ + (while read dep; do \ + ${SHCOMMENT} "check against the binary pkg that pkg_add would pick, too:"; \ + ${SHCOMMENT} "(Only one should be returned here, really...)"; \ + pkg=`${PKG_ADMIN} lsbest "${PACKAGES}/All/$$dep"`; \ if [ -z "$$pkg" ]; then \ - ${ECHO_MSG} >&2 "BULK> Required binary package $$dep does not exist, rebuilding... " ; \ - uptodate=0 ; \ - elif [ -n "$$(${FIND} $$pkg -prune -newer ${REF} -print)" ]; then \ - ${ECHO_MSG} >&2 "BULK> Required binary package $$dep (`basename $$pkg`) is newer, rebuilding... " ; \ - uptodate=0 ; \ + ${ECHO_MSG} >&2 "BULK> Required binary package $$dep does not exist, rebuilding..."; \ + exit 1; \ + elif [ "${USE_BULK_TIMESTAMPS}" = "yes" ] && [ -n "`${FIND} $$pkg -prune -newer ${REF} -print`" ]; then \ + ${ECHO_MSG} >&2 "BULK> Required binary package $$dep (`basename $$pkg`) is newer, rebuilding..."; \ + exit 1; \ else \ - ${ECHO_MSG} >&2 "BULK> Required binary package $$dep (`basename $$pkg`) is usable. " ; \ - fi ; \ - done ; \ - fi ; \ + ${ECHO_MSG} >&2 "BULK> Required binary package $$dep (`basename $$pkg`) is usable."; \ + fi; \ + done) || uptodate=0; \ + fi; \ ${ECHO_MSG} $$uptodate # rebuild binpkg if any of the pkg files is newer than the binary archive @@ -398,7 +415,7 @@ bulk-package: fi; \ ${ECHO_MSG} "BULK> $$pkgname ($$pkgdir) is broken because it depends upon ${PKGNAME} (${PKGPATH}) which is broken." \ >> ${PKGSRCDIR}/$$pkgdir/${BROKENFILE};\ - ${ECHO_MSG} "Please view the <a href=\"../../${PKGPATH}/${BROKENFILE}\">build log for ${PKGNAME}</a>" \ + ${ECHO_MSG} "Please view the <a href=\"../../${PKGPATH}/${BROKENFILE}\">build log for ${PKGNAME}</a>.<br />" \ >> ${PKGSRCDIR}/$$pkgdir/${BROKENFILE};\ nbrokenby=`expr $$nbrokenby + 1`;\ if ${GREP} -q " $$pkgdir/${BROKENFILE}" ${PKGSRCDIR}/${BROKENFILE} ; then :; else \ diff --git a/mk/bulk/build b/mk/bulk/build index 4c46c7fc700..be9fa6f819f 100644 --- a/mk/bulk/build +++ b/mk/bulk/build @@ -1,5 +1,5 @@ #!/bin/sh -# $NetBSD: build,v 1.45.2.2 2004/12/20 20:46:00 tv Exp $ +# $NetBSD: build,v 1.45.2.3 2005/01/24 18:40:01 tv Exp $ # # Copyright (c) 1999, 2000 Hubert Feyrer <hubertf@NetBSD.org> @@ -167,7 +167,7 @@ unset DISPLAY # allow sane failure for gimp, xlispstat # Check that the pkg_tools are up to date (cd ${USR_PKGSRC}/pkgtools/pkglint && \ - ${BMAKE} uptodate-pkgtools >/dev/null 2>&1) || \ + ${BMAKE} fetch >/dev/null 2>&1 ) || \ ( echo "Updating pkgtools" && \ cd ${USR_PKGSRC}/pkgtools/pkg_install && ${BMAKE} clean && \ ${BMAKE} install && ${BMAKE} clean ) diff --git a/mk/bulk/build.conf-example b/mk/bulk/build.conf-example index 4a25b9595f4..f6d6ae6b4ee 100644 --- a/mk/bulk/build.conf-example +++ b/mk/bulk/build.conf-example @@ -1,5 +1,5 @@ # build.conf -# $NetBSD: build.conf-example,v 1.22 2004/08/12 22:18:07 sketch Exp $ +# $NetBSD: build.conf-example,v 1.22.4.1 2005/01/24 18:40:01 tv Exp $ # # config file in /bin/sh syntax for {,pre,post}-build # @@ -12,7 +12,7 @@ FTPx=`date +%Y%m%d.%H%M` FTPURL="pub/NetBSD/pkgstat/${FTPx}" # relative to ~ftp ! FTP="/home/ftp/${FTPURL}" # absolute base path -FTPHOST="ftp://ftp.machi.ne" # host for broken.html +FTPHOST="ftp://ftp.machi.ne" # host for broken.html # Where build will mail the report ADMIN="you@some.whe.re" @@ -40,6 +40,14 @@ CVS_USER="yourlogin" # can be set to 'yes' or 'no'. PRUNEDISTFILES=no +# prune binary packages to remove those which are out of date +# can be set to 'yes' or 'no'. +PRUNEPACKAGES=yes + +# whether to cache the lintpkgsrc database for PRUNE* or uploading +# can be set to 'yes' or 'no'. +LINTPKGSRC_CACHE=no + # Proxies (optional): #ftp_proxy=http://proxy.machi.ne:3128/ #http_proxy=http://proxy.machi.ne:3128/ @@ -57,6 +65,12 @@ RSYNC_OPTS='-e ssh' # Nice level for builds NICE_LEVEL="nice -n 20" +# Whether or not to create checksum files +MKSUMS=yes + +# If you want to PGP sign the checksum files, set and correct +#SIGN_AS=username@NetBSD.org + ########################################################################### ### No changes should be needed below this line !!! ########################################################################### diff --git a/mk/bulk/post-build b/mk/bulk/post-build index bf894c0f790..41b79f5ee16 100644 --- a/mk/bulk/post-build +++ b/mk/bulk/post-build @@ -1,5 +1,5 @@ #!/usr/pkg/bin/perl -# $NetBSD: post-build,v 1.47.2.2 2005/01/13 20:11:55 tv Exp $ +# $NetBSD: post-build,v 1.47.2.3 2005/01/24 18:40:01 tv Exp $ # # Collect stuff after a pkg bulk build # @@ -217,9 +217,9 @@ sub pkgResult ($$) { my $file = ""; my $ver = ""; foreach my $ident (@idents) { - $ident =~ /\$[N]etBSD: ([^ ]*),v ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) Exp \$/; - if ("$3 $4" gt $datetime) { - $datetime = "$3 $4"; + $ident =~ /\$[N]etBSD: ([^ ]*),v [^ ]* ([^ ]*) ([^ ]*) [^ ]* Exp \$/; + if (defined($2) && defined($3) && ("$2 $3" gt $datetime)) { + $datetime = "$2 $3"; $file = $1; $ver = $1; } @@ -227,6 +227,9 @@ sub pkgResult ($$) { my $maintainer = `grep ^MAINTAINER $vars{USR_PKGSRC}/$pkg/Makefile`; $maintainer =~ s/MAINTAINER=[ \t]*//; + if (! $maintainer) { + $maintainer = `cd $vars{USR_PKGSRC}/$pkg ; $BMAKE show-var VARNAME=MAINTAINER`; + } $maintainer =~ s/</</g; $maintainer =~ s/>/>/g; chomp($maintainer); diff --git a/mk/bulk/pre-build b/mk/bulk/pre-build index 4ae1398ba77..bf74926ef5a 100644 --- a/mk/bulk/pre-build +++ b/mk/bulk/pre-build @@ -1,5 +1,5 @@ #!/bin/sh -# $NetBSD: pre-build,v 1.40.2.1 2005/01/13 20:11:55 tv Exp $ +# $NetBSD: pre-build,v 1.40.2.2 2005/01/24 18:40:01 tv Exp $ # # Clean up system to be ready for bulk pkg build # @@ -16,8 +16,8 @@ else fi PRUNEDISTFILES=${PRUNEDISTFILES:-"no"} -PRUNEPACKAGES=${PRUNEPACKAGES:-"no"} -PRUNELINKS=${PRUNEPACKAGES:-"no"} +PRUNEPACKAGES=${PRUNEPACKAGES:-"yes"} +PRUNELINKS=${PRUNEPACKAGES:-"yes"} PKGLINT_PKG_DIR=${USR_PKGSRC}/pkgtools/pkglint @@ -40,6 +40,11 @@ if [ "$BLDLOG" = "" ]; then echo "Had problems determining the name of the .make files" exit 1 fi +LINTPKGSRC_DB=`( cd ${PKGLINT_PKG_DIR} ; ${BMAKE} show-var VARNAME=LINTPKGSRC_DB )`; +if [ "$LINTPKGSRC_DB" = "" ]; then + echo "Had problems determining the name of the .lintpkgsrc.db file" + exit 1 +fi STARTFILE=`( cd ${PKGLINT_PKG_DIR} ; ${BMAKE} show-var VARNAME=STARTFILE )`; if [ "$STARTFILE" = "" ]; then echo "Had problems determining the name of the .start file" @@ -171,11 +176,29 @@ fi DISTDIR=`( cd ${PKGLINT_PKG_DIR} ; ${BMAKE} show-var VARNAME=DISTDIR )`; PACKAGES=`( cd ${PKGLINT_PKG_DIR} ; ${BMAKE} show-var VARNAME=PACKAGES )`; +case "$LINTPKGSRC_CACHE$PRUNEDISTFILES$PRUNEPACKAGES" in +*yes*|*YES*) + # install pkglint to support any of these options + ( cd ${PKGLINT_PKG_DIR} ; ${BMAKE} PRECLEAN=yes bulk-install ) + ;; +esac + +case "$LINTPKGSRC_CACHE" in +yes|YES) + echo "Creating lintpkgsrc cache database." + lintpkgsrc -K $PACKAGES -P $USR_PKGSRC -M $DISTDIR -E $LINTPKGSRC_DB + lintpkgsrc_cache="-I $LINTPKGSRC_DB" + echo done. + ;; +*) + lintpkgsrc_cache='' + ;; +esac + case "$PRUNEDISTFILES" in yes|YES) echo "Removing old/broken distfiles" - ( cd ${PKGLINT_PKG_DIR} ; ${BMAKE} PRECLEAN=yes bulk-install ) - lintpkgsrc -K $PACKAGES -P $USR_PKGSRC -M $DISTDIR -o -m -r + lintpkgsrc $lintpkgsrc_cache -K $PACKAGES -P $USR_PKGSRC -M $DISTDIR -o -m -r echo done. ;; *) @@ -186,8 +209,7 @@ esac case "$PRUNEPACKAGES" in yes|YES) echo "Removing old (out of date) binary packages" - ( cd ${PKGLINT_PKG_DIR} ; ${BMAKE} PRECLEAN=yes bulk-install ) - lintpkgsrc -K $PACKAGES -P $USR_PKGSRC -M $DISTDIR -p -r + lintpkgsrc $lintpkgsrc_cache -K $PACKAGES -P $USR_PKGSRC -M $DISTDIR -p -r echo done. ;; *) diff --git a/mk/bulk/upload b/mk/bulk/upload index d31b3918640..e7d88f4cada 100644 --- a/mk/bulk/upload +++ b/mk/bulk/upload @@ -1,14 +1,25 @@ #!/bin/sh -# $NetBSD: upload,v 1.18 2004/04/19 18:39:09 hubertf Exp $ +# $NetBSD: upload,v 1.18.6.1 2005/01/24 18:40:01 tv Exp $ # # Upload non-restricted binary pkgs to ftp server -# Must be called in $USR_PKGSRC # +MD5="digest md5"; +SHA1="digest sha1"; + opsys=`uname -s` case "$opsys" in -NetBSD) BMAKE=make ;; +NetBSD) BMAKE=make; + BSDSUM="sum -o 1"; + CKSUM="cksum"; + SYSVSUM="sum -o 2"; + ;; +IRIX*) BMAKE=bmake; +# BSDSUM="sum -r"; +# CKSUM="cksum"; +# SYSVSUM="sum"; + ;; *) BMAKE=bmake ;; esac @@ -26,6 +37,8 @@ else . `dirname $0`/build.conf fi +cd $USR_PKGSRC + if [ "$RSYNC_DST_SPECIFIC" != "" -o "$RSYNC_DST_OTHER" != "" ]; then echo Use of RSYNC_DST_SPECIFIC and RSYNC_DST_OTHER is deprecated. echo Please just set RSYNC_DST in build.conf. @@ -74,21 +87,76 @@ else echo '(skipped)' fi +case $LINTPKGSRC_CACHE in +yes|YES) + lintpkgsrc_cache="-I `cd pkgtools/pkglint ; ${BMAKE} show-var VARNAME=LINTPKGSRC_DB`" + ;; +*) + lintpkgsrc_cache='' + ;; +esac + echo "Checking for restricted, out of date, and vulnerable packages:" # -p = report old versions of packages # -R = report restricted packages # -V = report vulnerable packages -lintpkgsrc -K $packages -P $pkgsrcdir -pRV | sed 's@'$packages'/@@' > $exf +lintpkgsrc $lintpkgsrc_cache -K $packages -P $pkgsrcdir -pRV | sed 's@'$packages'/@@' > $exf echo "Checking for OSVERSION_SPECIFIC pkgs:" -lintpkgsrc -K $packages -P $pkgsrcdir -O | sed 's@'$packages'/@@' > $osf - +lintpkgsrc $lintpkgsrc_cache -K $packages -P $pkgsrcdir -O | sed 's@'$packages'/@@' > $osf RSFLAGS="-vap --progress $RSYNC_OPTS" failed=no cd $packages +if [ "${MKSUMS}" = "yes" -o "${MKSUMS}" = "YES" ]; then + + SUMFILES="BSDSUM CKSUM MD5 SHA1 SYSVSUM" + + rm -f ${SUMFILES} + + if [ x"${SIGN_AS}" != x"" ]; then + ( cd ${pkgsrcdir}/security/gnupg; ${BMAKE} bulk-install ) + for i in ${SUMFILES}; do + echo > $i + echo "This file is signed with ${SIGN_AS}'s PGP key." >> $i + echo >> $i + done + fi + + ( cd ${pkgsrcdir}/pkgtools/digest; ${BMAKE} bulk-install ) + + [ -z "${BSDSUM}" ] && BSDSUM="echo" + [ -z "${CKSUM}" ] && CKSUM="echo" + [ -z "${SYSVSUM}" ] && SYSVSUM="echo" + + for i in All/*; do + if ! grep -q $i $exf; then + ${BSDSUM} $i >> BSDSUM + ${CKSUM} $i >> CKSUM + ${MD5} $i >> MD5 + ${SHA1} $i >> SHA1 + ${SYSVSUM} $i >> SYSVSUM + fi + done + + [ "${BSDSUM}" = "echo" ] && rm BSDSUM + [ "${CKSUM}" = "echo" ] && rm CKSUM + [ "${SYSVSUM}" = "echo" ] && rm SYSVSUM + + if [ x"${SIGN_AS}" != x"" ]; then + for i in ${SUMFILES}; do + if [ -s $i ]; then + echo "Signing $i" + gpg --clearsign $i && rm $i + echo ${i}.asc >> $osf + fi + done + fi +fi + + echo "#!/bin/sh" > $upload echo "packages=$packages" >> $upload echo "if ! cd $packages ; then" >> $upload diff --git a/mk/compiler/f2c.mk b/mk/compiler/f2c.mk index 49d5a8369c4..b0dd069a068 100644 --- a/mk/compiler/f2c.mk +++ b/mk/compiler/f2c.mk @@ -1,4 +1,4 @@ -# $NetBSD: f2c.mk,v 1.3.2.2 2005/01/13 20:11:55 tv Exp $ +# $NetBSD: f2c.mk,v 1.3.2.3 2005/01/24 18:40:01 tv Exp $ # # Copyright (c) 2005 The NetBSD Foundation, Inc. # All rights reserved. @@ -70,7 +70,6 @@ _USE_F2C= YES .if !empty(_USE_F2C:M[yY][eE][sS]) EVAL_PREFIX+= _F2CBASE=f2c _F2CBASE_DEFAULT= ${LOCALBASE} -_F2CBASE?= ${LOCALBASE} _F2C_DIR= ${WRKDIR}/.f2c _F2C_VARS= # empty diff --git a/mk/compiler/gcc.mk b/mk/compiler/gcc.mk index dd5a7b5180e..0286bf3f489 100644 --- a/mk/compiler/gcc.mk +++ b/mk/compiler/gcc.mk @@ -1,4 +1,4 @@ -# $NetBSD: gcc.mk,v 1.74.2.3 2005/01/13 20:11:55 tv Exp $ +# $NetBSD: gcc.mk,v 1.74.2.4 2005/01/24 18:40:01 tv Exp $ .if !defined(COMPILER_GCC_MK) COMPILER_GCC_MK= defined @@ -417,20 +417,26 @@ BUILD_DEPENDS+= ${_GCC_DEPENDENCY} .endif # Create compiler driver scripts in ${WRKDIR}. +GCC_USE_SYMLINKS?= no .for _var_ in ${_GCC_VARS} . if !target(${_GCC_${_var_}}) override-tools: ${_GCC_${_var_}} ${_GCC_${_var_}}: ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H} +. if !empty(GCC_USE_SYMLINKS:Myes) + ${_PKG_SILENT}${_PKG_DEBUG}${RM} -f ${.TARGET} + ${_PKG_SILENT}${_PKG_DEBUG}${LN} -s ${_GCCBINDIR}/${.TARGET:T} ${.TARGET} +. else ${_PKG_SILENT}${_PKG_DEBUG} \ (${ECHO} '#!${TOOLS_SHELL}'; \ ${ECHO} 'exec ${_GCCBINDIR}/${.TARGET:T} "$$@"'; \ ) > ${.TARGET} ${_PKG_SILENT}${_PKG_DEBUG}${CHMOD} +x ${.TARGET} +. endif . for _alias_ in ${_ALIASES.${_var_}:S/^/${.TARGET:H}\//} ${_PKG_SILENT}${_PKG_DEBUG} \ if [ ! -x "${_alias_}" ]; then \ - ${LN} -f ${.TARGET} ${_alias_}; \ + ${LN} -f -s ${.TARGET:T} ${_alias_}; \ fi . endfor . endif diff --git a/mk/dlopen.builtin.mk b/mk/dlopen.builtin.mk index 22b1b3e0506..9d84a05c051 100644 --- a/mk/dlopen.builtin.mk +++ b/mk/dlopen.builtin.mk @@ -1,4 +1,4 @@ -# $NetBSD: dlopen.builtin.mk,v 1.6.2.5 2005/01/10 16:15:25 tv Exp $ +# $NetBSD: dlopen.builtin.mk,v 1.6.2.6 2005/01/24 18:40:01 tv Exp $ .for _lib_ in dl . if !defined(_BLNK_LIB_FOUND.${_lib_}) @@ -36,7 +36,8 @@ USE_BUILTIN.dl= no # Darwin uses devel/dlcompat # support. # _DLOPEN_REQUIRE_PTHREAD_PLATFORMS= \ - NetBSD-2.[0-9]-* NetBSD-2.[0-9]_*-* \ + NetBSD-2.[0-9]_*-* \ + NetBSD-2.[0-9]-* NetBSD-2.[0-9].[0-9]*-* \ NetBSD-2.[0-8][0-9]*-* NetBSD-2.9[0-8]*-* \ NetBSD-2.99.[0-9]-* NetBSD-2.99.10-* diff --git a/mk/pam.buildlink3.mk b/mk/pam.buildlink3.mk new file mode 100644 index 00000000000..aa397fd9ca8 --- /dev/null +++ b/mk/pam.buildlink3.mk @@ -0,0 +1,77 @@ +# $NetBSD: pam.buildlink3.mk,v 1.3.2.2 2005/01/24 18:40:01 tv Exp $ +# +# This Makefile fragment is meant to be included by packages that +# require a PAM implementation. pam.buildlink3.mk will: +# +# * set PAMBASE to the base directory of the PAM files; +# * set PAM_TYPE to the PAM implementation used. +# +# There are two variables that can be used to tweak the selection of +# the PAM implementation: +# +# PAM_DEFAULT is a user-settable variable whose value is the default +# PAM implementation to use. +# +# PAM_ACCEPTED is a package-settable list of PAM implementations +# that may be used by the package. +# + +PAM_BUILDLINK3_MK:= ${PAM_BUILDLINK3_MK}+ + +.include "../../mk/bsd.prefs.mk" + +.if !empty(PAM_BUILDLINK3_MK:M+) +# +# This is an exhaustive list of all of the PAM implementations +# that may be used with PAM.buildlink3.mk, in order of precedence. +# +_PAM_PKGS?= linux-pam openpam solaris-pam + +BUILDLINK_BUILTIN_MK.linux-pam= ../../security/PAM/builtin.mk +BUILDLINK_BUILTIN_MK.openpam= ../../security/openpam/builtin.mk +BUILDLINK_BUILTIN_MK.solaris-pam= ../../mk/solaris-pam.builtin.mk + +# If we have a particular PAM implementation in the base system, then +# default to using that PAM type. Otherwise, default to "linux-pam". +# +. for _pam_ in ${_PAM_PKGS} +. if exists(${BUILDLINK_BUILTIN_MK.${_pam_}}) +CHECK_BUILTIN.${_pam_}:= yes +. include "${BUILDLINK_BUILTIN_MK.${_pam_}}" +. if defined(IS_BUILTIN.${_pam_}) && \ + !empty(IS_BUILTIN.${_pam_}:M[yY][eE][sS]) +PAM_DEFAULT?= ${_pam_} +. endif +CHECK_BUILTIN.${_pam_}:= no +. endif +. endfor +PAM_DEFAULT?= linux-pam +PAM_ACCEPTED?= ${_PAM_PKGS} + +_PAM_DEFAULT= ${PAM_DEFAULT} +_PAM_ACCEPTED= ${PAM_ACCEPTED} + +_PAM_TYPE?= ${_PAM_DEFAULT} + +. if !empty(_PAM_ACCEPTED:M${_PAM_TYPE}) +PAM_TYPE= ${_PAM_TYPE} +. else +PAM_TYPE= none +. endif +PAMBASE= ${BUILDLINK_PREFIX.${PAM_TYPE}} + +BUILD_DEFS+= PAM_TYPE +BUILD_DEFS+= PAMBASE +.endif # PAM_BUILDLINK3_MK + +.if ${PAM_TYPE} == "none" +PKG_FAIL_REASON= \ + "${_PAM_TYPE} is not an acceptable PAM type for ${PKGNAME}." +.elif ${PAM_TYPE} == "linux-pam" +. include "../../security/PAM/buildlink3.mk" +.elif ${PAM_TYPE} == "openpam" +. include "../../security/openpam/buildlink3.mk" +.elif ${PAM_TYPE} == "solaris-pam" +BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nsolaris-pam} +BUILDLINK_PACKAGES+= solaris-pam +.endif diff --git a/mk/platform/Interix.mk b/mk/platform/Interix.mk index 87909edec32..77af9347cfa 100644 --- a/mk/platform/Interix.mk +++ b/mk/platform/Interix.mk @@ -1,4 +1,4 @@ -# $NetBSD: Interix.mk,v 1.13 2004/11/19 13:10:05 tv Exp $ +# $NetBSD: Interix.mk,v 1.13.2.1 2005/01/24 18:40:01 tv Exp $ # # Variable definitions for the Interix operating system. @@ -19,12 +19,22 @@ # # pkg start end slotsize #slots # +# <bsd.lib.mk> 0x50000000 0x6fffffff 0x00040000 2048 # libtool-base 0x50000000 0x6fffffff 0x00040000 2048 # netpbm 0x6b000000 0x6cffffff 0x00100000 32 # openssl 0x5e000000 0x5fffffff 0x00100000 32 # perl58 * +# python23 * +# ruby16 0x50000000 0x6fffffff 0x00040000 2048 +# (main lib) 0x48000000 +# ruby18 0x50000000 0x6fffffff 0x00040000 2048 +# (main lib) 0x48000000 # zsh * +# "catinstall" not yet supported as there's no shipped [gn]roff +MANINSTALL= maninstall +MAKE_FLAGS+= MKCATPAGES=no NOLINT=1 + AWK?= /usr/contrib/bin/gawk BASENAME?= /bin/basename CAT?= /bin/cat @@ -107,6 +117,7 @@ _PKG_USER_HOME?= # empty by default _USER_DEPENDS= user>=20040426:../../sysutils/user_interix CPP_PRECOMP_FLAGS?= # unset +CONFIG_RPATH_OVERRIDE?= config.rpath */config.rpath */*/config.rpath DEF_UMASK?= 002 EXPORT_SYMBOLS_LDFLAGS?=-Wl,-E # add symbols to the dynamic symbol table @@ -178,15 +189,11 @@ SERIAL_DEVICES?= /dev/tty00 /dev/tty01 /dev/tty02 /dev/tty03 # poll(2) is broken; try to work around it by making autoconf believe # it's missing. (Packages without autoconf will need explicit fixing.) -.ifdef GNU_CONFIGURE -CONFIGURE_ENV+= ac_cv_header_poll_h=no ac_cv_func_poll=no -.endif +CONFIGURE_ENV+= ${GNU_CONFIGURE:Dac_cv_header_poll_h=no ac_cv_func_poll=no} # check for maximum command line length and set it in configure's environment, # to avoid a test required by the libtool script that takes forever. -.if defined(GNU_CONFIGURE) && defined(USE_LIBTOOL) _OPSYS_MAX_CMDLEN= 262144 -.endif # If games are to be installed setgid, then SETGIDGAME is set to 'yes' # (it defaults to 'no' as per bsd.pkg.defaults.mk). diff --git a/mk/pthread.builtin.mk b/mk/pthread.builtin.mk index 5b86375ff87..4b9102572d7 100644 --- a/mk/pthread.builtin.mk +++ b/mk/pthread.builtin.mk @@ -1,4 +1,4 @@ -# $NetBSD: pthread.builtin.mk,v 1.2.2.2 2004/12/09 17:15:01 tv Exp $ +# $NetBSD: pthread.builtin.mk,v 1.2.2.3 2005/01/24 18:40:01 tv Exp $ .for _lib_ in pthread c_r rt . if !defined(_BLNK_LIB_FOUND.${_lib_}) @@ -45,7 +45,8 @@ BUILDLINK_LDFLAGS.pthread= # empty # XXX # XXX This should really be a check for GCC! # XXX -. if ${OPSYS} == "FreeBSD" || ${OPSYS} == "Linux" || ${OPSYS} == "NetBSD" +BUILDLINK_OPSYS_SUPPORT_PTHREAD= DragonFly FreeBSD Linux NetBSD +. if !empty(BUILDLINK_OPSYS_SUPPORT_PTHREAD:M${OPSYS}) BUILDLINK_CFLAGS.pthread+= -pthread BUILDLINK_LDFLAGS.pthread+= -pthread . elif ${OPSYS} == "OSF1" diff --git a/mk/solaris-pam.builtin.mk b/mk/solaris-pam.builtin.mk new file mode 100644 index 00000000000..86ab3d32aca --- /dev/null +++ b/mk/solaris-pam.builtin.mk @@ -0,0 +1,28 @@ +# $NetBSD: solaris-pam.builtin.mk,v 1.2.2.2 2005/01/24 18:40:01 tv Exp $ + +_SOLARIS_PAM_APPL_HEADERS= /usr/include/security/pam_appl.h +_SOLARIS_PAM_IDENT= Copyright.*Sun Microsystems + +.if !defined(IS_BUILTIN.solaris-pam) +IS_BUILTIN.solaris-pam= no +. for _inc_ in ${_SOLARIS_PAM_APPL_HEADERS} +. if !empty(IS_BUILTIN.solaris-pam:M[nN][oO]) && exists(${_inc_}) +IS_BUILTIN.solaris-pam!= \ + case ${_inc_} in \ + ${LOCALBASE}/*) \ + ${ECHO} "no"; \ + ;; \ + *) \ + if ${GREP} -q "${_SOLARIS_PAM_IDENT}" ${_inc_}; then \ + ${ECHO} "yes"; \ + else \ + ${ECHO} "no"; \ + fi; \ + ;; \ + esac +. endif +. endfor +BUILDLINK_VARS+= IS_BUILTIN.solaris-pam +.endif # IS_BUILTIN.solaris-pam + +USE_BUILTIN.solaris-pam?= ${IS_BUILTIN.solaris-pam} diff --git a/mk/tools.mk b/mk/tools.mk index d7cad091927..75424a5bcd6 100644 --- a/mk/tools.mk +++ b/mk/tools.mk @@ -1,4 +1,4 @@ -# $NetBSD: tools.mk,v 1.46.2.3 2004/12/31 20:25:30 tv Exp $ +# $NetBSD: tools.mk,v 1.46.2.4 2005/01/24 18:40: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}. @@ -131,7 +131,7 @@ _TOOLS_OPSYS_HAS_GNU.awk+= FreeBSD-*-* Interix-*-* Linux-*-* OpenBSD-*-* _TOOLS_OPSYS_HAS_GNU.awk+= NetBSD-1.[0-6]*-* DragonFly-*-* _TOOLS_OPSYS_HAS_GNU.grep+= Darwin-*-* FreeBSD-*-* Linux-*-* _TOOLS_OPSYS_HAS_GNU.grep+= NetBSD-*-* OpenBSD-*-* DragonFly-*-* -_TOOLS_OPSYS_HAS_GNU.lex+= FreeBSD-*-* Interix-*-* Linux-*-* NetBSD-*-* +_TOOLS_OPSYS_HAS_GNU.lex+= FreeBSD-*-* Linux-*-* NetBSD-*-* _TOOLS_OPSYS_HAS_GNU.lex+= OpenBSD-*-* DragonFly-*-* _TOOLS_OPSYS_HAS_GNU.m4+= # empty _TOOLS_OPSYS_HAS_GNU.make+= Darwin-*-* diff --git a/mk/wrapper/NOTES b/mk/wrapper/NOTES index 0a84bf22672..f3262979360 100644 --- a/mk/wrapper/NOTES +++ b/mk/wrapper/NOTES @@ -1,4 +1,4 @@ -$NetBSD: NOTES,v 1.1 2004/09/21 15:01:41 jlam Exp $ +$NetBSD: NOTES,v 1.1.2.1 2005/01/24 18:40:01 tv Exp $ ==> {"$@"} ,--> {argbuf} ,--> {cmdbuf} @@ -8,24 +8,24 @@ $NetBSD: NOTES,v 1.1 2004/09/21 15:01:41 jlam Exp $ | | | | | | v v | | | | | | - [scan] [arg-source] `--> [logic] `--> [cmd-sink] + [scan] [arg-source] `--> [logic] `--------> [cmd-sink] - ^ ^ ^ ^ - | | | | - ,-----------------' | | | - | ,-------' `---. | - | | | | - v v v v + ^ ^ ^ ^ ^ ^ + ,-----------------------------' | | | | | + | ,-------------------' | | | | + | | ,-------------' | | | + | | | ,---' `-------. | + v v v v v v - [cache] [transform.sed] [transform] [buildcmd] + [arg-pp-main] [arg-pp] [cache] [transform.sed] [transform] [buildcmd] - | - ,-- {cmd} <--| - {cmd} <===| | - `-- {libs} <--' + | + ,-- {cmd} <--| + {cmd} <===| | + `-- {libs} <--' - ^ - | - v + ^ + | + v - [reorderlibs] + [reorderlibs] diff --git a/mk/wrapper/arg-pp-darwin-gcc b/mk/wrapper/arg-pp-darwin-gcc new file mode 100644 index 00000000000..08bb1718327 --- /dev/null +++ b/mk/wrapper/arg-pp-darwin-gcc @@ -0,0 +1,55 @@ +# $NetBSD: arg-pp-darwin-gcc,v 1.1.2.2 2005/01/24 18:40:01 tv Exp $ +# +# Copyright (c) 2005 The NetBSD Foundation, Inc. +# All rights reserved. +# +# This code is derived from software contributed to The NetBSD Foundation +# by Johnny C. Lam. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. All advertising materials mentioning features or use of this software +# must display the following acknowledgement: +# This product includes software developed by the NetBSD +# Foundation, Inc. and its contributors. +# 4. Neither the name of The NetBSD Foundation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + +case $arg in +###################################################################### +# Darwin's linker uses: +# +# -dylib_file /path/shlib:/path2/shlib +# -dylib_install_name /path/shlib +# -install_name /path/shlib +# +# to pass the installed locations for the shared libraries to the +# linker, and we need to pass the extra argument unmodified. The +# purpose of -seg_addr_table_filename is more obscure, but Darwin's +# imake rules use it. +###################################################################### +-dylib_file|-dylib_install_name|-install_name|-seg_addr_table_filename) + skipargs=1 + argok=yes + argmatch=yes + ;; +esac diff --git a/mk/wrapper/arg-pp-main b/mk/wrapper/arg-pp-main new file mode 100644 index 00000000000..36625172854 --- /dev/null +++ b/mk/wrapper/arg-pp-main @@ -0,0 +1,159 @@ +# $NetBSD: arg-pp-main,v 1.1.2.2 2005/01/24 18:40:01 tv Exp $ +# +# Copyright (c) 2005 The NetBSD Foundation, Inc. +# All rights reserved. +# +# This code is derived from software contributed to The NetBSD Foundation +# by Johnny C. Lam. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. All advertising materials mentioning features or use of this software +# must display the following acknowledgement: +# This product includes software developed by the NetBSD +# Foundation, Inc. and its contributors. +# 4. Neither the name of The NetBSD Foundation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + +case $arg in +###################################################################### +# Split direct paths to shared libraries into the "-Ldir -llib" +# equivalent. +###################################################################### +/*/lib*.so|/*/lib*.so.[0-9]*) + dir="${arg%/lib*}" + lib="${arg#$dir/lib}" + case $lib in + */*) argok=yes; argmatch=yes ;; + *.so) lib="${lib%.so}" ;; + *.so.[0-9]*) lib="${lib%.so.[0-9]*}" ;; + esac + prepend_queue argbuf "-l$lib" + $debug_log $wrapperlog " (arg-pp-main) pre: -l$lib" + prepend_queue argbuf "-L$dir" + $debug_log $wrapperlog " (arg-pp-main) pre: -L$dir" + ;; +/*/lib*.sl|/*/lib*.sl.[0-9]*) # HP-UX + dir="${arg%/lib*}" + lib="${arg#$dir/lib}" + case $lib in + */*) argok=yes; argmatch=yes ;; + *.sl) lib="${lib%.sl}" ;; + *.sl.[0-9]*) lib="${lib%.sl.[0-9]*}" ;; + esac + prepend_queue argbuf "-l$lib" + $debug_log $wrapperlog " (arg-pp-main) pre: -l$lib" + prepend_queue argbuf "-L$dir" + $debug_log $wrapperlog " (arg-pp-main) pre: -L$dir" + ;; +/*/lib*.dylib) # Darwin + dir="${arg%/lib*.dylib}" + lib="${arg#$dir/lib}" + case $lib in + */*) argok=yes; argmatch=yes ;; + *.dylib) lib="${lib%.dylib}" ;; + esac + prepend_queue argbuf "-l$lib" + $debug_log $wrapperlog " (arg-pp-main) pre: -l$lib" + prepend_queue argbuf "-L$dir" + $debug_log $wrapperlog " (arg-pp-main) pre: -L$dir" + ;; +###################################################################### +# Remove extraneous comma in "-Wl,-R,/dir" and in "-Wl,-L,/dir". +###################################################################### +-Wl,-L,*) + arg="-Wl,-L${arg#-Wl,-L,}" + $debug_log $wrapperlog " (arg-pp-main) pre: $arg" + prepend_queue argbuf "$arg" + argmatch=yes + ;; +-Wl,-R,*) + arg="-Wl,-R${arg#-Wl,-R,}" + $debug_log $wrapperlog " (arg-pp-main) pre: $arg" + prepend_queue argbuf "$arg" + argmatch=yes + ;; +###################################################################### +# Merge "-Wl,-R -Wl,/dir" into a single "-Wl,-R/dir". Same for -Wl,-L, +# -Wl,-rpath and -Wl,-rpath-link. +###################################################################### +-Wl,-[LR]) + pop_queue argbuf nextarg + $debug_log $wrapperlog " (arg-pp-main) pop: $nextarg" + shquote "${nextarg#-Wl,}"; nextarg="$shquoted" + $debug_log $wrapperlog " (arg-pp-main) pre: $arg$nextarg" + prepend_queue argbuf "$arg$nextarg" + argmatch=yes + ;; +-Wl,-rpath|-Wl,-rpath-link|-Wl,--rpath) + pop_queue argbuf nextarg + $debug_log $wrapperlog " (arg-pp-main) pop: $nextarg" + shquote "${nextarg#-Wl,}"; nextarg="$shquoted" + $debug_log $wrapperlog " (arg-pp-main) pre: $arg,$nextarg" + prepend_queue argbuf "$arg,$nextarg" + argmatch=yes + ;; +###################################################################### +# Remove rpath options that try to add relative paths to the runtime +# library search path. This basically cleans up after lazy programmers +# who can't write Makefiles. +###################################################################### +-R[!/]*|-Wl,-R[!/]*|\ +-Wl,-rpath,[!/]*|-Wl,-rpath-link,[!/]*|-Wl,--rpath,[!/]*) + $debug_log $wrapperlog " (arg-pp-main) drop: $arg" + argmatch=yes + ;; +###################################################################### +# Remove consecutive, repeated library options. +###################################################################### +-l*) + head_queue argbuf nextarg + while $test "$nextarg" = "$arg"; do + pop_queue argbuf nextarg + $debug_log $wrapperlog " (arg-pp-main) drop: $nextarg" + if queue_is_empty argbuf; then + break + else + head_queue argbuf nextarg + fi + done + argok=yes + argmatch=yes + ;; +####################################################################### +# The -o option takes an extra argument that should be passed unmodified. +####################################################################### +-o) + skipargs=1 + argok=yes + argmatch=yes + ;; +####################################################################### +# GNU ld uses "--dynamic-linker /path/to/shared/object" to set the +# dynamic linker code for ELF executables. +####################################################################### +--dynamic-linker) + skipargs=1 + argok=yes + argmatch=yes + ;; +esac diff --git a/mk/wrapper/arg-pp-mipspro-cc b/mk/wrapper/arg-pp-mipspro-cc new file mode 100644 index 00000000000..fdb5598cc59 --- /dev/null +++ b/mk/wrapper/arg-pp-mipspro-cc @@ -0,0 +1,48 @@ +# $NetBSD: arg-pp-mipspro-cc,v 1.1.2.2 2005/01/24 18:40:01 tv Exp $ +# +# Copyright (c) 2005 The NetBSD Foundation, Inc. +# All rights reserved. +# +# This code is derived from software contributed to The NetBSD Foundation +# by Johnny C. Lam. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. All advertising materials mentioning features or use of this software +# must display the following acknowledgement: +# This product includes software developed by the NetBSD +# Foundation, Inc. and its contributors. +# 4. Neither the name of The NetBSD Foundation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + +case $arg in +###################################################################### +# MIPSpro uses -LANG:<feature> and -LIST:<feature> as knobs for the +# compiler, but we don't want them to be confused with the usual +# -Ldir options, so just pass them verbatim onward. +###################################################################### +-LANG:*|-LIST:*) + do_transform=no + argok=yes + argmatch=yes + ;; +esac diff --git a/mk/wrapper/bsd.wrapper.mk b/mk/wrapper/bsd.wrapper.mk index d17fbb2e5ce..0c66ff73c02 100644 --- a/mk/wrapper/bsd.wrapper.mk +++ b/mk/wrapper/bsd.wrapper.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.wrapper.mk,v 1.12.2.7 2005/01/13 20:11:55 tv Exp $ +# $NetBSD: bsd.wrapper.mk,v 1.12.2.8 2005/01/24 18:40:01 tv Exp $ # # Copyright (c) 2004 The NetBSD Foundation, Inc. # All rights reserved. @@ -172,6 +172,8 @@ _WRAP_ALIASES.LD= ld # _WRAP_ENV?= PATH="${_WRAP_PATH}"; export PATH _WRAP_EMPTY_FILE?= ${WRAPPER_TMPDIR}/empty +_WRAP_ARG_PP?= ${_WRAP_EMPTY_FILE} +_WRAP_ARG_PP_MAIN?= ${WRAPPER_TMPDIR}/arg-pp-main _WRAP_ARG_SOURCE?= ${WRAPPER_TMPDIR}/arg-source _WRAP_BUILDCMD?= ${WRAPPER_TMPDIR}/buildcmd _WRAP_CACHE?= ${WRAPPER_TMPDIR}/cache @@ -204,6 +206,8 @@ _UNWRAP_SED= -f ${_WRAP_UNTRANSFORM_SEDFILE} _WRAPPER_SH.${_wrappee_}= ${WRAPPER_SRCDIR}/wrapper.sh _WRAP_ENV.${_wrappee_}?= ${_WRAP_ENV} _WRAP_EXTRA_ARGS.${_wrappee_}?= # empty +_WRAP_ARG_PP.${_wrappee_}?= ${_WRAP_ARG_PP} +_WRAP_ARG_PP_MAIN.${_wrappee_}?= ${_WRAP_ARG_PP_MAIN} _WRAP_ARG_SOURCE.${_wrappee_}?= ${_WRAP_ARG_SOURCE} _WRAP_BUILDCMD.${_wrappee_}?= ${_WRAP_BUILDCMD} _WRAP_CACHE.${_wrappee_}?= ${_WRAP_CACHE} @@ -227,8 +231,10 @@ _WRAP_CMD_SINK.LD= ${_WRAP_CMD_SINK.CC} .endif .if !empty(PKGSRC_COMPILER:Mmipspro) +_WRAP_ARG_PP.CC= ${WRAPPER_TMPDIR}/arg-pp-mipspro-cc _WRAP_CACHE_BODY.CC= ${WRAPPER_TMPDIR}/cache-body-mipspro-cc _WRAP_TRANSFORM.CC= ${WRAPPER_TMPDIR}/transform-mipspro-cc +_WRAP_ARG_PP.CXX= ${_WRAP_ARG_PP.CC} _WRAP_CACHE_BODY.CXX= ${_WRAP_CACHE_BODY.CC} _WRAP_TRANSFORM.CXX= ${_WRAP_TRANSFORM.CC} .endif @@ -276,14 +282,18 @@ _WRAP_EXTRA_ARGS.CPP+= -D_ALL_SOURCE _WRAP_CMD_SINK.CC= ${WRAPPER_TMPDIR}/cmd-sink-interix-gcc _WRAP_CMD_SINK.CXX= ${_WRAP_CMD_SINK.CC} _WRAP_CMD_SINK.LD= ${WRAPPER_TMPDIR}/cmd-sink-interix-ld +.elif ${OPSYS} == "Darwin" +_WRAP_ARG_PP.CC= ${WRAPPER_TMPDIR}/arg-pp-darwin-gcc +_WRAP_ARG_PP.CXX= ${_WRAP_ARG_PP.CC} +_WRAP_ARG_PP.LD= ${_WRAP_ARG_PP.CC} .elif ${OPSYS} == "UnixWare" _WRAP_CMD_SINK.CC= ${WRAPPER_TMPDIR}/cmd-sink-unixware-gcc _WRAP_CMD_SINK.CXX= ${_WRAP_CMD_SINK.CC} _WRAP_CMD_SINK.LD= ${_WRAP_CMD_SINK.CC} .elif ${OPSYS} == "OSF1" -_WRAP_CMD_SINK.LD= ${WRAPPER_TMPDIR}/cmd-sink-osf1-ld _WRAP_CMD_SINK.CC= ${WRAPPER_TMPDIR}/cmd-sink-osf1-cc -_WRAP_CMD_SINK.CXX= ${WRAPPER_TMPDIR}/cmd-sink-osf1-cc +_WRAP_CMD_SINK.CXX= ${_WRAP_CMD_SINK.CC} +_WRAP_CMD_SINK.LD= ${WRAPPER_TMPDIR}/cmd-sink-osf1-ld .endif # Filter to scrunch shell scripts by removing comments and empty lines. @@ -311,6 +321,8 @@ _WRAP_SUBST_SED+= -e 's|@BUILD_ENV@|export '${BUILD_ENV:Q}'|' _WRAP_SUBST_SED.${_wrappee_}= \ -e "s|@_WRAP_ENV@|${_WRAP_ENV.${_wrappee_}:Q}|g" \ -e "s|@_WRAP_EXTRA_ARGS@|${_WRAP_EXTRA_ARGS.${_wrappee_}:Q}|g" \ + -e "s|@_WRAP_ARG_PP@|${_WRAP_ARG_PP.${_wrappee_}:Q}|g" \ + -e "s|@_WRAP_ARG_PP_MAIN@|${_WRAP_ARG_PP_MAIN.${_wrappee_}:Q}|g" \ -e "s|@_WRAP_ARG_SOURCE@|${_WRAP_ARG_SOURCE.${_wrappee_}:Q}|g" \ -e "s|@_WRAP_BUILDCMD@|${_WRAP_BUILDCMD.${_wrappee_}:Q}|g" \ -e "s|@_WRAP_CACHE@|${_WRAP_CACHE.${_wrappee_}:Q}|g" \ @@ -337,6 +349,8 @@ PKG_${_wrappee_}?= ${${_wrappee_}} do-wrapper: ${_WRAP_COOKIE.${_wrappee_}} ${_WRAP_COOKIE.${_wrappee_}}: \ ${_WRAPPER_SH.${_wrappee_}} \ + ${_WRAP_ARG_PP.${_wrappee_}} \ + ${_WRAP_ARG_PP_MAIN.${_wrappee_}} \ ${_WRAP_ARG_SOURCE.${_wrappee_}} \ ${_WRAP_BUILDCMD.${_wrappee_}} \ ${_WRAP_CACHE.${_wrappee_}} \ @@ -407,6 +421,18 @@ ${_alias_}: ${_WRAP_COOKIE.${_wrappee_}} do-wrapper: ${_target_} .endfor +${WRAPPER_TMPDIR}/arg-pp-darwin-gcc: \ + ${WRAPPER_SRCDIR}/arg-pp-darwin-gcc + ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H} + ${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC} \ + | ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET} + +${WRAPPER_TMPDIR}/arg-pp-mipspro-cc: \ + ${WRAPPER_SRCDIR}/arg-pp-mipspro-cc + ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H} + ${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC} \ + | ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET} + ${WRAPPER_TMPDIR}/cmd-sink-aix-xlc: \ ${WRAPPER_SRCDIR}/cmd-sink-aix-xlc ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H} @@ -540,6 +566,13 @@ ${_WRAP_EMPTY_FILE}: ${_PKG_SILENT}${_PKG_DEBUG}${TOUCH} ${TOUCH_ARGS} ${.TARGET} . endif +. if !target(${_WRAP_ARG_PP_MAIN.${_wrappee_}}) +${_WRAP_ARG_PP_MAIN.${_wrappee_}}: ${WRAPPER_SRCDIR}/arg-pp-main + ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H} + ${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC} \ + | ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET} +. endif + . if !target(${_WRAP_ARG_SOURCE.${_wrappee_}}) ${_WRAP_ARG_SOURCE.${_wrappee_}}: ${WRAPPER_SRCDIR}/arg-source ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H} diff --git a/mk/wrapper/logic b/mk/wrapper/logic index ce35477d581..d3e4377fb05 100644 --- a/mk/wrapper/logic +++ b/mk/wrapper/logic @@ -1,4 +1,4 @@ -# $NetBSD: logic,v 1.6.2.2 2005/01/10 16:15:25 tv Exp $ +# $NetBSD: logic,v 1.6.2.3 2005/01/24 18:40:01 tv Exp $ # # Copyright (c) 2004 The NetBSD Foundation, Inc. # All rights reserved. @@ -61,137 +61,18 @@ while ! queue_is_empty argbuf; do argok=yes continue fi - - case $arg in - ###################################################### - # Split direct paths to shared libraries into the - # "-Ldir -llib" equivalent - ###################################################### - /*/lib*.so|/*/lib*.so.[0-9]*) - dir="${arg%/lib*}" - lib="${arg#$dir/lib}" - case $lib in - */*) argok=yes; continue ;; - *.so) lib="${lib%.so}" ;; - *.so.[0-9]*) lib="${lib%.so.[0-9]*}" ;; - esac - prepend_queue argbuf "-l$lib" - $debug_log $wrapperlog " (logic) pre: -l$lib" - prepend_queue argbuf "-L$dir" - $debug_log $wrapperlog " (logic) pre: -L$dir" - ;; - /*/lib*.dylib) # Darwin - dir="${arg%/lib*.dylib}" - lib="${arg#$dir/lib}" - case $lib in - */*) argok=yes; continue ;; - *.dylib) lib="${lib%.dylib}" ;; - esac - prepend_queue argbuf "-l$lib" - $debug_log $wrapperlog " (logic) pre: -l$lib" - prepend_queue argbuf "-L$dir" - $debug_log $wrapperlog " (logic) pre: -L$dir" - ;; - ###################################################### - # Remove extraneous comma in "-Wl,-R,/dir" and in - # "-Wl,-L,/dir". - ###################################################### - -Wl,-L,*) - arg="-Wl,-L${arg#-Wl,-L,}" - $debug_log $wrapperlog " (logic) pre: $arg" - prepend_queue argbuf "$arg" - ;; - -Wl,-R,*) - arg="-Wl,-R${arg#-Wl,-R,}" - $debug_log $wrapperlog " (logic) pre: $arg" - prepend_queue argbuf "$arg" - ;; - ###################################################### - # Merge "-Wl,-R -Wl,/dir" into a single "-Wl,-R/dir". - # Same for -Wl,-L, -Wl,-rpath and -Wl,-rpath-link. - ###################################################### - -Wl,-[LR]) - pop_queue argbuf nextarg - $debug_log $wrapperlog " (logic) pop: $nextarg" - shquote "${nextarg#-Wl,}"; nextarg="$shquoted" - $debug_log $wrapperlog " (logic) pre: $arg$nextarg" - prepend_queue argbuf "$arg$nextarg" - ;; - -Wl,-rpath|-Wl,-rpath-link|-Wl,--rpath) - pop_queue argbuf nextarg - $debug_log $wrapperlog " (logic) pop: $nextarg" - shquote "${nextarg#-Wl,}"; nextarg="$shquoted" - $debug_log $wrapperlog " (logic) pre: $arg,$nextarg" - prepend_queue argbuf "$arg,$nextarg" - ;; - ###################################################### - # Remove rpath options that try to add relative paths - # to the runtime library search path. This basically - # cleans up after lazy programmers who can't write - # Makefiles. - ###################################################### - -R[!/]*|-Wl,-R[!/]*|\ - -Wl,-rpath,[!/]*|-Wl,-rpath-link,[!/]*|-Wl,--rpath,[!/]*) - $debug_log $wrapperlog " (logic) drop: $arg" - ;; - ###################################################### - # Remove consecutive, repeated library options. - ###################################################### - -l*) - head_queue argbuf nextarg - while $test "$nextarg" = "$arg"; do - pop_queue argbuf nextarg - $debug_log $wrapperlog " (logic) drop: $nextarg" - if queue_is_empty argbuf; then - break - else - head_queue argbuf nextarg - fi - done - argok=yes - ;; - ###################################################### - # The -o option takes an extra argument that should - # be passed unmodified. - ####################################################### - -o) - skipargs=1 - argok=yes - ;; - ###################################################### - # GNU ld uses "--dynamic-linker /path/to/shared/object" - # to set the dynamic linker code for ELF executables. - ###################################################### - --dynamic-linker) - skipargs=1 - argok=yes - ;; - ###################################################### - # Darwin's linker uses: - # - # -dylib_file /path/shlib:/path2/shlib - # -dylib_install_name /path/shlib - # -install_name /path/shlib - # - # to pass the installed locations for the shared - # libraries to the linker, and we need to pass the extra - # argument unmodified. The purpose of - # -seg_addr_table_filename is more obscure, but Darwin's - # imake rules use it. - ###################################################### - -dylib_file|-dylib_install_name|-install_name|\ - -seg_addr_table_filename) - skipargs=1 - argok=yes - ;; - ###################################################### - # Leave all else untouched. - ###################################################### - *) - argok=yes + argmatch=no + . $arg_pp_main + case $argmatch in + yes) continue ;; + esac + . $arg_pp + case $argmatch in + yes) continue ;; esac + argok=yes done - + # # Try to look up the transformed $arg in the cache, but if # not there, then apply the transformations and save the result # in the cache. diff --git a/mk/wrapper/wrapper.sh b/mk/wrapper/wrapper.sh index 7fcd9e8e2ff..4793dcdcdfd 100644 --- a/mk/wrapper/wrapper.sh +++ b/mk/wrapper/wrapper.sh @@ -1,6 +1,6 @@ #! @WRAPPER_SHELL@ # -# $NetBSD: wrapper.sh,v 1.4.2.1 2004/11/22 22:48:05 tv Exp $ +# $NetBSD: wrapper.sh,v 1.4.2.2 2005/01/24 18:40:01 tv Exp $ # # Copyright (c) 2004 The NetBSD Foundation, Inc. # All rights reserved. @@ -37,6 +37,8 @@ # POSSIBILITY OF SUCH DAMAGE. @BUILD_ENV@ +arg_pp="@_WRAP_ARG_PP@" +arg_pp_main="@_WRAP_ARG_PP_MAIN@" arg_source="@_WRAP_ARG_SOURCE@" buildcmd="@_WRAP_BUILDCMD@" cache="@_WRAP_CACHE@" |