[52501] trunk/dports/aqua/TeXShop/Portfile

jmr at macports.org jmr at macports.org
Wed Jun 17 13:58:43 PDT 2009


Revision: 52501
          http://trac.macports.org/changeset/52501
Author:   jmr at macports.org
Date:     2009-06-17 13:58:42 -0700 (Wed, 17 Jun 2009)
Log Message:
-----------
TeXShop: use lipo to strip archs we can't or won't use from the prebuilt frameworks

Modified Paths:
--------------
    trunk/dports/aqua/TeXShop/Portfile

Modified: trunk/dports/aqua/TeXShop/Portfile
===================================================================
--- trunk/dports/aqua/TeXShop/Portfile	2009-06-17 20:46:16 UTC (rev 52500)
+++ trunk/dports/aqua/TeXShop/Portfile	2009-06-17 20:58:42 UTC (rev 52501)
@@ -37,6 +37,24 @@
 
 post-extract	{
 	reinplace "s/defaultConfigurationName = Debug/defaultConfigurationName = Release/" ${worksrcpath}/${name}.xcodeproj/project.pbxproj
+    
+    set sparkle "Sparkle.framework/Versions/A/Sparkle"
+    set ogrekit "OgreKit.framework/Versions/A/OgreKit"
+    if {![variant_isset universal]} {
+        # thin the bundled frameworks
+        if {${os.major} >= 10 && $tcl_platform(wordSize) == 8} {
+            set arch x86_64
+        } elseif {${os.arch} == "powerpc"} {
+            set arch ppc
+        } else {
+            set arch i386
+        }
+        system "cd ${worksrcpath} && lipo -thin $arch $sparkle -output $sparkle"
+        system "cd ${worksrcpath} && lipo -thin $arch $ogrekit -output $ogrekit"
+    } elseif {${os.major} == 8} {
+        # Tiger chokes on the x86_64
+        system "cd ${worksrcpath} && lipo -remove x86_64 $sparkle -output $sparkle"
+    }
 }
 
 build.target    ${name}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090617/349a08a4/attachment.html>


More information about the macports-changes mailing list