[44827] trunk/dports/lang/python25/Portfile

afb at macports.org afb at macports.org
Sat Jan 3 01:57:40 PST 2009


Revision: 44827
          http://trac.macports.org/changeset/44827
Author:   afb at macports.org
Date:     2009-01-03 01:57:38 -0800 (Sat, 03 Jan 2009)
Log Message:
-----------
add +puredarwin platform variant (#16863)

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

Modified: trunk/dports/lang/python25/Portfile
===================================================================
--- trunk/dports/lang/python25/Portfile	2009-01-03 08:51:47 UTC (rev 44826)
+++ trunk/dports/lang/python25/Portfile	2009-01-03 09:57:38 UTC (rev 44827)
@@ -66,6 +66,7 @@
 
 destroot.target         frameworkinstall maninstall
 
+platform macosx {
 post-destroot {
         set framewpath ${frameworks_dir}/Python.framework
         set framewdir  ${framewpath}/Versions/${branch}
@@ -96,6 +97,7 @@
         xinstall -m 755 -d ${destroot}${prefix}/etc/select/python
         xinstall -m 644 ${filespath}/python[string map {. {}} ${branch}] ${destroot}${prefix}/etc/select/python/
 }
+}
 
 post-activate {
     ui_msg "\nTo fully complete your installation and make python $branch the default, please run
@@ -131,6 +133,31 @@
         patchfiles-append               patch-configure-badcflags.diff
 }
 
+platform puredarwin {
+        patchfiles-append       patch-Modules-posixmodule.c.diff
+        configure.args-delete   --enable-framework=${frameworks_dir}
+        configure.args-append   --disable-toolbox-glue --disable-framework
+        destroot.target     install maninstall
+
+post-build {
+    # thin dynamic library to have the same arch as static lib, even after -lSystemStubs
+    system "lipo ${worksrcpath}/libpython${branch}.dylib -output ${worksrcpath}/libpython${branch}.dylib -thin `lipo -info ${worksrcpath}/libpython${branch}.a | tail -n 1 | sed -e 's/.*architecture: \\(.*\\)/\\1/'`"
+}
+
+post-destroot {
+        # delete symlinks without version suffix, use python_select instead to choose version
+        foreach bin { python pythonw idle pydoc smtpd.py python-config } {
+            file delete ${destroot}${prefix}/bin/${bin}
+        }
+
+        file rename ${destroot}${prefix}/share/man/man1/python.1 ${destroot}${prefix}/share/man/man1/python${branch}.1
+
+        # 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/
+}
+}
+
 variant universal {
    configure.args-append           --enable-universalsdk=${universal_sysroot}
 }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090103/c4cc51f6/attachment.html>


More information about the macports-changes mailing list