Ticket #12803: python25-2.5.1_1.diff
File python25-2.5.1_1.diff, 7.2 KB (added by nox@…, 17 years ago) |
---|
-
files/patch-Makefile.pre.in
1 --- work/Python-2.5.1/Makefile.pre.in 2006-12-08 21:46:13.000000000 +01002 +++ Makefile.pre.in 2007-0 5-04 12:39:21.000000000 +02003 @@ - 168,7 +168,7@@4 MACHDEP_OBJS= @MACHDEP_OBJS@5 UNICODE_OBJS= @UNICODE_OBJS@1 --- Makefile.pre.in.orig 2007-09-29 02:15:52.000000000 +0200 2 +++ Makefile.pre.in 2007-09-29 02:18:57.000000000 +0200 3 @@ -373,6 +373,13 @@ 4 libpython$(VERSION).sl: $(LIBRARY_OBJS) 5 $(LDSHARED) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM) 6 6 7 -PYTHON= python$(EXE) 8 +PYTHON= @bindir@/python2.5 9 BUILDPYTHON= python$(BUILDEXE) 10 11 # === Definitions added by makesetup === 12 @@ -650,7 +650,6 @@ 13 then rm -f $(DESTDIR)$(BINDIR)/$(PYTHON); \ 14 else true; \ 7 +libpython$(VERSION).dylib: $(LIBRARY) 8 + libtool -o $@ -dynamic $(OTHER_LIBTOOL_OPT) \ 9 + -all_load $(LIBRARY) -single_module \ 10 + -install_name $(LIBDIR)/$@ \ 11 + -compatibility_version $(VERSION) \ 12 + -current_version $(VERSION) -lSystem -lSystemStubs $(LDFLAGS) 13 + 14 # This rule is here for OPENSTEP/Rhapsody/MacOSX. It builds a temporary 15 # minimal framework (not including the Lib directory and such) in the current 16 # directory. 17 @@ -675,6 +682,9 @@ 18 fi \ 19 fi; \ 20 else true; \ 21 + fi; \ 22 + if test -f libpython$(VERSION).dylib; then \ 23 + $(INSTALL_SHARED) libpython$(VERSION).dylib $(DESTDIR)$(LIBDIR); \ 15 24 fi 16 - (cd $(DESTDIR)$(BINDIR); $(LN) python$(VERSION)$(EXE) $(PYTHON))17 (cd $(DESTDIR)$(BINDIR); $(LN) -sf python$(VERSION)-config python-config)18 25 19 # Install the interpreter with $(VERSION) affixed 26 # Install the manual page 27 @@ -706,11 +716,10 @@ 28 plat-mac/lib-scriptpackages/SystemEvents \ 29 plat-mac/lib-scriptpackages/Terminal 30 PLATMACPATH=:plat-mac:plat-mac/lib-scriptpackages 31 -LIBSUBDIRS= lib-tk site-packages test test/output test/data \ 32 +LIBSUBDIRS= site-packages test test/output test/data \ 33 test/decimaltestdata \ 34 encodings compiler hotshot \ 35 email email/mime email/test email/test/data \ 36 - sqlite3 sqlite3/test \ 37 logging bsddb bsddb/test csv wsgiref \ 38 ctypes ctypes/test ctypes/macholib idlelib idlelib/Icons \ 39 distutils distutils/command distutils/tests $(XMLLIBSUBDIRS) \ -
files/patch-Misc-setuid-prog.c
1 --- Misc/setuid-prog.c.orig Sat Dec 11 14:29:22 2004 2 +++ Misc/setuid-prog.c Sat Dec 11 14:30:13 2004 3 @@ -70,6 +70,12 @@ 4 #define environ _environ 5 #endif 6 7 +#if defined(__APPLE__) 8 +#include <sys/time.h> 9 +#include <crt_externs.h> 10 +#define environ (*_NSGetEnviron()) 11 +#endif 12 + 13 /* don't change def_IFS */ 14 char def_IFS[] = "IFS= \t\n"; 15 /* you may want to change def_PATH, but you should really change it in */ 16 -
files/patch-Modules-posixmodule.c
1 --- Modules/posixmodule.c.orig Sat Dec 11 14:27:52 2004 2 +++ Modules/posixmodule.c Sat Dec 11 14:28:17 2004 3 @@ -339,7 +339,7 @@ 4 #endif 5 6 /* Return a dictionary corresponding to the POSIX environment table */ 7 -#ifdef WITH_NEXT_FRAMEWORK 8 +#ifdef __APPLE__ 9 /* On Darwin/MacOSX a shared library or framework has no access to 10 ** environ directly, we must obtain it with _NSGetEnviron(). 11 */ 12 @@ -357,7 +357,7 @@ 13 d = PyDict_New(); 14 if (d == NULL) 15 return NULL; 16 -#ifdef WITH_NEXT_FRAMEWORK 17 +#ifdef __APPLE__ 18 if (environ == NULL) 19 environ = *_NSGetEnviron(); 20 #endif 21 -
files/patch-configure
1 --- configure.in.orig 2007-09-28 21:07:32.000000000 +0200 2 +++ configure.in 2007-09-28 21:08:12.000000000 +0200 3 @@ -669,6 +669,11 @@ 4 BLDLIBRARY='-L. -lpython$(VERSION)' 5 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib} 6 ;; 7 + Darwin*) 8 + LDLIBRARY='libpython$(VERSION).dylib' 9 + BLDLIBRARY='-L. -lpython$(VERSION)' 10 + RUNSHARED=DYLD_LIBRARY_PATH="`pwd`:${DYLD_LIBRARY_PATH}" 11 + ;; 12 esac 13 else # shared is disabled 14 case $ac_sys_system in 15 --- configure.orig 2007-09-28 21:07:26.000000000 +0200 16 +++ configure 2007-09-28 21:07:33.000000000 +0200 17 @@ -3445,6 +3445,11 @@ 18 BLDLIBRARY='-L. -lpython$(VERSION)' 19 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib} 20 ;; 21 + Darwin*) 22 + LDLIBRARY='libpython$(VERSION).dylib' 23 + BLDLIBRARY='-L. -lpython$(VERSION)' 24 + RUNSHARED=DYLD_LIBRARY_PATH="`pwd`:${DYLD_LIBRARY_PATH}" 25 + ;; 26 esac 27 else # shared is disabled 28 case $ac_sys_system in -
Portfile
4 4 5 5 name python25 6 6 version 2.5.1 7 revision 17 revision 2 8 8 categories lang 9 9 platforms darwin 10 10 maintainers mww@macports.org … … 21 21 22 22 distname Python-${version} 23 23 use_bzip2 yes 24 checksums sha1 993a66bd2dabb0c4f33ca98372576315ef113df6 \25 rmd160 af0e8ed93bbc07015c338ae19bbee8811da21c1c26 24 27 patchfiles patch-setup.py patch-Makefile.pre.in patch-Lib-cgi.py 25 checksums md5 70084ffa561660f07de466c2c8c4842d \ 26 sha1 993a66bd2dabb0c4f33ca98372576315ef113df6 \ 27 rmd160 af0e8ed93bbc07015c338ae19bbee8811da21c1c 28 29 depends_lib port:gettext 30 31 patchfiles patch-configure \ 32 patch-Makefile.pre.in \ 33 patch-Misc-setuid-prog.c \ 34 patch-Modules-posixmodule.c \ 35 patch-setup.py \ 36 patch-Lib-cgi.py 28 37 29 38 configure.args --enable-shared \ 30 39 --mandir=${prefix}/share/man \ 31 --bindir=${prefix}/bin \32 --libdir=${prefix}/lib \33 --without-readline \34 --enable-ipv6 \35 --disable-tk \36 40 --disable-framework 37 41 38 42 post-patch { … … 42 46 test.run yes 43 47 test.target test 44 48 45 destroot.target install maninstall 49 destroot.target altinstall \ 50 maninstall 51 46 52 post-destroot { 47 system "cd ${destroot}${prefix}/bin && mv idle idle2.5 && mv pydoc pydoc2.5 && mv python-config python-config2.5 && mv smtpd.py smtpd2.5.py" 48 system "cd ${destroot}${prefix}/share/man/man1 && mv python.1 python2.5.1" 53 set branche [join [lrange [split ${version} .] 0 1] .] 54 55 foreach bin {idle pydoc smtpd.py} { 56 move ${destroot}${prefix}/bin/${bin} \ 57 ${destroot}${prefix}/bin/${bin}${branche} 58 } 59 move ${destroot}${prefix}/share/man/man1/python.1 \ 60 ${destroot}${prefix}/share/man/man1/python${branche}.1 49 61 } 50 62 51 63 platform darwin 8 { … … 65 77 platform puredarwin { 66 78 # configure.args-delete --enable-framework=${prefix}/Library/Frameworks 67 79 configure.args-append --disable-toolbox-glue --disable-framework 68 destroot.target install maninstall69 80 } 70 81 71 82 livecheck.check regex 72 livecheck.url http://www.python.org/download/releases/ 73 livecheck.regex Python (2.5\[0-9\.\]+) 83 livecheck.url ${homepage}download/releases/ 84 livecheck.regex Python (2\\.5(?:\\.\\d+)*) 85