[48182] trunk/dports/lang/python26
blb at macports.org
blb at macports.org
Mon Mar 16 00:04:54 PDT 2009
Revision: 48182
http://trac.macports.org/changeset/48182
Author: blb at macports.org
Date: 2009-03-16 00:04:50 -0700 (Mon, 16 Mar 2009)
Log Message:
-----------
lang/python26 - remove --enable-shared so python26-config includes the
path to the right library in 'python26-config --ldflags' (ticket #18848);
add to files/ and copy version.plist which is missing in 2.6 (ticket #18773);
don't use poll() on darwin (ticket #18376)
fix, again and should be the final time, LINKFORSHARED
Modified Paths:
--------------
trunk/dports/lang/python26/Portfile
Added Paths:
-----------
trunk/dports/lang/python26/files/pyconfig.ed
trunk/dports/lang/python26/files/version.plist
Modified: trunk/dports/lang/python26/Portfile
===================================================================
--- trunk/dports/lang/python26/Portfile 2009-03-16 04:15:56 UTC (rev 48181)
+++ trunk/dports/lang/python26/Portfile 2009-03-16 07:04:50 UTC (rev 48182)
@@ -4,6 +4,7 @@
name python26
version 2.6.1
+revision 1
set major [lindex [split $version .] 0]
set branch [join [lrange [split ${version} .] 0 1] .]
categories lang
@@ -17,8 +18,6 @@
homepage http://www.python.org/
master_sites ${homepage}/ftp/python/${version}/ \
ftp://ftp.python.org/pub/python/${version}/
-# ftp.python.jp works, but no 2.6 as of 2008-10-05
-# ftp://ftp.python.jp/ftp.python.org/python/${version}/
distname Python-${version}
use_bzip2 yes
@@ -42,8 +41,7 @@
port:sqlite3 port:db46 port:ncurses port:gdbm \
port:bzip2 port:readline
-configure.args --enable-shared \
- --enable-framework=${frameworks_dir} \
+configure.args --enable-framework=${frameworks_dir} \
--enable-ipv6
use_parallel_build no
@@ -87,9 +85,17 @@
# Without this, LINKFORSHARED is set to
# ... $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)
- # which is bad (see ticket #15099); so instead we set -F to the right
- # location then add '-framework Python' here
- reinplace "s|^\\(LINKFORSHARED=.*\\)\\\$(PYTHONFRAMEWORKDIR).*\$|\\1 -F${frameworks_dir} -framework Python|" ${destroot}${framewdir}/lib/python${branch}/config/Makefile
+ # (this becomes Python.framework/Versions/2.6/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/2.6/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 {
@@ -98,6 +104,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 7 {
# there is no SystemStubs on 10.3
post-patch {
Added: trunk/dports/lang/python26/files/pyconfig.ed
===================================================================
--- trunk/dports/lang/python26/files/pyconfig.ed (rev 0)
+++ trunk/dports/lang/python26/files/pyconfig.ed 2009-03-16 07:04:50 UTC (rev 48182)
@@ -0,0 +1,2 @@
+g,.*\(HAVE_POLL[_A-Z]*\).*,s,,/* #undef \1 */,
+w
Added: trunk/dports/lang/python26/files/version.plist
===================================================================
--- trunk/dports/lang/python26/files/version.plist (rev 0)
+++ trunk/dports/lang/python26/files/version.plist 2009-03-16 07:04:50 UTC (rev 48182)
@@ -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>2.6.1</string>
+ <key>CFBundleVersion</key>
+ <string>2.6.1</string>
+ <key>ProjectName</key>
+ <string>Python</string>
+ <key>SourceVersion</key>
+ <string>2.6.1</string>
+</dict>
+</plist>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090316/2c4eb150/attachment.html>
More information about the macports-changes
mailing list