Skip to content

Commit

Permalink
Mk/*: Build with a clean environment
Browse files Browse the repository at this point in the history
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.

games/iortcw, games/q3cellshading, games/tremulous:
These use Quake 3 engine code.  Fix use of ARCH.  Reduce diff between
FreeBSD code and Linux code.

games/legesmotus:
Remove ARCH related patches.

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.

PR:		276478
Approved by:	portmgr (antoine)
Exp-run by:	antoine
  • Loading branch information
TijlCoosemans committed Feb 29, 2024
1 parent 0eb74ba commit 572f236
Show file tree
Hide file tree
Showing 35 changed files with 487 additions and 418 deletions.
17 changes: 16 additions & 1 deletion CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,22 @@ in the release notes and/or placed into UPDATING.

All ports committers are allowed to commit to this file.

20230111:
20240229:
AUTHOR: tijl@FreeBSD.org

A new command SETENVI that clears the environment and a new variable
WRK_ENV that contains a basic environment to use with SETENVI have
been added.
Ports that run (parts of) the upstream build system directly using
commands like "${SETENV} ${MAKE_ENV} ${MAKE_CMD} ..." should change
that to "${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${MAKE_CMD} ...". This way
the build system runs with a clean environment without interference
from the user environment or ports framework environment. Ports can
add extra environment variables to WRK_ENV similar to CONFIGURE_ENV,
MAKE_ENV, TEST_ENV, and so on, but WRK_ENV is used in all targets
while the latter are target-specific.

20240111:
AUTHOR: bapt@FreeBSD.org

MAN[1-8LN]PREFIX variable has been removed from the framework, use PREFIX
Expand Down
2 changes: 1 addition & 1 deletion Mk/Uses/angr.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
16 changes: 8 additions & 8 deletions Mk/Uses/cabal.mk
Original file line number Diff line number Diff line change
Expand Up @@ -202,22 +202,22 @@ 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
@${RM} -r ${WRKSRC}/dist-newstyle
. 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}
Expand All @@ -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
Expand Down Expand Up @@ -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)
Expand Down
5 changes: 3 additions & 2 deletions Mk/Uses/cargo.mk
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,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?=
Expand Down
9 changes: 5 additions & 4 deletions Mk/Uses/cmake.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion Mk/Uses/elixir.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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?=
Expand Down
2 changes: 1 addition & 1 deletion Mk/Uses/erlang.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
8 changes: 4 additions & 4 deletions Mk/Uses/gem.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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} ; \
Expand All @@ -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} ; \
Expand All @@ -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
Expand Down
16 changes: 8 additions & 8 deletions Mk/Uses/go.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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)
Expand All @@ -246,15 +246,15 @@ 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

. if ${go_ARGS:Mmodules} && defined(GO_MODULE)
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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Mk/Uses/imake.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion Mk/Uses/lazarus.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Mk/Uses/mate.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
10 changes: 5 additions & 5 deletions Mk/Uses/perl5.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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} && \
Expand All @@ -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
Expand Down Expand Up @@ -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)
4 changes: 2 additions & 2 deletions Mk/Uses/pyqt.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Mk/Uses/pytest.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
Loading

0 comments on commit 572f236

Please sign in to comment.