f259daa708
package-pkg (via make-pkg-package.sh) passes CONFIGURE_ARGS to make when building ports-mgmt/pkg, which overrides the port's default configure args that are supposed to set --prefix. This means that pkg is always built with the default prefix of /usr/local, which then fails when ports tries to package it from LOCALBASE. Work around this by explicitly adding --prefix to CONFIGURE_ARGS. MFC after: 1 day Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D52634
25 lines
945 B
Bash
Executable File
25 lines
945 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# Simulate the build environment. Note that we need to unset some variables
|
|
# which are set in the src tree since they have different (unwanted) effects
|
|
# in the ports tree.
|
|
SRC_PKG_VERSION=${PKG_VERSION}
|
|
PKG_ABI=$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI)
|
|
unset PKG_VERSION
|
|
unset MAKEFLAGS
|
|
unset PKGBASE
|
|
export WRKDIRPREFIX=/tmp/ports.${TARGET}
|
|
export DISTDIR=/tmp/distfiles
|
|
export WRKDIR=$(make -C ${PORTSDIR}/ports-mgmt/pkg I_DONT_CARE_IF_MY_BUILDS_TARGET_THE_WRONG_RELEASE=YES -V WRKDIR)
|
|
|
|
make -C ${PORTSDIR}/ports-mgmt/pkg TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
|
|
CONFIGURE_ARGS="--host=$(uname -m)-portbld-freebsd${REVISION} --prefix=${LOCALBASE}" \
|
|
I_DONT_CARE_IF_MY_BUILDS_TARGET_THE_WRONG_RELEASE=YES \
|
|
BATCH=YES stage create-manifest
|
|
|
|
${PKG_CMD} -o ABI=${PKG_ABI} \
|
|
create -v -m ${WRKDIR}/.metadir.pkg/ \
|
|
-r ${WRKDIR}/stage \
|
|
-p ${WRKDIR}/.PLIST.mktmp \
|
|
-o ${REPODIR}/${PKG_ABI}/${SRC_PKG_VERSION}
|