[34610] trunk/dports/lang

reiffert at macports.org reiffert at macports.org
Fri Feb 29 04:32:02 PST 2008


Revision: 34610
          http://trac.macosforge.org/projects/macports/changeset/34610
Author:   reiffert at macports.org
Date:     2008-02-29 04:32:01 -0800 (Fri, 29 Feb 2008)

Log Message:
-----------
Initial commit of a python24 Doc package. Fixes #8488. If by any chance this is not recommended or advisable, please remove this port and integrate it into python24.

Added Paths:
-----------
    trunk/dports/lang/python24-doc/
    trunk/dports/lang/python24-doc/Portfile
    trunk/dports/lang/python24-doc/files/
    trunk/dports/lang/python24-doc/files/patch-Include-pyport.h
    trunk/dports/lang/python24-doc/files/patch-Lib-cgi.py
    trunk/dports/lang/python24-doc/files/patch-Lib-site.py
    trunk/dports/lang/python24-doc/files/patch-Mac-OSX-IDLE-Makefile.in
    trunk/dports/lang/python24-doc/files/patch-Mac-OSX-Makefile.in
    trunk/dports/lang/python24-doc/files/patch-Mac-OSX-PythonLauncher-Makefile.in
    trunk/dports/lang/python24-doc/files/patch-Makefile.pre.in
    trunk/dports/lang/python24-doc/files/patch-configure
    trunk/dports/lang/python24-doc/files/patch-setup.py
    trunk/dports/lang/python24-doc/files/python24

Added: trunk/dports/lang/python24-doc/Portfile
===================================================================
--- trunk/dports/lang/python24-doc/Portfile	                        (rev 0)
+++ trunk/dports/lang/python24-doc/Portfile	2008-02-29 12:32:01 UTC (rev 34610)
@@ -0,0 +1,96 @@
+# $Id: Portfile 33301 2008-01-23 10:58:09Z ryandesign at macports.org $
+
+PortSystem 1.0
+
+name            python24-doc
+version         2.4.4
+revision        2
+set major_version   2
+set minor_version   4
+categories      lang
+platforms       darwin freebsd linux
+maintainers     nomaintainer
+description     An interpreted, object-oriented programming language
+long_description    Python is an interpreted, interactive, object-oriented \
+                    programming language.
+
+homepage        http://www.python.org/
+master_sites    ${homepage}/ftp/python/${version}/ \
+                ftp://ftp.python.org/pub/python/${version}/
+distname        Python-${version}
+checksums       md5 0ba90c79175c017101100ebf5978e906
+patchfiles      patch-configure \
+                patch-Makefile.pre.in \
+                patch-Lib-cgi.py \
+                patch-Lib-site.py \
+                patch-setup.py \
+                patch-Include-pyport.h \
+                patch-Mac-OSX-Makefile.in \
+                patch-Mac-OSX-IDLE-Makefile.in \
+                patch-Mac-OSX-PythonLauncher-Makefile.in
+
+use_bzip2       yes
+
+depends_lib     port:gettext port:python24 port:latex2html
+
+configure.args  --enable-shared \
+                --mandir=${prefix}/share/man \
+                --bindir=${prefix}/bin \
+                --libdir=${prefix}/lib \
+                --without-readline \
+                --enable-framework=${prefix}/Library/Frameworks \
+                --disable-tk \
+                --enable-ipv6
+
+post-patch {
+    reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/Lib/cgi.py
+    reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/Lib/site.py
+    reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/Mac/OSX/Makefile.in
+    reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/setup.py
+}
+
+build.target	html
+build.cmd	{ cd Doc && make }
+
+destroot.target frameworkinstall maninstall
+destroot {
+	set framewdir ${prefix}/Library/Frameworks/Python.framework
+	file mkdir ${destroot}${framewdir}/Versions/2.4/Resources/English.ljproj/Documentation
+	system "cd $worksrcpath/Doc/html/ && \
+		cp -r * ${destroot}${framewdir}/Versions/2.4/Resources/English.ljproj/Documentation"
+}
+
+
+# delete symlinks without version suffix, use python_select instead to choose version
+
+platform puredarwin {
+    configure.args-delete   --enable-framework=${prefix}/Library/Frameworks
+    configure.args-append   --disable-toolbox-glue --disable-framework
+    destroot.target     install maninstall
+}
+
+platform darwin 8 {
+    configure.args-append --with-cxx=/usr/bin/g++-4.0
+}
+
+platform darwin 9 {
+    configure.cppflags-append    -D__DARWIN_UNIX03
+}
+
+platform freebsd {
+    configure.args-delete   --enable-framework=${prefix}/Library/Frameworks
+    configure.args-append   --disable-framework
+    build.target        all libpython2.4.so
+    destroot.target     install maninstall
+}
+
+platform linux {
+    configure.args-delete   --enable-framework=${prefix}/Library/Frameworks
+    configure.args-append   --disable-framework
+    build.target        all libpython2.4.so
+    destroot.target     install maninstall
+}
+
+livecheck.check regex
+livecheck.url   http://www.python.org/download/releases/
+livecheck.regex Python (2.4.\[0-9\]+)

