summaryrefslogtreecommitdiff
path: root/lang/python22
diff options
context:
space:
mode:
authordrochner <drochner>2002-03-22 15:20:23 +0000
committerdrochner <drochner>2002-03-22 15:20:23 +0000
commit0f444fbbbef781f61172ba313c24e0497068b36d (patch)
treeca70df30b7178b98021ee666d913005563797163 /lang/python22
parentdcc413d4f88f41322cef71ea07304bcdd9a9bdc4 (diff)
downloadpkgsrc-0f444fbbbef781f61172ba313c24e0497068b36d.tar.gz
-remove hardwired "/usr/local" and "/usr/contrib" library search paths,
as suggested by Johnny Lam -don't try to build the "locale" module - it doesn't work anyway -pull up a fix from Python CVS to get more consistent math exceptions (eg pow(1e-200,2) vs. math.pow(1e-200,2)) This will be part of 2.2.1.
Diffstat (limited to 'lang/python22')
-rw-r--r--lang/python22/distinfo6
-rw-r--r--lang/python22/patches/patch-aa49
-rw-r--r--lang/python22/patches/patch-ac16
-rw-r--r--lang/python22/patches/patch-ad46
4 files changed, 111 insertions, 6 deletions
diff --git a/lang/python22/distinfo b/lang/python22/distinfo
index cce29b36156..b49a7607609 100644
--- a/lang/python22/distinfo
+++ b/lang/python22/distinfo
@@ -1,6 +1,8 @@
-$NetBSD: distinfo,v 1.2 2002/01/28 09:12:08 drochner Exp $
+$NetBSD: distinfo,v 1.3 2002/03/22 15:20:23 drochner Exp $
SHA1 (Python-2.2.tgz) = ff78e4ab501bdb089a81884187ce2f4b44091ba2
Size (Python-2.2.tgz) = 6542443 bytes
-SHA1 (patch-aa) = a75108ad0f6577fbbc5ceaa065e9a06f107cd78d
+SHA1 (patch-aa) = 04bf82c8d760e98f70453aa9c765a7bb7b5ad853
SHA1 (patch-ab) = aa06824d9f595a24aaddc96c83f31646f522ab09
+SHA1 (patch-ac) = 82e5f3505321df21adde4a9a1bf752d157fb61cd
+SHA1 (patch-ad) = 7b532616983b152b0c313cc4a1e372483c8b0eb9
diff --git a/lang/python22/patches/patch-aa b/lang/python22/patches/patch-aa
index 1d9d71e6d4d..d112a0cce6d 100644
--- a/lang/python22/patches/patch-aa
+++ b/lang/python22/patches/patch-aa
@@ -1,7 +1,31 @@
-$NetBSD: patch-aa,v 1.2 2002/01/28 09:12:09 drochner Exp $
+$NetBSD: patch-aa,v 1.3 2002/03/22 15:20:24 drochner Exp $
--- setup.py.orig Mon Dec 17 18:24:43 2001
-+++ setup.py Sun Jan 27 13:33:55 2002
++++ setup.py Fri Mar 22 12:28:30 2002
+@@ -193,10 +193,10 @@
+
+ def detect_modules(self):
+ # Ensure that /usr/local is always used
+- if '/usr/local/lib' not in self.compiler.library_dirs:
+- self.compiler.library_dirs.insert(0, '/usr/local/lib')
+- if '/usr/local/include' not in self.compiler.include_dirs:
+- self.compiler.include_dirs.insert(0, '/usr/local/include' )
++# if '/usr/local/lib' not in self.compiler.library_dirs:
++# self.compiler.library_dirs.insert(0, '/usr/local/lib')
++# if '/usr/local/include' not in self.compiler.include_dirs:
++# self.compiler.include_dirs.insert(0, '/usr/local/include' )
+
+ try:
+ have_unicode = unicode
+@@ -256,7 +256,7 @@
+ if have_unicode:
+ exts.append( Extension('unicodedata', ['unicodedata.c']) )
+ # access to ISO C locale support
+- exts.append( Extension('_locale', ['_localemodule.c']) )
++# exts.append( Extension('_locale', ['_localemodule.c']) )
+
+ # Modules with some UNIX dependencies -- on by default:
+ # (If you have a really backward UNIX, select and socket may not be
@@ -314,13 +314,13 @@
# These represent audio samples or images as strings:
@@ -20,7 +44,24 @@ $NetBSD: patch-aa,v 1.2 2002/01/28 09:12:09 drochner Exp $
# readline
if self.compiler.find_library_file(lib_dirs, 'readline'):
-@@ -481,8 +481,8 @@
+@@ -347,14 +347,10 @@
+ # socket(2)
+ # Detect SSL support for the socket module
+ ssl_incs = find_file('openssl/ssl.h', inc_dirs,
+- ['/usr/local/ssl/include',
+- '/usr/contrib/ssl/include/'
+- ]
++ []
+ )
+ ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
+- ['/usr/local/ssl/lib',
+- '/usr/contrib/ssl/lib/'
+- ] )
++ [] )
+
+ if (ssl_incs is not None and
+ ssl_libs is not None):
+@@ -481,8 +477,8 @@
else:
curses_libs = ['curses', 'termcap']
@@ -31,7 +72,7 @@ $NetBSD: patch-aa,v 1.2 2002/01/28 09:12:09 drochner Exp $
# If the curses module is enabled, check for the panel module
if (module_enabled(exts, '_curses') and
-@@ -784,7 +784,7 @@
+@@ -784,7 +780,7 @@
ext_modules=[Extension('struct', ['structmodule.c'])],
# Scripts to install
diff --git a/lang/python22/patches/patch-ac b/lang/python22/patches/patch-ac
new file mode 100644
index 00000000000..645fe7b9ef1
--- /dev/null
+++ b/lang/python22/patches/patch-ac
@@ -0,0 +1,16 @@
+$NetBSD: patch-ac,v 1.1 2002/03/22 15:20:24 drochner Exp $
+
+--- Objects/floatobject.c.orig Tue Dec 11 21:31:34 2001
++++ Objects/floatobject.c Fri Mar 22 15:21:16 2002
+@@ -577,9 +577,9 @@
+ PyFPE_START_PROTECT("pow", return NULL)
+ ix = pow(iv, iw);
+ PyFPE_END_PROTECT(ix)
+- Py_SET_ERANGE_IF_OVERFLOW(ix);
++ Py_ADJUST_ERANGE1(ix);
+ if (errno != 0) {
+- /* XXX could it be another type of error? */
++ assert(errno == ERANGE);
+ PyErr_SetFromErrno(PyExc_OverflowError);
+ return NULL;
+ }
diff --git a/lang/python22/patches/patch-ad b/lang/python22/patches/patch-ad
new file mode 100644
index 00000000000..163699feca2
--- /dev/null
+++ b/lang/python22/patches/patch-ad
@@ -0,0 +1,46 @@
+$NetBSD: patch-ad,v 1.1 2002/03/22 15:20:24 drochner Exp $
+
+--- Include/pyport.h.orig Sat Oct 27 23:16:16 2001
++++ Include/pyport.h Fri Mar 22 15:17:29 2002
+@@ -285,6 +285,41 @@
+ errno = ERANGE; \
+ } while(0)
+
++/* Py_ADJUST_ERANGE1(x)
++ * Py_ADJUST_ERANGE2(x, y)
++ * Set errno to 0 before calling a libm function, and invoke one of these
++ * macros after, passing the function result(s) (Py_ADJUST_ERANGE2 is useful
++ * for functions returning complex results). This makes two kinds of
++ * adjustments to errno: (A) If it looks like the platform libm set
++ * errno=ERANGE due to underflow, clear errno. (B) If it looks like the
++ * platform libm overflowed but didn't set errno, force errno to ERANGE. In
++ * effect, we're trying to force a useful implementation of C89 errno
++ * behavior.
++ * Caution:
++ * This isn't reliable. See Py_OVERFLOWED comments.
++ * X and Y may be evaluated more than once.
++ */
++#define Py_ADJUST_ERANGE1(X) \
++ do { \
++ if (errno == 0) { \
++ if ((X) == Py_HUGE_VAL || (X) == -Py_HUGE_VAL) \
++ errno = ERANGE; \
++ } \
++ else if (errno == ERANGE && (X) == 0.0) \
++ errno = 0; \
++ } while(0)
++
++#define Py_ADJUST_ERANGE2(X, Y) \
++ do { \
++ if ((X) == Py_HUGE_VAL || (X) == -Py_HUGE_VAL || \
++ (Y) == Py_HUGE_VAL || (Y) == -Py_HUGE_VAL) { \
++ if (errno == 0) \
++ errno = ERANGE; \
++ } \
++ else if (errno == ERANGE) \
++ errno = 0; \
++ } while(0)
++
+ /**************************************************************************
+ Prototypes that are missing from the standard include files on some systems
+ (and possibly only some versions of such systems.)