Sun May 15 10:07:20 2011 UTC ()
Recent SunOS has netpacket/packet.h, but it is not what Python expects.
Fixes build on SunOS.


(hans)
diff -r1.33 -r1.34 pkgsrc/lang/python25/Makefile

cvs diff -r1.33 -r1.34 pkgsrc/lang/python25/Attic/Makefile (switch to unified diff)

--- pkgsrc/lang/python25/Attic/Makefile 2011/04/23 17:31:40 1.33
+++ pkgsrc/lang/python25/Attic/Makefile 2011/05/15 10:07:20 1.34
@@ -1,173 +1,174 @@ @@ -1,173 +1,174 @@
1# $NetBSD: Makefile,v 1.33 2011/04/23 17:31:40 tron Exp $ 1# $NetBSD: Makefile,v 1.34 2011/05/15 10:07:20 hans Exp $
2 2
3.include "dist.mk" 3.include "dist.mk"
4 4
5PKGNAME= python25-${PY_DISTVERSION} 5PKGNAME= python25-${PY_DISTVERSION}
6PKGREVISION= 5 6PKGREVISION= 5
7CATEGORIES= lang python 7CATEGORIES= lang python
8 8
9MAINTAINER= pkgsrc-users@NetBSD.org 9MAINTAINER= pkgsrc-users@NetBSD.org
10HOMEPAGE= http://www.python.org/ 10HOMEPAGE= http://www.python.org/
11COMMENT= Interpreted, interactive, object-oriented programming language 11COMMENT= Interpreted, interactive, object-oriented programming language
12LICENSE= python-software-foundation 12LICENSE= python-software-foundation
13 13
14PKG_DESTDIR_SUPPORT= user-destdir 14PKG_DESTDIR_SUPPORT= user-destdir
15 15
16CONFLICTS+= python-[0-9]* 16CONFLICTS+= python-[0-9]*
17 17
18GNU_CONFIGURE= yes 18GNU_CONFIGURE= yes
19CONFIGURE_ARGS+= --with-threads 19CONFIGURE_ARGS+= --with-threads
20CONFIGURE_ARGS+= --enable-shared 20CONFIGURE_ARGS+= --enable-shared
21CONFIGURE_ARGS+= OPT=${CFLAGS:M*:Q} 21CONFIGURE_ARGS+= OPT=${CFLAGS:M*:Q}
22CONFIGURE_ARGS+= --with-system-ffi 22CONFIGURE_ARGS+= --with-system-ffi
23 23
24LDFLAGS+= -L${WRKSRC} 24LDFLAGS+= -L${WRKSRC}
25 25
26USE_LANGUAGES= c c++ 26USE_LANGUAGES= c c++
27 27
28PTHREAD_OPTS+= require 28PTHREAD_OPTS+= require
29.include "../../mk/pthread.buildlink3.mk" 29.include "../../mk/pthread.buildlink3.mk"
30.if ${PTHREAD_TYPE} == "pth" 30.if ${PTHREAD_TYPE} == "pth"
31CONFIGURE_ARGS+= --with-pth 31CONFIGURE_ARGS+= --with-pth
32.endif 32.endif
33 33
34.include "../../mk/bsd.prefs.mk" 34.include "../../mk/bsd.prefs.mk"
35 35
36# fdatasync() 36# fdatasync()
37LIBS.SunOS+= -lrt 37LIBS.SunOS+= -lrt
38 38
39PY_VER_SUFFIX= 2.5 39PY_VER_SUFFIX= 2.5
40 40
41PLIST_SRC= ${.CURDIR}/../../lang/python25/PLIST.common 41PLIST_SRC= ${.CURDIR}/../../lang/python25/PLIST.common
42.if exists(${.CURDIR}/../../lang/python25/PLIST.${OPSYS}) 42.if exists(${.CURDIR}/../../lang/python25/PLIST.${OPSYS})
43PLIST_SRC+= ${.CURDIR}/../../lang/python25/PLIST.${OPSYS} 43PLIST_SRC+= ${.CURDIR}/../../lang/python25/PLIST.${OPSYS}
44.endif 44.endif
45 45
46.if ${OPSYS} == "NetBSD" 46.if ${OPSYS} == "NetBSD"
47PRIVILEGED_STAGES+= clean 47PRIVILEGED_STAGES+= clean
48# XXX work around a botched autoconf check which ignores libintl 48# XXX work around a botched autoconf check which ignores libintl
49CONFIGURE_ENV+= ac_cv_func_bind_textdomain_codeset=yes 49CONFIGURE_ENV+= ac_cv_func_bind_textdomain_codeset=yes
50.endif 50.endif
51 51
52.if ${OPSYS} == "Darwin" || ${OPSYS} == "Interix" 52.if ${OPSYS} == "Darwin" || ${OPSYS} == "Interix"
53PY_PLATNAME= ${LOWER_OPSYS} 53PY_PLATNAME= ${LOWER_OPSYS}
54USE_TOOLS+= gmake 54USE_TOOLS+= gmake
55.elif ${OPSYS} == "IRIX" 55.elif ${OPSYS} == "IRIX"
56PY_PLATNAME= ${LOWER_OPSYS:C/\..*//} 56PY_PLATNAME= ${LOWER_OPSYS:C/\..*//}
57.elif ${OPSYS} == "SunOS" 57.elif ${OPSYS} == "SunOS"
58PY_PLATNAME= sunos${OS_VERSION:C/\..*//} 58PY_PLATNAME= sunos${OS_VERSION:C/\..*//}
 59CONFIGURE_ENV+= ac_cv_header_netpacket_packet_h=no
59.elif ${OPSYS} == "HPUX" 60.elif ${OPSYS} == "HPUX"
60PY_PLATNAME= hp-ux11 61PY_PLATNAME= hp-ux11
61.else 62.else
62PY_PLATNAME= ${LOWER_OPSYS}${OS_VERSION:C/\..*//} 63PY_PLATNAME= ${LOWER_OPSYS}${OS_VERSION:C/\..*//}
63.endif 64.endif
64PLIST_SUBST+= PY_PLATNAME=${PY_PLATNAME:Q} 65PLIST_SUBST+= PY_PLATNAME=${PY_PLATNAME:Q}
65 66
66.if (${MACHINE_ARCH} == "alpha") || (${MACHINE_ARCH} == "amd64") || \ 67.if (${MACHINE_ARCH} == "alpha") || (${MACHINE_ARCH} == "amd64") || \
67 (${MACHINE_ARCH} == "sparc64") || (${MACHINE_ARCH} == "x86_64") || \ 68 (${MACHINE_ARCH} == "sparc64") || (${MACHINE_ARCH} == "x86_64") || \
68 (defined(ABI) && ${ABI} == "64") 69 (defined(ABI) && ${ABI} == "64")
69IS_64BIT_PLATFORM?= yes 70IS_64BIT_PLATFORM?= yes
70.else 71.else
71IS_64BIT_PLATFORM?= no 72IS_64BIT_PLATFORM?= no
72.endif 73.endif
73 74
74# the dl module isn't built for 64 bit archs 75# the dl module isn't built for 64 bit archs
75PLIST_VARS+= dl 76PLIST_VARS+= dl
76.if empty(IS_64BIT_PLATFORM:M[yY][eE][sS]) 77.if empty(IS_64BIT_PLATFORM:M[yY][eE][sS])
77PLIST.dl= yes 78PLIST.dl= yes
78.endif 79.endif
79 80
80# builds additional modules if OpenSSL < 0.9.8 81# builds additional modules if OpenSSL < 0.9.8
81PLIST_VARS+= openssl097 82PLIST_VARS+= openssl097
82CHECK_BUILTIN.openssl:= no 83CHECK_BUILTIN.openssl:= no
83.include "../../security/openssl/builtin.mk" 84.include "../../security/openssl/builtin.mk"
84CHECK_BUILTIN.openssl:= yes 85CHECK_BUILTIN.openssl:= yes
85.if !empty(USE_BUILTIN.openssl:M[yY][eE][sS]) && \ 86.if !empty(USE_BUILTIN.openssl:M[yY][eE][sS]) && \
86 !empty(BUILTIN_PKG.openssl:Mopenssl-0.9.[67]*) 87 !empty(BUILTIN_PKG.openssl:Mopenssl-0.9.[67]*)
87PLIST.openssl097= yes 88PLIST.openssl097= yes
88.endif 89.endif
89 90
90# setup.py causes some modules to be built if the platform is *not* 64bit. 91# setup.py causes some modules to be built if the platform is *not* 64bit.
91PLIST_VARS+= extra-so 92PLIST_VARS+= extra-so
92.if !empty(IS_64BIT_PLATFORM:M[nN][oO]) 93.if !empty(IS_64BIT_PLATFORM:M[nN][oO])
93PLIST.extra-so= yes 94PLIST.extra-so= yes
94.endif 95.endif
95 96
96# ossaudiodev is only available on x86 for the following platforms 97# ossaudiodev is only available on x86 for the following platforms
97PLIST_VARS+= oss 98PLIST_VARS+= oss
98.if (${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64") && \ 99.if (${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64") && \
99 (${PY_PLATNAME} == "linux2" || ${OPSYS} == "FreeBSD") 100 (${PY_PLATNAME} == "linux2" || ${OPSYS} == "FreeBSD")
100PLIST.oss= yes 101PLIST.oss= yes
101.endif 102.endif
102 103
103# Make sure python modules can link correctly 104# Make sure python modules can link correctly
104.if ${OPSYS} == "Darwin" 105.if ${OPSYS} == "Darwin"
105INSTALL_UNSTRIPPED= yes 106INSTALL_UNSTRIPPED= yes
106 107
107. if empty(OS_VERSION:M[1-9].*) 108. if empty(OS_VERSION:M[1-9].*)
108CFLAGS+= -D_DARWIN_C_SOURCE 109CFLAGS+= -D_DARWIN_C_SOURCE
109. endif 110. endif
110.endif 111.endif
111 112
112PLIST_VARS+= bsddb dll nis no-nis 113PLIST_VARS+= bsddb dll nis no-nis
113.if ${OPSYS} == "IRIX" 114.if ${OPSYS} == "IRIX"
114. if ${ABI} == "64" 115. if ${ABI} == "64"
115PLIST.no-nis= yes 116PLIST.no-nis= yes
116. else 117. else
117PLIST.nis= yes 118PLIST.nis= yes
118. endif 119. endif
119.else 120.else
120. include "../../mk/bdb.buildlink3.mk" 121. include "../../mk/bdb.buildlink3.mk"
121MAKE_ENV+= PY_BDB_TYPE=${BDB_TYPE} 122MAKE_ENV+= PY_BDB_TYPE=${BDB_TYPE}
122MAKE_ENV+= PY_BDB_INCDIRS=${BUILDLINK_INCDIRS.${BDB_TYPE}:S,^,${BDBBASE}/,:Q} 123MAKE_ENV+= PY_BDB_INCDIRS=${BUILDLINK_INCDIRS.${BDB_TYPE}:S,^,${BDBBASE}/,:Q}
123MAKE_ENV+= PY_BDB_LIBDIRS=${BDBBASE}/lib 124MAKE_ENV+= PY_BDB_LIBDIRS=${BDBBASE}/lib
124PLIST.bsddb= yes 125PLIST.bsddb= yes
125PLIST.dll= yes 126PLIST.dll= yes
126. if ${OPSYS} != "NetBSD" || exists(/usr/bin/ypcat) 127. if ${OPSYS} != "NetBSD" || exists(/usr/bin/ypcat)
127PLIST.nis= yes 128PLIST.nis= yes
128. else 129. else
129PLIST.no-nis= yes 130PLIST.no-nis= yes
130. endif 131. endif
131.endif 132.endif
132 133
133.if ${OPSYS} == "OSF1" 134.if ${OPSYS} == "OSF1"
134# configure complains about buggy getaddrinfo() 135# configure complains about buggy getaddrinfo()
135CONFIGURE_ARGS+= --disable-ipv6 136CONFIGURE_ARGS+= --disable-ipv6
136.endif 137.endif
137 138
138.if defined(BUILDLINK_TRANSFORM) 139.if defined(BUILDLINK_TRANSFORM)
139MAKE_ENV+= PY_BDB_TRANSFORM=${BUILDLINK_TRANSFORM:Q} 140MAKE_ENV+= PY_BDB_TRANSFORM=${BUILDLINK_TRANSFORM:Q}
140.endif 141.endif
141 142
142PLIST_SUBST+= PY_VER_SUFFIX=${PY_VER_SUFFIX:Q} 143PLIST_SUBST+= PY_VER_SUFFIX=${PY_VER_SUFFIX:Q}
143 144
144TEST_TARGET= test 145TEST_TARGET= test
145INSTALL_TARGET= altinstall 146INSTALL_TARGET= altinstall
146 147
147REPLACE_INTERPRETER+= py25 148REPLACE_INTERPRETER+= py25
148REPLACE.py25.old= .*python[^ ]* 149REPLACE.py25.old= .*python[^ ]*
149REPLACE.py25.new= ${PREFIX}/bin/python${PY_VER_SUFFIX} 150REPLACE.py25.new= ${PREFIX}/bin/python${PY_VER_SUFFIX}
150REPLACE_FILES.py25= Lib/*.py Lib/*/*.py Lib/*/*/*.py 151REPLACE_FILES.py25= Lib/*.py Lib/*/*.py Lib/*/*/*.py
151 152
152post-extract: 153post-extract:
153 ${MV} ${WRKSRC}/Lib/smtpd.py ${WRKSRC}/Lib/smtpd${PY_VER_SUFFIX}.py 154 ${MV} ${WRKSRC}/Lib/smtpd.py ${WRKSRC}/Lib/smtpd${PY_VER_SUFFIX}.py
154 ${MV} ${WRKSRC}/Tools/scripts/pydoc ${WRKSRC}/Tools/scripts/pydoc${PY_VER_SUFFIX} 155 ${MV} ${WRKSRC}/Tools/scripts/pydoc ${WRKSRC}/Tools/scripts/pydoc${PY_VER_SUFFIX}
155 156
156.if ${OPSYS} == "HPUX" 157.if ${OPSYS} == "HPUX"
157post-install: 158post-install:
158 ${LN} -fs ${DESTDIR}${PREFIX}/lib/libpython2.5.sl \ 159 ${LN} -fs ${DESTDIR}${PREFIX}/lib/libpython2.5.sl \
159 ${DESTDIR}${PREFIX}/lib/libpython2.5.sl.1.0 160 ${DESTDIR}${PREFIX}/lib/libpython2.5.sl.1.0
160.endif 161.endif
161 162
162USE_GNU_READLINE= yes 163USE_GNU_READLINE= yes
163BUILDLINK_DEPMETHOD.readline= build 164BUILDLINK_DEPMETHOD.readline= build
164 165
165.include "../../archivers/bzip2/buildlink3.mk" 166.include "../../archivers/bzip2/buildlink3.mk"
166.include "../../devel/gettext-lib/buildlink3.mk" 167.include "../../devel/gettext-lib/buildlink3.mk"
167.include "../../devel/libffi/buildlink3.mk" 168.include "../../devel/libffi/buildlink3.mk"
168.include "../../devel/readline/buildlink3.mk" 169.include "../../devel/readline/buildlink3.mk"
169.include "../../devel/zlib/buildlink3.mk" 170.include "../../devel/zlib/buildlink3.mk"
170.include "../../security/openssl/buildlink3.mk" 171.include "../../security/openssl/buildlink3.mk"
171.include "../../mk/dlopen.buildlink3.mk" 172.include "../../mk/dlopen.buildlink3.mk"
172.include "../../mk/oss.buildlink3.mk" 173.include "../../mk/oss.buildlink3.mk"
173.include "../../mk/bsd.pkg.mk" 174.include "../../mk/bsd.pkg.mk"