[48187] trunk/dports/lang/python30

blb at macports.org blb at macports.org
Mon Mar 16 01:30:01 PDT 2009


Revision: 48187
          http://trac.macports.org/changeset/48187
Author:   blb at macports.org
Date:     2009-03-16 01:29:58 -0700 (Mon, 16 Mar 2009)
Log Message:
-----------
lang/python30 - fix LINKFORSHARED to point specifically to this port's
framework library;
don't use broken poll (ticket #18376);
add to files/ and copy version.plist which is missing in 2.6 (ticket #18773)

Modified Paths:
--------------
    trunk/dports/lang/python30/Portfile

Added Paths:
-----------
    trunk/dports/lang/python30/files/pyconfig.ed
    trunk/dports/lang/python30/files/version.plist

Modified: trunk/dports/lang/python30/Portfile
===================================================================
--- trunk/dports/lang/python30/Portfile	2009-03-16 07:52:19 UTC (rev 48186)
+++ trunk/dports/lang/python30/Portfile	2009-03-16 08:29:58 UTC (rev 48187)
@@ -4,11 +4,12 @@
 
 name                    python30
 version                 3.0.1
+revision                1
 set major               [lindex [split $version .] 0]
 set branch              [join [lrange [split ${version} .] 0 1] .]
 categories              lang
 platforms               darwin
-maintainers             nomaintainer
+maintainers             blb openmaintainer
 
 description             An interpreted, object-oriented programming language
 long_description        Python is an interpreted, interactive, object-oriented \
@@ -83,6 +84,20 @@
    # install select file for python_select
    xinstall -m 755 -d ${destroot}${prefix}/etc/select/python
    xinstall -m 644 ${filespath}/python[string map {. {}} ${branch}] ${destroot}${prefix}/etc/select/python/
+
+   # Without this, LINKFORSHARED is set to
+   # ... $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)
+   # (this becomes Python.framework/Versions/3.0/Python) which doesn't
+   # quite work (see ticket #15099); instead specifically list the
+   # full path to the proper Python framework file (which becomes
+   # ${prefix}/Library/Frameworks/Python.framework/Versions/3.0/Python)
+   reinplace {s|^\(LINKFORSHARED=.*\)$(PYTHONFRAMEWORKDIR).*$|\1 $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)|} ${destroot}${framewdir}/lib/python${branch}/config/Makefile
+
+   # The framework version.plist isn't currently being installed so
+   # we'll copy ours for now (see http://trac.macports.org/ticket/18773 and
+   # http://bugs.python.org/issue4937)
+   xinstall -m 644 ${filespath}/version.plist \
+      ${destroot}${framewdir}/Resources/version.plist
 }
 
 post-activate {
@@ -91,6 +106,13 @@
 \n\tsudo python_select $name\n"
 }
 
+platform darwin {
+   post-configure {
+      # See http://trac.macports.org/ticket/18376
+      system "cd ${worksrcpath} && ed - pyconfig.h < ${filespath}/pyconfig.ed"
+   }
+}
+
 platform darwin 10 {
    configure.compiler   gcc-4.2
 }

Added: trunk/dports/lang/python30/files/pyconfig.ed
===================================================================
--- trunk/dports/lang/python30/files/pyconfig.ed	                        (rev 0)
+++ trunk/dports/lang/python30/files/pyconfig.ed	2009-03-16 08:29:58 UTC (rev 48187)
@@ -0,0 +1,2 @@
+g,.*\(HAVE_POLL[_A-Z]*\).*,s,,/* #undef \1 */,
+w

Added: trunk/dports/lang/python30/files/version.plist
===================================================================
--- trunk/dports/lang/python30/files/version.plist	                        (rev 0)
+++ trunk/dports/lang/python30/files/version.plist	2009-03-16 08:29:58 UTC (rev 48187)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>BuildVersion</key>
+	<string>1</string>
+	<key>CFBundleShortVersionString</key>
+	<string>3.0.1</string>
+	<key>CFBundleVersion</key>
+	<string>3.0.1</string>
+	<key>ProjectName</key>
+	<string>Python</string>
+	<key>SourceVersion</key>
+	<string>3.0.1</string>
+</dict>
+</plist>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090316/a25f4e19/attachment-0001.html>


More information about the macports-changes mailing list