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