[gtk-osx] Make ARCHFLAGS definition local to perl-xml-simple and perl-xml-parser



commit 8d12e319a5440bf572a586bdbfbd624220841a7f
Author: John Ralls <jralls ceridwen us>
Date:   Sat Nov 3 12:07:33 2012 -0700

    Make ARCHFLAGS definition local to perl-xml-simple and perl-xml-parser
    
    Waf pays attention to this flag too, and may need to link against single-architecture libraries, which will of course fail for one of them if it's universal.

 jhbuildrc-gtk-osx |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/jhbuildrc-gtk-osx b/jhbuildrc-gtk-osx
index 6a0069c..558531f 100644
--- a/jhbuildrc-gtk-osx
+++ b/jhbuildrc-gtk-osx
@@ -304,15 +304,12 @@ def setup_sdk(target, sdk_version, architectures=[_default_arch]):
     if architectures == ["i386"]:
         append_autogenargs("glib", "--build=i486-apple-darwin")
         append_autogenargs("gmp", "ABI=32")
-        append_autogenargs("libffi", "--build=i486-apple-darwin")
         append_autogenargs("liboil", "--host=i486-apple-darwin")
     elif architectures == ["x86_64"]:
         append_autogenargs("glib", "--build=x86_64-apple-darwin")
         append_autogenargs("gmp", "ABI=64")
-        append_autogenargs("libffi", "--build=x86_64-apple-darwin")
         append_autogenargs("liboil", "--host=x86_64-apple-darwin")
 
-
     # Tiger has a somewhat messed-up resolv.h, so we need to explicitly
     # link libresolv:
     if _osx_version < 5.0 or sdk_version.startswith("10.4"):
@@ -344,6 +341,13 @@ def setup_sdk(target, sdk_version, architectures=[_default_arch]):
     #Guile doesn't handle optimization well with llvm-gcc
     if _osx_version >= 7.0 and xcodeversion > 4.0:
         append_autogenargs("guile", 'CFLAGS="$CFLAGS -O1"')
+    #Defining ARCHFLAGS globally messes up waf, so we need to define
+    #it here for our two perl modules:
+    if architectures != ['ppc']:
+        module_extra_env.update(
+            {"perl-xml-simple":{"ARCHFLAGS":"-arch i386 -arch x86_64"},
+             "perl-xml-parser":{"ARCHFLAGS":"-arch i386 -arch x86_64"}})
+
 
     return sdkdir
 
@@ -398,7 +402,6 @@ def setup_ppc_build():
     append_autogenargs("libdbi", _ppc_args)
     append_autogenargs("libdbi-drivers", _ppc_args)
 
-
 # This is the function to call to build universal binaries. By default
 # it will build a ppc/i386/x86_64 universal binary for 10.5 and
 # 10.6. Arguments are the same as for setup_sdk, but with different



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]