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