pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/lang
Module Name: pkgsrc
Committed By: riastradh
Date: Tue Jun 27 10:35:30 UTC 2023
Modified Files:
pkgsrc/lang/python: pyversion.mk
pkgsrc/lang/python27: Makefile
pkgsrc/lang/python310: Makefile
pkgsrc/lang/python311: Makefile
pkgsrc/lang/python37: Makefile
pkgsrc/lang/python38: Makefile
pkgsrc/lang/python39: Makefile
Added Files:
pkgsrc/lang/python27: platname.mk
pkgsrc/lang/python310: platname.mk
pkgsrc/lang/python311: platname.mk
pkgsrc/lang/python37: platname.mk
pkgsrc/lang/python38: platname.mk
pkgsrc/lang/python39: platname.mk
Log Message:
python: Override sys.platform with PY_PLATNAME when cross-compiling.
For this purpose, factor the PY_PLATNAME definition out into a new
lang/pythonNN/platname.mk file. It's not the same for 2.x and 3.x;
perhaps we could factor it out further into a single 2.x vs 3.x
conditional but this is a more mechanical change that makes it easier
to audit for now.
To generate a diff of this commit:
cvs rdiff -u -r1.150 -r1.151 pkgsrc/lang/python/pyversion.mk
cvs rdiff -u -r1.106 -r1.107 pkgsrc/lang/python27/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/lang/python27/platname.mk
cvs rdiff -u -r1.17 -r1.18 pkgsrc/lang/python310/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/lang/python310/platname.mk
cvs rdiff -u -r1.6 -r1.7 pkgsrc/lang/python311/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/lang/python311/platname.mk
cvs rdiff -u -r1.36 -r1.37 pkgsrc/lang/python37/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/lang/python37/platname.mk
cvs rdiff -u -r1.28 -r1.29 pkgsrc/lang/python38/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/lang/python38/platname.mk
cvs rdiff -u -r1.23 -r1.24 pkgsrc/lang/python39/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/lang/python39/platname.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/lang/python/pyversion.mk
diff -u pkgsrc/lang/python/pyversion.mk:1.150 pkgsrc/lang/python/pyversion.mk:1.151
--- pkgsrc/lang/python/pyversion.mk:1.150 Tue Jun 27 10:31:21 2023
+++ pkgsrc/lang/python/pyversion.mk Tue Jun 27 10:35:29 2023
@@ -1,4 +1,4 @@
-# $NetBSD: pyversion.mk,v 1.150 2023/06/27 10:31:21 riastradh Exp $
+# $NetBSD: pyversion.mk,v 1.151 2023/06/27 10:35:29 riastradh Exp $
# This file should be included by packages as a way to depend on
# python when none of the other methods are appropriate, e.g. a
@@ -200,11 +200,13 @@ BUILDLINK_DEPMETHOD.python?= build
TOOL_DEPENDS+= ${PYDEPENDENCY}
MAKE_ENV+= PYTHONPATH=${WRKDIR:Q}/.pysite:${_CROSS_DESTDIR:Q}${LOCALBASE:Q}/${PYLIB:Q}
pre-configure: ${WRKDIR}/.pysite/sitecustomize.py
+.include "${PYPKGSRCDIR}/platname.mk"
${WRKDIR}/.pysite/sitecustomize.py:
@${STEP_MSG} "Creating Python sitecustomize.py for cross-compiling"
${RUN} ${MKDIR} ${.TARGET:H}
${RUN} ( \
${ECHO} "import sys" && \
+ ${PRINTF} "sys.platform = '%s'\\n" ${PY_PLATNAME:Q} && \
for v in \
sys.base_exec_prefix \
sys.base_prefix \
Index: pkgsrc/lang/python27/Makefile
diff -u pkgsrc/lang/python27/Makefile:1.106 pkgsrc/lang/python27/Makefile:1.107
--- pkgsrc/lang/python27/Makefile:1.106 Mon May 29 23:33:48 2023
+++ pkgsrc/lang/python27/Makefile Tue Jun 27 10:35:29 2023
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.106 2023/05/29 23:33:48 gutteridge Exp $
+# $NetBSD: Makefile,v 1.107 2023/06/27 10:35:29 riastradh Exp $
.include "dist.mk"
@@ -65,21 +65,10 @@ CONFIGURE_ENV+= ac_cv_func_bind_textdom
.endif
.if ${OPSYS} == "Cygwin" || ${OPSYS} == "Darwin" || ${OPSYS} == "Interix"
-PY_PLATNAME= ${LOWER_OPSYS}
USE_TOOLS+= gmake
-.elif ${OPSYS} == "IRIX"
-PY_PLATNAME= ${LOWER_OPSYS:C/\..*//}
-.elif ${OPSYS} == "SunOS"
-PY_PLATNAME= sunos${OS_VERSION:C/\..*//}
-.elif ${OPSYS} == "HPUX"
-PY_PLATNAME= hp-ux11
-.elif ${OPSYS} == "Linux"
-PY_PLATNAME= linux2
-.elif ${OS_VARIANT} == "SCOOSR5"
-PY_PLATNAME= sco_sv3
-.else
-PY_PLATNAME= ${LOWER_OPSYS}${OS_VERSION:C/\..*//}
.endif
+
+.include "platname.mk"
PLIST_SUBST+= PY_PLATNAME=${PY_PLATNAME:Q}
.if !empty(LP64PLATFORMS:@.PLAT.@${MACHINE_PLATFORM:M${.PLAT.}}@) || \
Index: pkgsrc/lang/python310/Makefile
diff -u pkgsrc/lang/python310/Makefile:1.17 pkgsrc/lang/python310/Makefile:1.18
--- pkgsrc/lang/python310/Makefile:1.17 Tue Jun 27 10:29:58 2023
+++ pkgsrc/lang/python310/Makefile Tue Jun 27 10:35:29 2023
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.17 2023/06/27 10:29:58 riastradh Exp $
+# $NetBSD: Makefile,v 1.18 2023/06/27 10:35:29 riastradh Exp $
.include "dist.mk"
@@ -52,6 +52,8 @@ CONFIGURE_ARGS+= ac_cv_buggy_getaddrinfo
CONFIGURE_ARGS.NetBSD+= ac_cv_file__dev_ptmx=yes
CONFIGURE_ARGS.NetBSD+= ac_cv_file__dev_ptc=no
MAKE_ENV+= \
+ _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_${PY_PLATNAME:Q}
+MAKE_ENV+= \
_PYTHON_HOST_PLATFORM=${LOWER_OPSYS}-${MACHINE_GNU_ARCH}
MAKE_ENV+= _PYTHON_PROJECT_BASE=${WRKSRC}
.endif
@@ -78,19 +80,10 @@ SUBST_SED.setup= -e "s,'crypt','crypt_i'
PY_VER_SUFFIX= 3.10
.if ${OPSYS} == "Darwin"
-PY_PLATNAME= ${LOWER_OPSYS}
USE_TOOLS+= gmake
-.elif ${OPSYS} == "IRIX"
-PY_PLATNAME= ${LOWER_OPSYS:C/\..*//}
-.elif ${OPSYS} == "SunOS"
-PY_PLATNAME= sunos${OS_VERSION:C/\..*//}
-.elif ${OPSYS} == "HPUX"
-PY_PLATNAME= hp-ux11
-.elif ${OPSYS} == "Linux"
-PY_PLATNAME= linux
-.else
-PY_PLATNAME= ${LOWER_OPSYS}${OS_VERSION:C/\..*//}
.endif
+
+.include "platname.mk"
PLIST_SUBST+= PY_PLATNAME=${PY_PLATNAME:Q}
# For Xcode 5 and up, we need to search the SDK path for headers, otherwise
Index: pkgsrc/lang/python311/Makefile
diff -u pkgsrc/lang/python311/Makefile:1.6 pkgsrc/lang/python311/Makefile:1.7
--- pkgsrc/lang/python311/Makefile:1.6 Tue Jun 27 10:29:58 2023
+++ pkgsrc/lang/python311/Makefile Tue Jun 27 10:35:30 2023
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.6 2023/06/27 10:29:58 riastradh Exp $
+# $NetBSD: Makefile,v 1.7 2023/06/27 10:35:30 riastradh Exp $
.include "dist.mk"
@@ -79,19 +79,10 @@ SUBST_SED.setup= -e "s,'crypt','crypt_i'
PY_VER_SUFFIX= 3.11
.if ${OPSYS} == "Darwin"
-PY_PLATNAME= ${LOWER_OPSYS}
USE_TOOLS+= gmake
-.elif ${OPSYS} == "IRIX"
-PY_PLATNAME= ${LOWER_OPSYS:C/\..*//}
-.elif ${OPSYS} == "SunOS"
-PY_PLATNAME= sunos${OS_VERSION:C/\..*//}
-.elif ${OPSYS} == "HPUX"
-PY_PLATNAME= hp-ux11
-.elif ${OPSYS} == "Linux"
-PY_PLATNAME= linux
-.else
-PY_PLATNAME= ${LOWER_OPSYS}${OS_VERSION:C/\..*//}
.endif
+
+.include "platname.mk"
PLIST_SUBST+= PY_PLATNAME=${PY_PLATNAME:Q}
# For Xcode 5 and up, we need to search the SDK path for headers, otherwise
Index: pkgsrc/lang/python37/Makefile
diff -u pkgsrc/lang/python37/Makefile:1.36 pkgsrc/lang/python37/Makefile:1.37
--- pkgsrc/lang/python37/Makefile:1.36 Fri Jul 29 20:37:48 2022
+++ pkgsrc/lang/python37/Makefile Tue Jun 27 10:35:30 2023
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.36 2022/07/29 20:37:48 jperkin Exp $
+# $NetBSD: Makefile,v 1.37 2023/06/27 10:35:30 riastradh Exp $
.include "dist.mk"
@@ -57,19 +57,10 @@ SUBST_SED.setup= -e "s,'crypt','crypt_i'
PY_VER_SUFFIX= 3.7
.if ${OPSYS} == "Darwin"
-PY_PLATNAME= ${LOWER_OPSYS}
USE_TOOLS+= gmake
-.elif ${OPSYS} == "IRIX"
-PY_PLATNAME= ${LOWER_OPSYS:C/\..*//}
-.elif ${OPSYS} == "SunOS"
-PY_PLATNAME= sunos${OS_VERSION:C/\..*//}
-.elif ${OPSYS} == "HPUX"
-PY_PLATNAME= hp-ux11
-.elif ${OPSYS} == "Linux"
-PY_PLATNAME= linux
-.else
-PY_PLATNAME= ${LOWER_OPSYS}${OS_VERSION:C/\..*//}
.endif
+
+.include "platname.mk"
PLIST_SUBST+= PY_PLATNAME=${PY_PLATNAME:Q}
# ossaudiodev is only available on x86 for the following platforms
Index: pkgsrc/lang/python38/Makefile
diff -u pkgsrc/lang/python38/Makefile:1.28 pkgsrc/lang/python38/Makefile:1.29
--- pkgsrc/lang/python38/Makefile:1.28 Sat Mar 19 18:56:44 2022
+++ pkgsrc/lang/python38/Makefile Tue Jun 27 10:35:30 2023
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.28 2022/03/19 18:56:44 adam Exp $
+# $NetBSD: Makefile,v 1.29 2023/06/27 10:35:30 riastradh Exp $
.include "dist.mk"
@@ -59,19 +59,10 @@ LIBS.SunOS+= -lrt # fdatasync()
PY_VER_SUFFIX= 3.8
.if ${OPSYS} == "Darwin"
-PY_PLATNAME= ${LOWER_OPSYS}
USE_TOOLS+= gmake
-.elif ${OPSYS} == "IRIX"
-PY_PLATNAME= ${LOWER_OPSYS:C/\..*//}
-.elif ${OPSYS} == "SunOS"
-PY_PLATNAME= sunos${OS_VERSION:C/\..*//}
-.elif ${OPSYS} == "HPUX"
-PY_PLATNAME= hp-ux11
-.elif ${OPSYS} == "Linux"
-PY_PLATNAME= linux
-.else
-PY_PLATNAME= ${LOWER_OPSYS}${OS_VERSION:C/\..*//}
.endif
+
+.include "platname.mk"
PLIST_SUBST+= PY_PLATNAME=${PY_PLATNAME:Q}
# ossaudiodev is only available on x86 for the following platforms
Index: pkgsrc/lang/python39/Makefile
diff -u pkgsrc/lang/python39/Makefile:1.23 pkgsrc/lang/python39/Makefile:1.24
--- pkgsrc/lang/python39/Makefile:1.23 Tue Jun 27 10:29:58 2023
+++ pkgsrc/lang/python39/Makefile Tue Jun 27 10:35:30 2023
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.23 2023/06/27 10:29:58 riastradh Exp $
+# $NetBSD: Makefile,v 1.24 2023/06/27 10:35:30 riastradh Exp $
.include "dist.mk"
@@ -78,19 +78,10 @@ SUBST_SED.setup= -e "s,'crypt','crypt_i'
PY_VER_SUFFIX= 3.9
.if ${OPSYS} == "Darwin"
-PY_PLATNAME= ${LOWER_OPSYS}
USE_TOOLS+= gmake
-.elif ${OPSYS} == "IRIX"
-PY_PLATNAME= ${LOWER_OPSYS:C/\..*//}
-.elif ${OPSYS} == "SunOS"
-PY_PLATNAME= sunos${OS_VERSION:C/\..*//}
-.elif ${OPSYS} == "HPUX"
-PY_PLATNAME= hp-ux11
-.elif ${OPSYS} == "Linux"
-PY_PLATNAME= linux
-.else
-PY_PLATNAME= ${LOWER_OPSYS}${OS_VERSION:C/\..*//}
.endif
+
+.include "platname.mk"
PLIST_SUBST+= PY_PLATNAME=${PY_PLATNAME:Q}
# For Xcode 5 and up, we need to search the SDK path for headers, otherwise
Added files:
Index: pkgsrc/lang/python27/platname.mk
diff -u /dev/null pkgsrc/lang/python27/platname.mk:1.1
--- /dev/null Tue Jun 27 10:35:30 2023
+++ pkgsrc/lang/python27/platname.mk Tue Jun 27 10:35:29 2023
@@ -0,0 +1,17 @@
+# $NetBSD: platname.mk,v 1.1 2023/06/27 10:35:29 riastradh Exp $
+
+.if ${OPSYS} == "Cygwin" || ${OPSYS} == "Darwin" || ${OPSYS} == "Interix"
+PY_PLATNAME= ${LOWER_OPSYS}
+.elif ${OPSYS} == "IRIX"
+PY_PLATNAME= ${LOWER_OPSYS:C/\..*//}
+.elif ${OPSYS} == "SunOS"
+PY_PLATNAME= sunos${OS_VERSION:C/\..*//}
+.elif ${OPSYS} == "HPUX"
+PY_PLATNAME= hp-ux11
+.elif ${OPSYS} == "Linux"
+PY_PLATNAME= linux2
+.elif ${OS_VARIANT} == "SCOOSR5"
+PY_PLATNAME= sco_sv3
+.else
+PY_PLATNAME= ${LOWER_OPSYS}${OS_VERSION:C/\..*//}
+.endif
Index: pkgsrc/lang/python310/platname.mk
diff -u /dev/null pkgsrc/lang/python310/platname.mk:1.1
--- /dev/null Tue Jun 27 10:35:30 2023
+++ pkgsrc/lang/python310/platname.mk Tue Jun 27 10:35:29 2023
@@ -0,0 +1,15 @@
+# $NetBSD: platname.mk,v 1.1 2023/06/27 10:35:29 riastradh Exp $
+
+.if ${OPSYS} == "Darwin"
+PY_PLATNAME= ${LOWER_OPSYS}
+.elif ${OPSYS} == "IRIX"
+PY_PLATNAME= ${LOWER_OPSYS:C/\..*//}
+.elif ${OPSYS} == "SunOS"
+PY_PLATNAME= sunos${OS_VERSION:C/\..*//}
+.elif ${OPSYS} == "HPUX"
+PY_PLATNAME= hp-ux11
+.elif ${OPSYS} == "Linux"
+PY_PLATNAME= linux
+.else
+PY_PLATNAME= ${LOWER_OPSYS}${OS_VERSION:C/\..*//}
+.endif
Index: pkgsrc/lang/python311/platname.mk
diff -u /dev/null pkgsrc/lang/python311/platname.mk:1.1
--- /dev/null Tue Jun 27 10:35:30 2023
+++ pkgsrc/lang/python311/platname.mk Tue Jun 27 10:35:30 2023
@@ -0,0 +1,15 @@
+# $NetBSD: platname.mk,v 1.1 2023/06/27 10:35:30 riastradh Exp $
+
+.if ${OPSYS} == "Darwin"
+PY_PLATNAME= ${LOWER_OPSYS}
+.elif ${OPSYS} == "IRIX"
+PY_PLATNAME= ${LOWER_OPSYS:C/\..*//}
+.elif ${OPSYS} == "SunOS"
+PY_PLATNAME= sunos${OS_VERSION:C/\..*//}
+.elif ${OPSYS} == "HPUX"
+PY_PLATNAME= hp-ux11
+.elif ${OPSYS} == "Linux"
+PY_PLATNAME= linux
+.else
+PY_PLATNAME= ${LOWER_OPSYS}${OS_VERSION:C/\..*//}
+.endif
Index: pkgsrc/lang/python37/platname.mk
diff -u /dev/null pkgsrc/lang/python37/platname.mk:1.1
--- /dev/null Tue Jun 27 10:35:30 2023
+++ pkgsrc/lang/python37/platname.mk Tue Jun 27 10:35:30 2023
@@ -0,0 +1,15 @@
+# $NetBSD: platname.mk,v 1.1 2023/06/27 10:35:30 riastradh Exp $
+
+.if ${OPSYS} == "Darwin"
+PY_PLATNAME= ${LOWER_OPSYS}
+.elif ${OPSYS} == "IRIX"
+PY_PLATNAME= ${LOWER_OPSYS:C/\..*//}
+.elif ${OPSYS} == "SunOS"
+PY_PLATNAME= sunos${OS_VERSION:C/\..*//}
+.elif ${OPSYS} == "HPUX"
+PY_PLATNAME= hp-ux11
+.elif ${OPSYS} == "Linux"
+PY_PLATNAME= linux
+.else
+PY_PLATNAME= ${LOWER_OPSYS}${OS_VERSION:C/\..*//}
+.endif
Index: pkgsrc/lang/python38/platname.mk
diff -u /dev/null pkgsrc/lang/python38/platname.mk:1.1
--- /dev/null Tue Jun 27 10:35:30 2023
+++ pkgsrc/lang/python38/platname.mk Tue Jun 27 10:35:30 2023
@@ -0,0 +1,15 @@
+# $NetBSD: platname.mk,v 1.1 2023/06/27 10:35:30 riastradh Exp $
+
+.if ${OPSYS} == "Darwin"
+PY_PLATNAME= ${LOWER_OPSYS}
+.elif ${OPSYS} == "IRIX"
+PY_PLATNAME= ${LOWER_OPSYS:C/\..*//}
+.elif ${OPSYS} == "SunOS"
+PY_PLATNAME= sunos${OS_VERSION:C/\..*//}
+.elif ${OPSYS} == "HPUX"
+PY_PLATNAME= hp-ux11
+.elif ${OPSYS} == "Linux"
+PY_PLATNAME= linux
+.else
+PY_PLATNAME= ${LOWER_OPSYS}${OS_VERSION:C/\..*//}
+.endif
Index: pkgsrc/lang/python39/platname.mk
diff -u /dev/null pkgsrc/lang/python39/platname.mk:1.1
--- /dev/null Tue Jun 27 10:35:30 2023
+++ pkgsrc/lang/python39/platname.mk Tue Jun 27 10:35:30 2023
@@ -0,0 +1,15 @@
+# $NetBSD: platname.mk,v 1.1 2023/06/27 10:35:30 riastradh Exp $
+
+.if ${OPSYS} == "Darwin"
+PY_PLATNAME= ${LOWER_OPSYS}
+.elif ${OPSYS} == "IRIX"
+PY_PLATNAME= ${LOWER_OPSYS:C/\..*//}
+.elif ${OPSYS} == "SunOS"
+PY_PLATNAME= sunos${OS_VERSION:C/\..*//}
+.elif ${OPSYS} == "HPUX"
+PY_PLATNAME= hp-ux11
+.elif ${OPSYS} == "Linux"
+PY_PLATNAME= linux
+.else
+PY_PLATNAME= ${LOWER_OPSYS}${OS_VERSION:C/\..*//}
+.endif
Home |
Main Index |
Thread Index |
Old Index