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