Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Introduce PKGSRC_SETENV, defaulting to SETENV. Can be set to ${SETENV…

…} -i

to santise environment
  • Loading branch information...
commit cce5fca253ef013971005f1109fe1d5946c8d23d 1 parent adecef3
abs authored
View
7 mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1977 2011/03/12 14:07:13 wiz Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1978 2011/09/08 20:17:15 abs Exp $
#
# This file is in the public domain.
#
@@ -151,6 +151,9 @@ ${_var_}+= ${${_var_}.*}
CPPFLAGS+= ${CPP_PRECOMP_FLAGS}
+# To sanitise environment set PKGSRC_SETENV=${SETENV} -i
+PKGSRC_SETENV= ${SETENV}
+
ALL_ENV+= CC=${CC:Q}
ALL_ENV+= CFLAGS=${CFLAGS:M*:Q}
ALL_ENV+= CPPFLAGS=${CPPFLAGS:M*:Q}
@@ -600,7 +603,7 @@ ${.CURDIR}/${WRKDIR_BASENAME}:
# XXX: Shouldn't the $${PATH} be ${PATH} here? This may be related to
# PR 34470.
_ROOT_CMD= cd ${.CURDIR} && \
- ${SETENV} ${PKGSRC_MAKE_ENV} \
+ ${PKGSRC_SETENV} ${PKGSRC_MAKE_ENV} \
PATH="$${PATH}:"${SU_CMD_PATH_APPEND:Q} \
${MAKE} ${MAKEFLAGS} _PKGSRC_BARRIER=yes \
PKG_DEBUG_LEVEL=${PKG_DEBUG_LEVEL:Q} \
View
4 mk/bsd.pkg.readme.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.readme.mk,v 1.24 2011/06/03 10:25:04 spz Exp $
+# $NetBSD: bsd.pkg.readme.mk,v 1.25 2011/09/08 20:17:15 abs Exp $
#
# This Makefile fragment is included by bsd.pkg.mk and encapsulates the
# code to produce README.html files in each package directory.
@@ -237,7 +237,7 @@ SED_HOMEPAGE_EXPR= -e 's|%%HOMEPAGE%%||'
# the target used to generate the README.html file.
.PHONY: README.html
README.html: .PRECIOUS
- @${SETENV} BMAKE=${MAKE:Q} ${SH} ../../mk/scripts/mkdatabase -f $@.tmp1
+ @${PKGSRC_SETENV} BMAKE=${MAKE:Q} ${SH} ../../mk/scripts/mkdatabase -f $@.tmp1
@if ${TEST} -d ${PACKAGES}; then \
cd ${PACKAGES}; \
case `${PWD_CMD}` in \
View
4 mk/bsd.prefs.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.prefs.mk,v 1.314 2011/04/07 08:08:45 wiz Exp $
+# $NetBSD: bsd.prefs.mk,v 1.315 2011/09/08 20:17:15 abs Exp $
#
# This file includes the mk.conf file, which contains the user settings.
#
@@ -711,7 +711,7 @@ PREPEND_PATH+= ${LOCALBASE}/bin
# processes invoked by pkgsrc.
#
PKGSRC_MAKE_ENV+= ${MAKECONF:DMAKECONF=${MAKECONF:Q}}
-RECURSIVE_MAKE= ${SETENV} ${PKGSRC_MAKE_ENV} ${MAKE}
+RECURSIVE_MAKE= ${PKGSRC_SETENV} ${PKGSRC_MAKE_ENV} ${MAKE}
_VARGROUPS+= dirs
_USER_VARS.dirs= DISTDIR LOCALBASE PACKAGES PKG_SYSCONFDIR WRKOBJDIR
View
6 mk/bsd.utils.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.utils.mk,v 1.8 2006/07/27 22:01:28 jlam Exp $
+# $NetBSD: bsd.utils.mk,v 1.9 2011/09/08 20:17:15 abs Exp $
#
# This Makefile fragment is included by bsd.pkg.mk and defines utility
# and otherwise miscellaneous variables and targets.
@@ -21,7 +21,7 @@ _ALL_DEPENDS+= ${DEPENDS}
# ${PKGSRCDIR} and also verifies that they exist within pkgsrc.
#
_PKG_PATHS_CMD= \
- ${SETENV} ECHO=${TOOLS_ECHO:Q} PKGSRCDIR=${PKGSRCDIR:Q} \
+ ${PKGSRC_SETENV} ECHO=${TOOLS_ECHO:Q} PKGSRCDIR=${PKGSRCDIR:Q} \
PWD_CMD=${TOOLS_PWD_CMD:Q} TEST=${TOOLS_TEST:Q} \
${SH} ${.CURDIR}/../../mk/scripts/pkg_path
@@ -34,7 +34,7 @@ show-depends-dirs show-depends-pkgpaths:
#
_DEPENDS_WALK_MAKEFLAGS?= ${MAKEFLAGS}
_DEPENDS_WALK_CMD= \
- ${SETENV} ECHO=${TOOLS_ECHO:Q} MAKE=${MAKE:Q} \
+ ${PKGSRC_SETENV} ECHO=${TOOLS_ECHO:Q} MAKE=${MAKE:Q} \
MAKEFLAGS=${_DEPENDS_WALK_MAKEFLAGS:Q} \
PKGSRCDIR=${PKGSRCDIR:Q} TEST=${TOOLS_TEST:Q} \
${AWK} -f ${.CURDIR}/../../mk/scripts/depends-depth-first.awk --
View
3  mk/build/bsd.build-vars.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.build-vars.mk,v 1.6 2010/02/01 00:16:54 joerg Exp $
+# $NetBSD: bsd.build-vars.mk,v 1.7 2011/09/08 20:17:15 abs Exp $
#
# Package-settable variables:
#
@@ -52,3 +52,4 @@ MAKE_ENV+= ${USETOOLS:DUSETOOLS=${USETOOLS:Q}}
# processes for build-related phases.
#
PKGSRC_MAKE_ENV+= PATH=${PATH:Q}
+PKGSRC_MAKE_ENV+= USE_DESTDIR=${USE_DESTDIR:Q}
View
6 mk/build/build.mk
@@ -1,4 +1,4 @@
-# $NetBSD: build.mk,v 1.19 2009/01/10 15:59:29 tnn Exp $
+# $NetBSD: build.mk,v 1.20 2011/09/08 20:17:15 abs Exp $
#
# This file defines what happens in the build phase, excluding the
# self-test, which is defined in test.mk.
@@ -46,7 +46,7 @@ BUILD_MAKE_FLAGS?= # none
BUILD_TARGET?= all
BUILD_MAKE_CMD= \
- ${SETENV} ${MAKE_ENV} \
+ ${PKGSRC_SETENV} ${MAKE_ENV} \
${MAKE_PROGRAM} ${_MAKE_JOBS} \
${MAKE_FLAGS} ${BUILD_MAKE_FLAGS} \
-f ${MAKE_FILE}
@@ -163,7 +163,7 @@ BUILD_ENV_SHELL?= ${SH}
build-env: .PHONY configure
@${STEP_MSG} "Entering the build environment for ${PKGNAME}"
${RUN}${_ULIMIT_CMD} \
- cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${BUILD_ENV_SHELL}
+ cd ${WRKSRC} && ${PKGSRC_SETENV} ${MAKE_ENV} ${BUILD_ENV_SHELL}
.else
build-env: barrier
.endif
View
4 mk/build/test.mk
@@ -1,4 +1,4 @@
-# $NetBSD: test.mk,v 1.15 2008/11/05 23:44:55 rillig Exp $
+# $NetBSD: test.mk,v 1.16 2011/09/08 20:17:15 abs Exp $
#
# After the "build" phase, many packages provide some sort of self-test
# that can be run on the not-yet installed package. To enable these
@@ -47,7 +47,7 @@ TEST_ENV+= ${MAKE_ENV}
TEST_MAKE_FLAGS?= # none
TEST_MAKE_CMD= \
- ${SETENV} ${MAKE_ENV} \
+ ${PKGSRC_SETENV} ${MAKE_ENV} \
${MAKE_PROGRAM} ${MAKE_FLAGS} ${TEST_MAKE_FLAGS} \
-f ${MAKE_FILE}
View
4 mk/buildlink3/imake-check.mk
@@ -1,4 +1,4 @@
-# $NetBSD: imake-check.mk,v 1.8 2010/06/16 20:23:05 schwarz Exp $
+# $NetBSD: imake-check.mk,v 1.9 2011/09/08 20:17:15 abs Exp $
#
# Copyright (c) 2005 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -76,7 +76,7 @@ IMAKE?= ${X11BASE}/bin/imake
. if !defined(BUILTIN_IMAKE_CHECK.${pkg})
BUILTIN_IMAKE_CHECK.${pkg}!= \
- if ${SETENV} CAT=${CAT:Q} ECHO=${ECHO:Q} GREP=${GREP:Q} \
+ if ${PKGSRC_SETENV} CAT=${CAT:Q} ECHO=${ECHO:Q} GREP=${GREP:Q} \
IMAKE=${IMAKE:Q} IMAKE_MAKE=${IMAKE_MAKE:Q} \
MKDIR=${MKDIR:Q} PATH_ORIG=${_PATH_ORIG:Q} \
RM=${RM:Q} TEST=${TEST:Q} \
View
8 mk/bulk/bsd.bulk-pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.bulk-pkg.mk,v 1.151 2010/05/11 18:36:15 mbalmer Exp $
+# $NetBSD: bsd.bulk-pkg.mk,v 1.152 2011/09/08 20:17:15 abs Exp $
#
# Copyright (c) 1999, 2000 Hubert Feyrer <hubertf@NetBSD.org>
@@ -252,10 +252,10 @@ bulk-cache:
@${ECHO} "This file is unused for a full pkgsrc bulk build" >> ${BULK_DBFILE}
@${ECHO} "It is only used for a SPECIFIC_PKGS bulk build" >> ${BULK_DBFILE}
@${BULK_MSG} "Building complete pkgsrc dependency tree (this may take a while)."
- cd ${PKGSRCDIR} && ${SETENV} BMAKE=${MAKE:Q} ${SH} mk/bulk/printdepends ${BROKENFILE:Q} ${BULKFILESDIR:Q} > ${DEPENDSTREEFILE:Q}
+ cd ${PKGSRCDIR} && ${PKGSRC_SETENV} BMAKE=${MAKE:Q} ${SH} mk/bulk/printdepends ${BROKENFILE:Q} ${BULKFILESDIR:Q} > ${DEPENDSTREEFILE:Q}
@${BULK_MSG} "Generating package name <=> package directory cross reference file"
@${BULK_MSG_CONT} "(this may take a while)."
- cd ${PKGSRCDIR} && ${SETENV} BMAKE=${MAKE:Q} ${SH} mk/bulk/printindex ${NOT_AVAILABLE_FILE} ${BULKFILESDIR:Q} > ${INDEXFILE:Q}
+ cd ${PKGSRCDIR} && ${PKGSRC_SETENV} BMAKE=${MAKE:Q} ${SH} mk/bulk/printindex ${NOT_AVAILABLE_FILE} ${BULKFILESDIR:Q} > ${INDEXFILE:Q}
.else
@${BULK_MSG} "Extracting database for SPECIFIC_PKGS subset of pkgsrc"
@${BULK_MSG_CONT} "along with their dependencies"
@@ -264,7 +264,7 @@ bulk-cache:
${BULK_MSG} "WARN: Skipping nonexisting directory ${__tmp__}"; \
${ECHO} " 0 ${__tmp__} 0" >> ${BULKFILESDIR:Q}/${BROKENFILE:Q}; \
else \
- cd ${PKGSRCDIR}/${__tmp__} && ${SETENV} BMAKE=${MAKE:Q} AWK=${AWK:Q} EXPR=${EXPR:Q} ${SH} ../../mk/scripts/mkdatabase -a -f ${BULK_DBFILE:Q}; \
+ cd ${PKGSRCDIR}/${__tmp__} && ${PKGSRC_SETENV} BMAKE=${MAKE:Q} AWK=${AWK:Q} EXPR=${EXPR:Q} ${SH} ../../mk/scripts/mkdatabase -a -f ${BULK_DBFILE:Q}; \
fi
. endfor
@${BULK_MSG} "Extracting dependency tree file"
View
4 mk/check/check-shlibs.mk
@@ -1,4 +1,4 @@
-# $NetBSD: check-shlibs.mk,v 1.18 2010/08/24 19:08:29 bad Exp $
+# $NetBSD: check-shlibs.mk,v 1.19 2011/09/08 20:17:15 abs Exp $
#
# This file verifies that all libraries used by the package can be found
# at run-time.
@@ -57,7 +57,7 @@ _check-shlibs: error-check .PHONY
cd ${DESTDIR:Q}${PREFIX:Q}; \
${_CHECK_SHLIBS_FILELIST_CMD} | \
${EGREP} -h ${_CHECK_SHLIBS_ERE:Q} | \
- ${SETENV} ${CHECK_SHLIBS_ELF_ENV} ${AWK} -f ${CHECK_SHLIBS_ELF} > ${ERROR_DIR}/${.TARGET}
+ ${PKGSRC_SETENV} ${CHECK_SHLIBS_ELF_ENV} ${AWK} -f ${CHECK_SHLIBS_ELF} > ${ERROR_DIR}/${.TARGET}
.else
. if ${_USE_DESTDIR} != "no"
View
6 mk/checksum/checksum.mk
@@ -1,4 +1,4 @@
-# $NetBSD: checksum.mk,v 1.15 2009/07/15 09:40:30 joerg Exp $
+# $NetBSD: checksum.mk,v 1.16 2011/09/08 20:17:15 abs Exp $
#
# See bsd.checksum.mk for helpful comments.
#
@@ -27,7 +27,7 @@ _PATCH_DIGEST_ALGORITHMS?= SHA1
_COOKIE.checksum= ${_COOKIE.extract}
_CHECKSUM_CMD= \
- ${SETENV} DIGEST=${TOOLS_DIGEST:Q} CAT=${TOOLS_CAT:Q} \
+ ${PKGSRC_SETENV} DIGEST=${TOOLS_DIGEST:Q} CAT=${TOOLS_CAT:Q} \
ECHO=${TOOLS_ECHO:Q} SED=${TOOLS_SED:Q} \
TEST=${TOOLS_TEST:Q} \
${SH} ${PKGSRCDIR}/mk/checksum/checksum \
@@ -51,7 +51,7 @@ checksum checksum-phase:
fi
.endif
-_DISTINFO_CMD= ${SETENV} DIGEST=${TOOLS_DIGEST:Q} SED=${TOOLS_SED:Q} \
+_DISTINFO_CMD= ${PKGSRC_SETENV} DIGEST=${TOOLS_DIGEST:Q} SED=${TOOLS_SED:Q} \
TEST=${TOOLS_TEST:Q} WC=${TOOLS_WC:Q} \
${AWK} -f ${PKGSRCDIR}/mk/checksum/distinfo.awk --
View
9 mk/compiler/gcc.mk
@@ -1,4 +1,4 @@
-# $NetBSD: gcc.mk,v 1.110 2011/08/18 10:01:31 wiz Exp $
+# $NetBSD: gcc.mk,v 1.111 2011/09/08 20:17:15 abs Exp $
#
# This is the compiler definition for the GNU Compiler Collection.
#
@@ -113,8 +113,13 @@ MAKEFLAGS+= _CC=${_CC:Q}
# explicitly. In the show-all and show-var targets, it appears
# nevertheless because "References to undefined variables are not
# expanded" when using the := operator.
+. if defined(SETENV)
_GCC_VERSION_STRING!= \
- ( ${SETENV} ${ALL_ENV} LC_ALL=C ${_CC} -v 2>&1 | ${GREP} 'gcc version' ) 2>/dev/null || ${ECHO} 0
+ ( ${PKGSRC_SETENV} ${ALL_ENV} LC_ALL=C ${_CC} -v 2>&1 | ${GREP} 'gcc version') 2>/dev/null || ${ECHO} 0
+. else
+_GCC_VERSION_STRING!= \
+ ( ${_CC} -v 2>&1 | ${GREP} 'gcc version') 2>/dev/null || ${ECHO} 0
+. endif
. if !empty(_GCC_VERSION_STRING:Megcs*)
_GCC_VERSION= 2.8.1 # egcs is considered to be gcc-2.8.1.
. elif !empty(_GCC_VERSION_STRING:Mgcc*)
View
10 mk/configure/configure.mk
@@ -1,4 +1,4 @@
-# $NetBSD: configure.mk,v 1.23 2008/02/07 21:36:13 rillig Exp $
+# $NetBSD: configure.mk,v 1.24 2011/09/08 20:17:15 abs Exp $
#
# = Package-settable variables =
#
@@ -205,7 +205,7 @@ do-configure-script:
.for _dir_ in ${CONFIGURE_DIRS}
${RUN}${_ULIMIT_CMD} \
cd ${WRKSRC} && cd ${_dir_} && \
- ${SETENV} ${_CONFIGURE_SCRIPT_ENV} \
+ ${PKGSRC_SETENV} ${_CONFIGURE_SCRIPT_ENV} \
${CONFIG_SHELL} ${CONFIG_SHELL_FLAGS} \
${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS}
.endfor
@@ -224,7 +224,7 @@ do-configure-imake:
.for _dir_ in ${CONFIGURE_DIRS}
${RUN} \
cd ${WRKSRC} && cd ${_dir_} && \
- ${SETENV} ${_CONFIGURE_IMAKE_ENV} ${XMKMF}
+ ${PKGSRC_SETENV} ${_CONFIGURE_IMAKE_ENV} ${XMKMF}
.endfor
######################################################################
@@ -242,7 +242,7 @@ do-configure-cmake:
.for _dir_ in ${CONFIGURE_DIRS}
${RUN}${_ULIMIT_CMD} \
cd ${WRKSRC} && cd ${_dir_} && \
- ${SETENV} ${_CONFIGURE_CMAKE_ENV} \
+ ${PKGSRC_SETENV} ${_CONFIGURE_CMAKE_ENV} \
cmake ${CMAKE_ARGS} ${CMAKE_ARG_PATH}
.endfor
@@ -280,5 +280,5 @@ post-configure:
#
configure-help:
.for d in ${CONFIGURE_DIRS}
- ${RUN} cd ${WRKSRC} && cd ${d} && ${SETENV} ${_CONFIGURE_SCRIPT_ENV} ${CONFIG_SHELL} ${CONFIGURE_SCRIPT} --help
+ ${RUN} cd ${WRKSRC} && cd ${d} && ${PKGSRC_SETENV} ${_CONFIGURE_SCRIPT_ENV} ${CONFIG_SHELL} ${CONFIGURE_SCRIPT} --help
.endfor
View
4 mk/extract/extract.mk
@@ -1,4 +1,4 @@
-# $NetBSD: extract.mk,v 1.33 2010/12/22 09:33:30 tron Exp $
+# $NetBSD: extract.mk,v 1.34 2011/09/08 20:17:16 abs Exp $
#
# The following variables may be set by the package Makefile and
# specify how extraction happens:
@@ -206,7 +206,7 @@ EXTRACT_OPTS+= -t ${_EXTRACT_TAR}
.endif
EXTRACTOR= \
- ${SETENV} ${_EXTRACT_ENV} ${SH} ${PKGSRCDIR}/mk/extract/extract
+ ${PKGSRC_SETENV} ${_EXTRACT_ENV} ${SH} ${PKGSRCDIR}/mk/extract/extract
EXTRACT_CMD_DEFAULT= \
${EXTRACTOR} ${EXTRACT_OPTS} ${DOWNLOADED_DISTFILE} ${EXTRACT_ELEMENTS}
View
6 mk/fetch/fetch.mk
@@ -1,4 +1,4 @@
-# $NetBSD: fetch.mk,v 1.51 2011/05/17 16:38:18 mspo Exp $
+# $NetBSD: fetch.mk,v 1.52 2011/09/08 20:17:16 abs Exp $
_MASTER_SITE_BACKUP= ${MASTER_SITE_BACKUP:=${DIST_SUBDIR}${DIST_SUBDIR:D/}}
_MASTER_SITE_OVERRIDE= ${MASTER_SITE_OVERRIDE:=${DIST_SUBDIR}${DIST_SUBDIR:D/}}
@@ -46,7 +46,7 @@ _ORDERED_SITES= ${_MASTER_SITE_OVERRIDE} $$unsorted_sites
# Associate each file to fetch with the correct site(s).
#
DYNAMIC_SITES_SCRIPT?= ${FILESDIR}/getsite.sh
-DYNAMIC_SITES_CMD?= ${SETENV} PATH=${PATH:Q} ${SH} ${DYNAMIC_SITES_SCRIPT}
+DYNAMIC_SITES_CMD?= ${PKGSRC_SETENV} PATH=${PATH:Q} ${SH} ${DYNAMIC_SITES_SCRIPT}
.if exists(${DYNAMIC_SITES_SCRIPT})
. for fetchfile in ${_ALLFILES}
SITES.${fetchfile:T:S/=/--/}?= `${DYNAMIC_SITES_CMD} ${fetchfile:T}`
@@ -238,7 +238,7 @@ _FETCH_AFTER_ARGS.custom= ${FETCH_AFTER_ARGS}
_FETCH_RESUME_ARGS.custom= ${FETCH_RESUME_ARGS}
_FETCH_OUTPUT_ARGS.custom= ${FETCH_OUTPUT_ARGS}
-_FETCH_CMD= ${SETENV} CHECKSUM=${_CHECKSUM_CMD:Q} \
+_FETCH_CMD= ${PKGSRC_SETENV} CHECKSUM=${_CHECKSUM_CMD:Q} \
CP=${TOOLS_CP:Q} \
ECHO=${TOOLS_ECHO:Q} \
FETCH_CMD=${_FETCH_CMD.${FETCH_USING}:Q} \
View
16 mk/flavor/pkg/depends.mk
@@ -1,4 +1,4 @@
-# $NetBSD: depends.mk,v 1.45 2009/07/17 23:24:57 agc Exp $
+# $NetBSD: depends.mk,v 1.46 2011/09/08 20:17:16 abs Exp $
# This command prints out the dependency patterns for all full (run-time)
# dependencies of the package.
@@ -27,7 +27,7 @@ _RDEPENDS_FILE= ${WRKDIR}/.rdepends
_FULL_DEPENDS_CMD= \
${AWK} '$$1 == "full" { print $$3; }' < ${_RDEPENDS_FILE}
-_REDUCE_DEPENDS_CMD= ${SETENV} CAT=${CAT:Q} \
+_REDUCE_DEPENDS_CMD= ${PKGSRC_SETENV} CAT=${CAT:Q} \
PKG_ADMIN=${PKG_ADMIN_CMD:Q} \
PWD_CMD=${PWD_CMD:Q} TEST=${TEST:Q} \
${AWK} -f ${PKGSRCDIR}/mk/flavor/pkg/reduce-depends.awk
@@ -39,7 +39,7 @@ _flavor-show-depends: .PHONY
esac
_LIST_DEPENDS_CMD= \
- ${SETENV} AWK=${AWK:Q} PKG_ADMIN=${PKG_ADMIN:Q} \
+ ${PKGSRC_SETENV} AWK=${AWK:Q} PKG_ADMIN=${PKG_ADMIN:Q} \
PKGSRCDIR=${PKGSRCDIR:Q} PWD_CMD=${PWD_CMD:Q} SED=${SED:Q} \
${SH} ${PKGSRCDIR}/mk/flavor/pkg/list-dependencies \
" "${BOOTSTRAP_DEPENDS:Q} \
@@ -47,13 +47,13 @@ _LIST_DEPENDS_CMD= \
" "${DEPENDS:Q}
_LIST_DEPENDS_CMD.bootstrap= \
- ${SETENV} AWK=${AWK:Q} PKG_ADMIN=${PKG_ADMIN:Q} \
+ ${PKGSRC_SETENV} AWK=${AWK:Q} PKG_ADMIN=${PKG_ADMIN:Q} \
PKGSRCDIR=${PKGSRCDIR:Q} PWD_CMD=${PWD_CMD:Q} SED=${SED:Q} \
${SH} ${PKGSRCDIR}/mk/flavor/pkg/list-dependencies \
" "${BOOTSTRAP_DEPENDS:Q} " " " "
_RESOLVE_DEPENDS_CMD= \
- ${SETENV} _PKG_DBDIR=${_PKG_DBDIR:Q} PKG_INFO=${PKG_INFO:Q} \
+ ${PKGSRC_SETENV} _PKG_DBDIR=${_PKG_DBDIR:Q} PKG_INFO=${PKG_INFO:Q} \
_DEPENDS_FILE=${_DEPENDS_FILE:Q} \
${SH} ${PKGSRCDIR}/mk/flavor/pkg/resolve-dependencies \
" "${BOOTSTRAP_DEPENDS:Q} \
@@ -79,7 +79,7 @@ _DEPENDS_INSTALL_CMD= \
${STEP_MSG} "Verifying $$target for $$dir"; \
[ -d "$$dir" ] || ${FAIL_MSG} "[depends.mk] The directory \`\`$$dir'' does not exist."; \
cd $$dir; \
- ${SETENV} ${PKGSRC_MAKE_ENV} _PKGSRC_DEPS=" ${PKGNAME}${_PKGSRC_DEPS}" PKGNAME_REQD="$$pattern" ${MAKE} ${MAKEFLAGS} _AUTOMATIC=yes $$target; \
+ ${PKGSRC_SETENV} ${PKGSRC_MAKE_ENV} _PKGSRC_DEPS=" ${PKGNAME}${_PKGSRC_DEPS}" PKGNAME_REQD="$$pattern" ${MAKE} ${MAKEFLAGS} _AUTOMATIC=yes $$target; \
pkg=`${_PKG_BEST_EXISTS} "$$pattern" || ${TRUE}`; \
case "$$pkg" in \
"") ${ERROR_MSG} "[depends.mk] A package matching \`\`$$pattern'' should"; \
@@ -141,10 +141,10 @@ _flavor-post-install-dependencies: .PHONY ${_RDEPENDS_FILE}
pkg_install-depends:
${RUN}if [ `${PKG_INFO_CMD} -V 2>/dev/null || echo 20010302` -lt ${PKGTOOLS_REQD} ]; then \
${PHASE_MSG} "Trying to handle out-dated pkg_install..."; \
- cd ../../pkgtools/pkg_install && ${SETENV} ${PKGSRC_MAKE_ENV} \
+ cd ../../pkgtools/pkg_install && ${PKGSRC_SETENV} ${PKGSRC_MAKE_ENV} \
_PKGSRC_DEPS=" ${PKGNAME}${_PKGSRC_DEPS}" \
${MAKE} ${MAKEFLAGS} _AUTOMATIC=yes clean && \
- cd ../../pkgtools/pkg_install && ${SETENV} ${PKGSRC_MAKE_ENV} \
+ cd ../../pkgtools/pkg_install && ${PKGSRC_SETENV} ${PKGSRC_MAKE_ENV} \
_PKGSRC_DEPS=" ${PKGNAME}${_PKGSRC_DEPS}" \
${MAKE} ${MAKEFLAGS} _AUTOMATIC=yes ${DEPENDS_TARGET:Q}; \
fi
View
4 mk/flavor/pkg/install.mk
@@ -1,4 +1,4 @@
-# $NetBSD: install.mk,v 1.14 2009/04/24 14:02:41 joerg Exp $
+# $NetBSD: install.mk,v 1.15 2011/09/08 20:17:16 abs Exp $
#
# _flavor-check-conflicts:
# Checks for conflicts between the package and installed packages.
@@ -53,7 +53,7 @@ _flavor-check-installed: .PHONY error-check
${ECHO} " re-linking dependencies, risking various problems."
_REGISTER_DEPENDENCIES= \
- ${SETENV} PKG_DBDIR=${_PKG_DBDIR:Q} \
+ ${PKGSRC_SETENV} PKG_DBDIR=${_PKG_DBDIR:Q} \
AWK=${TOOLS_AWK:Q} \
${SH} ${PKGSRCDIR}/mk/flavor/pkg/register-dependencies
View
4 mk/flavor/pkg/package.mk
@@ -1,4 +1,4 @@
-# $NetBSD: package.mk,v 1.21 2011/03/19 09:45:24 wiz Exp $
+# $NetBSD: package.mk,v 1.22 2011/09/08 20:17:16 abs Exp $
.if defined(PKG_SUFX)
WARNINGS+= "PKG_SUFX is deprecated, please use PKG_COMPRESSION"
@@ -113,7 +113,7 @@ tarup: package-remove tarup-pkg package-links
###
tarup-pkg:
${RUN} [ -x ${_PKG_TARUP_CMD} ] || exit 1; \
- ${SETENV} PKG_DBDIR=${_PKG_DBDIR} PKG_SUFX=${PKG_SUFX} \
+ ${PKGSRC_SETENV} PKG_DBDIR=${_PKG_DBDIR} PKG_SUFX=${PKG_SUFX} \
PKGREPOSITORY=${PKGREPOSITORY} \
${_PKG_TARUP_CMD} -f ${FILEBASE} ${PKGNAME}
View
6 mk/flavor/pkg/replace.mk
@@ -1,4 +1,4 @@
-# $NetBSD: replace.mk,v 1.32 2011/06/04 10:05:00 obache Exp $
+# $NetBSD: replace.mk,v 1.33 2011/09/08 20:17:16 abs Exp $
#
# _flavor-replace:
@@ -84,7 +84,7 @@ replace-tarup: .PHONY
${RUN} [ -x ${_PKG_TARUP_CMD:Q} ] \
|| ${FAIL_MSG} ${_PKG_TARUP_CMD:Q}" was not found."; \
${_REPLACE_OLDNAME_CMD}; \
- ${SETENV} PKG_DBDIR=${_PKG_DBDIR} PKG_SUFX=${PKG_SUFX} \
+ ${PKGSRC_SETENV} PKG_DBDIR=${_PKG_DBDIR} PKG_SUFX=${PKG_SUFX} \
PKGREPOSITORY=${WRKDIR} \
${_PKG_TARUP_CMD} $${oldname} || \
${FAIL_MSG} "Could not pkg_tarup $${oldname}".
@@ -157,7 +157,7 @@ replace-fixup-required-by: .PHONY
esac; \
contents="$$pkgdir/+CONTENTS"; \
newcontents="$$contents.$$$$"; \
- ${SETENV} OLDNAME="$$oldname" NEWNAME="$$newname" \
+ ${PKGSRC_SETENV} OLDNAME="$$oldname" NEWNAME="$$newname" \
${AWK} '($$0 ~ "^@pkgdep " ENVIRON["OLDNAME"]) \
{ print "@pkgdep " ENVIRON["NEWNAME"]; next } \
{ print }' \
View
8 mk/flavor/pkg/views.mk
@@ -1,4 +1,4 @@
-# $NetBSD: views.mk,v 1.6 2009/03/17 22:13:36 rillig Exp $
+# $NetBSD: views.mk,v 1.7 2011/09/08 20:17:16 abs Exp $
# By default, all packages attempt to link into the views.
.if ${PKG_INSTALLATION_TYPE} == "pkgviews"
@@ -53,7 +53,7 @@ su-build-views:
;; \
esac; \
${STEP_MSG} "Performing package view overwrite check for ${PKGNAME} in $$viewname view"; \
- dups=`${SETENV} PLIST_IGNORE_FILES=${_PLIST_IGNORE_FILES:Q} ${PKG_VIEW} --view=$$v check ${PKGNAME} || ${TRUE}`; \
+ dups=`${PKGSRC_SETENV} PLIST_IGNORE_FILES=${_PLIST_IGNORE_FILES:Q} ${PKG_VIEW} --view=$$v check ${PKGNAME} || ${TRUE}`; \
case "$$dups" in \
"") ;; \
*) ${WARNING_MSG} "***********************************************************"; \
@@ -65,7 +65,7 @@ su-build-views:
;; \
esac; \
${STEP_MSG} "Linking package into $$viewname view"; \
- ${SETENV} PLIST_IGNORE_FILES=${_PLIST_IGNORE_FILES:Q} ${PKG_VIEW} --view=$$v add ${PKGNAME}; \
+ ${PKGSRC_SETENV} PLIST_IGNORE_FILES=${_PLIST_IGNORE_FILES:Q} ${PKG_VIEW} --view=$$v add ${PKGNAME}; \
done
######################################################################
@@ -86,5 +86,5 @@ su-remove-views:
*) dbdir=${LOCALBASE}/$$v/.dbdir; viewname=$$v ;; \
esac; \
${STEP_MSG} "Removing package from $$viewname view"; \
- ${SETENV} PLIST_IGNORE_FILES=${_PLIST_IGNORE_FILES:Q} ${PKG_VIEW} --view=$$v delete ${PKGNAME}; \
+ ${PKGSRC_SETENV} PLIST_IGNORE_FILES=${_PLIST_IGNORE_FILES:Q} ${PKG_VIEW} --view=$$v delete ${PKGNAME}; \
done
View
6 mk/install/bin-install.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bin-install.mk,v 1.20 2011/02/07 10:33:27 wiz Exp $
+# $NetBSD: bin-install.mk,v 1.21 2011/09/08 20:17:16 abs Exp $
#
# This file provides the following targets:
@@ -89,7 +89,7 @@ locked-su-do-bin-install:
.if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
${RUN} ${_BIN_INSTALL_PREPARE_CMD} \
${STEP_MSG} "Installing ${PKGNAME} from $$pkg_path"; \
- if ${SETENV} PKG_PATH="$$pkg_path" ${PKG_ADD} -m ${MACHINE_ARCH} -I -p ${_CROSS_DESTDIR}${PREFIX} ${_BIN_INSTALL_FLAGS} ${PKGNAME_REQD:Q}${PKG_SUFX}; then \
+ if ${PKGSRC_SETENV} PKG_PATH="$$pkg_path" ${PKG_ADD} -m ${MACHINE_ARCH} -I -p ${_CROSS_DESTDIR}${PREFIX} ${_BIN_INSTALL_FLAGS} ${PKGNAME_REQD:Q}${PKG_SUFX}; then \
${ECHO} "Fixing recorded cwd..."; \
${SED} -e 's|@cwd ${_CROSS_DESTDIR}|@cwd |' ${_PKG_DBDIR}/${PKGNAME:Q}/+CONTENTS > ${_PKG_DBDIR}/${PKGNAME:Q}/+CONTENTS.tmp; \
${MV} ${_PKG_DBDIR}/${PKGNAME:Q}/+CONTENTS.tmp ${_PKG_DBDIR}/${PKGNAME:Q}/+CONTENTS; \
@@ -99,7 +99,7 @@ locked-su-do-bin-install:
${RUN} ${_BIN_INSTALL_PREPARE_CMD} \
pkgpattern=${PKGNAME_REQD:Q}; \
${STEP_MSG} "Installing $$pkgpattern from $$pkg_path"; \
- if ${SETENV} PKG_PATH="$$pkg_path" ${PKG_ADD} ${_BIN_INSTALL_FLAGS} "$$pkgpattern"; then \
+ if ${PKGSRC_SETENV} PKG_PATH="$$pkg_path" ${PKG_ADD} ${_BIN_INSTALL_FLAGS} "$$pkgpattern"; then \
installed=`${PKG_INFO} -e "$$pkgpattern"`; \
${ECHO} "$$installed successfully installed."; \
fi
View
6 mk/install/install.mk
@@ -1,4 +1,4 @@
-# $NetBSD: install.mk,v 1.61 2011/03/21 08:55:12 obache Exp $
+# $NetBSD: install.mk,v 1.62 2011/09/08 20:17:16 abs Exp $
#
# This file provides the code for the "install" phase.
#
@@ -322,7 +322,7 @@ do-install:
. for _dir_ in ${INSTALL_DIRS}
${RUN} ${_ULIMIT_CMD} \
cd ${WRKSRC} && cd ${_dir_} && \
- ${SETENV} ${INSTALL_ENV} ${MAKE_ENV} \
+ ${PKGSRC_SETENV} ${INSTALL_ENV} ${MAKE_ENV} \
${MAKE_PROGRAM} ${MAKE_FLAGS} ${INSTALL_MAKE_FLAGS} \
-f ${MAKE_FILE} ${INSTALL_TARGET}
. endfor
@@ -370,7 +370,7 @@ _PLIST_REGEXP.man= \
^([^/]*/)+(man[1-9ln]/[^/]*\.[1-9ln]|cat[1-9ln]/[^/]*\.[0-9])(\.gz)?$$
_DOC_COMPRESS= \
- ${SETENV} PATH=${PATH:Q} \
+ ${PKGSRC_SETENV} PATH=${PATH:Q} \
MANZ=${_MANZ} \
PKG_VERBOSE=${PKG_VERBOSE} \
TEST=${TOOLS_TEST:Q} \
View
4 mk/license.mk
@@ -1,4 +1,4 @@
-# $NetBSD: license.mk,v 1.43 2011/06/24 12:00:37 taca Exp $
+# $NetBSD: license.mk,v 1.44 2011/09/08 20:17:15 abs Exp $
#
# This file handles everything about the LICENSE variable. It is
# included automatically by bsd.pkg.mk.
@@ -151,7 +151,7 @@ _ACCEPTABLE_LICENSE!= \
if test `${PKG_ADMIN} -V` -lt 20090528; then \
echo outdated; \
else \
- ${SETENV} PKGSRC_ACCEPTABLE_LICENSES=${ACCEPTABLE_LICENSES:Q} \
+ ${PKGSRC_SETENV} PKGSRC_ACCEPTABLE_LICENSES=${ACCEPTABLE_LICENSES:Q} \
PKGSRC_DEFAULT_ACCEPTABLE_LICENSES=${DEFAULT_ACCEPTABLE_LICENSES:Q} \
${PKG_ADMIN} check-license ${LICENSE:Q} || echo failure; \
fi
View
4 mk/misc/toplevel.mk
@@ -1,4 +1,4 @@
-# $NetBSD: toplevel.mk,v 1.4 2007/10/13 11:04:19 dsl Exp $
+# $NetBSD: toplevel.mk,v 1.5 2011/09/08 20:17:16 abs Exp $
#
# This file contains the make targets that can be used from the
# top-level Makefile. They are in this separate file to keep the
@@ -15,7 +15,7 @@
_README_TYPE_FLAG?= none
README.html: .PRECIOUS
.if ${_README_TYPE_FLAG} == "--ftp" || ${_README_TYPE_FLAG} == "--cdrom"
- ${SETENV} TMPDIR=${TMPDIR:U/tmp}/mkreadme \
+ ${PKGSRC_SETENV} TMPDIR=${TMPDIR:U/tmp}/mkreadme \
BMAKE=${MAKE} \
./mk/scripts/mkreadme --pkgsrc ${.CURDIR} \
--packages ${PACKAGES} ${_README_TYPE_FLAG} \
View
10 mk/pkginstall/bsd.pkginstall.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkginstall.mk,v 1.54 2011/04/30 23:58:29 dholland Exp $
+# $NetBSD: bsd.pkginstall.mk,v 1.55 2011/09/08 20:17:16 abs Exp $
#
# This Makefile fragment is included by bsd.pkg.mk and implements the
# common INSTALL/DEINSTALL scripts framework. To use the pkginstall
@@ -331,7 +331,7 @@ pre-install: create-usergroup
.endif
_INSTALL_USERGROUP_CHECK= \
- ${SETENV} PERL5=${PERL5:Q} \
+ ${PKGSRC_SETENV} PERL5=${PERL5:Q} \
${SH} ${PKGSRCDIR}/mk/pkginstall/usergroup-check
.PHONY: create-usergroup
@@ -772,7 +772,7 @@ install-script-data-info-files:
>> ${INSTALL_FILE} ;; \
esac; \
done; \
- cd ${PKG_DB_TMPDIR} && ${SETENV} ${INSTALL_SCRIPTS_ENV} \
+ cd ${PKG_DB_TMPDIR} && ${PKGSRC_SETENV} ${INSTALL_SCRIPTS_ENV} \
${_PKG_DEBUG_SCRIPT} ${INSTALL_FILE} ${PKGNAME} \
UNPACK +INFO_FILES; \
fi
@@ -1125,7 +1125,7 @@ pre-install-script:
${RUN} \
if ${TEST} -x ${INSTALL_FILE}; then \
${STEP_MSG} "Running PRE-INSTALL script actions"; \
- cd ${PKG_DB_TMPDIR} && ${SETENV} ${INSTALL_SCRIPTS_ENV} \
+ cd ${PKG_DB_TMPDIR} && ${PKGSRC_SETENV} ${INSTALL_SCRIPTS_ENV} \
${_PKG_DEBUG_SCRIPT} ${INSTALL_FILE} ${PKGNAME} \
PRE-INSTALL; \
fi
@@ -1134,7 +1134,7 @@ post-install-script:
${RUN} \
if ${TEST} -x ${INSTALL_FILE}; then \
${STEP_MSG} "Running POST-INSTALL script actions"; \
- cd ${PKG_DB_TMPDIR} && ${SETENV} ${INSTALL_SCRIPTS_ENV} \
+ cd ${PKG_DB_TMPDIR} && ${PKGSRC_SETENV} ${INSTALL_SCRIPTS_ENV} \
${_PKG_DEBUG_SCRIPT} ${INSTALL_FILE} ${PKGNAME} \
POST-INSTALL; \
fi
View
12 mk/plist/plist.mk
@@ -1,4 +1,4 @@
-# $NetBSD: plist.mk,v 1.39 2009/03/17 22:13:36 rillig Exp $
+# $NetBSD: plist.mk,v 1.40 2011/09/08 20:17:16 abs Exp $
#
# This Makefile fragment handles the creation of PLISTs for use by
# pkg_create(8).
@@ -101,7 +101,7 @@ _IMAKE_MANINSTALL= # empty
.endif
_LIBTOOL_EXPAND= \
- ${SETENV} ECHO=${TOOLS_ECHO:Q} GREP=${TOOLS_GREP:Q} \
+ ${PKGSRC_SETENV} ECHO=${TOOLS_ECHO:Q} GREP=${TOOLS_GREP:Q} \
SORT=${TOOLS_SORT:Q} TEST=${TOOLS_TEST:Q} \
${SH} ${.CURDIR}/../../mk/plist/libtool-expand
@@ -258,9 +258,9 @@ ${PLIST}: ${PLIST_SRC}
${PLIST}:
${RUN} ${MKDIR} ${.TARGET:H}
${RUN} { ${_GENERATE_PLIST} } > ${.TARGET}-1src
- ${RUN} ${SETENV} ${_PLIST_AWK_ENV} ${AWK} ${_PLIST_1_AWK} < ${.TARGET}-1src > ${.TARGET}-2mac
- ${RUN} ${SETENV} ${_PLIST_AWK_ENV} ${AWK} ${_PLIST_AWK} < ${.TARGET}-2mac > ${.TARGET}-3mag
- ${RUN} ${SETENV} ${_PLIST_AWK_ENV} ${AWK} ${_PLIST_SHLIB_AWK} < ${.TARGET}-3mag > ${.TARGET}
+ ${RUN} ${PKGSRC_SETENV} ${_PLIST_AWK_ENV} ${AWK} ${_PLIST_1_AWK} < ${.TARGET}-1src > ${.TARGET}-2mac
+ ${RUN} ${PKGSRC_SETENV} ${_PLIST_AWK_ENV} ${AWK} ${_PLIST_AWK} < ${.TARGET}-2mac > ${.TARGET}-3mag
+ ${RUN} ${PKGSRC_SETENV} ${_PLIST_AWK_ENV} ${AWK} ${_PLIST_SHLIB_AWK} < ${.TARGET}-3mag > ${.TARGET}
# for list of keywords see pkg_create(1)
${_PLIST_NOKEYWORDS}: ${PLIST}
@@ -279,6 +279,6 @@ ${_PLIST_NOKEYWORDS}: ${PLIST}
.if defined(INFO_FILES)
INFO_FILES_cmd= \
${CAT} ${PLIST} | \
- ${SETENV} ${_PLIST_AWK_ENV} ${AWK} ${_PLIST_INFO_AWK} | \
+ ${PKGSRC_SETENV} ${_PLIST_AWK_ENV} ${AWK} ${_PLIST_INFO_AWK} | \
${AWK} '($$0 !~ "-[0-9]*(\\.gz)?$$") { print }'
.endif
Please sign in to comment.
Something went wrong with that request. Please try again.