pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/lang Add patches from darwinports/fink to make the pos...
details: https://anonhg.NetBSD.org/pkgsrc/rev/e4a8621fc526
branches: trunk
changeset: 484592:e4a8621fc526
user: recht <recht%pkgsrc.org@localhost>
date: Sun Nov 28 13:33:19 2004 +0000
description:
Add patches from darwinports/fink to make the posixmodule work on Darwin/
OSX and build the libpython as dynamic library.
While at it also fix the PLIST for Darwin/OSX.
diffstat:
lang/python23-pth/distinfo | 9 +-
lang/python23-pth/patches/patch-ah | 38 ++-
lang/python23-pth/patches/patch-al | 57 +++-
lang/python23-pth/patches/patch-da | 17 +
lang/python23-pth/patches/patch-db | 35 ++
lang/python23-pth/patches/patch-dc | 20 +
lang/python23/PLIST.Darwin | 492 +++++++++++++++++++++++++++++++++++++
lang/python23/distinfo | 9 +-
lang/python23/patches/patch-ah | 38 ++-
lang/python23/patches/patch-al | 57 +++-
lang/python23/patches/patch-da | 17 +
lang/python23/patches/patch-db | 35 ++
lang/python23/patches/patch-dc | 20 +
13 files changed, 816 insertions(+), 28 deletions(-)
diffs (truncated from 988 to 300 lines):
diff -r bde05980c626 -r e4a8621fc526 lang/python23-pth/distinfo
--- a/lang/python23-pth/distinfo Sun Nov 28 13:04:03 2004 +0000
+++ b/lang/python23-pth/distinfo Sun Nov 28 13:33:19 2004 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.18 2004/06/14 02:31:13 lukem Exp $
+$NetBSD: distinfo,v 1.19 2004/11/28 13:33:20 recht Exp $
SHA1 (Python-2.3.4.tgz) = 7d47431febec704e766b57f12a1a5030bb2d03c3
Size (Python-2.3.4.tgz) = 8502738 bytes
@@ -7,10 +7,13 @@
SHA1 (patch-ad) = c8f6ea08e68dae3bd9ad639c38e74cf654c0b41e
SHA1 (patch-ae) = 35d27825ea4f3930cce651761e192a7302696eba
SHA1 (patch-af) = d23d42d5d5fc31aeaf1fca89448873cc4179ccf6
-SHA1 (patch-ah) = 4bc95e775a2b3f4f1997d0779c561db2e9e7b575
-SHA1 (patch-al) = 903b42991a83fe5f5f4f3a20f88abb4937174f26
+SHA1 (patch-ah) = f9a46bfe82acec594cf44afd43f359a5248edadb
+SHA1 (patch-al) = 72c155d28675c10e30a0b13f33f6d1a52457ee47
SHA1 (patch-am) = eda4c6161b4237e1281cc6b82b26c5195444dcff
SHA1 (patch-ba) = dd8f89952d7f40c9a979e362758775f093e047bc
SHA1 (patch-bb) = 7c6fe21b6328dddce2a079b0a1c7ae0bee817bae
SHA1 (patch-ca) = 95f5a515fe3dafd75d077e0591e88a34447152ff
SHA1 (patch-cb) = 301205b29db1ca60f06b2dc0423f5f911eabcd18
+SHA1 (patch-da) = b082eff79571726701aab53c37d8d53a8115e204
+SHA1 (patch-db) = ac37d14f55c165fee1d8225304d6c3c8ec203fec
+SHA1 (patch-dc) = 151159e0bafd248040ab57e5c05152a91fe44ac6
diff -r bde05980c626 -r e4a8621fc526 lang/python23-pth/patches/patch-ah
--- a/lang/python23-pth/patches/patch-ah Sun Nov 28 13:04:03 2004 +0000
+++ b/lang/python23-pth/patches/patch-ah Sun Nov 28 13:33:19 2004 +0000
@@ -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 @@
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 @@
$(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 -r bde05980c626 -r e4a8621fc526 lang/python23-pth/patches/patch-al
--- a/lang/python23-pth/patches/patch-al Sun Nov 28 13:04:03 2004 +0000
+++ b/lang/python23-pth/patches/patch-al Sun Nov 28 13:33:19 2004 +0000
@@ -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 @@
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 -r bde05980c626 -r e4a8621fc526 lang/python23-pth/patches/patch-da
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/python23-pth/patches/patch-da Sun Nov 28 13:33:19 2004 +0000
@@ -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 -r bde05980c626 -r e4a8621fc526 lang/python23-pth/patches/patch-db
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/python23-pth/patches/patch-db Sun Nov 28 13:33:19 2004 +0000
@@ -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 -r bde05980c626 -r e4a8621fc526 lang/python23-pth/patches/patch-dc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/python23-pth/patches/patch-dc Sun Nov 28 13:33:19 2004 +0000
@@ -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
diff -r bde05980c626 -r e4a8621fc526 lang/python23/PLIST.Darwin
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/python23/PLIST.Darwin Sun Nov 28 13:33:19 2004 +0000
@@ -0,0 +1,492 @@
+lib/python${PY_VER_SUFFIX}/lib-dynload/audioop.so
+lib/python${PY_VER_SUFFIX}/lib-dynload/imageop.so
+lib/python${PY_VER_SUFFIX}/lib-dynload/rgbimg.so
+lib/python${PY_VER_SUFFIX}/lib-dynload/_CF.so
+lib/python${PY_VER_SUFFIX}/lib-dynload/ColorPicker.so
+lib/python${PY_VER_SUFFIX}/lib-dynload/autoGIL.so
+lib/python${PY_VER_SUFFIX}/lib-dynload/gestalt.so
+lib/python${PY_VER_SUFFIX}/lib-dynload/MacOS.so
+lib/python${PY_VER_SUFFIX}/lib-dynload/_Res.so
+lib/python${PY_VER_SUFFIX}/lib-dynload/OSATerminology.so
+lib/python${PY_VER_SUFFIX}/lib-dynload/icglue.so
+lib/python${PY_VER_SUFFIX}/lib-dynload/_Snd.so
+lib/python${PY_VER_SUFFIX}/lib-dynload/Nav.so
+lib/python${PY_VER_SUFFIX}/lib-dynload/_AE.so
+lib/python${PY_VER_SUFFIX}/lib-dynload/_AH.so
+lib/python${PY_VER_SUFFIX}/lib-dynload/_App.so
+lib/python${PY_VER_SUFFIX}/lib-dynload/_CarbonEvt.so
+lib/python${PY_VER_SUFFIX}/lib-dynload/_CG.so
+lib/python${PY_VER_SUFFIX}/lib-dynload/_Cm.so
+lib/python${PY_VER_SUFFIX}/lib-dynload/_Ctl.so
+lib/python${PY_VER_SUFFIX}/lib-dynload/_Dlg.so
+lib/python${PY_VER_SUFFIX}/lib-dynload/_Drag.so
+lib/python${PY_VER_SUFFIX}/lib-dynload/_Evt.so
+lib/python${PY_VER_SUFFIX}/lib-dynload/_File.so
+lib/python${PY_VER_SUFFIX}/lib-dynload/_Folder.so
+lib/python${PY_VER_SUFFIX}/lib-dynload/_Fm.so
+lib/python${PY_VER_SUFFIX}/lib-dynload/_Help.so
+lib/python${PY_VER_SUFFIX}/lib-dynload/_Icn.so
+lib/python${PY_VER_SUFFIX}/lib-dynload/_IBCarbon.so
+lib/python${PY_VER_SUFFIX}/lib-dynload/_List.so
+lib/python${PY_VER_SUFFIX}/lib-dynload/_Menu.so
+lib/python${PY_VER_SUFFIX}/lib-dynload/_Mlte.so
+lib/python${PY_VER_SUFFIX}/lib-dynload/_Qd.so
+lib/python${PY_VER_SUFFIX}/lib-dynload/_Qdoffs.so
+lib/python${PY_VER_SUFFIX}/lib-dynload/_Qt.so
+lib/python${PY_VER_SUFFIX}/lib-dynload/_Scrap.so
+lib/python${PY_VER_SUFFIX}/lib-dynload/_TE.so
+lib/python${PY_VER_SUFFIX}/lib-dynload/_Win.so
+lib/python${PY_VER_SUFFIX}/plat-mac/Carbon/AE.py
+lib/python${PY_VER_SUFFIX}/plat-mac/Carbon/AH.py
+lib/python${PY_VER_SUFFIX}/plat-mac/Carbon/Alias.py
+lib/python${PY_VER_SUFFIX}/plat-mac/Carbon/Aliases.py
+lib/python${PY_VER_SUFFIX}/plat-mac/Carbon/App.py
+lib/python${PY_VER_SUFFIX}/plat-mac/Carbon/Appearance.py
+lib/python${PY_VER_SUFFIX}/plat-mac/Carbon/AppleEvents.py
+lib/python${PY_VER_SUFFIX}/plat-mac/Carbon/AppleHelp.py
+lib/python${PY_VER_SUFFIX}/plat-mac/Carbon/CF.py
+lib/python${PY_VER_SUFFIX}/plat-mac/Carbon/CG.py
+lib/python${PY_VER_SUFFIX}/plat-mac/Carbon/CarbonEvents.py
+lib/python${PY_VER_SUFFIX}/plat-mac/Carbon/CarbonEvt.py
+lib/python${PY_VER_SUFFIX}/plat-mac/Carbon/Cm.py
Home |
Main Index |
Thread Index |
Old Index