[34637] trunk/dports/lang

reiffert at macports.org reiffert at macports.org
Fri Feb 29 15:27:32 PST 2008


Revision: 34637
          http://trac.macosforge.org/projects/macports/changeset/34637
Author:   reiffert at macports.org
Date:     2008-02-29 15:27:31 -0800 (Fri, 29 Feb 2008)

Log Message:
-----------
New port python25-doc as motivated by #8488.

Added Paths:
-----------
    trunk/dports/lang/python25-doc/
    trunk/dports/lang/python25-doc/Portfile
    trunk/dports/lang/python25-doc/files/
    trunk/dports/lang/python25-doc/files/patch-Lib-cgi.py.diff
    trunk/dports/lang/python25-doc/files/patch-Makefile.pre.in.diff
    trunk/dports/lang/python25-doc/files/patch-Misc-setuid-prog.c.diff
    trunk/dports/lang/python25-doc/files/patch-Modules-posixmodule.c.diff
    trunk/dports/lang/python25-doc/files/patch-configure.diff
    trunk/dports/lang/python25-doc/files/patch-setup.py.diff
    trunk/dports/lang/python25-doc/files/python25

Added: trunk/dports/lang/python25-doc/Portfile
===================================================================
--- trunk/dports/lang/python25-doc/Portfile	                        (rev 0)
+++ trunk/dports/lang/python25-doc/Portfile	2008-02-29 23:27:31 UTC (rev 34637)
@@ -0,0 +1,83 @@
+# $Id$ 
+
+PortSystem 1.0
+
+name			python25-doc
+version			2.5.2
+categories		lang
+platforms		darwin
+maintainers		nomaintainer
+
+description		HTML documentation for Python 2.5
+long_description	HTML documentation for Python 2.5. Use by running \
+			'pydoc2.5 TOPIC', e.g. 'pydoc2.5 NUMBERS'.
+
+homepage		http://www.python.org/
+master_sites		${homepage}/ftp/python/${version}/ \
+			ftp://ftp.python.org/pub/python/${version}/ \
+			ftp://ftp.fastorama.com/mirrors/ftp.python.org/pub/python/${version}/ \
+			ftp://ftp.python.jp/pub/python/${version}/
+
+distname		Python-${version}
+use_bzip2		yes
+
+checksums       md5 afb5451049eda91fbde10bd5a4b7fadc \
+                sha1 4755d212f50af704c20224a6966e23acc5aea60f \
+                rmd160 b23b02739833e6730799c5866e2b77aae884b63f
+
+depends_lib     port:gettext port:python25 port:latex2html
+
+patchfiles      patch-configure.diff \
+                patch-Makefile.pre.in.diff \
+                patch-Misc-setuid-prog.c.diff \
+                patch-Modules-posixmodule.c.diff \
+                patch-setup.py.diff \
+                patch-Lib-cgi.py.diff
+
+configure.args	--enable-shared \
+			--mandir=${prefix}/share/man \
+			--disable-framework
+
+post-patch {
+    reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/Lib/cgi.py
+}
+
+build.target	html
+build.cmd	{ cd Doc && make }
+
+destroot {
+	file mkdir ${destroot}
+	file mkdir ${destroot}${prefix}/share/doc/${name}/
+	file copy $worksrcpath/Doc/html ${destroot}${prefix}/share/doc/${name}/Documentation
+}
+
+platform darwin 7 {
+	# there is no SystemStubs on 10.3
+	post-patch { reinplace "s|-lSystemStubs||g" ${worksrcpath}/Makefile.pre.in }
+	# To avoid GCC incompatibility issue. See http://nxg.me.uk/note/2004/restFP/ (by ebgssth at gmail.com, ticket #13322)
+	configure.ldflags-append "-lcc_dynamic"
+}
+
+platform darwin 8 {
+	configure.args-append 	--with-cxx=/usr/bin/g++-4.0
+}
+
+platform darwin 9 {
+	configure.cppflags-append	-D__DARWIN_UNIX03
+	configure.args-append 	--with-cxx=/usr/bin/g++-4.0
+}
+
+variant universal {
+    configure.args-append   --enable-universalsdk
+}
+
+# for w/o quicktime sdk, etc. (be prepared for framework build, though)
+platform puredarwin {
+#	configure.args-delete	--enable-framework=${prefix}/Library/Frameworks
+	configure.args-append	--disable-toolbox-glue --disable-framework
+}
+
+livecheck.check	regex
+livecheck.url   ${homepage}download/releases/
+livecheck.regex {Python (2\.5(?:\.\d+)*)}
+


