Sat Apr 13 12:55:53 2013 UTC ()
Cygwin also require gmake to build.


(obache)
diff -r1.23 -r1.24 pkgsrc/lang/python27/Makefile

cvs diff -r1.23 -r1.24 pkgsrc/lang/python27/Makefile (switch to unified diff)

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