| @@ -1,18 +1,19 @@ | | | @@ -1,18 +1,19 @@ |
1 | # $NetBSD: Makefile,v 1.16 2016/05/13 16:35:03 adam Exp $ | | 1 | # $NetBSD: Makefile,v 1.17 2016/09/18 12:36:41 kamil Exp $ |
2 | | | 2 | |
3 | .include "dist.mk" | | 3 | .include "dist.mk" |
4 | | | 4 | |
5 | PKGNAME= python34-${PY_DISTVERSION} | | 5 | PKGNAME= python34-${PY_DISTVERSION} |
| | | 6 | PKGREVISION= 1 |
6 | CATEGORIES= lang python | | 7 | CATEGORIES= lang python |
7 | | | 8 | |
8 | MAINTAINER= pkgsrc-users@NetBSD.org | | 9 | MAINTAINER= pkgsrc-users@NetBSD.org |
9 | HOMEPAGE= http://www.python.org/ | | 10 | HOMEPAGE= http://www.python.org/ |
10 | COMMENT= Interpreted, interactive, object-oriented programming language | | 11 | COMMENT= Interpreted, interactive, object-oriented programming language |
11 | LICENSE= python-software-foundation | | 12 | LICENSE= python-software-foundation |
12 | | | 13 | |
13 | CONFLICTS+= python-[0-9]* | | 14 | CONFLICTS+= python-[0-9]* |
14 | | | 15 | |
15 | PLIST_AWK+= -f ${PKGSRCDIR}/lang/python/plist-python.awk | | 16 | PLIST_AWK+= -f ${PKGSRCDIR}/lang/python/plist-python.awk |
16 | PLIST_AWK_ENV+= PYVERS=34 | | 17 | PLIST_AWK_ENV+= PYVERS=34 |
17 | PRINT_PLIST_AWK+= /^[^@]/ && /[^\/]+\.py[co]$$/ { | | 18 | PRINT_PLIST_AWK+= /^[^@]/ && /[^\/]+\.py[co]$$/ { |
18 | PRINT_PLIST_AWK+= gsub(/__pycache__\//, "") | | 19 | PRINT_PLIST_AWK+= gsub(/__pycache__\//, "") |
| @@ -112,26 +113,46 @@ TEST_TARGET= test | | | @@ -112,26 +113,46 @@ TEST_TARGET= test |
112 | INSTALL_TARGET= altinstall | | 113 | INSTALL_TARGET= altinstall |
113 | | | 114 | |
114 | REPLACE_INTERPRETER+= py34 | | 115 | REPLACE_INTERPRETER+= py34 |
115 | REPLACE.py34.old= .*python[^ ]* | | 116 | REPLACE.py34.old= .*python[^ ]* |
116 | REPLACE.py34.new= ${PREFIX}/bin/python${PY_VER_SUFFIX} | | 117 | REPLACE.py34.new= ${PREFIX}/bin/python${PY_VER_SUFFIX} |
117 | REPLACE_FILES.py34= Lib/*.py Lib/*/*.py Lib/*/*/*.py Lib/*/*/*/*.py | | 118 | REPLACE_FILES.py34= Lib/*.py Lib/*/*.py Lib/*/*/*.py Lib/*/*/*/*.py |
118 | | | 119 | |
119 | SUBST_CLASSES+= findlib | | 120 | SUBST_CLASSES+= findlib |
120 | SUBST_MESSAGE.findlib= Fixing find_library_file on Darwin. | | 121 | SUBST_MESSAGE.findlib= Fixing find_library_file on Darwin. |
121 | SUBST_STAGE.findlib= pre-configure | | 122 | SUBST_STAGE.findlib= pre-configure |
122 | SUBST_FILES.findlib= Lib/distutils/unixccompiler.py | | 123 | SUBST_FILES.findlib= Lib/distutils/unixccompiler.py |
123 | SUBST_SED.findlib= -e 's,/usr/local,${PREFIX},' | | 124 | SUBST_SED.findlib= -e 's,/usr/local,${PREFIX},' |
124 | | | 125 | |
| | | 126 | # XXX: It might be needed to add manually more paths like ${PREFIX}/qt5/lib |
| | | 127 | # Testing: |
| | | 128 | # >>> from ctypes.util import find_library |
| | | 129 | # >>> find_library("m") |
| | | 130 | # 'libm.so.0' |
| | | 131 | # >>> find_library("crypto") |
| | | 132 | # 'libcrypto.so.11' |
| | | 133 | # >>> find_library("GL") |
| | | 134 | # 'libGL.so.2' |
| | | 135 | # >>> find_library("curl") |
| | | 136 | # 'libcurl.so.4' |
| | | 137 | |
| | | 138 | SUBST_CLASSES+= pfindlib |
| | | 139 | SUBST_MESSAGE.pfindlib= Fixing find_library() on POSIX-like (excluding Darwin) systems. |
| | | 140 | SUBST_STAGE.pfindlib= pre-configure |
| | | 141 | SUBST_FILES.pfindlib= Lib/ctypes/util.py |
| | | 142 | SUBST_SED.pfindlib= -e 's!\(-Wl,-t -o\)!${COMPILER_RPATH_FLAG}${PREFIX}/lib -L${PREFIX}/lib \1!' |
| | | 143 | |
| | | 144 | .include "options.mk" |
| | | 145 | |
125 | SUBST_CLASSES+= sslbase | | 146 | SUBST_CLASSES+= sslbase |
126 | SUBST_MESSAGE.sslbase= Fixing OpenSSL base directory to find header file. | | 147 | SUBST_MESSAGE.sslbase= Fixing OpenSSL base directory to find header file. |
127 | SUBST_STAGE.sslbase= pre-configure | | 148 | SUBST_STAGE.sslbase= pre-configure |
128 | SUBST_FILES.sslbase= setup.py | | 149 | SUBST_FILES.sslbase= setup.py |
129 | SUBST_VARS.sslbase= SSLBASE | | 150 | SUBST_VARS.sslbase= SSLBASE |
130 | | | 151 | |
131 | CHECK_INTERPRETER_SKIP= lib/python${PY_VER_SUFFIX}/venv/scripts/posix/pydoc | | 152 | CHECK_INTERPRETER_SKIP= lib/python${PY_VER_SUFFIX}/venv/scripts/posix/pydoc |
132 | | | 153 | |
133 | .if ${OPSYS} == "HPUX" | | 154 | .if ${OPSYS} == "HPUX" |
134 | post-install: | | 155 | post-install: |
135 | ${LN} -fs ${DESTDIR}${PREFIX}/lib/libpython3.4.sl \ | | 156 | ${LN} -fs ${DESTDIR}${PREFIX}/lib/libpython3.4.sl \ |
136 | ${DESTDIR}${PREFIX}/lib/libpython3.4.sl.1.0 | | 157 | ${DESTDIR}${PREFIX}/lib/libpython3.4.sl.1.0 |
137 | .endif | | 158 | .endif |