[gtk-osx] Fix premature setting of pkg-config extra_env
- From: John Ralls <jralls src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-osx] Fix premature setting of pkg-config extra_env
- Date: Sun, 15 Dec 2013 23:53:36 +0000 (UTC)
commit 21bd4cb41efbd645c8d6bd0bd5fb90a2075e2169
Author: John Ralls <jralls ceridwen us>
Date: Sun Dec 15 15:52:29 2013 -0800
Fix premature setting of pkg-config extra_env
Also force native to 10.9 SDK for 10.9, since it has no /usr/include
jhbuildrc-gtk-osx | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/jhbuildrc-gtk-osx b/jhbuildrc-gtk-osx
index 7d467d2..fd221f8 100644
--- a/jhbuildrc-gtk-osx
+++ b/jhbuildrc-gtk-osx
@@ -228,6 +228,10 @@ def setup_sdk(target, sdk_version, architectures=[_default_arch]):
elif os.environ.has_key("DEVELOPER_DIR"):
xcodepath = os.environ["DEVELOPER_DIR"]
+#OSX 10.9 doesn't have /usr/include, so we need to set the sdkdir to XCode.app:
+ if sdk_version == 'native' and _osx_version >= 9.0:
+ sdk_version = str(10 + _osx_version / 10)
+
_toolpath = os.path.join("/usr", "bin")
if xcodepath:
_toolpath = os.path.join(xcodepath, "usr", "bin")
@@ -250,6 +254,7 @@ def setup_sdk(target, sdk_version, architectures=[_default_arch]):
# skip that.
#
+
#Apple Documentation says that "-syslibroot" is the arg to pass to the
#linker, but we are using the compiler to control the linker, and
#everything seems to be working correctly.
@@ -292,7 +297,7 @@ def setup_sdk(target, sdk_version, architectures=[_default_arch]):
os.environ["CC"] = "gcc"
os.environ["OBJC"] = "gcc"
os.environ["CXX"] = "g++"
- module_extra_env["pkg-config"] = {'CFLAGS': os.environ['CFLAGS'] + ' --std=gcc89'}
+
elif _osx_version >= 7.0 and xcodeversion > 4.0:
os.environ["CC"] = os.path.join(_toolpath, "llvm-gcc-4.2")
os.environ["OBJC"] = os.path.join(_toolpath, "llvm-gcc-4.2")
@@ -365,6 +370,8 @@ def setup_sdk(target, sdk_version, architectures=[_default_arch]):
# to our current CFLAGS so that everything will link with other
# build products. Note that this will generally break
# cross-compilation, not that it works anyway.
+ if xcodeversion >= 5.0:
+ module_extra_env["pkg-config"] = {'CFLAGS': os.environ['CFLAGS'] + ' --std=gcc89'}
os.environ['CFLAGS_FOR_BUILD'] = os.environ['CFLAGS']
return sdkdir
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]