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.diff -r1.150 -r1.151 pkgsrc/lang/python/pyversion.mk
(riastradh)
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: pyversion.mk,v 1.150 2023/06/27 10:31:21 riastradh Exp $ | 1 | # $NetBSD: pyversion.mk,v 1.151 2023/06/27 10:35:29 riastradh Exp $ | |
2 | 2 | |||
3 | # This file should be included by packages as a way to depend on | 3 | # This file should be included by packages as a way to depend on | |
4 | # python when none of the other methods are appropriate, e.g. a | 4 | # python when none of the other methods are appropriate, e.g. a | |
5 | # package that produces a binary that embeds python. | 5 | # package that produces a binary that embeds python. | |
6 | # It determines which Python version is used as a dependency for | 6 | # It determines which Python version is used as a dependency for | |
7 | # a package. | 7 | # a package. | |
8 | # | 8 | # | |
9 | # === User-settable variables === | 9 | # === User-settable variables === | |
10 | # | 10 | # | |
11 | # PYTHON_VERSION_DEFAULT | 11 | # PYTHON_VERSION_DEFAULT | |
12 | # The preferred Python version to use. | 12 | # The preferred Python version to use. | |
13 | # | 13 | # | |
14 | # Possible values: 27 37 38 39 310 311 | 14 | # Possible values: 27 37 38 39 310 311 | |
@@ -190,31 +190,33 @@ PYTHON_FOR_BUILD_ONLY?= no | @@ -190,31 +190,33 @@ PYTHON_FOR_BUILD_ONLY?= no | |||
190 | . if !empty(PYTHON_FOR_BUILD_ONLY:M[tT][oO][oO][lL]) | 190 | . if !empty(PYTHON_FOR_BUILD_ONLY:M[tT][oO][oO][lL]) | |
191 | TOOL_DEPENDS+= ${PYDEPENDENCY} | 191 | TOOL_DEPENDS+= ${PYDEPENDENCY} | |
192 | . elif !empty(PYTHON_FOR_BUILD_ONLY:M[tT][eE][sS][tT]) | 192 | . elif !empty(PYTHON_FOR_BUILD_ONLY:M[tT][eE][sS][tT]) | |
193 | TEST_DEPENDS+= ${PYDEPENDENCY} | 193 | TEST_DEPENDS+= ${PYDEPENDENCY} | |
194 | . else | 194 | . else | |
195 | . if !empty(PYTHON_FOR_BUILD_ONLY:M[yY][eE][sS]) | 195 | . if !empty(PYTHON_FOR_BUILD_ONLY:M[yY][eE][sS]) | |
196 | BUILDLINK_DEPMETHOD.python?= build | 196 | BUILDLINK_DEPMETHOD.python?= build | |
197 | . endif | 197 | . endif | |
198 | . include "${PYPKGSRCDIR}/buildlink3.mk" | 198 | . include "${PYPKGSRCDIR}/buildlink3.mk" | |
199 | . if ${USE_CROSS_COMPILE:U:tl} == "yes" | 199 | . if ${USE_CROSS_COMPILE:U:tl} == "yes" | |
200 | TOOL_DEPENDS+= ${PYDEPENDENCY} | 200 | TOOL_DEPENDS+= ${PYDEPENDENCY} | |
201 | MAKE_ENV+= PYTHONPATH=${WRKDIR:Q}/.pysite:${_CROSS_DESTDIR:Q}${LOCALBASE:Q}/${PYLIB:Q} | 201 | MAKE_ENV+= PYTHONPATH=${WRKDIR:Q}/.pysite:${_CROSS_DESTDIR:Q}${LOCALBASE:Q}/${PYLIB:Q} | |
202 | pre-configure: ${WRKDIR}/.pysite/sitecustomize.py | 202 | pre-configure: ${WRKDIR}/.pysite/sitecustomize.py | |
203 | .include "${PYPKGSRCDIR}/platname.mk" | |||
203 | ${WRKDIR}/.pysite/sitecustomize.py: | 204 | ${WRKDIR}/.pysite/sitecustomize.py: | |
204 | @${STEP_MSG} "Creating Python sitecustomize.py for cross-compiling" | 205 | @${STEP_MSG} "Creating Python sitecustomize.py for cross-compiling" | |
205 | ${RUN} ${MKDIR} ${.TARGET:H} | 206 | ${RUN} ${MKDIR} ${.TARGET:H} | |
206 | ${RUN} ( \ | 207 | ${RUN} ( \ | |
207 | ${ECHO} "import sys" && \ | 208 | ${ECHO} "import sys" && \ | |
209 | ${PRINTF} "sys.platform = '%s'\\n" ${PY_PLATNAME:Q} && \ | |||
208 | for v in \ | 210 | for v in \ | |
209 | sys.base_exec_prefix \ | 211 | sys.base_exec_prefix \ | |
210 | sys.base_prefix \ | 212 | sys.base_prefix \ | |
211 | sys.exec_prefix \ | 213 | sys.exec_prefix \ | |
212 | sys.prefix \ | 214 | sys.prefix \ | |
213 | ; do \ | 215 | ; do \ | |
214 | ${PRINTF} "%s = '%s'\\n" "$$v" ${LOCALBASE:Q}; \ | 216 | ${PRINTF} "%s = '%s'\\n" "$$v" ${LOCALBASE:Q}; \ | |
215 | done; \ | 217 | done; \ | |
216 | ) >${.TARGET}.tmp | 218 | ) >${.TARGET}.tmp | |
217 | ${RUN} ${MV} -f ${.TARGET}.tmp ${.TARGET} | 219 | ${RUN} ${MV} -f ${.TARGET}.tmp ${.TARGET} | |
218 | . endif | 220 | . endif | |
219 | . endif | 221 | . endif | |
220 | .endif | 222 | .endif |
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: Makefile,v 1.106 2023/05/29 23:33:48 gutteridge Exp $ | 1 | # $NetBSD: Makefile,v 1.107 2023/06/27 10:35:29 riastradh Exp $ | |
2 | 2 | |||
3 | .include "dist.mk" | 3 | .include "dist.mk" | |
4 | 4 | |||
5 | PKGNAME= python27-${PY_DISTVERSION} | 5 | PKGNAME= python27-${PY_DISTVERSION} | |
6 | PKGREVISION= 11 | 6 | PKGREVISION= 11 | |
7 | CATEGORIES= lang python | 7 | CATEGORIES= lang python | |
8 | 8 | |||
9 | MAINTAINER= pkgsrc-users@NetBSD.org | 9 | MAINTAINER= pkgsrc-users@NetBSD.org | |
10 | HOMEPAGE= https://www.python.org/ | 10 | HOMEPAGE= https://www.python.org/ | |
11 | COMMENT= Interpreted, interactive, object-oriented programming language | 11 | COMMENT= Interpreted, interactive, object-oriented programming language | |
12 | LICENSE= python-software-foundation | 12 | LICENSE= python-software-foundation | |
13 | 13 | |||
14 | DEPENDS= mozilla-rootcerts>=1.0.20150804nb1:../../security/mozilla-rootcerts | 14 | DEPENDS= mozilla-rootcerts>=1.0.20150804nb1:../../security/mozilla-rootcerts | |
@@ -55,41 +55,30 @@ SUBST_MESSAGE.setup= Replacing crypt wit | @@ -55,41 +55,30 @@ SUBST_MESSAGE.setup= Replacing crypt wit | |||
55 | SUBST_STAGE.setup= pre-configure | 55 | SUBST_STAGE.setup= pre-configure | |
56 | SUBST_FILES.setup= setup.py | 56 | SUBST_FILES.setup= setup.py | |
57 | SUBST_SED.setup= -e "s,\([ \[]\)'crypt',\\1'crypt_i'," | 57 | SUBST_SED.setup= -e "s,\([ \[]\)'crypt',\\1'crypt_i'," | |
58 | .endif | 58 | .endif | |
59 | 59 | |||
60 | PY_VER_SUFFIX= 2.7 | 60 | PY_VER_SUFFIX= 2.7 | |
61 | 61 | |||
62 | .if ${OPSYS} == "NetBSD" | 62 | .if ${OPSYS} == "NetBSD" | |
63 | # XXX work around a botched autoconf check which ignores libintl | 63 | # XXX work around a botched autoconf check which ignores libintl | |
64 | CONFIGURE_ENV+= ac_cv_func_bind_textdomain_codeset=yes | 64 | CONFIGURE_ENV+= ac_cv_func_bind_textdomain_codeset=yes | |
65 | .endif | 65 | .endif | |
66 | 66 | |||
67 | .if ${OPSYS} == "Cygwin" || ${OPSYS} == "Darwin" || ${OPSYS} == "Interix" | 67 | .if ${OPSYS} == "Cygwin" || ${OPSYS} == "Darwin" || ${OPSYS} == "Interix" | |
68 | PY_PLATNAME= ${LOWER_OPSYS} | |||
69 | USE_TOOLS+= gmake | 68 | USE_TOOLS+= gmake | |
70 | .elif ${OPSYS} == "IRIX" | |||
71 | PY_PLATNAME= ${LOWER_OPSYS:C/\..*//} | |||
72 | .elif ${OPSYS} == "SunOS" | |||
73 | PY_PLATNAME= sunos${OS_VERSION:C/\..*//} | |||
74 | .elif ${OPSYS} == "HPUX" | |||
75 | PY_PLATNAME= hp-ux11 | |||
76 | .elif ${OPSYS} == "Linux" | |||
77 | PY_PLATNAME= linux2 | |||
78 | .elif ${OS_VARIANT} == "SCOOSR5" | |||
79 | PY_PLATNAME= sco_sv3 | |||
80 | .else | |||
81 | PY_PLATNAME= ${LOWER_OPSYS}${OS_VERSION:C/\..*//} | |||
82 | .endif | 69 | .endif | |
70 | ||||
71 | .include "platname.mk" | |||
83 | PLIST_SUBST+= PY_PLATNAME=${PY_PLATNAME:Q} | 72 | PLIST_SUBST+= PY_PLATNAME=${PY_PLATNAME:Q} | |
84 | 73 | |||
85 | .if !empty(LP64PLATFORMS:@.PLAT.@${MACHINE_PLATFORM:M${.PLAT.}}@) || \ | 74 | .if !empty(LP64PLATFORMS:@.PLAT.@${MACHINE_PLATFORM:M${.PLAT.}}@) || \ | |
86 | (defined(ABI) && ${ABI} == "64") | 75 | (defined(ABI) && ${ABI} == "64") | |
87 | IS_64BIT_PLATFORM?= yes | 76 | IS_64BIT_PLATFORM?= yes | |
88 | .else | 77 | .else | |
89 | IS_64BIT_PLATFORM?= no | 78 | IS_64BIT_PLATFORM?= no | |
90 | .endif | 79 | .endif | |
91 | 80 | |||
92 | PLIST_VARS+= dl dll extra-so nis qt | 81 | PLIST_VARS+= dl dll extra-so nis qt | |
93 | 82 | |||
94 | # the dl module isn't built for 64 bit archs | 83 | # the dl module isn't built for 64 bit archs | |
95 | .if empty(IS_64BIT_PLATFORM:M[yY][eE][sS]) | 84 | .if empty(IS_64BIT_PLATFORM:M[yY][eE][sS]) |
# $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
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: Makefile,v 1.17 2023/06/27 10:29:58 riastradh Exp $ | 1 | # $NetBSD: Makefile,v 1.18 2023/06/27 10:35:29 riastradh Exp $ | |
2 | 2 | |||
3 | .include "dist.mk" | 3 | .include "dist.mk" | |
4 | 4 | |||
5 | PKGNAME= python310-${PY_DISTVERSION} | 5 | PKGNAME= python310-${PY_DISTVERSION} | |
6 | CATEGORIES= lang python | 6 | CATEGORIES= lang python | |
7 | 7 | |||
8 | MAINTAINER= pkgsrc-users@NetBSD.org | 8 | MAINTAINER= pkgsrc-users@NetBSD.org | |
9 | HOMEPAGE= https://www.python.org/ | 9 | HOMEPAGE= https://www.python.org/ | |
10 | COMMENT= Interpreted, interactive, object-oriented programming language | 10 | COMMENT= Interpreted, interactive, object-oriented programming language | |
11 | LICENSE= python-software-foundation | 11 | LICENSE= python-software-foundation | |
12 | 12 | |||
13 | CONFLICTS+= python-[0-9]* | 13 | CONFLICTS+= python-[0-9]* | |
14 | 14 | |||
@@ -42,65 +42,58 @@ TOOL_DEPENDS+= ${PKGNAME}:../../${PKGPA | @@ -42,65 +42,58 @@ TOOL_DEPENDS+= ${PKGNAME}:../../${PKGPA | |||
42 | CONFIGURE_ARGS+= PYTHON_FOR_BUILD=${TOOLBASE:Q}/bin/python3.10 | 42 | CONFIGURE_ARGS+= PYTHON_FOR_BUILD=${TOOLBASE:Q}/bin/python3.10 | |
43 | CONFIGURE_ARGS+= MACHDEP=${PY_PLATNAME} | 43 | CONFIGURE_ARGS+= MACHDEP=${PY_PLATNAME} | |
44 | CONFIGURE_ARGS+= \ | 44 | CONFIGURE_ARGS+= \ | |
45 | _PYTHON_HOST_PLATFORM=${LOWER_OPSYS}-${MACHINE_GNU_ARCH} | 45 | _PYTHON_HOST_PLATFORM=${LOWER_OPSYS}-${MACHINE_GNU_ARCH} | |
46 | CONFIGURE_ARGS+= ac_sys_system=${OPSYS} | 46 | CONFIGURE_ARGS+= ac_sys_system=${OPSYS} | |
47 | . if ${OPSYS} == "OSF1" | 47 | . if ${OPSYS} == "OSF1" | |
48 | CONFIGURE_ARGS+= ac_cv_buggy_getaddrinfo=true | 48 | CONFIGURE_ARGS+= ac_cv_buggy_getaddrinfo=true | |
49 | . else | 49 | . else | |
50 | CONFIGURE_ARGS+= ac_cv_buggy_getaddrinfo=false | 50 | CONFIGURE_ARGS+= ac_cv_buggy_getaddrinfo=false | |
51 | . endif | 51 | . endif | |
52 | CONFIGURE_ARGS.NetBSD+= ac_cv_file__dev_ptmx=yes | 52 | CONFIGURE_ARGS.NetBSD+= ac_cv_file__dev_ptmx=yes | |
53 | CONFIGURE_ARGS.NetBSD+= ac_cv_file__dev_ptc=no | 53 | CONFIGURE_ARGS.NetBSD+= ac_cv_file__dev_ptc=no | |
54 | MAKE_ENV+= \ | 54 | MAKE_ENV+= \ | |
55 | _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_${PY_PLATNAME:Q} | |||
56 | MAKE_ENV+= \ | |||
55 | _PYTHON_HOST_PLATFORM=${LOWER_OPSYS}-${MACHINE_GNU_ARCH} | 57 | _PYTHON_HOST_PLATFORM=${LOWER_OPSYS}-${MACHINE_GNU_ARCH} | |
56 | MAKE_ENV+= _PYTHON_PROJECT_BASE=${WRKSRC} | 58 | MAKE_ENV+= _PYTHON_PROJECT_BASE=${WRKSRC} | |
57 | .endif | 59 | .endif | |
58 | 60 | |||
59 | # http://bugs.python.org/issue13241 | 61 | # http://bugs.python.org/issue13241 | |
60 | .if !empty(MACHINE_PLATFORM:MDarwin-1[12].*) | 62 | .if !empty(MACHINE_PLATFORM:MDarwin-1[12].*) | |
61 | PKGSRC_COMPILER= clang | 63 | PKGSRC_COMPILER= clang | |
62 | PKG_CC= clang | 64 | PKG_CC= clang | |
63 | PKG_CXX= clang++ | 65 | PKG_CXX= clang++ | |
64 | .endif | 66 | .endif | |
65 | 67 | |||
66 | # Used in socketmodule.c to determine if a sethostname declaration is required | 68 | # Used in socketmodule.c to determine if a sethostname declaration is required | |
67 | CFLAGS.SunOS+= -DPKGSRC_OPSYS_VERSION=${OPSYS_VERSION} | 69 | CFLAGS.SunOS+= -DPKGSRC_OPSYS_VERSION=${OPSYS_VERSION} | |
68 | LIBS.SunOS+= -lrt # fdatasync() | 70 | LIBS.SunOS+= -lrt # fdatasync() | |
69 | LIBS.SunOS+= -luuid | 71 | LIBS.SunOS+= -luuid | |
70 | .if ${OPSYS} == "SunOS" && ${OPSYS_VERSION} < 051100 | 72 | .if ${OPSYS} == "SunOS" && ${OPSYS_VERSION} < 051100 | |
71 | SUBST_CLASSES+= setup | 73 | SUBST_CLASSES+= setup | |
72 | SUBST_MESSAGE.setup= Replacing crypt with crypt_i | 74 | SUBST_MESSAGE.setup= Replacing crypt with crypt_i | |
73 | SUBST_STAGE.setup= pre-configure | 75 | SUBST_STAGE.setup= pre-configure | |
74 | SUBST_FILES.setup= setup.py | 76 | SUBST_FILES.setup= setup.py | |
75 | SUBST_SED.setup= -e "s,'crypt','crypt_i'," | 77 | SUBST_SED.setup= -e "s,'crypt','crypt_i'," | |
76 | .endif | 78 | .endif | |
77 | 79 | |||
78 | PY_VER_SUFFIX= 3.10 | 80 | PY_VER_SUFFIX= 3.10 | |
79 | 81 | |||
80 | .if ${OPSYS} == "Darwin" | 82 | .if ${OPSYS} == "Darwin" | |
81 | PY_PLATNAME= ${LOWER_OPSYS} | |||
82 | USE_TOOLS+= gmake | 83 | USE_TOOLS+= gmake | |
83 | .elif ${OPSYS} == "IRIX" | |||
84 | PY_PLATNAME= ${LOWER_OPSYS:C/\..*//} | |||
85 | .elif ${OPSYS} == "SunOS" | |||
86 | PY_PLATNAME= sunos${OS_VERSION:C/\..*//} | |||
87 | .elif ${OPSYS} == "HPUX" | |||
88 | PY_PLATNAME= hp-ux11 | |||
89 | .elif ${OPSYS} == "Linux" | |||
90 | PY_PLATNAME= linux | |||
91 | .else | |||
92 | PY_PLATNAME= ${LOWER_OPSYS}${OS_VERSION:C/\..*//} | |||
93 | .endif | 84 | .endif | |
85 | ||||
86 | .include "platname.mk" | |||
94 | PLIST_SUBST+= PY_PLATNAME=${PY_PLATNAME:Q} | 87 | PLIST_SUBST+= PY_PLATNAME=${PY_PLATNAME:Q} | |
95 | 88 | |||
96 | # For Xcode 5 and up, we need to search the SDK path for headers, otherwise | 89 | # For Xcode 5 and up, we need to search the SDK path for headers, otherwise | |
97 | # certain modules will not be built. | 90 | # certain modules will not be built. | |
98 | .if ${OPSYS} == "Darwin" && exists(${OSX_SDK_PATH:Q}/usr/include) | 91 | .if ${OPSYS} == "Darwin" && exists(${OSX_SDK_PATH:Q}/usr/include) | |
99 | CFLAGS+= -I${OSX_SDK_PATH:Q}/usr/include | 92 | CFLAGS+= -I${OSX_SDK_PATH:Q}/usr/include | |
100 | .endif | 93 | .endif | |
101 | 94 | |||
102 | PLIST_VARS+= nis | 95 | PLIST_VARS+= nis | |
103 | .for incdir in ${_OPSYS_INCLUDE_DIRS} | 96 | .for incdir in ${_OPSYS_INCLUDE_DIRS} | |
104 | . if (exists(${incdir}/rpc/rpc.h) || exists(${incdir}/tirpc/rpc/rpc.h)) | 97 | . if (exists(${incdir}/rpc/rpc.h) || exists(${incdir}/tirpc/rpc/rpc.h)) | |
105 | HAVE_RPC_H= yes | 98 | HAVE_RPC_H= yes | |
106 | . endif | 99 | . endif |
# $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
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: Makefile,v 1.6 2023/06/27 10:29:58 riastradh Exp $ | 1 | # $NetBSD: Makefile,v 1.7 2023/06/27 10:35:30 riastradh Exp $ | |
2 | 2 | |||
3 | .include "dist.mk" | 3 | .include "dist.mk" | |
4 | 4 | |||
5 | PKGNAME= python311-${PY_DISTVERSION} | 5 | PKGNAME= python311-${PY_DISTVERSION} | |
6 | PKGREVISION= 1 | 6 | PKGREVISION= 1 | |
7 | CATEGORIES= lang python | 7 | CATEGORIES= lang python | |
8 | 8 | |||
9 | MAINTAINER= pkgsrc-users@NetBSD.org | 9 | MAINTAINER= pkgsrc-users@NetBSD.org | |
10 | HOMEPAGE= https://www.python.org/ | 10 | HOMEPAGE= https://www.python.org/ | |
11 | COMMENT= Interpreted, interactive, object-oriented programming language | 11 | COMMENT= Interpreted, interactive, object-oriented programming language | |
12 | LICENSE= python-software-foundation | 12 | LICENSE= python-software-foundation | |
13 | 13 | |||
14 | CONFLICTS+= python-[0-9]* | 14 | CONFLICTS+= python-[0-9]* | |
@@ -69,39 +69,30 @@ CFLAGS.SunOS+= -DPKGSRC_OPSYS_VERSION=$ | @@ -69,39 +69,30 @@ CFLAGS.SunOS+= -DPKGSRC_OPSYS_VERSION=$ | |||
69 | LIBS.SunOS+= -lrt # fdatasync() | 69 | LIBS.SunOS+= -lrt # fdatasync() | |
70 | LIBS.SunOS+= -luuid | 70 | LIBS.SunOS+= -luuid | |
71 | .if ${OPSYS} == "SunOS" && ${OPSYS_VERSION} < 051100 | 71 | .if ${OPSYS} == "SunOS" && ${OPSYS_VERSION} < 051100 | |
72 | SUBST_CLASSES+= setup | 72 | SUBST_CLASSES+= setup | |
73 | SUBST_MESSAGE.setup= Replacing crypt with crypt_i | 73 | SUBST_MESSAGE.setup= Replacing crypt with crypt_i | |
74 | SUBST_STAGE.setup= pre-configure | 74 | SUBST_STAGE.setup= pre-configure | |
75 | SUBST_FILES.setup= setup.py | 75 | SUBST_FILES.setup= setup.py | |
76 | SUBST_SED.setup= -e "s,'crypt','crypt_i'," | 76 | SUBST_SED.setup= -e "s,'crypt','crypt_i'," | |
77 | .endif | 77 | .endif | |
78 | 78 | |||
79 | PY_VER_SUFFIX= 3.11 | 79 | PY_VER_SUFFIX= 3.11 | |
80 | 80 | |||
81 | .if ${OPSYS} == "Darwin" | 81 | .if ${OPSYS} == "Darwin" | |
82 | PY_PLATNAME= ${LOWER_OPSYS} | |||
83 | USE_TOOLS+= gmake | 82 | USE_TOOLS+= gmake | |
84 | .elif ${OPSYS} == "IRIX" | |||
85 | PY_PLATNAME= ${LOWER_OPSYS:C/\..*//} | |||
86 | .elif ${OPSYS} == "SunOS" | |||
87 | PY_PLATNAME= sunos${OS_VERSION:C/\..*//} | |||
88 | .elif ${OPSYS} == "HPUX" | |||
89 | PY_PLATNAME= hp-ux11 | |||
90 | .elif ${OPSYS} == "Linux" | |||
91 | PY_PLATNAME= linux | |||
92 | .else | |||
93 | PY_PLATNAME= ${LOWER_OPSYS}${OS_VERSION:C/\..*//} | |||
94 | .endif | 83 | .endif | |
84 | ||||
85 | .include "platname.mk" | |||
95 | PLIST_SUBST+= PY_PLATNAME=${PY_PLATNAME:Q} | 86 | PLIST_SUBST+= PY_PLATNAME=${PY_PLATNAME:Q} | |
96 | 87 | |||
97 | # For Xcode 5 and up, we need to search the SDK path for headers, otherwise | 88 | # For Xcode 5 and up, we need to search the SDK path for headers, otherwise | |
98 | # certain modules will not be built. | 89 | # certain modules will not be built. | |
99 | .if ${OPSYS} == "Darwin" && exists(${OSX_SDK_PATH:Q}/usr/include) | 90 | .if ${OPSYS} == "Darwin" && exists(${OSX_SDK_PATH:Q}/usr/include) | |
100 | CFLAGS+= -I${OSX_SDK_PATH:Q}/usr/include | 91 | CFLAGS+= -I${OSX_SDK_PATH:Q}/usr/include | |
101 | .endif | 92 | .endif | |
102 | 93 | |||
103 | LDFLAGS.SunOS+= -lresolv | 94 | LDFLAGS.SunOS+= -lresolv | |
104 | 95 | |||
105 | PLIST_VARS+= nis | 96 | PLIST_VARS+= nis | |
106 | .for incdir in ${_OPSYS_INCLUDE_DIRS} | 97 | .for incdir in ${_OPSYS_INCLUDE_DIRS} | |
107 | . if (exists(${incdir}/rpc/rpc.h) || exists(${incdir}/tirpc/rpc/rpc.h)) | 98 | . if (exists(${incdir}/rpc/rpc.h) || exists(${incdir}/tirpc/rpc/rpc.h)) |
# $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
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: Makefile,v 1.36 2022/07/29 20:37:48 jperkin Exp $ | 1 | # $NetBSD: Makefile,v 1.37 2023/06/27 10:35:30 riastradh Exp $ | |
2 | 2 | |||
3 | .include "dist.mk" | 3 | .include "dist.mk" | |
4 | 4 | |||
5 | PKGNAME= python37-${PY_DISTVERSION} | 5 | PKGNAME= python37-${PY_DISTVERSION} | |
6 | CATEGORIES= lang python | 6 | CATEGORIES= lang python | |
7 | 7 | |||
8 | MAINTAINER= pkgsrc-users@NetBSD.org | 8 | MAINTAINER= pkgsrc-users@NetBSD.org | |
9 | HOMEPAGE= https://www.python.org/ | 9 | HOMEPAGE= https://www.python.org/ | |
10 | COMMENT= Interpreted, interactive, object-oriented programming language | 10 | COMMENT= Interpreted, interactive, object-oriented programming language | |
11 | LICENSE= python-software-foundation | 11 | LICENSE= python-software-foundation | |
12 | 12 | |||
13 | CONFLICTS+= python-[0-9]* | 13 | CONFLICTS+= python-[0-9]* | |
14 | 14 | |||
@@ -47,39 +47,30 @@ CFLAGS.SunOS+= -DPKGSRC_OPSYS_VERSION=$ | @@ -47,39 +47,30 @@ CFLAGS.SunOS+= -DPKGSRC_OPSYS_VERSION=$ | |||
47 | # fdatasync() | 47 | # fdatasync() | |
48 | LIBS.SunOS+= -lrt | 48 | LIBS.SunOS+= -lrt | |
49 | .if ${OPSYS} == "SunOS" && ${OPSYS_VERSION} < 051100 | 49 | .if ${OPSYS} == "SunOS" && ${OPSYS_VERSION} < 051100 | |
50 | SUBST_CLASSES+= setup | 50 | SUBST_CLASSES+= setup | |
51 | SUBST_MESSAGE.setup= Replacing crypt with crypt_i | 51 | SUBST_MESSAGE.setup= Replacing crypt with crypt_i | |
52 | SUBST_STAGE.setup= pre-configure | 52 | SUBST_STAGE.setup= pre-configure | |
53 | SUBST_FILES.setup= setup.py | 53 | SUBST_FILES.setup= setup.py | |
54 | SUBST_SED.setup= -e "s,'crypt','crypt_i'," | 54 | SUBST_SED.setup= -e "s,'crypt','crypt_i'," | |
55 | .endif | 55 | .endif | |
56 | 56 | |||
57 | PY_VER_SUFFIX= 3.7 | 57 | PY_VER_SUFFIX= 3.7 | |
58 | 58 | |||
59 | .if ${OPSYS} == "Darwin" | 59 | .if ${OPSYS} == "Darwin" | |
60 | PY_PLATNAME= ${LOWER_OPSYS} | |||
61 | USE_TOOLS+= gmake | 60 | USE_TOOLS+= gmake | |
62 | .elif ${OPSYS} == "IRIX" | |||
63 | PY_PLATNAME= ${LOWER_OPSYS:C/\..*//} | |||
64 | .elif ${OPSYS} == "SunOS" | |||
65 | PY_PLATNAME= sunos${OS_VERSION:C/\..*//} | |||
66 | .elif ${OPSYS} == "HPUX" | |||
67 | PY_PLATNAME= hp-ux11 | |||
68 | .elif ${OPSYS} == "Linux" | |||
69 | PY_PLATNAME= linux | |||
70 | .else | |||
71 | PY_PLATNAME= ${LOWER_OPSYS}${OS_VERSION:C/\..*//} | |||
72 | .endif | 61 | .endif | |
62 | ||||
63 | .include "platname.mk" | |||
73 | PLIST_SUBST+= PY_PLATNAME=${PY_PLATNAME:Q} | 64 | PLIST_SUBST+= PY_PLATNAME=${PY_PLATNAME:Q} | |
74 | 65 | |||
75 | # ossaudiodev is only available on x86 for the following platforms | 66 | # ossaudiodev is only available on x86 for the following platforms | |
76 | PLIST_VARS+= oss | 67 | PLIST_VARS+= oss | |
77 | .if (${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64") && \ | 68 | .if (${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64") && \ | |
78 | (${PY_PLATNAME} == "linux" || ${OPSYS} == "FreeBSD") | 69 | (${PY_PLATNAME} == "linux" || ${OPSYS} == "FreeBSD") | |
79 | PLIST.oss= yes | 70 | PLIST.oss= yes | |
80 | .endif | 71 | .endif | |
81 | 72 | |||
82 | # For Xcode 5 and up, we need to search the SDK path for headers, otherwise | 73 | # For Xcode 5 and up, we need to search the SDK path for headers, otherwise | |
83 | # certain modules will not be built. | 74 | # certain modules will not be built. | |
84 | .if ${OPSYS} == "Darwin" && exists(${OSX_SDK_PATH:Q}/usr/include) | 75 | .if ${OPSYS} == "Darwin" && exists(${OSX_SDK_PATH:Q}/usr/include) | |
85 | CFLAGS+= -I${OSX_SDK_PATH:Q}/usr/include | 76 | CFLAGS+= -I${OSX_SDK_PATH:Q}/usr/include |
# $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
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: Makefile,v 1.28 2022/03/19 18:56:44 adam Exp $ | 1 | # $NetBSD: Makefile,v 1.29 2023/06/27 10:35:30 riastradh Exp $ | |
2 | 2 | |||
3 | .include "dist.mk" | 3 | .include "dist.mk" | |
4 | 4 | |||
5 | PKGNAME= python38-${PY_DISTVERSION} | 5 | PKGNAME= python38-${PY_DISTVERSION} | |
6 | CATEGORIES= lang python | 6 | CATEGORIES= lang python | |
7 | 7 | |||
8 | MAINTAINER= pkgsrc-users@NetBSD.org | 8 | MAINTAINER= pkgsrc-users@NetBSD.org | |
9 | HOMEPAGE= https://www.python.org/ | 9 | HOMEPAGE= https://www.python.org/ | |
10 | COMMENT= Interpreted, interactive, object-oriented programming language | 10 | COMMENT= Interpreted, interactive, object-oriented programming language | |
11 | LICENSE= python-software-foundation | 11 | LICENSE= python-software-foundation | |
12 | 12 | |||
13 | CONFLICTS+= python-[0-9]* | 13 | CONFLICTS+= python-[0-9]* | |
14 | 14 | |||
@@ -49,39 +49,30 @@ CFLAGS.SunOS+= -DPKGSRC_OPSYS_VERSION=$ | @@ -49,39 +49,30 @@ CFLAGS.SunOS+= -DPKGSRC_OPSYS_VERSION=$ | |||
49 | .if ${OPSYS} == "SunOS" && ${OPSYS_VERSION} < 051100 | 49 | .if ${OPSYS} == "SunOS" && ${OPSYS_VERSION} < 051100 | |
50 | SUBST_CLASSES+= setup | 50 | SUBST_CLASSES+= setup | |
51 | SUBST_MESSAGE.setup= Replacing crypt with crypt_i | 51 | SUBST_MESSAGE.setup= Replacing crypt with crypt_i | |
52 | SUBST_STAGE.setup= pre-configure | 52 | SUBST_STAGE.setup= pre-configure | |
53 | SUBST_FILES.setup= setup.py | 53 | SUBST_FILES.setup= setup.py | |
54 | SUBST_SED.setup= -e "s,'crypt','crypt_i'," | 54 | SUBST_SED.setup= -e "s,'crypt','crypt_i'," | |
55 | .endif | 55 | .endif | |
56 | 56 | |||
57 | LIBS.SunOS+= -lrt # fdatasync() | 57 | LIBS.SunOS+= -lrt # fdatasync() | |
58 | 58 | |||
59 | PY_VER_SUFFIX= 3.8 | 59 | PY_VER_SUFFIX= 3.8 | |
60 | 60 | |||
61 | .if ${OPSYS} == "Darwin" | 61 | .if ${OPSYS} == "Darwin" | |
62 | PY_PLATNAME= ${LOWER_OPSYS} | |||
63 | USE_TOOLS+= gmake | 62 | USE_TOOLS+= gmake | |
64 | .elif ${OPSYS} == "IRIX" | |||
65 | PY_PLATNAME= ${LOWER_OPSYS:C/\..*//} | |||
66 | .elif ${OPSYS} == "SunOS" | |||
67 | PY_PLATNAME= sunos${OS_VERSION:C/\..*//} | |||
68 | .elif ${OPSYS} == "HPUX" | |||
69 | PY_PLATNAME= hp-ux11 | |||
70 | .elif ${OPSYS} == "Linux" | |||
71 | PY_PLATNAME= linux | |||
72 | .else | |||
73 | PY_PLATNAME= ${LOWER_OPSYS}${OS_VERSION:C/\..*//} | |||
74 | .endif | 63 | .endif | |
64 | ||||
65 | .include "platname.mk" | |||
75 | PLIST_SUBST+= PY_PLATNAME=${PY_PLATNAME:Q} | 66 | PLIST_SUBST+= PY_PLATNAME=${PY_PLATNAME:Q} | |
76 | 67 | |||
77 | # ossaudiodev is only available on x86 for the following platforms | 68 | # ossaudiodev is only available on x86 for the following platforms | |
78 | PLIST_VARS+= oss | 69 | PLIST_VARS+= oss | |
79 | .if (${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64") && \ | 70 | .if (${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64") && \ | |
80 | (${PY_PLATNAME} == "linux" || ${OPSYS} == "FreeBSD") | 71 | (${PY_PLATNAME} == "linux" || ${OPSYS} == "FreeBSD") | |
81 | PLIST.oss= yes | 72 | PLIST.oss= yes | |
82 | .endif | 73 | .endif | |
83 | 74 | |||
84 | # For Xcode 5 and up, we need to search the SDK path for headers, otherwise | 75 | # For Xcode 5 and up, we need to search the SDK path for headers, otherwise | |
85 | # certain modules will not be built. | 76 | # certain modules will not be built. | |
86 | .if ${OPSYS} == "Darwin" && exists(${OSX_SDK_PATH:Q}/usr/include) | 77 | .if ${OPSYS} == "Darwin" && exists(${OSX_SDK_PATH:Q}/usr/include) | |
87 | CFLAGS+= -I${OSX_SDK_PATH:Q}/usr/include | 78 | CFLAGS+= -I${OSX_SDK_PATH:Q}/usr/include |
# $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
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: Makefile,v 1.23 2023/06/27 10:29:58 riastradh Exp $ | 1 | # $NetBSD: Makefile,v 1.24 2023/06/27 10:35:30 riastradh Exp $ | |
2 | 2 | |||
3 | .include "dist.mk" | 3 | .include "dist.mk" | |
4 | 4 | |||
5 | PKGNAME= python39-${PY_DISTVERSION} | 5 | PKGNAME= python39-${PY_DISTVERSION} | |
6 | CATEGORIES= lang python | 6 | CATEGORIES= lang python | |
7 | 7 | |||
8 | MAINTAINER= pkgsrc-users@NetBSD.org | 8 | MAINTAINER= pkgsrc-users@NetBSD.org | |
9 | HOMEPAGE= https://www.python.org/ | 9 | HOMEPAGE= https://www.python.org/ | |
10 | COMMENT= Interpreted, interactive, object-oriented programming language | 10 | COMMENT= Interpreted, interactive, object-oriented programming language | |
11 | LICENSE= python-software-foundation | 11 | LICENSE= python-software-foundation | |
12 | 12 | |||
13 | CONFLICTS+= python-[0-9]* | 13 | CONFLICTS+= python-[0-9]* | |
14 | 14 | |||
@@ -68,39 +68,30 @@ CFLAGS.SunOS+= -DPKGSRC_OPSYS_VERSION=$ | @@ -68,39 +68,30 @@ CFLAGS.SunOS+= -DPKGSRC_OPSYS_VERSION=$ | |||
68 | LIBS.SunOS+= -lrt # fdatasync() | 68 | LIBS.SunOS+= -lrt # fdatasync() | |
69 | LIBS.SunOS+= -luuid | 69 | LIBS.SunOS+= -luuid | |
70 | .if ${OPSYS} == "SunOS" && ${OPSYS_VERSION} < 051100 | 70 | .if ${OPSYS} == "SunOS" && ${OPSYS_VERSION} < 051100 | |
71 | SUBST_CLASSES+= setup | 71 | SUBST_CLASSES+= setup | |
72 | SUBST_MESSAGE.setup= Replacing crypt with crypt_i | 72 | SUBST_MESSAGE.setup= Replacing crypt with crypt_i | |
73 | SUBST_STAGE.setup= pre-configure | 73 | SUBST_STAGE.setup= pre-configure | |
74 | SUBST_FILES.setup= setup.py | 74 | SUBST_FILES.setup= setup.py | |
75 | SUBST_SED.setup= -e "s,'crypt','crypt_i'," | 75 | SUBST_SED.setup= -e "s,'crypt','crypt_i'," | |
76 | .endif | 76 | .endif | |
77 | 77 | |||
78 | PY_VER_SUFFIX= 3.9 | 78 | PY_VER_SUFFIX= 3.9 | |
79 | 79 | |||
80 | .if ${OPSYS} == "Darwin" | 80 | .if ${OPSYS} == "Darwin" | |
81 | PY_PLATNAME= ${LOWER_OPSYS} | |||
82 | USE_TOOLS+= gmake | 81 | USE_TOOLS+= gmake | |
83 | .elif ${OPSYS} == "IRIX" | |||
84 | PY_PLATNAME= ${LOWER_OPSYS:C/\..*//} | |||
85 | .elif ${OPSYS} == "SunOS" | |||
86 | PY_PLATNAME= sunos${OS_VERSION:C/\..*//} | |||
87 | .elif ${OPSYS} == "HPUX" | |||
88 | PY_PLATNAME= hp-ux11 | |||
89 | .elif ${OPSYS} == "Linux" | |||
90 | PY_PLATNAME= linux | |||
91 | .else | |||
92 | PY_PLATNAME= ${LOWER_OPSYS}${OS_VERSION:C/\..*//} | |||
93 | .endif | 82 | .endif | |
83 | ||||
84 | .include "platname.mk" | |||
94 | PLIST_SUBST+= PY_PLATNAME=${PY_PLATNAME:Q} | 85 | PLIST_SUBST+= PY_PLATNAME=${PY_PLATNAME:Q} | |
95 | 86 | |||
96 | # For Xcode 5 and up, we need to search the SDK path for headers, otherwise | 87 | # For Xcode 5 and up, we need to search the SDK path for headers, otherwise | |
97 | # certain modules will not be built. | 88 | # certain modules will not be built. | |
98 | .if ${OPSYS} == "Darwin" && exists(${OSX_SDK_PATH:Q}/usr/include) | 89 | .if ${OPSYS} == "Darwin" && exists(${OSX_SDK_PATH:Q}/usr/include) | |
99 | CFLAGS+= -I${OSX_SDK_PATH:Q}/usr/include | 90 | CFLAGS+= -I${OSX_SDK_PATH:Q}/usr/include | |
100 | .endif | 91 | .endif | |
101 | 92 | |||
102 | PLIST_VARS+= nis | 93 | PLIST_VARS+= nis | |
103 | .for incdir in ${_OPSYS_INCLUDE_DIRS} | 94 | .for incdir in ${_OPSYS_INCLUDE_DIRS} | |
104 | . if (exists(${incdir}/rpc/rpc.h) || exists(${incdir}/tirpc/rpc/rpc.h)) | 95 | . if (exists(${incdir}/rpc/rpc.h) || exists(${incdir}/tirpc/rpc/rpc.h)) | |
105 | HAVE_RPC_H= yes | 96 | HAVE_RPC_H= yes | |
106 | . endif | 97 | . endif |
# $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