Fixup fromcvs/togit conversion
[minix-pkgsrc.git] / lang / python33 / Makefile
blobeb310389230943d31d551cb50ad52767db62353a
1 # $NetBSD: Makefile,v 1.5 2012/12/25 23:48:47 sbd Exp $
3 .include "dist.mk"
5 PKGNAME= python33-${PY_DISTVERSION}
6 PKGREVISION= 2
7 CATEGORIES= lang python
9 MAINTAINER= pkgsrc-users@NetBSD.org
10 HOMEPAGE= http://www.python.org/
11 COMMENT= Interpreted, interactive, object-oriented programming language
12 LICENSE= python-software-foundation
14 CONFLICTS+= python-[0-9]*
16 GNU_CONFIGURE= yes
17 CONFIGURE_ENV+= ac_cv_path_mkdir=${TOOLS_PATH.mkdir:Q}
18 CONFIGURE_ARGS+= --with-threads
19 CONFIGURE_ARGS+= --enable-shared
20 CONFIGURE_ARGS+= OPT=${CFLAGS:M*:Q}
21 CONFIGURE_ARGS+= --with-system-ffi
22 CONFIGURE_ARGS+= --without-pymalloc
24 USE_LANGUAGES= c c++
26 PTHREAD_OPTS+= require
27 .include "../../mk/pthread.buildlink3.mk"
29 .include "../../mk/bsd.prefs.mk"
31 # fdatasync()
32 LIBS.SunOS+= -lrt
34 PY_VER_SUFFIX= 3.3
36 .if ${OPSYS} == "Darwin" || ${OPSYS} == "Interix"
37 PY_PLATNAME= ${LOWER_OPSYS}
38 USE_TOOLS+= gmake
39 .elif ${OPSYS} == "IRIX"
40 PY_PLATNAME= ${LOWER_OPSYS:C/\..*//}
41 .elif ${OPSYS} == "SunOS"
42 PY_PLATNAME= sunos${OS_VERSION:C/\..*//}
43 .elif ${OPSYS} == "HPUX"
44 PY_PLATNAME= hp-ux11
45 .elif ${OPSYS} == "Linux"
46 PY_PLATNAME= linux
47 .else
48 PY_PLATNAME= ${LOWER_OPSYS}${OS_VERSION:C/\..*//}
49 .endif
50 PLIST_SUBST+= PY_PLATNAME=${PY_PLATNAME:Q}
52 # ossaudiodev is only available on x86 for the following platforms
53 PLIST_VARS+= oss
54 .if (${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64") && \
55 (${PY_PLATNAME} == "linux" || ${OPSYS} == "FreeBSD")
56 PLIST.oss= yes
57 .endif
59 # Make sure python modules can link correctly
60 .if ${OPSYS} == "Darwin"
61 INSTALL_UNSTRIPPED= yes
62 .endif
64 PLIST_VARS+= bsddb dll nis no-nis
65 .if ${OPSYS} == "IRIX"
66 . if ${ABI} == "64"
67 PLIST.no-nis= yes
68 . else
69 PLIST.nis= yes
70 . endif
71 .else
72 . include "../../mk/bdb.buildlink3.mk"
73 MAKE_ENV+= PY_BDB_TYPE=${BDB_TYPE}
74 MAKE_ENV+= PY_BDB_INCDIRS=${BUILDLINK_INCDIRS.${BDB_TYPE}:S,^,${BDBBASE}/,:Q}
75 MAKE_ENV+= PY_BDB_LIBDIRS=${BDBBASE}/lib
76 PLIST.bsddb= yes
77 PLIST.dll= yes
78 . if ${OPSYS} != "NetBSD" || exists(/usr/bin/ypcat)
79 PLIST.nis= yes
80 . else
81 PLIST.no-nis= yes
82 . endif
83 .endif
85 .if defined(BUILDLINK_TRANSFORM)
86 MAKE_ENV+= PY_BDB_TRANSFORM=${BUILDLINK_TRANSFORM:Q}
87 .endif
89 PLIST_SUBST+= PY_VER_SUFFIX=${PY_VER_SUFFIX:Q}
91 PRINT_PLIST_AWK+= { gsub(/${PY_PLATNAME}/, "$${PY_PLATNAME}") }
92 PRINT_PLIST_AWK+= { gsub(/python${PY_VER_SUFFIX}/, \
93 "python$${PY_VER_SUFFIX}") }
95 TEST_TARGET= test
96 INSTALL_TARGET= altinstall
98 REPLACE_INTERPRETER+= py33
99 REPLACE.py33.old= .*python[^ ]*
100 REPLACE.py33.new= ${PREFIX}/bin/python${PY_VER_SUFFIX}
101 REPLACE_FILES.py33= Lib/*.py Lib/*/*.py Lib/*/*/*.py Lib/*/*/*/*.py
103 CHECK_INTERPRETER_SKIP= lib/python${PY_VER_SUFFIX}/venv/scripts/posix/pydoc
105 .if ${OPSYS} == "HPUX"
106 post-install:
107 ${LN} -fs ${DESTDIR}${PREFIX}/lib/libpython3.3.sl \
108 ${DESTDIR}${PREFIX}/lib/libpython3.3.sl.1.0
109 .endif
111 USE_GNU_READLINE= yes
112 BUILDLINK_DEPMETHOD.readline= build
114 .include "../../archivers/bzip2/buildlink3.mk"
115 .include "../../archivers/xz/buildlink3.mk"
116 .include "../../devel/gettext-lib/buildlink3.mk"
117 .include "../../devel/libffi/buildlink3.mk"
118 .include "../../devel/readline/buildlink3.mk"
119 .include "../../devel/zlib/buildlink3.mk"
120 .include "../../security/openssl/buildlink3.mk"
121 .include "../../mk/dlopen.buildlink3.mk"
122 .include "../../mk/oss.buildlink3.mk"
123 .include "../../mk/bsd.pkg.mk"