[56584] trunk/dports/lang/python24/Portfile

jmr at macports.org jmr at macports.org
Sun Aug 30 09:26:51 PDT 2009


Revision: 56584
          http://trac.macports.org/changeset/56584
Author:   jmr at macports.org
Date:     2009-08-30 09:26:45 -0700 (Sun, 30 Aug 2009)
Log Message:
-----------
python24: disable framework build and toolbox glue on 10.6 to avoid build failure

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

Modified: trunk/dports/lang/python24/Portfile
===================================================================
--- trunk/dports/lang/python24/Portfile	2009-08-30 15:59:57 UTC (rev 56583)
+++ trunk/dports/lang/python24/Portfile	2009-08-30 16:26:45 UTC (rev 56584)
@@ -37,12 +37,12 @@
                         patch-Include-pyport.h \
                         patch-Mac-OSX-Makefile.in \
                         patch-Mac-OSX-IDLE-Makefile.in \
-                        patch-Mac-OSX-PythonLauncher-Makefile.in
+                        patch-Mac-OSX-PythonLauncher-Makefile.in \
+                        patch-configure-badcflags.diff \
+                        patch-configure-arch_only.diff
 
 depends_lib             port:gettext
 
-configure.compiler gcc-4.0
-
 configure.args          --with-cxx=${configure.cxx} \
                         --enable-shared \
                         --enable-framework=${frameworks_dir} \
@@ -83,43 +83,56 @@
 
 platform macosx {
     post-destroot {
-        set framewpath ${frameworks_dir}/Python.framework
-        set framewdir  ${framewpath}/Versions/${branch}
-
-        foreach dir { lib include } {
-            file rename ${destroot}${framewdir}/${dir}/python${branch} ${destroot}${prefix}/${dir}
-            ln -s ${prefix}/${dir}/python${branch} ${destroot}${framewdir}/${dir}/python${branch}
+        if {$build_arch != "x86_64"} {
+            set framewpath ${frameworks_dir}/Python.framework
+            set framewdir  ${framewpath}/Versions/${branch}
+    
+            foreach dir { lib include } {
+                file rename ${destroot}${framewdir}/${dir}/python${branch} ${destroot}${prefix}/${dir}
+                ln -s ${prefix}/${dir}/python${branch} ${destroot}${framewdir}/${dir}/python${branch}
+            }
+            # Since the lib/python${branch} dir was just moved above and
+            # libpython2.4.a in lib/python${branch}/config is relative, we need
+            # to repoint it here
+            file delete ${destroot}${prefix}/lib/python${branch}/config/libpython${branch}.a
+            ln -s ${framewdir}/Python ${destroot}${prefix}/lib/python${branch}/config/libpython${branch}.a
+    
+            ln -s ${framewdir}/Python ${destroot}${prefix}/lib/libpython${branch}.dylib
+    
+            file rename ${destroot}${prefix}/share/man/man1/python.1 ${destroot}${prefix}/share/man/man1/python${branch}.1
+    
+            # delete symlinks without version suffix, use python_select instead to choose version
+            foreach bin { python pythonw idle pydoc smtpd.py } {
+                file delete ${destroot}${prefix}/bin/${bin}
+            }
+            foreach bin [list python${branch} pythonw${branch} idle${branch} pydoc${branch} smtpd${branch}.py] {
+                file rename -force ${destroot}${framewdir}/bin/${bin} ${destroot}${prefix}/bin
+                ln -s ${prefix}/bin/${bin} ${destroot}${framewdir}/bin/${bin}
+            }
+    
+            foreach dir { Headers Resources Python Versions/Current } {
+                file delete ${destroot}${framewpath}/${dir}
+            }
+    
+            # Without this, LINKFORSHARED is set to
+            # ... $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)
+            # (this becomes Python.framework/Versions/2.4/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.4/Python)
+            reinplace {s|^\(LINKFORSHARED=.*\)$(PYTHONFRAMEWORKDIR).*$|\1 $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)|} ${destroot}${prefix}/lib/python${branch}/config/Makefile
+        } else {
+            # 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/
         }
-        # Since the lib/python${branch} dir was just moved above and
-        # libpython2.4.a in lib/python${branch}/config is relative, we need
-        # to repoint it here
-        file delete ${destroot}${prefix}/lib/python${branch}/config/libpython${branch}.a
-        ln -s ${framewdir}/Python ${destroot}${prefix}/lib/python${branch}/config/libpython${branch}.a
-
-        ln -s ${framewdir}/Python ${destroot}${prefix}/lib/libpython${branch}.dylib
-
-        file rename ${destroot}${prefix}/share/man/man1/python.1 ${destroot}${prefix}/share/man/man1/python${branch}.1
-
-        # delete symlinks without version suffix, use python_select instead to choose version
-        foreach bin { python pythonw idle pydoc smtpd.py } {
-            file delete ${destroot}${prefix}/bin/${bin}
-        }
-        foreach bin [list python${branch} pythonw${branch} idle${branch} pydoc${branch} smtpd${branch}.py] {
-            file rename -force ${destroot}${framewdir}/bin/${bin} ${destroot}${prefix}/bin
-            ln -s ${prefix}/bin/${bin} ${destroot}${framewdir}/bin/${bin}
-        }
-
-        foreach dir { Headers Resources Python Versions/Current } {
-            file delete ${destroot}${framewpath}/${dir}
-        }
-
-        # Without this, LINKFORSHARED is set to
-        # ... $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)
-        # (this becomes Python.framework/Versions/2.4/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.4/Python)
-        reinplace {s|^\(LINKFORSHARED=.*\)$(PYTHONFRAMEWORKDIR).*$|\1 $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)|} ${destroot}${prefix}/lib/python${branch}/config/Makefile
     }
 }
 
@@ -142,6 +155,11 @@
 
 platform darwin 10 {
     configure.cppflags-append       -D__DARWIN_UNIX03
+    if {$build_arch == "x86_64"} {
+        configure.args-delete --enable-framework=${frameworks_dir}
+        configure.args-append --disable-toolbox-glue
+        destroot.target       install maninstall
+    }
 }
 
 platform puredarwin {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090830/50a23aa7/attachment.html>


More information about the macports-changes mailing list