Added: trunk/dports/lang/python24-doc/files/patch-Include-pyport.h
===================================================================
--- trunk/dports/lang/python24-doc/files/patch-Include-pyport.h	                        (rev 0)
+++ trunk/dports/lang/python24-doc/files/patch-Include-pyport.h	2008-02-29 12:32:01 UTC (rev 34610)
@@ -0,0 +1,34 @@
+--- Include/pyport.h.orig	2007-03-12 23:26:06.000000000 -0700
++++ Include/pyport.h	2007-03-12 23:29:35.000000000 -0700
+@@ -152,11 +152,23 @@ typedef PY_LONG_LONG		Py_intptr_t;
+ #if defined(PYOS_OS2) && defined(PYCC_GCC)
+ #include <sys/types.h>
+ #endif
++
++#if (defined __APPLE__) && (!defined _POSIX_C_SOURCE)
++#define TEMPORARILY_DEFINING__POSIX_C_SOURCE    /* so we can #undef it later */
++#define _POSIX_C_SOURCE   /* avoid deprecated struct ostat in sys/stat.h */
++#endif
++
+ #include <sys/stat.h>
+ #elif defined(HAVE_STAT_H)
+ #include <stat.h>
+ #endif
+ 
++/* Mac OS X: undefine _POSIX_C_SOURCE if it wasn't defined before */
++#ifdef TEMPORARILY_DEFINING__POSIX_C_SOURCE
++#undef _POSIX_C_SOURCE
++#undef TEMPORARILY_DEFINING__POSIX_C_SOURCE
++#endif
++
+ #if defined(PYCC_VACPP)
+ /* VisualAge C/C++ Failed to Define MountType Field in sys/stat.h */
+ #define S_IFMT (S_IFDIR|S_IFCHR|S_IFREG)
+@@ -393,6 +405,7 @@ extern char * _getpty(int *, int, mode_t
+ /* BSDI does not supply a prototype for the 'openpty' and 'forkpty'
+    functions, even though they are included in libutil. */
+ #include <termios.h>
++struct winsize;
+ extern int openpty(int *, int *, char *, struct termios *, struct winsize *);
+ extern int forkpty(int *, char *, struct termios *, struct winsize *);
+ #endif /* !defined(HAVE_PTY_H) && !defined(HAVE_LIBUTIL_H) */

Added: trunk/dports/lang/python24-doc/files/patch-Lib-cgi.py
===================================================================
--- trunk/dports/lang/python24-doc/files/patch-Lib-cgi.py	                        (rev 0)
+++ trunk/dports/lang/python24-doc/files/patch-Lib-cgi.py	2008-02-29 12:32:01 UTC (rev 34610)
@@ -0,0 +1,18 @@
+--- Lib/cgi.py.orig	2006-08-11 09:14:38.000000000 +0200
++++ Lib/cgi.py	2007-08-21 15:36:54.000000000 +0200
+@@ -1,13 +1,6 @@
+-#! /usr/local/bin/python
++#! __PREFIX__/bin/python2.4
+ 
+-# NOTE: the above "/usr/local/bin/python" is NOT a mistake.  It is
+-# intentionally NOT "/usr/bin/env python".  On many systems
+-# (e.g. Solaris), /usr/local/bin is not in $PATH as passed to CGI
+-# scripts, and /usr/local/bin is the default directory where Python is
+-# installed, so /usr/bin/env would be unable to find python.  Granted,
+-# binary installations by Linux vendors often install Python in
+-# /usr/bin.  So let those vendors patch cgi.py to match their choice
+-# of installation.
++# NOTE: /usr/local/bin/python patched for MacPorts installation
+ 
+ """Support module for CGI (Common Gateway Interface) scripts.
+ 

Added: trunk/dports/lang/python24-doc/files/patch-Lib-site.py
===================================================================
--- trunk/dports/lang/python24-doc/files/patch-Lib-site.py	                        (rev 0)
+++ trunk/dports/lang/python24-doc/files/patch-Lib-site.py	2008-02-29 12:32:01 UTC (rev 34610)
@@ -0,0 +1,10 @@
+--- Lib/site.py	Tue Jul 20 04:28:28 2004
++++ Lib/site.py.new	Mon Apr  4 10:47:12 2005
+@@ -186,6 +186,7 @@
+             else:
+                 sitedirs = [prefix, os.path.join(prefix, "lib", "site-packages")]
+             if sys.platform == 'darwin':
++                sitedirs.append( os.path.join('__PREFIX__', 'lib', 'python2.4', 'site-packages') )
+                 # for framework builds *only* we add the standard Apple
+                 # locations. Currently only per-user, but /Library and
+                 # /Network/Library could be added too

Added: trunk/dports/lang/python24-doc/files/patch-Mac-OSX-IDLE-Makefile.in
===================================================================
--- trunk/dports/lang/python24-doc/files/patch-Mac-OSX-IDLE-Makefile.in	                        (rev 0)
+++ trunk/dports/lang/python24-doc/files/patch-Mac-OSX-IDLE-Makefile.in	2008-02-29 12:32:01 UTC (rev 34610)
@@ -0,0 +1,11 @@
+--- Mac/OSX/IDLE/Makefile.in.orig	2006-10-08 10:41:25.000000000 -0700
++++ Mac/OSX/IDLE/Makefile.in	2007-04-27 13:27:07.000000000 -0700
+@@ -21,7 +21,7 @@
+ 
+ BUNDLEBULDER=$(srcdir)/../../../Lib/plat-mac/bundlebuilder.py
+ 
+-PYTHONAPPSDIR=/Applications/MacPython $(VERSION)
++PYTHONAPPSDIR=/Applications/MacPorts/MacPython $(VERSION)
+ 
+ all: IDLE.app
+ 

Added: trunk/dports/lang/python24-doc/files/patch-Mac-OSX-Makefile.in
===================================================================
--- trunk/dports/lang/python24-doc/files/patch-Mac-OSX-Makefile.in	                        (rev 0)
+++ trunk/dports/lang/python24-doc/files/patch-Mac-OSX-Makefile.in	2008-02-29 12:32:01 UTC (rev 34610)
@@ -0,0 +1,20 @@
+--- Mac/OSX/Makefile.in.orig	2006-10-08 10:41:25.000000000 -0700
++++ Mac/OSX/Makefile.in	2007-04-27 11:07:02.000000000 -0700
+@@ -5,7 +5,7 @@
+ VERSION=@VERSION@
+ builddir = ../..
+ srcdir = @srcdir@
+-prefix=/Library/Frameworks/Python.framework/Versions/$(VERSION)
++prefix=__PREFIX__/Library/Frameworks/Python.framework/Versions/$(VERSION)
+ LIBDEST=$(prefix)/lib/python$(VERSION)
+ BUILDPYTHON=$(builddir)/python.exe
+ RUNSHARED=       @RUNSHARED@
+@@ -16,7 +16,7 @@
+ 
+ # These are normally glimpsed from the previous set
+ bindir=@exec_prefix@/bin
+-PYTHONAPPSPATH=/Applications/MacPython $(VERSION)
++PYTHONAPPSPATH=/Applications/MacPorts/MacPython $(VERSION)
+ PYTHONAPPSDIR=$(PYTHONAPPSPATH)
+ APPINSTALLDIR=$(prefix)/Resources/Python.app
+ 

Added: trunk/dports/lang/python24-doc/files/patch-Mac-OSX-PythonLauncher-Makefile.in
===================================================================
--- trunk/dports/lang/python24-doc/files/patch-Mac-OSX-PythonLauncher-Makefile.in	                        (rev 0)
+++ trunk/dports/lang/python24-doc/files/patch-Mac-OSX-PythonLauncher-Makefile.in	2008-02-29 12:32:01 UTC (rev 34610)
@@ -0,0 +1,20 @@
+--- Mac/OSX/PythonLauncher/Makefile.in.orig	2006-10-08 10:41:25.000000000 -0700
++++ Mac/OSX/PythonLauncher/Makefile.in	2007-04-27 13:33:26.000000000 -0700
+@@ -20,7 +20,7 @@
+ 
+ BUNDLEBULDER=$(srcdir)/../../../Lib/plat-mac/bundlebuilder.py
+ 
+-PYTHONAPPSDIR=/Applications/MacPython $(VERSION)
++PYTHONAPPSDIR=/Applications/MacPorts/MacPython $(VERSION)
+ OBJECTS=FileSettings.o MyAppDelegate.o MyDocument.o PreferencesWindowController.o doscript.o main.o
+ 
+ all: PythonLauncher.app
+@@ -56,7 +56,7 @@
+ 		--resource=$(srcdir)/factorySettings.plist \
+ 		--plist=$(srcdir)/Info.plist \
+ 		build
+-	find "PythonLauncher.app" -name '.svn' -print0 | xargs -0 rm -r
++	find "PythonLauncher.app" -name '.svn' -print0 | xargs -0 rm -r || :
+ 		
+ 
+ FileSettings.o: $(srcdir)/FileSettings.m

Added: trunk/dports/lang/python24-doc/files/patch-Makefile.pre.in
===================================================================
--- trunk/dports/lang/python24-doc/files/patch-Makefile.pre.in	                        (rev 0)
+++ trunk/dports/lang/python24-doc/files/patch-Makefile.pre.in	2008-02-29 12:32:01 UTC (rev 34610)
@@ -0,0 +1,37 @@
+--- Makefile.pre.in.orig	2006-10-08 10:41:25.000000000 -0700
++++ Makefile.pre.in	2007-04-20 18:06:11.000000000 -0700
+@@ -56,7 +56,7 @@
+ OPT=		@OPT@
+ BASECFLAGS=	@BASECFLAGS@
+ CFLAGS=		$(BASECFLAGS) $(OPT)
+-CPPFLAGS=	-I. -I$(srcdir)/Include
++CPPFLAGS=	@CPPFLAGS@ -I. -I$(srcdir)/Include
+ LDFLAGS=	@LDFLAGS@
+ LDLAST=		@LDLAST@
+ SGI_ABI=	@SGI_ABI@
+@@ -364,6 +364,10 @@
+ libpython$(VERSION).sl: $(LIBRARY_OBJS)
+ 	$(LDSHARED) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM)
+ 
++libpython$(VERSION).dylib: $(LIBRARY_OBJS)
++	$(LINKCC) -dynamiclib -install_name $(LIBDIR)/$@ -current_version $(VERSION) -compatibility_version $(VERSION) -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.
+@@ -655,7 +659,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
+ 

Added: trunk/dports/lang/python24-doc/files/patch-configure
===================================================================
--- trunk/dports/lang/python24-doc/files/patch-configure	                        (rev 0)
+++ trunk/dports/lang/python24-doc/files/patch-configure	2008-02-29 12:32:01 UTC (rev 34610)
@@ -0,0 +1,36 @@
+--- configure.orig	2007-04-05 21:32:57.000000000 -0700
++++ configure	2007-04-05 21:32:59.000000000 -0700
+@@ -3907,7 +3907,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
+ 	    if test "${enable_universalsdk}"; then
+ 		BASECFLAGS="-arch ppc -arch i386 -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
+ 	    fi
+@@ -10328,7 +10333,7 @@
+         else
+             LIBTOOL_CRUFT=""
+     fi
+-    LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -lSystem -lSystemStubs -arch_only ppc'
++    LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -lSystem -lSystemStubs -arch_only '`/usr/bin/arch`
+     LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
+     LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
+ esac
+@@ -10472,8 +10477,8 @@
+ 				LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(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
+ 		fi
+ 		;;

Added: trunk/dports/lang/python24-doc/files/patch-setup.py
===================================================================
--- trunk/dports/lang/python24-doc/files/patch-setup.py	                        (rev 0)
+++ trunk/dports/lang/python24-doc/files/patch-setup.py	2008-02-29 12:32:01 UTC (rev 34610)
@@ -0,0 +1,37 @@
+--- /Users/roederja/Desktop/setup.py.orig	2007-05-20 13:02:39.000000000 -0700
++++ setup.py	2007-05-20 14:49:50.000000000 -0700
+@@ -246,11 +246,11 @@
+         # Add paths to popular package managers on OS X/darwin
+         if sys.platform == "darwin":
+             # Fink installs into /sw by default
+-            add_dir_to_list(self.compiler.library_dirs, '/sw/lib')
+-            add_dir_to_list(self.compiler.include_dirs, '/sw/include')
++            #add_dir_to_list(self.compiler.library_dirs, '/sw/lib')
++            #add_dir_to_list(self.compiler.include_dirs, '/sw/include')
+             # DarwinPorts installs into /opt/local by default
+-            #add_dir_to_list(self.compiler.library_dirs, '/opt/local/lib')
+-            #add_dir_to_list(self.compiler.include_dirs, '/opt/local/include')
++            add_dir_to_list(self.compiler.library_dirs, '__PREFIX__/lib')
++            add_dir_to_list(self.compiler.include_dirs, '__PREFIX__/include')
+ 
+         if os.path.normpath(sys.prefix) != '/usr':
+             add_dir_to_list(self.compiler.library_dirs,
+@@ -357,7 +357,7 @@
+             exts.append( Extension('unicodedata', ['unicodedata.c']) )
+         # access to ISO C locale support
+         data = open('pyconfig.h').read()
+-        m = re.search(r"#s*define\s+WITH_LIBINTL\s+1\s*", data)
++        m = re.search(r"#\s*define\s+(HAVE_LIBINTL_H|WITH_LIBINTL)\s+1\s*", data)
+         if m is not None:
+             locale_libs = ['intl']
+         else:
+@@ -954,7 +954,8 @@
+         self.extensions.extend(exts)
+ 
+         # Call the method for detecting whether _tkinter can be compiled
+-        self.detect_tkinter(inc_dirs, lib_dirs)
++        if ("--disable-tk" not in sysconfig.get_config_var("CONFIG_ARGS")):
++            self.detect_tkinter(inc_dirs, lib_dirs)
+ 
+     def detect_tkinter_darwin(self, inc_dirs, lib_dirs):
+         # The _tkinter module, using frameworks. Since frameworks are quite

Added: trunk/dports/lang/python24-doc/files/python24
===================================================================
--- trunk/dports/lang/python24-doc/files/python24	                        (rev 0)
+++ trunk/dports/lang/python24-doc/files/python24	2008-02-29 12:32:01 UTC (rev 34610)
@@ -0,0 +1,8 @@
+bin/python2.4
+bin/pythonw2.4
+-
+bin/idle2.4
+bin/pydoc2.4
+bin/smtpd2.4.py
+-
+share/man/man1/python2.4.1.gz

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080229/64d2782d/attachment.html 


More information about the macports-changes mailing list