summaryrefslogtreecommitdiff
path: root/lang/python23-pth/patches
diff options
context:
space:
mode:
Diffstat (limited to 'lang/python23-pth/patches')
-rw-r--r--lang/python23-pth/patches/patch-ah38
-rw-r--r--lang/python23-pth/patches/patch-al57
-rw-r--r--lang/python23-pth/patches/patch-da17
-rw-r--r--lang/python23-pth/patches/patch-db35
-rw-r--r--lang/python23-pth/patches/patch-dc20
5 files changed, 156 insertions, 11 deletions
diff --git a/lang/python23-pth/patches/patch-ah b/lang/python23-pth/patches/patch-ah
index 4c5b6dc4af2..c673c5e6e73 100644
--- a/lang/python23-pth/patches/patch-ah
+++ b/lang/python23-pth/patches/patch-ah
@@ -1,17 +1,17 @@
-$NetBSD: patch-ah,v 1.3 2004/01/26 12:11:57 grant Exp $
+$NetBSD: patch-ah,v 1.4 2004/11/28 13:33:20 recht Exp $
---- Makefile.pre.in.orig 2003-11-19 06:54:00.000000000 +1100
-+++ Makefile.pre.in
-@@ -56,7 +56,7 @@ MAKESETUP= $(srcdir)/Modules/makese
+--- Makefile.pre.in.orig Tue Nov 18 20:54:00 2003
++++ Makefile.pre.in Thu Nov 11 18:54:35 2004
+@@ -56,7 +56,7 @@
OPT= @OPT@
BASECFLAGS= @BASECFLAGS@
CFLAGS= $(BASECFLAGS) $(OPT)
-CPPFLAGS= -I. -I$(srcdir)/Include
-+CPPFLAGS+= -I. -I$(srcdir)/Include
++CPPFLAGS+= @CPPFLAGS@ -I. -I$(srcdir)/Include
LDFLAGS= @LDFLAGS@
LDLAST= @LDLAST@
SGI_ABI= @SGI_ABI@
-@@ -305,7 +305,7 @@ all: $(BUILDPYTHON) oldsharedmods share
+@@ -305,7 +305,7 @@
$(BUILDPYTHON): Modules/$(MAINOBJ) $(LIBRARY) $(LDLIBRARY)
$(LINKCC) $(LDFLAGS) $(LINKFORSHARED) -o $@ \
Modules/$(MAINOBJ) \
@@ -20,7 +20,7 @@ $NetBSD: patch-ah,v 1.3 2004/01/26 12:11:57 grant Exp $
platform: $(BUILDPYTHON)
$(RUNSHARED) ./$(BUILDPYTHON) -E -c 'import sys ; from distutils.util import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform
-@@ -345,7 +345,7 @@ $(LIBRARY): $(LIBRARY_OBJS)
+@@ -345,7 +345,7 @@
libpython$(VERSION).so: $(LIBRARY_OBJS)
if test $(INSTSONAME) != $(LDLIBRARY); then \
@@ -29,3 +29,27 @@ $NetBSD: patch-ah,v 1.3 2004/01/26 12:11:57 grant Exp $
$(LN) -f $(INSTSONAME) $@; \
else\
$(LDSHARED) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM); \
+@@ -354,6 +354,9 @@
+ libpython$(VERSION).sl: $(LIBRARY_OBJS)
+ $(LDSHARED) -o $@ $(LIBRARY_OBJS) $(LIBC) $(LIBM)
+
++libpython$(VERSION).dylib: $(LIBRARY_OBJS)
++ $(LINKCC) -dynamiclib -install_name $(LIBDIR)/$@ -current_version 2.3.4 -compatibility_version 2.3 -o $@ -flat_namespace -undefined suppress $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM)
++
+ # This rule is here for OPENSTEP/Rhapsody/MacOSX. It builds a temporary
+ # minimal framework (not including the Lib directory and such) in the current
+ # directory.
+@@ -613,7 +616,12 @@
+ (cd $(DESTDIR)$(LIBDIR); $(LN) -sf $(INSTSONAME) libpython$(VERSION)$(SO)); \
+ fi \
+ fi; \
+- else true; \
++ else \
++ if test -f libpython$(VERSION).dylib; then \
++ $(INSTALL_SHARED) libpython$(VERSION).dylib $(DESTDIR)$(LIBDIR)/libpython$(VERSION).dylib; \
++ else \
++ true; \
++ fi \
+ fi
+
+ # Install the manual page
diff --git a/lang/python23-pth/patches/patch-al b/lang/python23-pth/patches/patch-al
index 5518ba252f1..844dacc715f 100644
--- a/lang/python23-pth/patches/patch-al
+++ b/lang/python23-pth/patches/patch-al
@@ -1,7 +1,7 @@
-$NetBSD: patch-al,v 1.7 2004/06/02 12:29:28 recht Exp $
+$NetBSD: patch-al,v 1.8 2004/11/28 13:33:20 recht Exp $
---- configure.orig 2004-05-07 21:13:40.000000000 +0200
-+++ configure 2004-06-02 13:59:28.000000000 +0200
+--- configure.orig Fri May 7 21:13:40 2004
++++ configure Thu Nov 25 13:20:20 2004
@@ -1318,7 +1318,7 @@
mv confdefs.h.new confdefs.h
@@ -29,7 +29,56 @@ $NetBSD: patch-al,v 1.7 2004/06/02 12:29:28 recht Exp $
LDLIBRARY='libpython$(VERSION).so'
BLDLIBRARY='-L. -lpython$(VERSION)'
RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
-@@ -13855,6 +13857,7 @@
+@@ -3624,6 +3626,14 @@
+ BLDLIBRARY='-L. -lpython$(VERSION)'
+ RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
+ ;;
++ Darwin*)
++ if test -z "$enable_framework"; then
++ LDLIBRARY='libpython$(VERSION).dylib'
++ BLDLIBRARY='-L. -lpython$(VERSION)'
++ RUNSHARED=DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}
++ fi
++ ;;
++
+ esac
+ # DG/UX requires some fancy ld contortions to produce a .so from an .a
+ case $MACHDEP in
+@@ -4021,7 +4031,12 @@
+ ;;
+ # is there any other compiler on Darwin besides gcc?
+ Darwin*)
+- BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd"
++ if [[ `/usr/bin/arch` = 'ppc' ]]
++ then
++ BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common"
++ else
++ BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -fno-common"
++ fi
+ ;;
+ esac
+ ;;
+@@ -10082,7 +10097,7 @@
+ LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
+ else
+ # No framework. Ignore undefined symbols, assuming they come from Python
+- LDSHARED="$LDSHARED -undefined suppress"
++ LDSHARED="$LDSHARED -flat_namespace -undefined suppress"
+ fi ;;
+ Darwin/*)
+ LDSHARED='$(CC) $(LDFLAGS) -bundle'
+@@ -10091,8 +10106,8 @@
+ LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
+ else
+ # No framework, use the Python app as bundle-loader
+- BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
+- LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
++ BLDSHARED="$LDSHARED "'-flat_namespace -undefined suppress -bundle_loader $(BUILDPYTHON)'
++ LDSHARED="$LDSHARED "'-flat_namespace -undefined suppress -bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
+ fi ;;
+ Linux*|GNU*) LDSHARED='$(CC) -shared';;
+ dgux*) LDSHARED="ld -G";;
+@@ -13855,6 +13870,7 @@
/* end confdefs.h. */
#include "confdefs.h"
diff --git a/lang/python23-pth/patches/patch-da b/lang/python23-pth/patches/patch-da
new file mode 100644
index 00000000000..a94d625a5b5
--- /dev/null
+++ b/lang/python23-pth/patches/patch-da
@@ -0,0 +1,17 @@
+$NetBSD: patch-da,v 1.1 2004/11/28 13:33:20 recht Exp $
+
+--- Misc/setuid-prog.c.orig Thu Nov 25 13:11:28 2004
++++ Misc/setuid-prog.c Thu Nov 25 13:11:27 2004
+@@ -70,6 +70,12 @@
+ #define environ _environ
+ #endif
+
++#if defined(__APPLE__)
++# include <sys/time.h>
++# include <crt_externs.h>
++# define environ (*_NSGetEnviron())
++#endif /* __APPLE__ */
++
+ /* don't change def_IFS */
+ char def_IFS[] = "IFS= \t\n";
+ /* you may want to change def_PATH, but you should really change it in */
diff --git a/lang/python23-pth/patches/patch-db b/lang/python23-pth/patches/patch-db
new file mode 100644
index 00000000000..c5e271cafaa
--- /dev/null
+++ b/lang/python23-pth/patches/patch-db
@@ -0,0 +1,35 @@
+$NetBSD: patch-db,v 1.1 2004/11/28 13:33:20 recht Exp $
+
+--- Modules/getpath.c.orig Thu Nov 11 18:08:55 2004
++++ Modules/getpath.c Thu Nov 11 18:10:13 2004
+@@ -374,6 +374,9 @@
+ #ifdef WITH_NEXT_FRAMEWORK
+ NSModule pythonModule;
+ #endif
++#ifdef __APPLE__
++ unsigned long nsexeclength = MAXPATHLEN;
++#endif
+
+ /* If there is no slash in the argv0 path, then we have to
+ * assume python is on the user's $PATH, since there's no
+@@ -382,6 +385,20 @@
+ */
+ if (strchr(prog, SEP))
+ strncpy(progpath, prog, MAXPATHLEN);
++#ifdef __APPLE__
++ /* On Mac OS X, if a script uses an interpreter of the form
++ * "#!/opt/python2.3/bin/python", the kernel only passes "python"
++ * as argv[0], which falls through to the $PATH search below.
++ * If /opt/python2.3/bin isn't in your path, or is near the end,
++ * this algorithm may incorrectly find /usr/bin/python. To work
++ * around this, we can use _NSGetExecutablePath to get a better
++ * hint of what the intended interpreter was, although this
++ * will fail if a relative path was used. but in that case,
++ * absolutize() should help us out below
++ */
++ else if(0 == _NSGetExecutablePath(progpath, &nsexeclength) && progpath[0] == SEP)
++ ;
++#endif // __APPLE__
+ else if (path) {
+ while (1) {
+ char *delim = strchr(path, DELIM);
diff --git a/lang/python23-pth/patches/patch-dc b/lang/python23-pth/patches/patch-dc
new file mode 100644
index 00000000000..077ed6d0587
--- /dev/null
+++ b/lang/python23-pth/patches/patch-dc
@@ -0,0 +1,20 @@
+--- Modules/posixmodule.c.orig Thu Nov 25 12:56:28 2004
++++ Modules/posixmodule.c Thu Nov 25 12:57:24 2004
+@@ -304,7 +304,7 @@
+ #endif
+
+ /* Return a dictionary corresponding to the POSIX environment table */
+-#ifdef WITH_NEXT_FRAMEWORK
++#ifdef __APPLE__
+ /* On Darwin/MacOSX a shared library or framework has no access to
+ ** environ directly, we must obtain it with _NSGetEnviron().
+ */
+@@ -322,7 +322,7 @@
+ d = PyDict_New();
+ if (d == NULL)
+ return NULL;
+-#ifdef WITH_NEXT_FRAMEWORK
++#ifdef __APPLE__
+ if (environ == NULL)
+ environ = *_NSGetEnviron();
+ #endif