Property changes on: trunk/dports/lang/python25-doc/Portfile
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: trunk/dports/lang/python25-doc/files/patch-Lib-cgi.py.diff
===================================================================
--- trunk/dports/lang/python25-doc/files/patch-Lib-cgi.py.diff	                        (rev 0)
+++ trunk/dports/lang/python25-doc/files/patch-Lib-cgi.py.diff	2008-02-29 23:27:31 UTC (rev 34637)
@@ -0,0 +1,18 @@
+--- Lib/cgi.py.orig	2006-08-10 19:41:07.000000000 +0200
++++ Lib/cgi.py	2007-08-21 15:36:54.000000000 +0200
+@@ -1,13 +1,6 @@
+-#! /usr/local/bin/python
++#! __PREFIX__/bin/python2.5
+ 
+-# 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/python25-doc/files/patch-Makefile.pre.in.diff
===================================================================
--- trunk/dports/lang/python25-doc/files/patch-Makefile.pre.in.diff	                        (rev 0)
+++ trunk/dports/lang/python25-doc/files/patch-Makefile.pre.in.diff	2008-02-29 23:27:31 UTC (rev 34637)
@@ -0,0 +1,26 @@
+--- Makefile.pre.in.orig	2007-09-29 02:15:52.000000000 +0200
++++ Makefile.pre.in	2007-09-29 02:18:57.000000000 +0200
+@@ -373,6 +373,13 @@
+ libpython$(VERSION).sl: $(LIBRARY_OBJS)
+ 	$(LDSHARED) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM)
+ 
++libpython$(VERSION).dylib: $(LIBRARY)
++	/usr/bin/libtool -o $@ -dynamic $(OTHER_LIBTOOL_OPT) \
++		-all_load $(LIBRARY) -single_module \
++		-install_name $(LIBDIR)/$@ \
++		-compatibility_version $(VERSION) \
++		-current_version $(VERSION) -lSystem -lSystemStubs $(LDFLAGS)
++
+ # 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.
+@@ -675,6 +682,9 @@
+ 			fi \
+ 		fi; \
+ 	else	true; \
++	fi; \
++	if test -f libpython$(VERSION).dylib; then \
++		$(INSTALL_SHARED) libpython$(VERSION).dylib $(DESTDIR)$(LIBDIR); \
+ 	fi
+ 
+ # Install the manual page

Added: trunk/dports/lang/python25-doc/files/patch-Misc-setuid-prog.c.diff
===================================================================
--- trunk/dports/lang/python25-doc/files/patch-Misc-setuid-prog.c.diff	                        (rev 0)
+++ trunk/dports/lang/python25-doc/files/patch-Misc-setuid-prog.c.diff	2008-02-29 23:27:31 UTC (rev 34637)
@@ -0,0 +1,16 @@
+--- Misc/setuid-prog.c.orig	Sat Dec 11 14:29:22 2004
++++ Misc/setuid-prog.c	Sat Dec 11 14:30:13 2004
+@@ -70,6 +70,12 @@
+ #define environ _environ
+ #endif
+ 
++#if defined(__APPLE__)
++#include <sys/time.h>
++#include <crt_externs.h>
++#define environ (*_NSGetEnviron())
++#endif
++
+ /* 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 */
+

