1 # $NetBSD: Makefile,v 1.5 2012/12/25 23:48:47 sbd Exp $
5 PKGNAME
= python33-
${PY_DISTVERSION}
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]*
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
26 PTHREAD_OPTS
+= require
27 .
include "../../mk/pthread.buildlink3.mk"
29 .
include "../../mk/bsd.prefs.mk"
36 .if
${OPSYS} == "Darwin" ||
${OPSYS} == "Interix"
37 PY_PLATNAME
= ${LOWER_OPSYS}
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"
45 .elif
${OPSYS} == "Linux"
48 PY_PLATNAME
= ${LOWER_OPSYS}${OS_VERSION
:C
/\..
*//}
50 PLIST_SUBST
+= PY_PLATNAME
=${PY_PLATNAME
:Q
}
52 # ossaudiodev is only available on x86 for the following platforms
54 .if
(${MACHINE_ARCH} == "i386" ||
${MACHINE_ARCH} == "x86_64") && \
55 (${PY_PLATNAME} == "linux" ||
${OPSYS} == "FreeBSD")
59 # Make sure python modules can link correctly
60 .if
${OPSYS} == "Darwin"
61 INSTALL_UNSTRIPPED
= yes
64 PLIST_VARS
+= bsddb dll nis no-nis
65 .if
${OPSYS} == "IRIX"
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
78 . if
${OPSYS} != "NetBSD" || exists
(/usr
/bin
/ypcat
)
85 .if defined
(BUILDLINK_TRANSFORM
)
86 MAKE_ENV
+= PY_BDB_TRANSFORM
=${BUILDLINK_TRANSFORM
:Q
}
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}") }
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"
107 ${LN} -fs
${DESTDIR}${PREFIX}/lib
/libpython3.3.sl \
108 ${DESTDIR}${PREFIX}/lib
/libpython3.3.sl
.1.0
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"