- Update to Python 2.4.2. [1]

- Allow to override a command passing to distutils using
  PYDISTUTILS_{CONFIGURE,BUILD,INSTALL}_TARGET [2]
- Allow to specify BUILD/RUN dependency separatedly. [3]
- Replace shell executions with regex replacement on bsd.python.mk. [3]
- Remove thread serialization from socket.getaddrinfo() on FreeBSD 5.3
  and later versions because we've got thread-safe implementation. [4]
- Add a workaround to avoid curses.h problem of FreeBSD base.

PR:		86685 [1]
Submitted by:	Soeren Straarup <xride@x12.dk> [1],
		lioux [2], vsevolod [3], sobomax [4]
Obtained from:	Python CVS [4]
This commit is contained in:
Hye-Shik Chang
2005-10-02 14:31:39 +00:00
parent 12add669af
commit 08a19a2887
12 changed files with 130 additions and 138 deletions

View File

@@ -6,8 +6,7 @@
#
PORTNAME= python
PORTVERSION= 2.4.1
PORTREVISION= 3
PORTVERSION= 2.4.2
CATEGORIES= lang python ipv6
MASTER_SITES= ${PYTHON_MASTER_SITES}
MASTER_SITE_SUBDIR= ${PYTHON_MASTER_SITE_SUBDIR}
@@ -16,7 +15,6 @@ DISTFILES= ${PYTHON_DISTFILE}
MAINTAINER= perky@FreeBSD.org
COMMENT?= An interpreted object-oriented programming language
CONFLICTS= stackless_python-*
DIST_SUBDIR= python
WRKSRC= ${PYTHON_WRKSRC}
GNU_CONFIGURE= yes
@@ -47,6 +45,9 @@ OPTIONS= THREADS "Enable thread support" on \
.include <bsd.port.pre.mk>
# workaround for a bug in base curses.h.
CFLAGS+= -D__wchar_t=wchar_t
.if !defined(WITHOUT_THREADS)
CONFIGURE_ARGS+= --with-threads
CFLAGS+= ${PTHREAD_CFLAGS}

View File

@@ -19,6 +19,8 @@ MD5 (python/Python-2.4.tgz) = 149ad508f936eccf669d52682cf8e606
SIZE (python/Python-2.4.tgz) = 9198035
MD5 (python/Python-2.4.1.tgz) = 7bb2416a4f421c3452d306694d3efbba
SIZE (python/Python-2.4.1.tgz) = 9219882
MD5 (python/Python-2.4.2.tgz) = 07cfc759546f6723bb367be5b1ce9875
SIZE (python/Python-2.4.2.tgz) = 9239975
MD5 (python/Python-2.5.a0.20050129.tgz) = bdf571f3e28c4793bedbd180611c28e6
SIZE (python/Python-2.5.a0.20050129.tgz) = 9227299
MD5 (python/Python-2.5.a0.20050728.tgz) = 423c9ac2dbe3a754195e26652495aac3

View File

@@ -1,17 +0,0 @@
--- Lib/test/test_fcntl.py.orig Sun Apr 3 22:45:13 2005
+++ Lib/test/test_fcntl.py Sun Apr 3 22:45:19 2005
@@ -24,7 +24,13 @@
'freebsd2', 'freebsd3', 'freebsd4', 'freebsd5', 'freebsd6',
'bsdos2', 'bsdos3', 'bsdos4',
'openbsd', 'openbsd2', 'openbsd3'):
- lockdata = struct.pack('lxxxxlxxxxlhh', 0, 0, 0, fcntl.F_WRLCK, 0)
+ if struct.calcsize('l') == 8:
+ off_t = 'l'
+ pid_t = 'i'
+ else:
+ off_t = 'lxxxx'
+ pid_t = 'l'
+ lockdata = struct.pack(off_t+off_t+pid_t+'hh', 0, 0, 0, fcntl.F_WRLCK, 0)
elif sys.platform in ['aix3', 'aix4', 'hp-uxB', 'unixware7']:
lockdata = struct.pack('hhlllii', fcntl.F_WRLCK, 0, 0, 0, 0, 0, 0)
elif sys.platform in ['os2emx']:

View File

@@ -1,35 +0,0 @@
Index: Modules/fcntlmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/fcntlmodule.c,v
retrieving revision 2.43
retrieving revision 2.44
diff -u -r2.43 -r2.44
--- Modules/fcntlmodule.c 30 Nov 2004 14:31:54 -0000 2.43
+++ Modules/fcntlmodule.c 27 Jul 2005 20:24:30 -0000 2.44
@@ -102,7 +102,7 @@
int mutate_arg = 1;
char buf[1024];
- if (PyArg_ParseTuple(args, "O&iw#|i:ioctl",
+ if (PyArg_ParseTuple(args, "O&Iw#|i:ioctl",
conv_descriptor, &fd, &code,
&str, &len, &mutate_arg)) {
char *arg;
@@ -151,7 +151,7 @@
}
PyErr_Clear();
- if (PyArg_ParseTuple(args, "O&is#:ioctl",
+ if (PyArg_ParseTuple(args, "O&Is#:ioctl",
conv_descriptor, &fd, &code, &str, &len)) {
if (len > sizeof buf) {
PyErr_SetString(PyExc_ValueError,
@@ -172,7 +172,7 @@
PyErr_Clear();
arg = 0;
if (!PyArg_ParseTuple(args,
- "O&i|i;ioctl requires a file or file descriptor,"
+ "O&I|i;ioctl requires a file or file descriptor,"
" an integer and optionally a integer or buffer argument",
conv_descriptor, &fd, &code, &arg)) {
return NULL;

View File

@@ -0,0 +1,13 @@
--- Modules/socketmodule.c.orig Sun Oct 2 21:49:22 2005
+++ Modules/socketmodule.c Sun Oct 2 21:50:01 2005
@@ -142,7 +142,9 @@
/* On systems on which getaddrinfo() is believed to not be thread-safe,
(this includes the getaddrinfo emulation) protect access with a lock. */
-#if defined(WITH_THREAD) && (defined(__APPLE__) || defined(__FreeBSD__) || \
+#include <sys/param.h>
+#if defined(WITH_THREAD) && (defined(__APPLE__) || \
+ (defined(__FreeBSD__) && __FreeBSD_version+0 < 503000) || \
defined(__OpenBSD__) || defined(__NetBSD__) || !defined(HAVE_GETADDRINFO))
#define USE_GETADDRINFO_LOCK
#endif