From 447556710dee76dd217bab4f2210c403268328bb Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Tue, 13 Mar 2012 23:30:16 +0100 Subject: [PATCH] port to Xcode 4.3 (libvpx patch added) --- submodules/build/builders.d/libvpx.mk | 9 +++-- submodules/build/builders.d/libvpx.patch | 42 ++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 submodules/build/builders.d/libvpx.patch diff --git a/submodules/build/builders.d/libvpx.mk b/submodules/build/builders.d/libvpx.mk index f1acb950c..13e0aa62b 100644 --- a/submodules/build/builders.d/libvpx.mk +++ b/submodules/build/builders.d/libvpx.mk @@ -13,11 +13,16 @@ else endif libvpx_dir?=externals/libvpx -$(BUILDER_BUILD_DIR)/$(libvpx_dir)/config.mk: +$(BUILDER_SRC_DIR)/$(libvpx_dir)/patched.stamp: + cd $(BUILDER_SRC_DIR)/$(libvpx_dir) \ + && git apply $(BUILDER_SRC_DIR)/build/builders.d/libvpx.patch \ + && touch $@ + +$(BUILDER_BUILD_DIR)/$(libvpx_dir)/config.mk: $(BUILDER_SRC_DIR)/$(libvpx_dir)/patched.stamp mkdir -p $(BUILDER_BUILD_DIR)/$(libvpx_dir) cd $(BUILDER_BUILD_DIR)/$(libvpx_dir)/ \ && host_alias=${host} . $(BUILDER_SRC_DIR)/build/$(config_site) \ - && $(BUILDER_SRC_DIR)/$(libvpx_dir)/configure --prefix=$(prefix) $(libvpx_configure_options) + && SYSROOT_PATH=$$SYSROOT_PATH SDK_BIN_PATH=$$SDK_BIN_PATH $(BUILDER_SRC_DIR)/$(libvpx_dir)/configure --prefix=$(prefix) $(libvpx_configure_options) build-libvpx: $(BUILDER_BUILD_DIR)/$(libvpx_dir)/config.mk cd $(BUILDER_BUILD_DIR)/$(libvpx_dir) && PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) make && make install diff --git a/submodules/build/builders.d/libvpx.patch b/submodules/build/builders.d/libvpx.patch new file mode 100644 index 000000000..390ec4ecf --- /dev/null +++ b/submodules/build/builders.d/libvpx.patch @@ -0,0 +1,42 @@ +diff --git a/build/make/configure.sh b/build/make/configure.sh +index 0426f92..24fa04e 100755 +--- a/build/make/configure.sh ++++ b/build/make/configure.sh +@@ -624,6 +624,9 @@ process_common_toolchain() { + if [ -d "/Developer/SDKs/MacOSX10.7.sdk" ]; then + osx_sdk_dir="/Developer/SDKs/MacOSX10.7.sdk" + fi ++ if test -n "$SYSROOT_PATH" ; then ++ osx_sdk_dir=$SYSROOT_PATH ++ fi + + case ${toolchain} in + *-darwin8-*) +@@ -743,6 +746,14 @@ process_common_toolchain() { + darwin*) + SDK_PATH=/Developer/Platforms/iPhoneOS.platform/Developer + TOOLCHAIN_PATH=${SDK_PATH}/usr/bin ++ if test -n "$SYSROOT_PATH" ; then ++ SDK_FULL_PATH=$SYSROOT_PATH ++ else ++ SDK_FULL_PATH="${SDK_PATH}/SDKs/iPhoneOS5.0.sdk" ++ fi ++ if test -n "$SDK_BIN_PATH" ; then ++ TOOLCHAIN_PATH=$SDK_BIN_PATH ++ fi + CC=${TOOLCHAIN_PATH}/gcc + AR=${TOOLCHAIN_PATH}/ar + LD=${TOOLCHAIN_PATH}/arm-apple-darwin10-llvm-gcc-4.2 +@@ -759,10 +770,10 @@ process_common_toolchain() { + add_cflags -arch ${tgt_isa} + add_ldflags -arch_only ${tgt_isa} + +- add_cflags "-isysroot ${SDK_PATH}/SDKs/iPhoneOS5.0.sdk" ++ add_cflags "-isysroot $SDK_FULL_PATH" + + # This should be overridable +- alt_libc=${SDK_PATH}/SDKs/iPhoneOS5.0.sdk ++ alt_libc=$SDK_FULL_PATH + + # Add the paths for the alternate libc + for d in usr/include; do