| @@ -1,194 +1,195 @@ | | | @@ -1,194 +1,195 @@ |
1 | # $NetBSD: Makefile,v 1.33 2013/12/12 11:34:23 jperkin Exp $ | | 1 | # $NetBSD: Makefile,v 1.34 2014/02/09 09:02:50 tron 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= 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 | GNU_CONFIGURE= yes | | 16 | GNU_CONFIGURE= yes |
16 | CONFIGURE_ARGS+= --with-threads | | 17 | CONFIGURE_ARGS+= --with-threads |
17 | CONFIGURE_ARGS+= --enable-shared | | 18 | CONFIGURE_ARGS+= --enable-shared |
18 | CONFIGURE_ARGS+= OPT=${CFLAGS:Q} | | 19 | CONFIGURE_ARGS+= OPT=${CFLAGS:Q} |
19 | CONFIGURE_ARGS+= --with-system-ffi | | 20 | CONFIGURE_ARGS+= --with-system-ffi |
20 | CONFIGURE_ARGS+= --with-dbmliborder=ndbm:bdb | | 21 | CONFIGURE_ARGS+= --with-dbmliborder=ndbm:bdb |
21 | CONFIGURE_ENV+= MKDIR_P=${MKDIR:Q} | | 22 | CONFIGURE_ENV+= MKDIR_P=${MKDIR:Q} |
22 | | | 23 | |
23 | PKGCONFIG_OVERRIDE+= Misc/python.pc.in | | 24 | PKGCONFIG_OVERRIDE+= Misc/python.pc.in |
24 | | | 25 | |
25 | LDFLAGS+= -L${WRKSRC} | | 26 | LDFLAGS+= -L${WRKSRC} |
26 | | | 27 | |
27 | # $RANDOM usage there is fine | | 28 | # $RANDOM usage there is fine |
28 | CHECK_PORTABILITY_SKIP= Tools/faqwiz/move-faqwiz.sh | | 29 | CHECK_PORTABILITY_SKIP= Tools/faqwiz/move-faqwiz.sh |
29 | | | 30 | |
30 | USE_LANGUAGES= c c++ | | 31 | USE_LANGUAGES= c c++ |
31 | | | 32 | |
32 | PTHREAD_OPTS+= require | | 33 | PTHREAD_OPTS+= require |
33 | .include "../../mk/pthread.buildlink3.mk" | | 34 | .include "../../mk/pthread.buildlink3.mk" |
34 | .if ${PTHREAD_TYPE} == "pth" | | 35 | .if ${PTHREAD_TYPE} == "pth" |
35 | CONFIGURE_ARGS+= --with-pth | | 36 | CONFIGURE_ARGS+= --with-pth |
36 | .endif | | 37 | .endif |
37 | | | 38 | |
38 | .include "../../mk/compiler.mk" | | 39 | .include "../../mk/compiler.mk" |
39 | | | 40 | |
40 | # Clang needs -fwrapv | | 41 | # Clang needs -fwrapv |
41 | .if !empty(PKGSRC_COMPILER:Mclang) | | 42 | .if !empty(PKGSRC_COMPILER:Mclang) |
42 | CFLAGS+= -fwrapv | | 43 | CFLAGS+= -fwrapv |
43 | .endif | | 44 | .endif |
44 | | | 45 | |
45 | .include "../../mk/bsd.prefs.mk" | | 46 | .include "../../mk/bsd.prefs.mk" |
46 | | | 47 | |
47 | # fdatasync() | | 48 | # fdatasync() |
48 | LIBS.SunOS+= -lrt | | 49 | LIBS.SunOS+= -lrt |
49 | | | 50 | |
50 | PY_VER_SUFFIX= 2.7 | | 51 | PY_VER_SUFFIX= 2.7 |
51 | | | 52 | |
52 | PLIST_SRC= ${.CURDIR}/../../lang/python27/PLIST.common | | 53 | PLIST_SRC= ${.CURDIR}/../../lang/python27/PLIST.common |
53 | .if exists(${.CURDIR}/../../lang/python27/PLIST.${OPSYS}) | | 54 | .if exists(${.CURDIR}/../../lang/python27/PLIST.${OPSYS}) |
54 | PLIST_SRC+= ${.CURDIR}/../../lang/python27/PLIST.${OPSYS} | | 55 | PLIST_SRC+= ${.CURDIR}/../../lang/python27/PLIST.${OPSYS} |
55 | .endif | | 56 | .endif |
56 | PLIST_SRC+= ${.CURDIR}/../../lang/python27/PLIST.common_end | | 57 | PLIST_SRC+= ${.CURDIR}/../../lang/python27/PLIST.common_end |
57 | | | 58 | |
58 | .if ${OPSYS} == "NetBSD" | | 59 | .if ${OPSYS} == "NetBSD" |
59 | . if !defined(USE_DESTDIR) || empty(USE_DESTDIR:M[Yy][Ee][Ss]) | | 60 | . if !defined(USE_DESTDIR) || empty(USE_DESTDIR:M[Yy][Ee][Ss]) |
60 | PRIVILEGED_STAGES+= clean | | 61 | PRIVILEGED_STAGES+= clean |
61 | . endif | | 62 | . endif |
62 | # XXX work around a botched autoconf check which ignores libintl | | 63 | # XXX work around a botched autoconf check which ignores libintl |
63 | CONFIGURE_ENV+= ac_cv_func_bind_textdomain_codeset=yes | | 64 | CONFIGURE_ENV+= ac_cv_func_bind_textdomain_codeset=yes |
64 | .endif | | 65 | .endif |
65 | | | 66 | |
66 | .if ${OPSYS} == "Cygwin" || ${OPSYS} == "Darwin" || ${OPSYS} == "Interix" | | 67 | .if ${OPSYS} == "Cygwin" || ${OPSYS} == "Darwin" || ${OPSYS} == "Interix" |
67 | PY_PLATNAME= ${LOWER_OPSYS} | | 68 | PY_PLATNAME= ${LOWER_OPSYS} |
68 | USE_TOOLS+= gmake | | 69 | USE_TOOLS+= gmake |
69 | .elif ${OPSYS} == "IRIX" | | 70 | .elif ${OPSYS} == "IRIX" |
70 | PY_PLATNAME= ${LOWER_OPSYS:C/\..*//} | | 71 | PY_PLATNAME= ${LOWER_OPSYS:C/\..*//} |
71 | .elif ${OPSYS} == "SunOS" | | 72 | .elif ${OPSYS} == "SunOS" |
72 | PY_PLATNAME= sunos${OS_VERSION:C/\..*//} | | 73 | PY_PLATNAME= sunos${OS_VERSION:C/\..*//} |
73 | .elif ${OPSYS} == "HPUX" | | 74 | .elif ${OPSYS} == "HPUX" |
74 | PY_PLATNAME= hp-ux11 | | 75 | PY_PLATNAME= hp-ux11 |
75 | .elif ${OPSYS} == "Linux" | | 76 | .elif ${OPSYS} == "Linux" |
76 | PY_PLATNAME= linux2 | | 77 | PY_PLATNAME= linux2 |
77 | .else | | 78 | .else |
78 | PY_PLATNAME= ${LOWER_OPSYS}${OS_VERSION:C/\..*//} | | 79 | PY_PLATNAME= ${LOWER_OPSYS}${OS_VERSION:C/\..*//} |
79 | .endif | | 80 | .endif |
80 | PLIST_SUBST+= PY_PLATNAME=${PY_PLATNAME:Q} | | 81 | PLIST_SUBST+= PY_PLATNAME=${PY_PLATNAME:Q} |
81 | | | 82 | |
82 | .if (${MACHINE_ARCH} == "alpha") || (${MACHINE_ARCH} == "amd64") || \ | | 83 | .if (${MACHINE_ARCH} == "alpha") || (${MACHINE_ARCH} == "amd64") || \ |
83 | (${MACHINE_ARCH} == "sparc64") || (${MACHINE_ARCH} == "x86_64") || \ | | 84 | (${MACHINE_ARCH} == "sparc64") || (${MACHINE_ARCH} == "x86_64") || \ |
84 | (${MACHINE_ARCH} == "powerpc64") || (defined(ABI) && ${ABI} == "64") | | 85 | (${MACHINE_ARCH} == "powerpc64") || (defined(ABI) && ${ABI} == "64") |
85 | IS_64BIT_PLATFORM?= yes | | 86 | IS_64BIT_PLATFORM?= yes |
86 | .else | | 87 | .else |
87 | IS_64BIT_PLATFORM?= no | | 88 | IS_64BIT_PLATFORM?= no |
88 | .endif | | 89 | .endif |
89 | | | 90 | |
90 | # the dl module isn't built for 64 bit archs | | 91 | # the dl module isn't built for 64 bit archs |
91 | PLIST_VARS+= dl | | 92 | PLIST_VARS+= dl |
92 | .if empty(IS_64BIT_PLATFORM:M[yY][eE][sS]) | | 93 | .if empty(IS_64BIT_PLATFORM:M[yY][eE][sS]) |
93 | PLIST.dl= yes | | 94 | PLIST.dl= yes |
94 | .endif | | 95 | .endif |
95 | | | 96 | |
96 | # builds additional modules if OpenSSL < 0.9.8 | | 97 | # builds additional modules if OpenSSL < 0.9.8 |
97 | PLIST_VARS+= openssl097 | | 98 | PLIST_VARS+= openssl097 |
98 | CHECK_BUILTIN.openssl:= yes | | 99 | CHECK_BUILTIN.openssl:= yes |
99 | .include "../../security/openssl/builtin.mk" | | 100 | .include "../../security/openssl/builtin.mk" |
100 | CHECK_BUILTIN.openssl:= no | | 101 | CHECK_BUILTIN.openssl:= no |
101 | .if !empty(USE_BUILTIN.openssl:M[yY][eE][sS]) && \ | | 102 | .if !empty(USE_BUILTIN.openssl:M[yY][eE][sS]) && \ |
102 | !empty(BUILTIN_PKG.openssl:Mopenssl-0.9.[67]*) | | 103 | !empty(BUILTIN_PKG.openssl:Mopenssl-0.9.[67]*) |
103 | PLIST.openssl097= yes | | 104 | PLIST.openssl097= yes |
104 | .endif | | 105 | .endif |
105 | | | 106 | |
106 | # setup.py causes some modules to be built if the platform is *not* 64bit. | | 107 | # setup.py causes some modules to be built if the platform is *not* 64bit. |
107 | PLIST_VARS+= extra-so | | 108 | PLIST_VARS+= extra-so |
108 | .if !empty(IS_64BIT_PLATFORM:M[nN][oO]) | | 109 | .if !empty(IS_64BIT_PLATFORM:M[nN][oO]) |
109 | PLIST.extra-so= yes | | 110 | PLIST.extra-so= yes |
110 | .endif | | 111 | .endif |
111 | | | 112 | |
112 | # Make sure python modules can link correctly | | 113 | # Make sure python modules can link correctly |
113 | .if ${OPSYS} == "Darwin" | | 114 | .if ${OPSYS} == "Darwin" |
114 | INSTALL_UNSTRIPPED= yes | | 115 | INSTALL_UNSTRIPPED= yes |
115 | .endif | | 116 | .endif |
116 | | | 117 | |
117 | # For Xcode 5 we need to search the SDK path for headers, otherwise certain | | 118 | # For Xcode 5 we need to search the SDK path for headers, otherwise certain |
118 | # modules will not be built. | | 119 | # modules will not be built. |
119 | .if ${OPSYS} == "Darwin" && exists(${OSX_SDK_PATH}/usr/include) | | 120 | .if ${OPSYS} == "Darwin" && exists(${OSX_SDK_PATH}/usr/include) |
120 | CFLAGS+= -I${OSX_SDK_PATH}/usr/include | | 121 | CFLAGS+= -I${OSX_SDK_PATH}/usr/include |
121 | .endif | | 122 | .endif |
122 | | | 123 | |
123 | PLIST_VARS+= dll nis no-nis | | 124 | PLIST_VARS+= dll nis no-nis |
124 | .if ${OPSYS} == "IRIX" | | 125 | .if ${OPSYS} == "IRIX" |
125 | . if ${ABI} == "64" | | 126 | . if ${ABI} == "64" |
126 | PLIST.no-nis= yes | | 127 | PLIST.no-nis= yes |
127 | . else | | 128 | . else |
128 | PLIST.nis= yes | | 129 | PLIST.nis= yes |
129 | . endif | | 130 | . endif |
130 | .else | | 131 | .else |
131 | PLIST.dll= yes | | 132 | PLIST.dll= yes |
132 | . if ${OPSYS} == "MirBSD" | | 133 | . if ${OPSYS} == "MirBSD" |
133 | # neither nis nor no-nis | | 134 | # neither nis nor no-nis |
134 | . elif ${OPSYS} != "NetBSD" || exists(/usr/bin/ypcat) | | 135 | . elif ${OPSYS} != "NetBSD" || exists(/usr/bin/ypcat) |
135 | PLIST.nis= yes | | 136 | PLIST.nis= yes |
136 | . else | | 137 | . else |
137 | PLIST.no-nis= yes | | 138 | PLIST.no-nis= yes |
138 | . endif | | 139 | . endif |
139 | .endif | | 140 | .endif |
140 | | | 141 | |
141 | .include "../../mk/bdb.buildlink3.mk" | | 142 | .include "../../mk/bdb.buildlink3.mk" |
142 | MAKE_ENV+= PY_BDB_TYPE=${BDB_TYPE} | | 143 | MAKE_ENV+= PY_BDB_TYPE=${BDB_TYPE} |
143 | .if empty(BDB_LIBS) | | 144 | .if empty(BDB_LIBS) |
144 | BUILDLINK_TRANSFORM+= rm:-ldb | | 145 | BUILDLINK_TRANSFORM+= rm:-ldb |
145 | .endif | | 146 | .endif |
146 | CFLAGS+= -DHAVE_DB_185_H | | 147 | CFLAGS+= -DHAVE_DB_185_H |
147 | | | 148 | |
148 | .if ${OPSYS} == "OSF1" | | 149 | .if ${OPSYS} == "OSF1" |
149 | # configure complains about buggy getaddrinfo() | | 150 | # configure complains about buggy getaddrinfo() |
150 | CONFIGURE_ARGS+= --disable-ipv6 | | 151 | CONFIGURE_ARGS+= --disable-ipv6 |
151 | .endif | | 152 | .endif |
152 | | | 153 | |
153 | .if defined(BUILDLINK_TRANSFORM) | | 154 | .if defined(BUILDLINK_TRANSFORM) |
154 | MAKE_ENV+= PY_BDB_TRANSFORM=${BUILDLINK_TRANSFORM:Q} | | 155 | MAKE_ENV+= PY_BDB_TRANSFORM=${BUILDLINK_TRANSFORM:Q} |
155 | .endif | | 156 | .endif |
156 | | | 157 | |
157 | PLIST_SUBST+= PY_VER_SUFFIX=${PY_VER_SUFFIX:Q} | | 158 | PLIST_SUBST+= PY_VER_SUFFIX=${PY_VER_SUFFIX:Q} |
158 | | | 159 | |
159 | TEST_TARGET= test | | 160 | TEST_TARGET= test |
160 | INSTALL_TARGET= altinstall | | 161 | INSTALL_TARGET= altinstall |
161 | | | 162 | |
162 | REPLACE_INTERPRETER+= py27 | | 163 | REPLACE_INTERPRETER+= py27 |
163 | REPLACE.py27.old= .*python[^ ]* | | 164 | REPLACE.py27.old= .*python[^ ]* |
164 | REPLACE.py27.new= ${PREFIX}/bin/python${PY_VER_SUFFIX} | | 165 | REPLACE.py27.new= ${PREFIX}/bin/python${PY_VER_SUFFIX} |
165 | REPLACE_FILES.py27= Lib/*.py Lib/*/*.py Lib/*/*/*.py | | 166 | REPLACE_FILES.py27= Lib/*.py Lib/*/*.py Lib/*/*/*.py |
166 | REPLACE_FILES.py27+= Lib/*/*/*/*.py | | 167 | REPLACE_FILES.py27+= Lib/*/*/*/*.py |
167 | | | 168 | |
168 | SUBST_CLASSES+= findlib | | 169 | SUBST_CLASSES+= findlib |
169 | SUBST_MESSAGE.findlib= Fixing find_library_file on Darwin. | | 170 | SUBST_MESSAGE.findlib= Fixing find_library_file on Darwin. |
170 | SUBST_STAGE.findlib= pre-configure | | 171 | SUBST_STAGE.findlib= pre-configure |
171 | SUBST_FILES.findlib= Lib/distutils/unixccompiler.py | | 172 | SUBST_FILES.findlib= Lib/distutils/unixccompiler.py |
172 | SUBST_SED.findlib= -e 's,/usr/local,${PREFIX},' | | 173 | SUBST_SED.findlib= -e 's,/usr/local,${PREFIX},' |
173 | | | 174 | |
174 | post-extract: | | 175 | post-extract: |
175 | ${MV} ${WRKSRC}/Lib/smtpd.py ${WRKSRC}/Lib/smtpd${PY_VER_SUFFIX}.py | | 176 | ${MV} ${WRKSRC}/Lib/smtpd.py ${WRKSRC}/Lib/smtpd${PY_VER_SUFFIX}.py |
176 | ${MV} ${WRKSRC}/Tools/scripts/pydoc ${WRKSRC}/Tools/scripts/pydoc${PY_VER_SUFFIX} | | 177 | ${MV} ${WRKSRC}/Tools/scripts/pydoc ${WRKSRC}/Tools/scripts/pydoc${PY_VER_SUFFIX} |
177 | ${MV} ${WRKSRC}/Tools/scripts/2to3 ${WRKSRC}/Tools/scripts/2to3-${PY_VER_SUFFIX} | | 178 | ${MV} ${WRKSRC}/Tools/scripts/2to3 ${WRKSRC}/Tools/scripts/2to3-${PY_VER_SUFFIX} |
178 | | | 179 | |
179 | .if ${OPSYS} == "HPUX" | | 180 | .if ${OPSYS} == "HPUX" |
180 | post-install: | | 181 | post-install: |
181 | ${LN} -fs ${DESTDIR}${PREFIX}/lib/libpython2.7.sl \ | | 182 | ${LN} -fs ${DESTDIR}${PREFIX}/lib/libpython2.7.sl \ |
182 | ${DESTDIR}${PREFIX}/lib/libpython2.7.sl.1.0 | | 183 | ${DESTDIR}${PREFIX}/lib/libpython2.7.sl.1.0 |
183 | .endif | | 184 | .endif |
184 | | | 185 | |
185 | BUILDLINK_DEPMETHOD.readline= build | | 186 | BUILDLINK_DEPMETHOD.readline= build |
186 | | | 187 | |
187 | .include "../../archivers/bzip2/buildlink3.mk" | | 188 | .include "../../archivers/bzip2/buildlink3.mk" |
188 | .include "../../devel/gettext-lib/buildlink3.mk" | | 189 | .include "../../devel/gettext-lib/buildlink3.mk" |
189 | .include "../../devel/libffi/buildlink3.mk" | | 190 | .include "../../devel/libffi/buildlink3.mk" |
190 | .include "../../devel/readline/buildlink3.mk" | | 191 | .include "../../devel/readline/buildlink3.mk" |
191 | .include "../../devel/zlib/buildlink3.mk" | | 192 | .include "../../devel/zlib/buildlink3.mk" |
192 | .include "../../security/openssl/buildlink3.mk" | | 193 | .include "../../security/openssl/buildlink3.mk" |
193 | .include "../../mk/dlopen.buildlink3.mk" | | 194 | .include "../../mk/dlopen.buildlink3.mk" |
194 | .include "../../mk/bsd.pkg.mk" | | 195 | .include "../../mk/bsd.pkg.mk" |