diff Makefile @ 45:5e046980990d

Call the package.py script with WRKSRC as the CWD. This removes the need for patching sysconfig.py and package.py (PyPy3) because files that are created by the scripts in the CWD now are created in WRKSRC. This is also consistent with other build stept, where an explicit change of the CWD to WRKSRC is done.
author Franz Glasner <fzglas.hg@dom66.de>
date Sun, 09 Oct 2022 19:11:04 +0200
parents af3a2629a882
children 948aab4fc6b9
line wrap: on
line diff
--- a/Makefile	Sun Oct 09 16:00:56 2022 +0200
+++ b/Makefile	Sun Oct 09 19:11:04 2022 +0200
@@ -50,7 +50,7 @@
 
 ALL_TARGET=	${PYPY_EXECUTABLE}
 BUILD_WRKSRC?=	${WRKDIR}/build/usession-${PORTNAME}-0/testing_1
-MAKE_ENV+=	PYPY_LOCALBASE=${LOCALBASE} PYPY_WRKDIR=${WRKDIR} LDSHARED="${CC} -shared"
+MAKE_ENV+=	PYPY_LOCALBASE=${LOCALBASE} LDSHARED="${CC} -shared"
 PACKAGE_ARGS?=	--without-gdbm --without-sqlite3 --without-_tkinter
 LLD_UNSAFE=	yes
 SHEBANG_FILES?=	lib-python/2.7/plat-mac/appletrunner.py \
@@ -128,9 +128,10 @@
 	${CP} ${BUILD_WRKSRC}/${PYPY_EXECUTABLE} ${BUILD_WRKSRC}/${PYPY_LDLIBRARY} ${WRKSRC}/pypy/goal/
 
 do-install:
-	${SETENV} ${MAKE_ENV} TMPDIR=${WRKDIR}/build \
-		${PYTHON_CMD} ${WRKSRC}/pypy/tool/release/package.py --builddir ${WRKDIR}/build --archive-name ${PYPY_DIR} \
-			${PACKAGE_ARGS}
+	(cd ${WRKSRC}; \
+		${SETENV} ${MAKE_ENV} TMPDIR=${WRKDIR}/build \
+			${PYTHON_CMD} ${WRKSRC}/pypy/tool/release/package.py --builddir ${WRKDIR}/build --archive-name ${PYPY_DIR} \
+				${PACKAGE_ARGS})
 	${EXTRACT_CMD} -C ${STAGEDIR}${PREFIX} -xf ${WRKDIR}/build/${PYPY_DIR}.tar.bz2
 	${LN} -fs ../${PYPY_DIR}/bin/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
 .if ${PORT_OPTIONS:MFORPYIMPL38} || ${PORT_OPTIONS:MFORPYIMPL39}