| @@ -1,173 +1,174 @@ | | | @@ -1,173 +1,174 @@ |
1 | # $NetBSD: Makefile,v 1.33 2011/04/23 17:31:40 tron Exp $ | | 1 | # $NetBSD: Makefile,v 1.34 2011/05/15 10:07:20 hans Exp $ |
2 | | | 2 | |
3 | .include "dist.mk" | | 3 | .include "dist.mk" |
4 | | | 4 | |
5 | PKGNAME= python25-${PY_DISTVERSION} | | 5 | PKGNAME= python25-${PY_DISTVERSION} |
6 | PKGREVISION= 5 | | 6 | PKGREVISION= 5 |
7 | CATEGORIES= lang python | | 7 | CATEGORIES= lang python |
8 | | | 8 | |
9 | MAINTAINER= pkgsrc-users@NetBSD.org | | 9 | MAINTAINER= pkgsrc-users@NetBSD.org |
10 | HOMEPAGE= http://www.python.org/ | | 10 | HOMEPAGE= http://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 | PKG_DESTDIR_SUPPORT= user-destdir | | 14 | PKG_DESTDIR_SUPPORT= user-destdir |
15 | | | 15 | |
16 | CONFLICTS+= python-[0-9]* | | 16 | CONFLICTS+= python-[0-9]* |
17 | | | 17 | |
18 | GNU_CONFIGURE= yes | | 18 | GNU_CONFIGURE= yes |
19 | CONFIGURE_ARGS+= --with-threads | | 19 | CONFIGURE_ARGS+= --with-threads |
20 | CONFIGURE_ARGS+= --enable-shared | | 20 | CONFIGURE_ARGS+= --enable-shared |
21 | CONFIGURE_ARGS+= OPT=${CFLAGS:M*:Q} | | 21 | CONFIGURE_ARGS+= OPT=${CFLAGS:M*:Q} |
22 | CONFIGURE_ARGS+= --with-system-ffi | | 22 | CONFIGURE_ARGS+= --with-system-ffi |
23 | | | 23 | |
24 | LDFLAGS+= -L${WRKSRC} | | 24 | LDFLAGS+= -L${WRKSRC} |
25 | | | 25 | |
26 | USE_LANGUAGES= c c++ | | 26 | USE_LANGUAGES= c c++ |
27 | | | 27 | |
28 | PTHREAD_OPTS+= require | | 28 | PTHREAD_OPTS+= require |
29 | .include "../../mk/pthread.buildlink3.mk" | | 29 | .include "../../mk/pthread.buildlink3.mk" |
30 | .if ${PTHREAD_TYPE} == "pth" | | 30 | .if ${PTHREAD_TYPE} == "pth" |
31 | CONFIGURE_ARGS+= --with-pth | | 31 | CONFIGURE_ARGS+= --with-pth |
32 | .endif | | 32 | .endif |
33 | | | 33 | |
34 | .include "../../mk/bsd.prefs.mk" | | 34 | .include "../../mk/bsd.prefs.mk" |
35 | | | 35 | |
36 | # fdatasync() | | 36 | # fdatasync() |
37 | LIBS.SunOS+= -lrt | | 37 | LIBS.SunOS+= -lrt |
38 | | | 38 | |
39 | PY_VER_SUFFIX= 2.5 | | 39 | PY_VER_SUFFIX= 2.5 |
40 | | | 40 | |
41 | PLIST_SRC= ${.CURDIR}/../../lang/python25/PLIST.common | | 41 | PLIST_SRC= ${.CURDIR}/../../lang/python25/PLIST.common |
42 | .if exists(${.CURDIR}/../../lang/python25/PLIST.${OPSYS}) | | 42 | .if exists(${.CURDIR}/../../lang/python25/PLIST.${OPSYS}) |
43 | PLIST_SRC+= ${.CURDIR}/../../lang/python25/PLIST.${OPSYS} | | 43 | PLIST_SRC+= ${.CURDIR}/../../lang/python25/PLIST.${OPSYS} |
44 | .endif | | 44 | .endif |
45 | | | 45 | |
46 | .if ${OPSYS} == "NetBSD" | | 46 | .if ${OPSYS} == "NetBSD" |
47 | PRIVILEGED_STAGES+= clean | | 47 | PRIVILEGED_STAGES+= clean |
48 | # XXX work around a botched autoconf check which ignores libintl | | 48 | # XXX work around a botched autoconf check which ignores libintl |
49 | CONFIGURE_ENV+= ac_cv_func_bind_textdomain_codeset=yes | | 49 | CONFIGURE_ENV+= ac_cv_func_bind_textdomain_codeset=yes |
50 | .endif | | 50 | .endif |
51 | | | 51 | |
52 | .if ${OPSYS} == "Darwin" || ${OPSYS} == "Interix" | | 52 | .if ${OPSYS} == "Darwin" || ${OPSYS} == "Interix" |
53 | PY_PLATNAME= ${LOWER_OPSYS} | | 53 | PY_PLATNAME= ${LOWER_OPSYS} |
54 | USE_TOOLS+= gmake | | 54 | USE_TOOLS+= gmake |
55 | .elif ${OPSYS} == "IRIX" | | 55 | .elif ${OPSYS} == "IRIX" |
56 | PY_PLATNAME= ${LOWER_OPSYS:C/\..*//} | | 56 | PY_PLATNAME= ${LOWER_OPSYS:C/\..*//} |
57 | .elif ${OPSYS} == "SunOS" | | 57 | .elif ${OPSYS} == "SunOS" |
58 | PY_PLATNAME= sunos${OS_VERSION:C/\..*//} | | 58 | PY_PLATNAME= sunos${OS_VERSION:C/\..*//} |
| | | 59 | CONFIGURE_ENV+= ac_cv_header_netpacket_packet_h=no |
59 | .elif ${OPSYS} == "HPUX" | | 60 | .elif ${OPSYS} == "HPUX" |
60 | PY_PLATNAME= hp-ux11 | | 61 | PY_PLATNAME= hp-ux11 |
61 | .else | | 62 | .else |
62 | PY_PLATNAME= ${LOWER_OPSYS}${OS_VERSION:C/\..*//} | | 63 | PY_PLATNAME= ${LOWER_OPSYS}${OS_VERSION:C/\..*//} |
63 | .endif | | 64 | .endif |
64 | PLIST_SUBST+= PY_PLATNAME=${PY_PLATNAME:Q} | | 65 | PLIST_SUBST+= PY_PLATNAME=${PY_PLATNAME:Q} |
65 | | | 66 | |
66 | .if (${MACHINE_ARCH} == "alpha") || (${MACHINE_ARCH} == "amd64") || \ | | 67 | .if (${MACHINE_ARCH} == "alpha") || (${MACHINE_ARCH} == "amd64") || \ |
67 | (${MACHINE_ARCH} == "sparc64") || (${MACHINE_ARCH} == "x86_64") || \ | | 68 | (${MACHINE_ARCH} == "sparc64") || (${MACHINE_ARCH} == "x86_64") || \ |
68 | (defined(ABI) && ${ABI} == "64") | | 69 | (defined(ABI) && ${ABI} == "64") |
69 | IS_64BIT_PLATFORM?= yes | | 70 | IS_64BIT_PLATFORM?= yes |
70 | .else | | 71 | .else |
71 | IS_64BIT_PLATFORM?= no | | 72 | IS_64BIT_PLATFORM?= no |
72 | .endif | | 73 | .endif |
73 | | | 74 | |
74 | # the dl module isn't built for 64 bit archs | | 75 | # the dl module isn't built for 64 bit archs |
75 | PLIST_VARS+= dl | | 76 | PLIST_VARS+= dl |
76 | .if empty(IS_64BIT_PLATFORM:M[yY][eE][sS]) | | 77 | .if empty(IS_64BIT_PLATFORM:M[yY][eE][sS]) |
77 | PLIST.dl= yes | | 78 | PLIST.dl= yes |
78 | .endif | | 79 | .endif |
79 | | | 80 | |
80 | # builds additional modules if OpenSSL < 0.9.8 | | 81 | # builds additional modules if OpenSSL < 0.9.8 |
81 | PLIST_VARS+= openssl097 | | 82 | PLIST_VARS+= openssl097 |
82 | CHECK_BUILTIN.openssl:= no | | 83 | CHECK_BUILTIN.openssl:= no |
83 | .include "../../security/openssl/builtin.mk" | | 84 | .include "../../security/openssl/builtin.mk" |
84 | CHECK_BUILTIN.openssl:= yes | | 85 | CHECK_BUILTIN.openssl:= yes |
85 | .if !empty(USE_BUILTIN.openssl:M[yY][eE][sS]) && \ | | 86 | .if !empty(USE_BUILTIN.openssl:M[yY][eE][sS]) && \ |
86 | !empty(BUILTIN_PKG.openssl:Mopenssl-0.9.[67]*) | | 87 | !empty(BUILTIN_PKG.openssl:Mopenssl-0.9.[67]*) |
87 | PLIST.openssl097= yes | | 88 | PLIST.openssl097= yes |
88 | .endif | | 89 | .endif |
89 | | | 90 | |
90 | # setup.py causes some modules to be built if the platform is *not* 64bit. | | 91 | # setup.py causes some modules to be built if the platform is *not* 64bit. |
91 | PLIST_VARS+= extra-so | | 92 | PLIST_VARS+= extra-so |
92 | .if !empty(IS_64BIT_PLATFORM:M[nN][oO]) | | 93 | .if !empty(IS_64BIT_PLATFORM:M[nN][oO]) |
93 | PLIST.extra-so= yes | | 94 | PLIST.extra-so= yes |
94 | .endif | | 95 | .endif |
95 | | | 96 | |
96 | # ossaudiodev is only available on x86 for the following platforms | | 97 | # ossaudiodev is only available on x86 for the following platforms |
97 | PLIST_VARS+= oss | | 98 | PLIST_VARS+= oss |
98 | .if (${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64") && \ | | 99 | .if (${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64") && \ |
99 | (${PY_PLATNAME} == "linux2" || ${OPSYS} == "FreeBSD") | | 100 | (${PY_PLATNAME} == "linux2" || ${OPSYS} == "FreeBSD") |
100 | PLIST.oss= yes | | 101 | PLIST.oss= yes |
101 | .endif | | 102 | .endif |
102 | | | 103 | |
103 | # Make sure python modules can link correctly | | 104 | # Make sure python modules can link correctly |
104 | .if ${OPSYS} == "Darwin" | | 105 | .if ${OPSYS} == "Darwin" |
105 | INSTALL_UNSTRIPPED= yes | | 106 | INSTALL_UNSTRIPPED= yes |
106 | | | 107 | |
107 | . if empty(OS_VERSION:M[1-9].*) | | 108 | . if empty(OS_VERSION:M[1-9].*) |
108 | CFLAGS+= -D_DARWIN_C_SOURCE | | 109 | CFLAGS+= -D_DARWIN_C_SOURCE |
109 | . endif | | 110 | . endif |
110 | .endif | | 111 | .endif |
111 | | | 112 | |
112 | PLIST_VARS+= bsddb dll nis no-nis | | 113 | PLIST_VARS+= bsddb dll nis no-nis |
113 | .if ${OPSYS} == "IRIX" | | 114 | .if ${OPSYS} == "IRIX" |
114 | . if ${ABI} == "64" | | 115 | . if ${ABI} == "64" |
115 | PLIST.no-nis= yes | | 116 | PLIST.no-nis= yes |
116 | . else | | 117 | . else |
117 | PLIST.nis= yes | | 118 | PLIST.nis= yes |
118 | . endif | | 119 | . endif |
119 | .else | | 120 | .else |
120 | . include "../../mk/bdb.buildlink3.mk" | | 121 | . include "../../mk/bdb.buildlink3.mk" |
121 | MAKE_ENV+= PY_BDB_TYPE=${BDB_TYPE} | | 122 | MAKE_ENV+= PY_BDB_TYPE=${BDB_TYPE} |
122 | MAKE_ENV+= PY_BDB_INCDIRS=${BUILDLINK_INCDIRS.${BDB_TYPE}:S,^,${BDBBASE}/,:Q} | | 123 | MAKE_ENV+= PY_BDB_INCDIRS=${BUILDLINK_INCDIRS.${BDB_TYPE}:S,^,${BDBBASE}/,:Q} |
123 | MAKE_ENV+= PY_BDB_LIBDIRS=${BDBBASE}/lib | | 124 | MAKE_ENV+= PY_BDB_LIBDIRS=${BDBBASE}/lib |
124 | PLIST.bsddb= yes | | 125 | PLIST.bsddb= yes |
125 | PLIST.dll= yes | | 126 | PLIST.dll= yes |
126 | . if ${OPSYS} != "NetBSD" || exists(/usr/bin/ypcat) | | 127 | . if ${OPSYS} != "NetBSD" || exists(/usr/bin/ypcat) |
127 | PLIST.nis= yes | | 128 | PLIST.nis= yes |
128 | . else | | 129 | . else |
129 | PLIST.no-nis= yes | | 130 | PLIST.no-nis= yes |
130 | . endif | | 131 | . endif |
131 | .endif | | 132 | .endif |
132 | | | 133 | |
133 | .if ${OPSYS} == "OSF1" | | 134 | .if ${OPSYS} == "OSF1" |
134 | # configure complains about buggy getaddrinfo() | | 135 | # configure complains about buggy getaddrinfo() |
135 | CONFIGURE_ARGS+= --disable-ipv6 | | 136 | CONFIGURE_ARGS+= --disable-ipv6 |
136 | .endif | | 137 | .endif |
137 | | | 138 | |
138 | .if defined(BUILDLINK_TRANSFORM) | | 139 | .if defined(BUILDLINK_TRANSFORM) |
139 | MAKE_ENV+= PY_BDB_TRANSFORM=${BUILDLINK_TRANSFORM:Q} | | 140 | MAKE_ENV+= PY_BDB_TRANSFORM=${BUILDLINK_TRANSFORM:Q} |
140 | .endif | | 141 | .endif |
141 | | | 142 | |
142 | PLIST_SUBST+= PY_VER_SUFFIX=${PY_VER_SUFFIX:Q} | | 143 | PLIST_SUBST+= PY_VER_SUFFIX=${PY_VER_SUFFIX:Q} |
143 | | | 144 | |
144 | TEST_TARGET= test | | 145 | TEST_TARGET= test |
145 | INSTALL_TARGET= altinstall | | 146 | INSTALL_TARGET= altinstall |
146 | | | 147 | |
147 | REPLACE_INTERPRETER+= py25 | | 148 | REPLACE_INTERPRETER+= py25 |
148 | REPLACE.py25.old= .*python[^ ]* | | 149 | REPLACE.py25.old= .*python[^ ]* |
149 | REPLACE.py25.new= ${PREFIX}/bin/python${PY_VER_SUFFIX} | | 150 | REPLACE.py25.new= ${PREFIX}/bin/python${PY_VER_SUFFIX} |
150 | REPLACE_FILES.py25= Lib/*.py Lib/*/*.py Lib/*/*/*.py | | 151 | REPLACE_FILES.py25= Lib/*.py Lib/*/*.py Lib/*/*/*.py |
151 | | | 152 | |
152 | post-extract: | | 153 | post-extract: |
153 | ${MV} ${WRKSRC}/Lib/smtpd.py ${WRKSRC}/Lib/smtpd${PY_VER_SUFFIX}.py | | 154 | ${MV} ${WRKSRC}/Lib/smtpd.py ${WRKSRC}/Lib/smtpd${PY_VER_SUFFIX}.py |
154 | ${MV} ${WRKSRC}/Tools/scripts/pydoc ${WRKSRC}/Tools/scripts/pydoc${PY_VER_SUFFIX} | | 155 | ${MV} ${WRKSRC}/Tools/scripts/pydoc ${WRKSRC}/Tools/scripts/pydoc${PY_VER_SUFFIX} |
155 | | | 156 | |
156 | .if ${OPSYS} == "HPUX" | | 157 | .if ${OPSYS} == "HPUX" |
157 | post-install: | | 158 | post-install: |
158 | ${LN} -fs ${DESTDIR}${PREFIX}/lib/libpython2.5.sl \ | | 159 | ${LN} -fs ${DESTDIR}${PREFIX}/lib/libpython2.5.sl \ |
159 | ${DESTDIR}${PREFIX}/lib/libpython2.5.sl.1.0 | | 160 | ${DESTDIR}${PREFIX}/lib/libpython2.5.sl.1.0 |
160 | .endif | | 161 | .endif |
161 | | | 162 | |
162 | USE_GNU_READLINE= yes | | 163 | USE_GNU_READLINE= yes |
163 | BUILDLINK_DEPMETHOD.readline= build | | 164 | BUILDLINK_DEPMETHOD.readline= build |
164 | | | 165 | |
165 | .include "../../archivers/bzip2/buildlink3.mk" | | 166 | .include "../../archivers/bzip2/buildlink3.mk" |
166 | .include "../../devel/gettext-lib/buildlink3.mk" | | 167 | .include "../../devel/gettext-lib/buildlink3.mk" |
167 | .include "../../devel/libffi/buildlink3.mk" | | 168 | .include "../../devel/libffi/buildlink3.mk" |
168 | .include "../../devel/readline/buildlink3.mk" | | 169 | .include "../../devel/readline/buildlink3.mk" |
169 | .include "../../devel/zlib/buildlink3.mk" | | 170 | .include "../../devel/zlib/buildlink3.mk" |
170 | .include "../../security/openssl/buildlink3.mk" | | 171 | .include "../../security/openssl/buildlink3.mk" |
171 | .include "../../mk/dlopen.buildlink3.mk" | | 172 | .include "../../mk/dlopen.buildlink3.mk" |
172 | .include "../../mk/oss.buildlink3.mk" | | 173 | .include "../../mk/oss.buildlink3.mk" |
173 | .include "../../mk/bsd.pkg.mk" | | 174 | .include "../../mk/bsd.pkg.mk" |