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

jmr at macports.org jmr at macports.org
Tue Jul 6 02:30:23 PDT 2010


Revision: 69441
          http://trac.macports.org/changeset/69441
Author:   jmr at macports.org
Date:     2010-07-06 02:30:21 -0700 (Tue, 06 Jul 2010)
Log Message:
-----------
python24: disable toolbox glue and framework when building 64-bit on any OS X version, use configure.sdkroot, use notes

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

Modified: trunk/dports/lang/python24/Portfile
===================================================================
--- trunk/dports/lang/python24/Portfile	2010-07-06 08:57:16 UTC (rev 69440)
+++ trunk/dports/lang/python24/Portfile	2010-07-06 09:30:21 UTC (rev 69441)
@@ -82,8 +82,8 @@
 select.file             ${filespath}/python[string map {. {}} ${branch}]
 
 platform macosx {
-    post-destroot {
-        if {$build_arch != "x86_64"} {
+    if {(![variant_isset universal] && ![string match *64* $build_arch]) || ([variant_isset universal] && ![string match *64* $universal_archs])} {
+        post-destroot {
             set framewpath ${frameworks_dir}/Python.framework
             set framewdir  ${framewpath}/Versions/${branch}
     
@@ -121,7 +121,14 @@
             # 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 {
+        }
+    } else {
+        # 64-bit, can't build mac-specific stuff
+        configure.args-delete --enable-framework=${frameworks_dir}
+        configure.args-append --disable-toolbox-glue
+        destroot.target       install maninstall
+
+        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}
@@ -136,11 +143,9 @@
     }
 }
 
-post-activate {
-    ui_msg "\nTo fully complete your installation and make python $branch the default, please run
-\n\tsudo port install python_select \
-\n\tsudo python_select $name\n"
-}
+    notes "To fully complete your installation and make python $branch the default, please run:
+\tsudo port install python_select
+\tsudo python_select $name"
 
 platform darwin {
     post-configure {
@@ -155,11 +160,6 @@
 
 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
-    }
 	post-configure {
   		reinplace "s|#define _POSIX_C_SOURCE 200112L|#undef _POSIX_C_SOURCE|g" ${worksrcpath}/pyconfig.h
 		reinplace "s|#define _XOPEN_SOURCE 600|#undef _XOPEN_SOURCE|g" ${worksrcpath}/pyconfig.h  
@@ -186,8 +186,8 @@
 }
 
 variant universal {
-   if {${macosx_version} == "10.4" && ${os.arch} == "powerpc"} {
-      configure.args-append   --enable-universalsdk=${developer_dir}/SDKs/MacOSX10.4u.sdk
+   if {${configure.sdkroot} != ""} {
+      configure.args-append   --enable-universalsdk=${configure.sdkroot}
    } else {
       configure.args-append   --enable-universalsdk=/
    }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100706/1bc64ce9/attachment.html>


More information about the macports-changes mailing list