FreeBSD Bugzilla – Attachment 248232 Details for
Bug 276478
Mk/*: Build with a clean environment
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch4
0001-Mk-Build-with-a-clean-environment.patch (text/plain), 36.64 KB, created by
Tijl Coosemans
on 2024-02-07 15:00:42 UTC
(
hide
)
Description:
patch4
Filename:
MIME Type:
Creator:
Tijl Coosemans
Created:
2024-02-07 15:00:42 UTC
Size:
36.64 KB
patch
obsolete
>From 31b9a766ec934c267174826082d48dd4e5b668c0 Mon Sep 17 00:00:00 2001 >From: Tijl Coosemans <tijl@FreeBSD.org> >Date: Sat, 20 Jan 2024 12:38:46 +0100 >Subject: [PATCH] Mk/*: Build with a clean environment > >Both our make and gmake use the MAKEFLAGS environment variable but the >values aren't compatible and the latest version of gmake complains about >that. To rule out that any environment variable can cause problems like >this, add a new command SETENVI=/usr/bin/env -i that clears the >environment, and use it to run upstream build systems with a clean >environment. > >Introduce a new variable WRK_ENV that contains the environment to use >with SETENVI in all targets that run upstream build commands. Variables >that are common between CONFIGURE_ENV and MAKE_ENV could be moved to >WRK_ENV but for now it just contains a minimal environment: > >HOME=${WRKDIR}: Fixes USES=elixir ports that were using the user's HOME. >OSVERSION: For cross building; determines the output of uname -K and >getosreldate(3); affects net/freebsd-telnetd for example. >PATH: Fixes USES=gem ports that were using the user's PATH. >PWD=$${PWD}: Preserve current working directory; affects USES=go ports. >TERM: To preserve colored output to terminals. >TMPDIR: For users who define that. >UNAME_*: For cross building; determines the output of uname(1); affects >lang/python* for example. > >This commit deals with everything under Mk/. Ports that have their own >targets running upstream build commands can switch to SETENVI later. > >The ports tree adds its definition of ARCH to the MAKEFLAGS environment >variable, which is interpreted by sub-makes as command line arguments, >which means that any definition of ARCH in upstream makefiles was >overridden. The following ports required fixes now that this is no >longer the case. > >lang/ocaml: >Patch configure script so it detects amd64 correctly. Also make the >powerpc case consistent with the other architectures. This also affects >other ocaml ports like devel/ocaml-ocamlbuild and math/ocaml-num that >include a Makefile.config installed by lang/ocaml. While here, use >SETENVI in check-test target. > >net/libnatpmp: >Use of upstream definition of ARCH triggers installation in PREFIX/lib64 >on amd64. Disable this. > >games/legesmotus: >Remove ARCH related patches. > >PR: 276478 >Exp-run by: antoine >--- > Mk/Uses/angr.mk | 2 +- > Mk/Uses/cabal.mk | 16 ++++++------ > Mk/Uses/cargo.mk | 5 ++-- > Mk/Uses/cmake.mk | 9 ++++--- > Mk/Uses/elixir.mk | 2 +- > Mk/Uses/erlang.mk | 2 +- > Mk/Uses/gem.mk | 8 +++--- > Mk/Uses/go.mk | 16 ++++++------ > Mk/Uses/imake.mk | 2 +- > Mk/Uses/lazarus.mk | 2 +- > Mk/Uses/mate.mk | 2 +- > Mk/Uses/perl5.mk | 10 ++++---- > Mk/Uses/pyqt.mk | 4 +-- > Mk/Uses/pytest.mk | 2 +- > Mk/Uses/python.mk | 20 +++++++-------- > Mk/Uses/qmake.mk | 2 +- > Mk/Uses/ruby.mk | 10 ++++---- > Mk/bsd.commands.mk | 1 + > Mk/bsd.java.mk | 8 +++--- > Mk/bsd.port.mk | 25 +++++++++++++++--- > games/legesmotus/files/patch-Makefile | 11 -------- > games/legesmotus/files/patch-common.mk | 18 ++----------- > graphics/py-python-poppler-qt5/Makefile | 6 +++-- > lang/ocaml/Makefile | 16 ++++-------- > lang/ocaml/files/patch-configure | 34 ++++++++++++++++++------- > net/libnatpmp/files/patch-Makefile | 10 ++++++++ > 26 files changed, 130 insertions(+), 113 deletions(-) > delete mode 100644 games/legesmotus/files/patch-Makefile > create mode 100644 net/libnatpmp/files/patch-Makefile > >diff --git a/Mk/Uses/angr.mk b/Mk/Uses/angr.mk >index a1e41b042dae..6a5ae2a433ea 100644 >--- a/Mk/Uses/angr.mk >+++ b/Mk/Uses/angr.mk >@@ -59,7 +59,7 @@ TEST_WRKSRC?= ${WRKSRC}/tests > ANGR_NOSETESTS?= nosetests-${PYTHON_VER} > > do-test: >- @(cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${ANGR_NOSETESTS}) >+ @(cd ${TEST_WRKSRC} && ${SETENVI} ${WRK_ENV} ${TEST_ENV} ${ANGR_NOSETESTS}) > . endif # "${angr_ARGS:Mnose}" != "" > > .endif >diff --git a/Mk/Uses/cabal.mk b/Mk/Uses/cabal.mk >index e91e4522e8f7..2ee0596e0a6e 100644 >--- a/Mk/Uses/cabal.mk >+++ b/Mk/Uses/cabal.mk >@@ -202,14 +202,14 @@ cabal-extract: check-cabal > ${RM} -r ${CABAL_HOME} > . endif > @${ECHO_MSG} "===> Fetching Hackage index into ${CABAL_HOME}/.cabal" >- ${SETENV} ${CABAL_HOME_ENV} ${CABAL_CMD} update >+ ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${CABAL_HOME_ENV} ${CABAL_CMD} update > . if ${_hackage_is_default} == yes > cd ${WRKDIR} && \ >- ${SETENV} ${MAKE_ENV} ${CABAL_HOME_ENV} ${CABAL_CMD} get ${HACKAGE_DISTNAME} >+ ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${CABAL_HOME_ENV} ${CABAL_CMD} get ${HACKAGE_DISTNAME} > . else > . if ${cabal_ARGS:Mhpack} > @${ECHO_MSG} "===> Running ${HPACK_CMD} to generate .cabal file" >- cd ${WRKSRC} && ${SETENV} ${CABAL_HOME_ENV} ${HPACK_CMD} >+ cd ${WRKSRC} && ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${CABAL_HOME_ENV} ${HPACK_CMD} > . endif > . endif > # Remove Haskell dependencies that come from GH_TUPLE >@@ -217,7 +217,7 @@ cabal-extract: check-cabal > . ifdef CABAL_REPOSITORIES > @${ECHO_MSG} "===> Fetching additional Cabal repositories index into ${CABAL_HOME}/.cabal" > @cd ${WRKSRC} && \ >- ${SETENV} ${CABAL_HOME_ENV} ${CABAL_CMD} update >+ ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${CABAL_HOME_ENV} ${CABAL_CMD} update > . endif > # Create a cookie for cabal-post-patch > @${TOUCH} ${EXTRACT_COOKIE} ${CABAL_COOKIE} >@@ -227,12 +227,12 @@ cabal-extract: check-cabal > # This pulls in all source dependencies, resolves them and generates build plan > cabal-configure: check-cabal > cd ${WRKSRC} && \ >- ${SETENV} ${MAKE_ENV} ${CABAL_HOME_ENV} ${CABAL_CMD} build --dry-run --disable-benchmarks --disable-tests --flags="${CABAL_FLAGS}" ${CABAL_WITH_ARGS} ${CABAL_LTO_ARGS} ${BUILD_ARGS} ${BUILD_TARGET} >+ ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${CABAL_HOME_ENV} ${CABAL_CMD} build --dry-run --disable-benchmarks --disable-tests --flags="${CABAL_FLAGS}" ${CABAL_WITH_ARGS} ${CABAL_LTO_ARGS} ${BUILD_ARGS} ${BUILD_TARGET} > > # Calls cabal build on the Haskell package located in ${WRKSRC} > cabal-build: check-cabal > cd ${WRKSRC} && \ >- ${SETENV} ${MAKE_ENV} ${CABAL_HOME_ENV} ${CABAL_CMD} build --disable-benchmarks --disable-tests ${CABAL_WITH_ARGS} ${CABAL_LTO_ARGS} ${BUILD_ARGS} ${BUILD_TARGET} >+ ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${CABAL_HOME_ENV} ${CABAL_CMD} build --disable-benchmarks --disable-tests ${CABAL_WITH_ARGS} ${CABAL_LTO_ARGS} ${BUILD_ARGS} ${BUILD_TARGET} > > # Generates USE_CABAL= ... line ready to be pasted into the port based on the plan.json file generated by cabal configure. > make-use-cabal: check-cabal2tuple >@@ -312,13 +312,13 @@ cabal-post-patch: > cabal-pre-configure: > # Generate .cabal file with hpack if requested > . if ${cabal_ARGS:Mhpack} >- cd ${WRKSRC} && ${SETENV} ${CABAL_HOME_ENV} hpack >+ cd ${WRKSRC} && ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${CABAL_HOME_ENV} hpack > . endif > > . if !target(do-build) > do-build: > cd ${WRKSRC} && \ >- ${SETENV} ${MAKE_ENV} ${CABAL_HOME_ENV} ${CABAL_CMD} build --offline --disable-benchmarks --disable-tests ${CABAL_WITH_ARGS} ${CABAL_LTO_ARGS} --flags "${CABAL_FLAGS}" ${BUILD_ARGS} ${BUILD_TARGET} >+ ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${CABAL_HOME_ENV} ${CABAL_CMD} build --offline --disable-benchmarks --disable-tests ${CABAL_WITH_ARGS} ${CABAL_LTO_ARGS} --flags "${CABAL_FLAGS}" ${BUILD_ARGS} ${BUILD_TARGET} > . endif > > . if !target(do-install) >diff --git a/Mk/Uses/cargo.mk b/Mk/Uses/cargo.mk >index 3af4e4183922..ac79283c5c7d 100644 >--- a/Mk/Uses/cargo.mk >+++ b/Mk/Uses/cargo.mk >@@ -156,8 +156,9 @@ RUSTFLAGS+= ${CFLAGS:M-mcpu=*:S/-mcpu=/-C target-cpu=/} > . endif > > # Helper to shorten cargo calls. >-_CARGO_RUN= ${SETENV} ${MAKE_ENV} ${CARGO_ENV} ${CARGO} >-CARGO_CARGO_RUN= cd ${WRKSRC}; ${SETENV} CARGO_FREEBSD_PORTS_SKIP_GIT_UPDATE=1 ${_CARGO_RUN} >+_CARGO_RUN= ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${CARGO_ENV} ${CARGO} >+CARGO_CARGO_RUN= cd ${WRKSRC}; ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${CARGO_ENV} \ >+ CARGO_FREEBSD_PORTS_SKIP_GIT_UPDATE=1 ${CARGO} > > # User arguments for cargo targets. > CARGO_BUILD_ARGS?= >diff --git a/Mk/Uses/cmake.mk b/Mk/Uses/cmake.mk >index f4150b0e5adf..e622776052af 100644 >--- a/Mk/Uses/cmake.mk >+++ b/Mk/Uses/cmake.mk >@@ -153,7 +153,8 @@ BROKEN= USES=emacs is incompatible with cmake's ninja-generator (try cmake:noni > do-configure: > @${ECHO_MSG} ${_CMAKE_MSG} > ${MKDIR} ${CONFIGURE_WRKSRC} >- @cd ${CONFIGURE_WRKSRC}; ${SETENV} ${CONFIGURE_ENV} ${CMAKE_BIN} ${CMAKE_ARGS} ${CMAKE_SOURCE_PATH} >+ @cd ${CONFIGURE_WRKSRC}; ${SETENVI} ${WRK_ENV} ${CONFIGURE_ENV} ${CMAKE_BIN} \ >+ ${CMAKE_ARGS} ${CMAKE_SOURCE_PATH} > . endif > > . if !target(do-test) && ${cmake_ARGS:Mtesting} >@@ -169,9 +170,9 @@ CMAKE_TESTING_ARGS+= ${CMAKE_TESTING_${_bool_kind}:C/.*/-D&:BOOL=${_bool_kind}/ > > do-test: > @cd ${BUILD_WRKSRC} && \ >- ${SETENV} ${CONFIGURE_ENV} ${CMAKE_BIN} ${CMAKE_ARGS} ${CMAKE_TESTING_ARGS} ${CMAKE_SOURCE_PATH} && \ >- ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${_MAKE_JOBS} ${MAKE_ARGS} ${ALL_TARGET} && \ >- ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} ${CMAKE_TESTING_TARGET} >+ ${SETENVI} ${WRK_ENV} ${CONFIGURE_ENV} ${CMAKE_BIN} ${CMAKE_ARGS} ${CMAKE_TESTING_ARGS} ${CMAKE_SOURCE_PATH} && \ >+ ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${MAKE_CMD} ${_MAKE_JOBS} ${MAKE_ARGS} ${ALL_TARGET} && \ >+ ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} ${CMAKE_TESTING_TARGET} > . endif > . endif > >diff --git a/Mk/Uses/elixir.mk b/Mk/Uses/elixir.mk >index fbfe407907d6..89d29aa9c46d 100644 >--- a/Mk/Uses/elixir.mk >+++ b/Mk/Uses/elixir.mk >@@ -42,7 +42,7 @@ ELIXIR_APP_ROOT?= ${PREFIX}/lib/elixir/lib/${ELIXIR_APP_NAME} > ELIXIR_HIDDEN?= "^${ELIXIR_APP_NAME}$$" > ELIXIR_LOCALE?= en_US.UTF-8 > MIX_CMD?= ${LOCALBASE}/bin/mix >-MIX_COMPILE?= ${SETENV} ${MIX_ENV} LANG=${ELIXIR_LOCALE} LC_ALL=${ELIXIR_LOCALE} MIX_ENV=${MIX_ENV_NAME} ELIXIR_HIDDEN=${ELIXIR_HIDDEN} ${MIX_CMD} ${MIX_TARGET} >+MIX_COMPILE?= ${SETENVI} ${WRK_ENV} ${MIX_ENV} LANG=${ELIXIR_LOCALE} LC_ALL=${ELIXIR_LOCALE} MIX_ENV=${MIX_ENV_NAME} ELIXIR_HIDDEN=${ELIXIR_HIDDEN} ${MIX_CMD} ${MIX_TARGET} > MIX_REWRITE?= > MIX_BUILD_DEPS?= > MIX_RUN_DEPS?= >diff --git a/Mk/Uses/erlang.mk b/Mk/Uses/erlang.mk >index 62e9e6e34f29..acdd6c031cdd 100644 >--- a/Mk/Uses/erlang.mk >+++ b/Mk/Uses/erlang.mk >@@ -97,7 +97,7 @@ do-build: > . for target in ${REBAR_TARGETS} > # Remove rebar.lock every time - it can be created again after each run of rebar3 > @${RM} ${WRKSRC}/rebar.lock >- @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} REBAR_PROFILE=${REBAR_PROFILE} ${ERLANG_COMPILE} ${target} >+ @cd ${WRKSRC} && ${SETENVI} ${WRK_ENV} ${MAKE_ENV} REBAR_PROFILE=${REBAR_PROFILE} ${ERLANG_COMPILE} ${target} > . endfor > . endif # !target(do-build) > >diff --git a/Mk/Uses/gem.mk b/Mk/Uses/gem.mk >index 8c4539a274ca..e085c45fcab0 100644 >--- a/Mk/Uses/gem.mk >+++ b/Mk/Uses/gem.mk >@@ -93,8 +93,8 @@ RUBYGEM_ARGS+= --no-document > > _USES_extract+= 590:gem-extract > gem-extract: >- @${SETENV} ${GEM_ENV} ${RUBYGEMBIN} unpack --target=${WRKDIR} ${DISTDIR}/${DIST_SUBDIR}/${GEMFILES} >- @(cd ${BUILD_WRKSRC}; if ! ${SETENV} ${GEM_ENV} ${RUBYGEMBIN} spec --ruby ${DISTDIR}/${DIST_SUBDIR}/${GEMFILES} > ${GEMSPEC} ; then \ >+ @${SETENVI} ${WRK_ENV} ${GEM_ENV} ${RUBYGEMBIN} unpack --target=${WRKDIR} ${DISTDIR}/${DIST_SUBDIR}/${GEMFILES} >+ @(cd ${BUILD_WRKSRC}; if ! ${SETENVI} ${WRK_ENV} ${GEM_ENV} ${RUBYGEMBIN} spec --ruby ${DISTDIR}/${DIST_SUBDIR}/${GEMFILES} > ${GEMSPEC} ; then \ > if [ -n "${BUILD_FAIL_MESSAGE}" ] ; then \ > ${ECHO_MSG} "===> Extraction failed unexpectedly."; \ > (${ECHO_CMD} "${BUILD_FAIL_MESSAGE}") | ${FMT_80} ; \ >@@ -104,7 +104,7 @@ gem-extract: > > . if !target(do-build) > do-build: >- @(cd ${BUILD_WRKSRC}; if ! ${SETENV} ${GEM_ENV} ${RUBYGEMBIN} build --force ${GEMSPEC} ; then \ >+ @(cd ${BUILD_WRKSRC}; if ! ${SETENVI} ${WRK_ENV} ${GEM_ENV} ${RUBYGEMBIN} build --force ${GEMSPEC} ; then \ > if [ -n "${BUILD_FAIL_MESSAGE}" ] ; then \ > ${ECHO_MSG} "===> Compilation failed unexpectedly."; \ > (${ECHO_CMD} "${BUILD_FAIL_MESSAGE}") | ${FMT_80} ; \ >@@ -115,7 +115,7 @@ do-build: > > . if !target(do-install) > do-install: >- (cd ${BUILD_WRKSRC}; ${SETENV} ${GEM_ENV} ${RUBYGEMBIN} install ${RUBYGEM_ARGS} ${GEMFILES} -- ${CONFIGURE_ARGS}) >+ (cd ${BUILD_WRKSRC}; ${SETENVI} ${WRK_ENV} ${GEM_ENV} ${RUBYGEMBIN} install ${RUBYGEM_ARGS} ${GEMFILES} -- ${CONFIGURE_ARGS}) > ${RM} -r ${STAGEDIR}${PREFIX}/${GEMS_BASE_DIR}/build_info/ > ${FIND} ${STAGEDIR}${PREFIX}/${GEMS_BASE_DIR} -type f -name '*.so' -exec ${STRIP_CMD} {} + > ${FIND} ${STAGEDIR}${PREFIX}/${GEMS_BASE_DIR} -type f \( -name mkmf.log -or -name gem_make.out \) -delete >diff --git a/Mk/Uses/go.mk b/Mk/Uses/go.mk >index 76b664b7b9b8..a241685d0956 100644 >--- a/Mk/Uses/go.mk >+++ b/Mk/Uses/go.mk >@@ -192,7 +192,7 @@ go-post-fetch: > @${ECHO_MSG} "===> Fetching ${GO_MODNAME} dependencies"; > @(cd ${DISTDIR}/${DIST_SUBDIR}; \ > [ -e go.mod ] || ${RLN} ${GO_MODFILE} go.mod; \ >- ${SETENV} ${GO_ENV} GOPROXY=${GO_GOPROXY} ${GO_CMD} mod download -x all) >+ ${SETENVI} ${WRK_ENV} ${GO_ENV} GOPROXY=${GO_GOPROXY} ${GO_CMD} mod download -x all) > . endif > > _USES_extract+= 800:go-post-extract >@@ -201,9 +201,9 @@ _USES_extract+= 800:go-post-extract > # already in MODCACHE), vendor them so we can patch them if needed. > go-post-extract: > @${ECHO_MSG} "===> Tidying ${GO_MODNAME} dependencies"; >- @(cd ${GO_WRKSRC}; ${SETENV} ${MAKE_ENV} ${GO_ENV} GOPROXY=${GO_MODCACHE} ${GO_CMD} mod tidy -e) >+ @(cd ${GO_WRKSRC}; ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${GO_ENV} GOPROXY=${GO_MODCACHE} ${GO_CMD} mod tidy -e) > @${ECHO_MSG} "===> Vendoring ${GO_MODNAME} dependencies"; >- @(cd ${GO_WRKSRC}; ${SETENV} ${MAKE_ENV} ${GO_ENV} GOPROXY=${GO_MODCACHE} ${GO_CMD} mod vendor -e) >+ @(cd ${GO_WRKSRC}; ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${GO_ENV} GOPROXY=${GO_MODCACHE} ${GO_CMD} mod vendor -e) > . else > # Legacy (GOPATH) build mode, setup directory structure expected by Go for the main module. > go-post-extract: >@@ -220,7 +220,7 @@ do-build: > pkg=$$(${ECHO_CMD} $${t} | \ > ${SED} -Ee 's/^([^:]*).*$$/\1/' -e 's/^${PORTNAME}$$/./'); \ > ${ECHO_MSG} "===> Building $${out} from $${pkg}"; \ >- ${SETENV} ${MAKE_ENV} ${GO_ENV} GOMAXPROCS=${MAKE_JOBS_NUMBER} GOPROXY=off ${GO_CMD} build ${GO_BUILDFLAGS} \ >+ ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${GO_ENV} GOMAXPROCS=${MAKE_JOBS_NUMBER} GOPROXY=off ${GO_CMD} build ${GO_BUILDFLAGS} \ > -o ${GO_WRKDIR_BIN}/$${out} \ > $${pkg}; \ > done) >@@ -246,7 +246,7 @@ do-test: > (cd ${GO_WRKSRC}; \ > for t in ${GO_TESTTARGET}; do \ > ${ECHO_MSG} "===> Testing $${t}"; \ >- ${SETENV} ${MAKE_ENV} ${GO_ENV} GOPROXY=off ${GO_CMD} test ${GO_TESTFLAGS} $${t}; \ >+ ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${GO_ENV} GOPROXY=off ${GO_CMD} test ${GO_TESTFLAGS} $${t}; \ > done) > . endif > >@@ -254,7 +254,7 @@ do-test: > gomod-clean: > . if exists(${GO_CMD}) > @${ECHO_MSG} "===> Cleaning Go module cache" >- @${SETENV} ${GO_ENV} ${GO_CMD} clean -modcache >+ @${SETENVI} ${WRK_ENV} ${GO_ENV} ${GO_CMD} clean -modcache > . else > @${ECHO_MSG} "===> Skipping since ${GO_CMD} is not installed" > . endif >@@ -279,11 +279,11 @@ gomod-vendor-deps: > fi > > gomod-vendor: gomod-vendor-deps patch >- @cd ${WRKSRC}; ${SETENV} ${GO_ENV} ${GO_CMD} mod vendor; \ >+ @cd ${WRKSRC}; ${SETENVI} ${WRK_ENV} ${GO_ENV} ${GO_CMD} mod vendor; \ > [ -r vendor/modules.txt ] && ${_MODULES2TUPLE_CMD} vendor/modules.txt > > gomod-vendor-diff: gomod-vendor-deps patch >- @cd ${WRKSRC}; ${SETENV} ${GO_ENV} ${GO_CMD} mod vendor; \ >+ @cd ${WRKSRC}; ${SETENVI} ${WRK_ENV} ${GO_ENV} ${GO_CMD} mod vendor; \ > [ -r vendor/modules.txt ] && ${_MODULES2TUPLE_CMD} vendor/modules.txt | ${SED} 's|GH_TUPLE=| |; s| \\$$||' | ${GREP} -v ' \\' > ${WRKDIR}/GH_TUPLE-new.txt && \ > echo ${GH_TUPLE} | ${TR} -s " " "\n" | ${SED} "s|^| |" > ${WRKDIR}/GH_TUPLE-old.txt && \ > ${DIFF} ${WRKDIR}/GH_TUPLE-old.txt ${WRKDIR}/GH_TUPLE-new.txt || exit 0 >diff --git a/Mk/Uses/imake.mk b/Mk/Uses/imake.mk >index 06981bc9f819..6848907e8934 100644 >--- a/Mk/Uses/imake.mk >+++ b/Mk/Uses/imake.mk >@@ -36,7 +36,7 @@ XMKMF_ARGS+= -a > . if ! ${imake_ARGS:Menv} > . if !target(do-configure) > do-configure: >- @(cd ${CONFIGURE_WRKSRC} && ${SETENV} ${MAKE_ENV} ${XMKMF} ${XMKMF_ARGS}) >+ @(cd ${CONFIGURE_WRKSRC} && ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${XMKMF} ${XMKMF_ARGS}) > . endif > > . if ! ${imake_ARGS:Mnoman} >diff --git a/Mk/Uses/lazarus.mk b/Mk/Uses/lazarus.mk >index 6088ea029b23..ef5569ab8eb9 100644 >--- a/Mk/Uses/lazarus.mk >+++ b/Mk/Uses/lazarus.mk >@@ -144,7 +144,7 @@ _INCLUDE_USES_LAZARUS_POST_MK= yes > . if !target(do-build) > do-build: > . for PROJECT_FILE in ${LAZARUS_PROJECT_FILES} >- @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${LAZBUILD_CMD} \ >+ @(cd ${BUILD_WRKSRC}; ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${LAZBUILD_CMD} \ > ${LAZBUILD_ARGS} --ws=${LCL_PLATFORM} --lazarusdir=${LAZARUS_DIR} ${PROJECT_FILE}) > . endfor > . endif # !target(do-build) >diff --git a/Mk/Uses/mate.mk b/Mk/Uses/mate.mk >index 34ccb7d831c3..dc4272bb90a0 100644 >--- a/Mk/Uses/mate.mk >+++ b/Mk/Uses/mate.mk >@@ -210,7 +210,7 @@ CONFIGURE_ENV+= NOCONFIGURE=yes > _USES_configure+= 295:mate-pre-configure > > mate-pre-configure: >- @(cd ${CONFIGURE_WRKSRC} ; ${SETENV} ${CONFIGURE_ENV} ./autogen.sh) >+ @(cd ${CONFIGURE_WRKSRC} ; ${SETENVI} ${WRK_ENV} ${CONFIGURE_ENV} ./autogen.sh) > . endif > > . if defined(MATE_PRE_PATCH) >diff --git a/Mk/Uses/perl5.mk b/Mk/Uses/perl5.mk >index 8c266cdfafee..e7c5fd5b5068 100644 >--- a/Mk/Uses/perl5.mk >+++ b/Mk/Uses/perl5.mk >@@ -261,7 +261,7 @@ do-configure: > ${SCRIPTDIR}/configure; \ > fi > @cd ${CONFIGURE_WRKSRC} && \ >- ${SETENV} ${CONFIGURE_ENV} \ >+ ${SETENVI} ${WRK_ENV} ${CONFIGURE_ENV} \ > ${PERL5} ${CONFIGURE_CMD} ${CONFIGURE_ARGS} > . if !${_USE_PERL5:Mmodbuild*} > @cd ${CONFIGURE_WRKSRC} && \ >@@ -273,13 +273,13 @@ do-configure: > . if ${_USE_PERL5:Mmodbuild*} > . if !target(do-build) > do-build: >- @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PERL5} ${PL_BUILD} ${ALL_TARGET} ${MAKE_ARGS}) >+ @(cd ${BUILD_WRKSRC}; ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${PERL5} ${PL_BUILD} ${ALL_TARGET} ${MAKE_ARGS}) > . endif # !target(do-build) > > . if !${USES:Mgmake} > . if !target(do-install) > do-install: >- @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PERL5} ${PL_BUILD} ${INSTALL_TARGET} ${MAKE_ARGS}) >+ @(cd ${BUILD_WRKSRC}; ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${PERL5} ${PL_BUILD} ${INSTALL_TARGET} ${MAKE_ARGS}) > . endif # !target(do-install) > . endif # ! USES=gmake > . endif # modbuild >@@ -325,9 +325,9 @@ TEST_TARGET?= test > TEST_WRKSRC?= ${BUILD_WRKSRC} > do-test: > . if ${USE_PERL5:Mmodbuild*} >- @cd ${TEST_WRKSRC}/ && ${SETENV} ${TEST_ENV} ${PERL5} ${PL_BUILD} ${TEST_TARGET} ${TEST_ARGS} >+ @cd ${TEST_WRKSRC}/ && ${SETENVI} ${WRK_ENV} ${TEST_ENV} ${PERL5} ${PL_BUILD} ${TEST_TARGET} ${TEST_ARGS} > . elif ${USE_PERL5:Mconfigure} >- @cd ${TEST_WRKSRC}/ && ${SETENV} ${TEST_ENV} ${MAKE_CMD} ${TEST_ARGS} ${TEST_TARGET} >+ @cd ${TEST_WRKSRC}/ && ${SETENVI} ${WRK_ENV} ${TEST_ENV} ${MAKE_CMD} ${TEST_ARGS} ${TEST_TARGET} > . endif # USE_PERL5:Mmodbuild* > . endif # do-test > .endif # defined(_POSTMKINCLUDED) >diff --git a/Mk/Uses/pyqt.mk b/Mk/Uses/pyqt.mk >index b9724bebd084..fb0eb6de16b7 100644 >--- a/Mk/Uses/pyqt.mk >+++ b/Mk/Uses/pyqt.mk >@@ -228,13 +228,13 @@ post-patch: > > . if !target(do-build) > do-build: >- (cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${SIP} ${SIP_ARGS}; ${SETENV} ${MAKE_ENV} ${MAKE} ${_MAKE_JOBS} -C ./build) >+ (cd ${WRKSRC}; ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${SIP} ${SIP_ARGS}; ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${MAKE} ${_MAKE_JOBS} -C ./build) > > . endif # !target(do-build) > > . if !target(do-install) > do-install: >- (cd ${WRKSRC} ; ${SETENV} ${MAKE_ENV} ${MAKE} -C ./build install INSTALL_ROOT=${STAGEDIR} ) >+ (cd ${WRKSRC} ; ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${MAKE} -C ./build install INSTALL_ROOT=${STAGEDIR} ) > . endif # !target(do-install) > > . endif # defined(PYQT_DIST) >diff --git a/Mk/Uses/pytest.mk b/Mk/Uses/pytest.mk >index 62e435270cbd..4d0a0039672f 100644 >--- a/Mk/Uses/pytest.mk >+++ b/Mk/Uses/pytest.mk >@@ -60,7 +60,7 @@ _PYTEST_FILTER_EXPRESSION= ${_PYTEST_ALL_IGNORED_TESTS:C/^(.)/and not \1/:tW:C/^ > > . if !target(do-test) > do-test: >- @cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest \ >+ @cd ${TEST_WRKSRC} && ${SETENVI} ${WRK_ENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest \ > -k '${_PYTEST_FILTER_EXPRESSION}' \ > -v -rs -o addopts= \ > ${PYTEST_ARGS} >diff --git a/Mk/Uses/python.mk b/Mk/Uses/python.mk >index 5ef639cf7907..dad34dac322e 100644 >--- a/Mk/Uses/python.mk >+++ b/Mk/Uses/python.mk >@@ -905,17 +905,17 @@ MAKE_ENV+= LDSHARED="${LDSHARED}" PYTHONDONTWRITEBYTECODE= PYTHONOPTIMIZE= > > . if !target(do-configure) && !defined(HAS_CONFIGURE) && !defined(GNU_CONFIGURE) > do-configure: >- @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYDISTUTILS_SETUP} ${PYDISTUTILS_CONFIGURE_TARGET} ${PYDISTUTILS_CONFIGUREARGS}) >+ @(cd ${BUILD_WRKSRC}; ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYDISTUTILS_SETUP} ${PYDISTUTILS_CONFIGURE_TARGET} ${PYDISTUTILS_CONFIGUREARGS}) > . endif > > . if !target(do-build) > do-build: >- @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYDISTUTILS_SETUP} ${PYDISTUTILS_BUILD_TARGET} ${PYDISTUTILS_BUILDARGS}) >+ @(cd ${BUILD_WRKSRC}; ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYDISTUTILS_SETUP} ${PYDISTUTILS_BUILD_TARGET} ${PYDISTUTILS_BUILDARGS}) > . endif > > . if !target(do-install) > do-install: >- @(cd ${INSTALL_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYDISTUTILS_SETUP} ${PYDISTUTILS_INSTALL_TARGET} ${PYDISTUTILS_INSTALLARGS}) >+ @(cd ${INSTALL_WRKSRC}; ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYDISTUTILS_SETUP} ${PYDISTUTILS_INSTALL_TARGET} ${PYDISTUTILS_INSTALLARGS}) > . endif > . endif # defined(_PYTHON_FEATURE_DISTUTILS) > >@@ -934,13 +934,13 @@ do-configure: > > . if !target(do-build) > do-build: >- @cd ${BUILD_WRKSRC} && ${SETENV} ${MAKE_ENV} ${PEP517_BUILD_CMD} >+ @cd ${BUILD_WRKSRC} && ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${PEP517_BUILD_CMD} > . endif > > . if !target(do-install) > do-install: > @${MKDIR} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} >- @cd ${INSTALL_WRKSRC} && ${SETENV} ${MAKE_ENV} ${PEP517_INSTALL_CMD} >+ @cd ${INSTALL_WRKSRC} && ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${PEP517_INSTALL_CMD} > @${PYTHON_CMD} -B ${PORTSDIR}/Mk/Scripts/strip_RECORD.py \ > ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/${PORTNAME:C|[-_]+|_|g}-${DISTVERSION}*.dist-info/RECORD >> ${_PYTHONPKGLIST} > @${REINPLACE_CMD} \ >@@ -963,35 +963,35 @@ do-install: > . if defined(_PYTHON_FEATURE_NOSE) > . if !target(do-test) > do-test: >- cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m nose ${TEST_ARGS:NDESTDIR=*} -v >+ cd ${TEST_WRKSRC} && ${SETENVI} ${WRK_ENV} ${TEST_ENV} ${PYTHON_CMD} -m nose ${TEST_ARGS:NDESTDIR=*} -v > . endif > . endif # defined(_PYTHON_FEATURE_NOSE) > > . if defined(_PYTHON_FEATURE_NOSE2) > . if !target(do-test) > do-test: >- cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m nose2 ${TEST_ARGS:NDESTDIR=*} -v >+ cd ${TEST_WRKSRC} && ${SETENVI} ${WRK_ENV} ${TEST_ENV} ${PYTHON_CMD} -m nose2 ${TEST_ARGS:NDESTDIR=*} -v > . endif > . endif # defined(_PYTHON_FEATURE_NOSE2) > > . if defined(_PYTHON_FEATURE_PYTEST) || defined(_PYTHON_FEATURE_PYTEST4) > . if !target(do-test) > do-test: >- cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest -k '${_PYTEST_FILTER_EXPRESSION}' -rs -v -o addopts= ${TEST_ARGS:NDESTDIR=*} >+ cd ${TEST_WRKSRC} && ${SETENVI} ${WRK_ENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest -k '${_PYTEST_FILTER_EXPRESSION}' -rs -v -o addopts= ${TEST_ARGS:NDESTDIR=*} > . endif > . endif # defined(_PYTHON_FEATURE_PYTEST) || defined(_PYTHON_FEATURE_PYTEST4) > > . if defined(_PYTHON_FEATURE_UNITTEST) > . if !target(do-test) > do-test: >- cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m unittest ${TEST_ARGS:NDESTDIR=*} -v >+ cd ${TEST_WRKSRC} && ${SETENVI} ${WRK_ENV} ${TEST_ENV} ${PYTHON_CMD} -m unittest ${TEST_ARGS:NDESTDIR=*} -v > . endif > . endif # defined(_PYTHON_FEATURE_UNITTEST) > > . if defined(_PYTHON_FEATURE_UNITTEST2) > . if !target(do-test) > do-test: >- cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m unittest2 ${TEST_ARGS:NDESTDIR=*} -v >+ cd ${TEST_WRKSRC} && ${SETENVI} ${WRK_ENV} ${TEST_ENV} ${PYTHON_CMD} -m unittest2 ${TEST_ARGS:NDESTDIR=*} -v > . endif > . endif # defined(_PYTHON_FEATURE_UNITTEST2) > >diff --git a/Mk/Uses/qmake.mk b/Mk/Uses/qmake.mk >index e6fc0758026a..926d98002b53 100644 >--- a/Mk/Uses/qmake.mk >+++ b/Mk/Uses/qmake.mk >@@ -139,7 +139,7 @@ _QMAKE_MK_POST_INCLUDED= qmake.mk > qmake-configure: > @${MKDIR} ${_QMAKE_WRKSRC} > @cd ${_QMAKE_WRKSRC} && \ >- ${SETENV} ${QMAKE_ENV} ${_QMAKE} ${QMAKE_ARGS} \ >+ ${SETENVI} ${WRK_ENV} ${QMAKE_ENV} ${_QMAKE} ${QMAKE_ARGS} \ > ${QMAKE_SOURCE_PATH} \ > ${QMAKE_CONFIGURE_ARGS:?--:} ${QMAKE_CONFIGURE_ARGS} > >diff --git a/Mk/Uses/ruby.mk b/Mk/Uses/ruby.mk >index be964b45c520..abf6edd059bc 100644 >--- a/Mk/Uses/ruby.mk >+++ b/Mk/Uses/ruby.mk >@@ -311,12 +311,12 @@ ruby-extconf-configure: > . for d in ${RUBY_EXTCONF_SUBDIRS} > @${ECHO_MSG} "===> Running ${RUBY_EXTCONF} in ${d} to configure" > @cd ${CONFIGURE_WRKSRC}/${d}; \ >- ${SETENV} ${CONFIGURE_ENV} ${RUBY} ${RUBY_FLAGS} ${RUBY_EXTCONF} ${CONFIGURE_ARGS} >+ ${SETENVI} ${WRK_ENV} ${CONFIGURE_ENV} ${RUBY} ${RUBY_FLAGS} ${RUBY_EXTCONF} ${CONFIGURE_ARGS} > . endfor > . else > @${ECHO_MSG} "===> Running ${RUBY_EXTCONF} to configure" > @cd ${CONFIGURE_WRKSRC}; \ >- ${SETENV} ${CONFIGURE_ENV} ${RUBY} ${RUBY_FLAGS} ${RUBY_EXTCONF} ${CONFIGURE_ARGS} >+ ${SETENVI} ${WRK_ENV} ${CONFIGURE_ENV} ${RUBY} ${RUBY_FLAGS} ${RUBY_EXTCONF} ${CONFIGURE_ARGS} > . endif > . endif > >@@ -331,21 +331,21 @@ do-configure: ruby-setup-configure > ruby-setup-configure: > @${ECHO_MSG} "===> Running ${RUBY_SETUP} to configure" > @cd ${BUILD_WRKSRC}; \ >- ${SETENV} ${CONFIGURE_ENV} ${RUBY} ${RUBY_FLAGS} ${RUBY_SETUP} config ${CONFIGURE_ARGS} >+ ${SETENVI} ${WRK_ENV} ${CONFIGURE_ENV} ${RUBY} ${RUBY_FLAGS} ${RUBY_SETUP} config ${CONFIGURE_ARGS} > > do-build: ruby-setup-build > > ruby-setup-build: > @${ECHO_MSG} "===> Running ${RUBY_SETUP} to build" > @cd ${BUILD_WRKSRC}; \ >- ${SETENV} ${MAKE_ENV} ${RUBY} ${RUBY_FLAGS} ${RUBY_SETUP} setup >+ ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${RUBY} ${RUBY_FLAGS} ${RUBY_SETUP} setup > > do-install: ruby-setup-install > > ruby-setup-install: > @${ECHO_MSG} "===> Running ${RUBY_SETUP} to install" > @cd ${INSTALL_WRKSRC}; \ >- ${SETENV} ${MAKE_ENV} ${RUBY} ${RUBY_FLAGS} ${RUBY_SETUP} install --prefix=${STAGEDIR} >+ ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${RUBY} ${RUBY_FLAGS} ${RUBY_SETUP} install --prefix=${STAGEDIR} > . endif > > . if !${ruby_ARGS:Mbuild} && !${ruby_ARGS:Mrun} && !${ruby_ARGS:Mnone} >diff --git a/Mk/bsd.commands.mk b/Mk/bsd.commands.mk >index 069b5e4c6030..8ab99a18e22b 100644 >--- a/Mk/bsd.commands.mk >+++ b/Mk/bsd.commands.mk >@@ -83,6 +83,7 @@ RM?= /bin/rm -f > RMDIR?= /bin/rmdir > SED?= /usr/bin/sed > SETENV?= /usr/bin/env >+SETENVI?= /usr/bin/env -i > SH?= /bin/sh > SORT?= /usr/bin/sort > STRIP_CMD?= /usr/bin/strip >diff --git a/Mk/bsd.java.mk b/Mk/bsd.java.mk >index 162e2836e236..91ea9516c846 100644 >--- a/Mk/bsd.java.mk >+++ b/Mk/bsd.java.mk >@@ -396,15 +396,15 @@ BUILD_DEPENDS+= ${ANT}:devel/apache-ant > ALL_TARGET?= > . if !target(do-build) > do-build: >- @(cd ${BUILD_WRKSRC}; \ >- ${SETENV} ${MAKE_ENV} ${ANT} ${MAKE_ARGS} ${ALL_TARGET}) >+ @(cd ${BUILD_WRKSRC}; ${SETENVI} ${WRK_ENV} ${MAKE_ENV} \ >+ ${ANT} ${MAKE_ARGS} ${ALL_TARGET}) > . endif > . if !target(do-test) && defined(TEST_TARGET) > TEST_DEPENDS+= ${DEPEND_JAVA} > TEST_DEPENDS+= ${ANT}:devel/apache-ant > do-test: >- @(cd ${TEST_WRKSRC}; \ >- ${SETENV} ${MAKE_ENV} ${ANT} ${MAKE_ARGS} ${TEST_TARGET}) >+ @(cd ${TEST_WRKSRC}; ${SETENVI} ${WRK_ENV} ${MAKE_ENV} \ >+ ${ANT} ${MAKE_ARGS} ${TEST_TARGET}) > . endif > . endif > >diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk >index 448056ca1c17..0e4b16395889 100644 >--- a/Mk/bsd.port.mk >+++ b/Mk/bsd.port.mk >@@ -669,6 +669,10 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org > # > # For options see bsd.options.mk > # >+# WRK_ENV - Environment used when running the upstream build system. >+# Target-specific environment variables can be defined using >+# CONFIGURE_ENV, MAKE_ENV, TEST_ENV, and similar variables. >+# > # For fetch: > # > # FETCH_BINARY - Path to ftp/http fetch command if not in $PATH. >@@ -1609,6 +1613,16 @@ PKG_NOTES+= flavor > PKG_NOTE_flavor= ${FLAVOR} > . endif > >+WRK_ENV+= HOME=${WRKDIR} \ >+ PWD="$${PWD}" >+. for e in OSVERSION PATH TERM TMPDIR \ >+ UNAME_b UNAME_i UNAME_K UNAME_m UNAME_n \ >+ UNAME_p UNAME_r UNAME_s UNAME_U UNAME_v >+. ifdef ${e} >+WRK_ENV+= ${e}=${${e}:Q} >+. endif >+. endfor >+ > TEST_ARGS?= ${MAKE_ARGS} > TEST_ENV?= ${MAKE_ENV} > >@@ -3314,7 +3328,7 @@ do-configure: > @${MKDIR} ${CONFIGURE_WRKSRC} > @(cd ${CONFIGURE_WRKSRC} && \ > ${SET_LATE_CONFIGURE_ARGS} \ >- if ! ${SETENV} CC="${CC}" CPP="${CPP}" CXX="${CXX}" \ >+ if ! ${SETENVI} ${WRK_ENV} CC="${CC}" CPP="${CPP}" CXX="${CXX}" \ > CFLAGS="${CFLAGS}" CPPFLAGS="${CPPFLAGS}" CXXFLAGS="${CXXFLAGS}" \ > LDFLAGS="${LDFLAGS}" LIBS="${LIBS}" \ > INSTALL="/usr/bin/install -c" \ >@@ -3331,7 +3345,8 @@ do-configure: > . endif > > # Build >-DO_MAKE_BUILD?= ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} ${_MAKE_JOBS} ${MAKE_ARGS:N${DESTDIRNAME}=*} >+DO_MAKE_BUILD?= ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} \ >+ ${MAKEFILE} ${_MAKE_JOBS} ${MAKE_ARGS:N${DESTDIRNAME}=*} > . if !target(do-build) > do-build: > @(cd ${BUILD_WRKSRC}; if ! ${DO_MAKE_BUILD} ${ALL_TARGET}; then \ >@@ -3422,13 +3437,15 @@ check-install-conflicts: > > . if !target(do-install) && !defined(NO_INSTALL) > do-install: >- @(cd ${INSTALL_WRKSRC} && ${SETENV} ${MAKE_ENV} ${FAKEROOT} ${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET}) >+ @(cd ${INSTALL_WRKSRC} && ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${FAKEROOT} \ >+ ${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET}) > . endif > > # Test > > . if !target(do-test) && defined(TEST_TARGET) >-DO_MAKE_TEST?= ${SETENV} ${TEST_ENV} ${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} ${TEST_ARGS:N${DESTDIRNAME}=*} >+DO_MAKE_TEST?= ${SETENVI} ${WRK_ENV} ${TEST_ENV} ${MAKE_CMD} ${MAKE_FLAGS} \ >+ ${MAKEFILE} ${TEST_ARGS:N${DESTDIRNAME}=*} > do-test: > @(cd ${TEST_WRKSRC}; if ! ${DO_MAKE_TEST} ${TEST_TARGET}; then \ > if [ -n "${TEST_FAIL_MESSAGE}" ] ; then \ >diff --git a/games/legesmotus/files/patch-Makefile b/games/legesmotus/files/patch-Makefile >deleted file mode 100644 >index 58d01cbdab8c..000000000000 >--- a/games/legesmotus/files/patch-Makefile >+++ /dev/null >@@ -1,11 +0,0 @@ >---- Makefile.orig 2010-09-06 03:18:02 UTC >-+++ Makefile >-@@ -99,7 +99,7 @@ lmserver: server >- >- $(ALL_PKG): >- +@mkdir -p $@ >-- +@$(MAKE) -C $@ -f $(BASEDIR)/$@/Makefile BASEDIR="../../.." SUBDIR="$@" $(TARGET) >-+ +@$(MAKE) -C $@ -f $(BASEDIR)/$@/Makefile BASEDIR=".." SUBDIR="$@" $(TARGET) >- >- server: common >- >diff --git a/games/legesmotus/files/patch-common.mk b/games/legesmotus/files/patch-common.mk >index e92d58d1463d..0aa014d450e2 100644 >--- a/games/legesmotus/files/patch-common.mk >+++ b/games/legesmotus/files/patch-common.mk >@@ -1,6 +1,6 @@ > --- common.mk.orig 2010-09-03 19:22:37 UTC > +++ common.mk >-@@ -9,7 +9,6 @@ FRAMEWORKS = /Library/Frameworks >+@@ -9,7 +9,6 @@ VERSION = 0.4.0 > VERSION = 0.4.0 > > # These may be overridden by config.mk >@@ -8,21 +8,7 @@ > #UNIVERSAL = 1 > #NOBUNDLE = 1 > >-@@ -84,13 +83,6 @@ ifeq ($(ARCHS),) >- endif >- endif >- >--# Only Mac OS X can use fat binaries >--ifneq ($(filter $(ARCH),$(ARCHS)),$(ARCH)) >-- ifneq ($(MACHINE)-$(ARCH),Darwin-universal) >-- $(error Disallowed architecture for this platform: $(ARCH)) >-- endif >--endif >-- >- ifeq ($(MACHINE)$(NOBUNDLE),Darwin) >- export MACOSX_DEPLOYMENT_TARGET=10.4 >- FLAGS_SDL = -I$(FRAMEWORKS)/SDL.framework/Headers >-@@ -174,12 +166,10 @@ CXXFLAGS += -Wnon-virtual-dtor >+@@ -174,12 +173,10 @@ ifeq ($(DEBUG),1) > > ifeq ($(DEBUG),1) > RELEASE = debug >diff --git a/graphics/py-python-poppler-qt5/Makefile b/graphics/py-python-poppler-qt5/Makefile >index 5b6928418adb..545265769036 100644 >--- a/graphics/py-python-poppler-qt5/Makefile >+++ b/graphics/py-python-poppler-qt5/Makefile >@@ -27,10 +27,12 @@ PLIST_SUB= _PY_SONAME=${_PY_SONAME} > > _PY_SONAME= ${PYTHON_EXT_SUFFIX} > >-BINARY_ALIAS= qmake=${QMAKE} >+SIP_ARGS= --qmake ${QMAKE} \ >+ --verbose \ >+ --jobs ${MAKE_JOBS_NUMBER} > > do-build: >- (cd ${WRKSRC} ; ${SETENV} ${MAKE_ENV} ${SIP} ${SIP_ARGS} ; ${SETENV} ${MAKE_ENV} ${MAKE} -C ./build ) >+ (cd ${WRKSRC} ; ${SETENV} ${MAKE_ENV} ${SIP} ${SIP_ARGS} ; ${SETENV} ${MAKE_ENV} ${MAKE} ${_MAKE_JOBS} -C ./build ) > > do-install: > (cd ${WRKSRC} ; ${SETENV} ${MAKE_ENV} ${MAKE} -C ./build install INSTALL_ROOT=${STAGEDIR} ) >diff --git a/lang/ocaml/Makefile b/lang/ocaml/Makefile >index e4ba7d887ebf..9ced7c1cccbc 100644 >--- a/lang/ocaml/Makefile >+++ b/lang/ocaml/Makefile >@@ -2,7 +2,7 @@ > > PORTNAME= ocaml > PORTVERSION= 4.08.1 >-PORTREVISION= 1 >+PORTREVISION= 2 > CATEGORIES= lang > MASTER_SITES= http://caml.inria.fr/pub/distrib/${DISTNAME:R}/ GENTOO \ > http://caml.inria.fr/pub/distrib/${DISTNAME:R}/:docs >@@ -49,7 +49,6 @@ CONFIGURE_ARGS= --prefix="${PREFIX}" > CONFIGURE_ENV= LDFLAGS="${LDFLAGS}" \ > ASPP="${CC} -c" \ > PARTIALLD="${LD} -r" >-MAKE_ENV= SYSTEM_ARCH="${ARCH:C/aarch64/arm64/:C/powerpc.*/power/}" > > OPTIONS_DEFINE= X11 THREADS DOCS EXAMPLES > OPTIONS_DEFAULT=X11 THREADS >@@ -91,7 +90,7 @@ CONFIGURE_ENV+= AS="${AS} ${ASFLAGS}" \ > CC="${CC}" > .endif > >-.if defined(NO_PROFILE) || ${ARCH:Mpowerpc} || ${ARCH:Mamd64} >+.if defined(NO_PROFILE) > PLIST_SUB+= PROF="@comment " > .else > PLIST_SUB+= PROF="" >@@ -103,17 +102,12 @@ post-patch: > -e '\|RANLIB|s|ranlib|${RANLIB}|' \ > -e '\|^ldflags=|s|""|"${LDFLAGS}"|' \ > ${WRKSRC}/configure >- @${REINPLACE_CMD} -e 's,$$(ARCH),$$(SYSTEM_ARCH),' \ >- ${WRKSRC}/Makefile ${WRKSRC}/Makefile.tools \ >- ${WRKSRC}/runtime/Makefile \ >- ${WRKSRC}/ocamltest/Makefile \ >- ${WRKSRC}/otherlibs/systhreads/Makefile > > check-test: do-install > @cd ${WRKSRC}/testsuite; ${RM} _log; for d in tests/* ; do \ >- ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} one DIR=$${d} \ >- 2>&1 | tee -a _log || ${TRUE} ; done ; \ >- ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} report >+ ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} one \ >+ DIR=$${d} 2>&1 | tee -a _log || ${TRUE} ; done ; \ >+ ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} report > > post-install: > .if ${PORT_OPTIONS:MDOCS} >diff --git a/lang/ocaml/files/patch-configure b/lang/ocaml/files/patch-configure >index 2cf280415341..c3e62de2bf07 100644 >--- a/lang/ocaml/files/patch-configure >+++ b/lang/ocaml/files/patch-configure >@@ -50,13 +50,13 @@ > model=ppc > fi; system=elf ;; #( > + powerpc64le*-*-freebsd*) : >-+ arch=power; model=ppc64le; system=bsd_elf;; #( >++ arch=power; model=ppc64le; system=freebsd;; #( > + powerpc*-*-freebsd*) : > + arch=power; if $arch64; then : > + model=ppc64 > +else > + model=ppc >-+fi; system=bsd_elf ;; #( >++fi; system=freebsd ;; #( > powerpc-*-netbsd*) : > arch=power; model=ppc; system=netbsd ;; #( > powerpc-*-openbsd*) : >@@ -69,7 +69,16 @@ > earmv6*-*-netbsd*) : > arch=arm; model=armv6; system=netbsd ;; #( > earmv7*-*-netbsd*) : >-@@ -13544,6 +13560,8 @@ fi; system=elf ;; #( >+@@ -13534,6 +13550,8 @@ fi; system=elf ;; #( >+ arch=amd64; system=dragonfly ;; #( >+ x86_64-*-freebsd*) : >+ arch=amd64; system=freebsd ;; #( >++ amd64-*-freebsd*) : >++ arch=amd64; system=freebsd ;; #( >+ x86_64-*-netbsd*) : >+ arch=amd64; system=netbsd ;; #( >+ x86_64-*-openbsd*) : >+@@ -13544,6 +13562,8 @@ fi; system=elf ;; #( > arch=amd64; system=mingw64 ;; #( > aarch64-*-linux*) : > arch=arm64; system=linux ;; #( >@@ -78,7 +87,7 @@ > x86_64-*-cygwin*) : > arch=amd64; system=cygwin > ;; #( >-@@ -13714,6 +13732,8 @@ case "$arch,$system" in #( >+@@ -13714,6 +13734,8 @@ case "$arch,$system" in #( > profiling=true ;; #( > amd64,openbsd) : > profiling=true ;; #( >@@ -87,14 +96,21 @@ > amd64,freebsd) : > profiling=true ;; #( > amd64,netbsd) : >-@@ -13721,6 +13741,10 @@ case "$arch,$system" in #( >- arm,netbsd) : >+@@ -13722,11 +13744,17 @@ case "$arch,$system" in #( > profiling=true ;; #( > amd64,gnu) : >+ profiling=true ;; #( >++ arm64,freebsd) : > + profiling=true ;; #( >-+ arm64,freebsd*) : >++ arm,freebsd) : > + profiling=true ;; #( >-+ arm,freebsd*) : >- profiling=true ;; #( > arm,linux*) : > profiling=true ;; #( >+ power,elf) : >+ profiling=true ;; #( >+ power,bsd*) : >++ profiling=true ;; #( >++ power,freebsd) : >+ profiling=true ;; #( >+ power,netbsd) : >+ profiling=true ;; #( >diff --git a/net/libnatpmp/files/patch-Makefile b/net/libnatpmp/files/patch-Makefile >new file mode 100644 >index 000000000000..1a8ca9ecb3ef >--- /dev/null >+++ b/net/libnatpmp/files/patch-Makefile >@@ -0,0 +1,10 @@ >+--- Makefile.orig 2022-01-22 19:25:56 UTC >++++ Makefile >+@@ -72,7 +72,6 @@ ifneq (, $(findstring x86_64, $(ARCH))) >+ >+ INSTALLDIRLIB = $(INSTALLPREFIX)/$(LIBDIR) >+ ifneq (, $(findstring x86_64, $(ARCH))) >+-INSTALLDIRLIB = $(INSTALLPREFIX)/lib64 >+ endif >+ >+ INSTALLDIRBIN = $(INSTALLPREFIX)/bin >-- >2.43.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 276478
:
247801
|
247897
|
248176
|
248232
|
248511
|
248512
|
248731
|
248732