Added: trunk/dports/lang/python25-doc/files/patch-Modules-posixmodule.c.diff
===================================================================
--- trunk/dports/lang/python25-doc/files/patch-Modules-posixmodule.c.diff	                        (rev 0)
+++ trunk/dports/lang/python25-doc/files/patch-Modules-posixmodule.c.diff	2008-02-29 23:27:31 UTC (rev 34637)
@@ -0,0 +1,21 @@
+--- Modules/posixmodule.c.orig	Sat Dec 11 14:27:52 2004
++++ Modules/posixmodule.c	Sat Dec 11 14:28:17 2004
+@@ -339,7 +339,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().
+ */
+@@ -357,7 +357,7 @@
+ 	d = PyDict_New();
+ 	if (d == NULL)
+ 		return NULL;
+-#ifdef WITH_NEXT_FRAMEWORK
++#ifdef __APPLE__
+ 	if (environ == NULL)
+ 		environ = *_NSGetEnviron();
+ #endif
+

Added: trunk/dports/lang/python25-doc/files/patch-configure.diff
===================================================================
--- trunk/dports/lang/python25-doc/files/patch-configure.diff	                        (rev 0)
+++ trunk/dports/lang/python25-doc/files/patch-configure.diff	2008-02-29 23:27:31 UTC (rev 34637)
@@ -0,0 +1,28 @@
+--- configure.in.orig	2007-09-28 21:07:32.000000000 +0200
++++ configure.in	2007-09-28 21:08:12.000000000 +0200
+@@ -669,6 +669,11 @@
+ 	  BLDLIBRARY='-L. -lpython$(VERSION)'
+ 	  RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
+ 	  ;;
++	Darwin*)
++	  LDLIBRARY='libpython$(VERSION).dylib'
++	  BLDLIBRARY='-L. -lpython$(VERSION)'
++	  RUNSHARED=DYLD_LIBRARY_PATH="`pwd`:${DYLD_LIBRARY_PATH}"
++	  ;;
+   esac
+ else # shared is disabled
+   case $ac_sys_system in
+--- configure.orig	2007-09-28 21:07:26.000000000 +0200
++++ configure	2007-09-28 21:07:33.000000000 +0200
+@@ -3445,6 +3445,11 @@
+ 	  BLDLIBRARY='-L. -lpython$(VERSION)'
+ 	  RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
+ 	  ;;
++	Darwin*)
++	  LDLIBRARY='libpython$(VERSION).dylib'
++	  BLDLIBRARY='-L. -lpython$(VERSION)'
++	  RUNSHARED=DYLD_LIBRARY_PATH="`pwd`:${DYLD_LIBRARY_PATH}"
++	  ;;
+   esac
+ else # shared is disabled
+   case $ac_sys_system in

Added: trunk/dports/lang/python25-doc/files/patch-setup.py.diff
===================================================================
--- trunk/dports/lang/python25-doc/files/patch-setup.py.diff	                        (rev 0)
+++ trunk/dports/lang/python25-doc/files/patch-setup.py.diff	2008-02-29 23:27:31 UTC (rev 34637)
@@ -0,0 +1,11 @@
+--- setup.py	2006-08-10 01:42:18.000000000 +0200
++++ setup.py	2007-02-17 16:57:24.000000000 +0100
+@@ -15,7 +15,7 @@
+ from distutils.command.install_lib import install_lib
+ 
+ # This global variable is used to hold the list of modules to be disabled.
+-disabled_module_list = []
++disabled_module_list = ["zlib","_hashlib","_ssl","_bsddb","_sqlite3","_tkinter","bz2","gdbm","readline","_curses","_curses_panel"]
+ 
+ def add_dir_to_list(dirlist, dir):
+     """Add the directory 'dir' to the list 'dirlist' (at the front) if

Added: trunk/dports/lang/python25-doc/files/python25
===================================================================
--- trunk/dports/lang/python25-doc/files/python25	                        (rev 0)
+++ trunk/dports/lang/python25-doc/files/python25	2008-02-29 23:27:31 UTC (rev 34637)
@@ -0,0 +1,8 @@
+bin/python2.5
+-
+bin/python-config2.5
+bin/idle2.5
+bin/pydoc2.5
+bin/smtpd2.5.py
+-
+share/man/man1/python2.5.1.gz

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


More information about the macports-changes mailing list