diff options
author | Memphiz <memphis@machzwo.de> | 2013-10-16 23:05:03 -0700 |
---|---|---|
committer | Memphiz <memphis@machzwo.de> | 2013-10-16 23:05:03 -0700 |
commit | 4d9d2870710d23e0649fcdf2cb9d4bb456e483f6 (patch) | |
tree | e2cf3c3fd6ae96ec7e5c8259fa679725e5b64186 /tools | |
parent | 42c9649b8c9cbcfb457cb4d6be074f7aea892fe2 (diff) | |
parent | 29cd36f00b7c1bb90d0f559ce8a25e912c67024a (diff) |
Merge pull request #3419 from amet/xcode5_fix
[osx/ios/atv2] Xcode5 fix
Diffstat (limited to 'tools')
-rw-r--r-- | tools/TexturePacker/XBTFWriter.cpp | 2 | ||||
-rw-r--r-- | tools/depends/configure.in | 31 | ||||
-rw-r--r-- | tools/depends/native/cmake-native/Makefile | 2 | ||||
-rw-r--r-- | tools/depends/native/pkg-config-native/Makefile | 4 | ||||
-rw-r--r-- | tools/depends/target/Toolchain.cmake.in | 3 | ||||
-rw-r--r-- | tools/depends/target/afpfs-ng/fix_afpfs-ng_includes.patch | 12 | ||||
-rw-r--r-- | tools/depends/target/config.site.in | 12 | ||||
-rw-r--r-- | tools/depends/target/libgpg-error/Makefile | 2 | ||||
-rw-r--r-- | tools/depends/target/libmpeg2/04-clang-fix.patch | 10 | ||||
-rw-r--r-- | tools/depends/target/libmpeg2/Makefile | 2 | ||||
-rw-r--r-- | tools/depends/target/libplist/0002-fixclang.diff | 57 | ||||
-rw-r--r-- | tools/depends/target/libplist/Makefile | 1 | ||||
-rw-r--r-- | tools/depends/target/openssl/Makefile | 1 | ||||
-rw-r--r-- | tools/depends/target/pythonmodule-pil/Makefile | 2 |
14 files changed, 129 insertions, 12 deletions
diff --git a/tools/TexturePacker/XBTFWriter.cpp b/tools/TexturePacker/XBTFWriter.cpp index f238f87958..339990c412 100644 --- a/tools/TexturePacker/XBTFWriter.cpp +++ b/tools/TexturePacker/XBTFWriter.cpp @@ -23,7 +23,7 @@ #include <inttypes.h> #include "guilib/XBTF.h" #include "utils/EndianSwap.h" -#if defined(TARGET_FREEBSD) +#if defined(TARGET_FREEBSD) || defined(TARGET_DARWIN) #include <stdlib.h> #elif !defined(TARGET_DARWIN) #include <malloc.h> diff --git a/tools/depends/configure.in b/tools/depends/configure.in index 921ac1191c..435654ff8e 100644 --- a/tools/depends/configure.in +++ b/tools/depends/configure.in @@ -164,16 +164,30 @@ case $host in platform_cc=gcc-4.2 platform_cxx=g++-4.2 ;; - *) + 4.*.*) platform_cc=llvm-gcc-4.2 platform_cxx=llvm-g++-4.2 + ;; + *) + platform_cc=clang + platform_cxx=clang++ + platform_cflags="-fheinous-gnu-extensions -no-cpp-precomp -no-integrated-as" + platform_ldflags="-Wl,-search_paths_first" + platform_cxxflags="-no-cpp-precomp" ;; esac case $host in *86*-apple-darwin) found_sdk_version=[`$use_xcodebuild -showsdks | grep macosx | sort | tail -n 1 | grep -oE 'macosx[0-9.0-9]+' | cut -c 7-$NF`] + case $use_xcode in + 5.* | 5.*.* ) + use_toolchain="${use_xcodepath}/Toolchains/XcodeDefault.xctoolchain" + ;; + *) + use_toolchain="${use_toolchain:-$use_xcodepath}" + ;; + esac use_sdk="${use_sdk:-$found_sdk_version}" - use_toolchain="${use_toolchain:-$use_xcodepath}" if test "$use_cpu" = "armv7"; then AC_MSG_ERROR(error in configure of --with-arch=$use_cpu) fi @@ -182,6 +196,7 @@ case $host in 10.6);; 10.7);; 10.8);; + 10.9);; *) AC_MSG_ERROR(error in configure of --with-sdk=$use_sdk) esac @@ -217,11 +232,20 @@ case $host in found_sdk_version=[`$use_xcodebuild -showsdks | grep iphoneos | sort | tail -n 1 | awk '{ print $2}'`] use_sdk="${use_sdk:-$found_sdk_version}" sdk_name=iphoneos$use_sdk - use_toolchain="${use_toolchain:-`$use_xcodebuild -version -sdk $sdk_name PlatformPath`/Developer}" + case $use_xcode in + 5.* | 5.*.* ) + use_toolchain="${use_xcodepath}/Toolchains/XcodeDefault.xctoolchain" + ;; + *) + use_toolchain="${use_toolchain:-`$use_xcodebuild -version -sdk $sdk_name PlatformPath`/Developer}" + ;; + esac + case $use_sdk in 4.*);; 5.*);; 6.*);; + 7.*);; *) AC_MSG_ERROR(error in configure of --with-sdk=$use_sdk) ;; @@ -394,6 +418,7 @@ AC_SUBST(link_iconv) AC_SUBST(need_libiconv) AC_SUBST(use_gplv3) AC_SUBST(has_libcrystax) +AC_SUBST(use_xcode) AC_OUTPUT echo -e "toolchain:\t $use_toolchain" diff --git a/tools/depends/native/cmake-native/Makefile b/tools/depends/native/cmake-native/Makefile index 8c46e9888e..c925958a7e 100644 --- a/tools/depends/native/cmake-native/Makefile +++ b/tools/depends/native/cmake-native/Makefile @@ -3,7 +3,7 @@ PLATFORM=$(NATIVEPLATFORM) DEPS= ../../Makefile.include.in Makefile APPNAME=cmake -VERSION=2.8.8 +VERSION=2.8.12 SOURCE=$(APPNAME)-$(VERSION) ARCHIVE=$(SOURCE).tar.gz diff --git a/tools/depends/native/pkg-config-native/Makefile b/tools/depends/native/pkg-config-native/Makefile index fe072e7f46..4ea10782c1 100644 --- a/tools/depends/native/pkg-config-native/Makefile +++ b/tools/depends/native/pkg-config-native/Makefile @@ -6,7 +6,7 @@ DEPS= ../../Makefile.include.in Makefile # lib name, version # lib name, version LIBNAME=pkg-config -VERSION=0.23 +VERSION=0.28 SOURCE=$(LIBNAME)-$(VERSION) ARCHIVE=$(SOURCE).tar.gz @@ -16,7 +16,7 @@ PC_PATH:=$(PC_PATH):/usr/lib/pkgconfig:/usr/lib/$(HOST)/pkgconfig:/usr/share/pkg endif # configuration settings -CONFIGURE=./configure --prefix=$(PREFIX) --enable-indirect-deps --with-pc-path=$(PC_PATH) +CONFIGURE=./configure --prefix=$(PREFIX) --enable-indirect-deps --with-pc-path=$(PC_PATH) --with-internal-glib LIBDYLIB=$(PLATFORM)/pkg-config CLEAN_FILES=$(ARCHIVE) $(PLATFORM) diff --git a/tools/depends/target/Toolchain.cmake.in b/tools/depends/target/Toolchain.cmake.in index 156b501e88..d260dd82ed 100644 --- a/tools/depends/target/Toolchain.cmake.in +++ b/tools/depends/target/Toolchain.cmake.in @@ -2,6 +2,9 @@ SET(OS "@platform_os@") IF("${OS}" STREQUAL "linux" OR "${OS}" STREQUAL "android") SET(CMAKE_SYSTEM_NAME Linux) ENDIF() +IF("${OS}" STREQUAL "ios" OR "${OS}" STREQUAL "osx") +SET(CMAKE_OSX_SYSROOT @use_sdk_path@) +ENDIF() SET(CMAKE_SYSTEM_VERSION 1) # specify the cross compiler diff --git a/tools/depends/target/afpfs-ng/fix_afpfs-ng_includes.patch b/tools/depends/target/afpfs-ng/fix_afpfs-ng_includes.patch index f507a485ef..08c6f024c2 100644 --- a/tools/depends/target/afpfs-ng/fix_afpfs-ng_includes.patch +++ b/tools/depends/target/afpfs-ng/fix_afpfs-ng_includes.patch @@ -476,7 +476,7 @@ diff -Naur afpfs-ng-0.8.1/include/afpfs-ng/afp.h afpfs-ng-0.8.1.patch/include/af + +struct afp_server * afp_server_full_connect(void * priv, struct afp_connection_request * req); + -+void * just_end_it_now(void *other); ++void just_end_it_now(void *other); +void add_fd_and_signal(int fd); +void loop_disconnect(struct afp_server *s); +void afp_wait_for_started_loop(void); @@ -2685,6 +2685,16 @@ diff -Naur afpfs-ng-0.8.1/lib/loop.c afpfs-ng-0.8.1.patch/lib/loop.c #define SIGNAL_TO_USE SIGUSR2 +@@ -85,7 +85,7 @@ void signal_main_thread(void) + } + + static int ending=0; +-void * just_end_it_now(void * ignore) ++void just_end_it_now(void * ignore) + { + if (ending) return; + ending=1; + diff -Naur afpfs-ng-0.8.1/lib/lowlevel.c afpfs-ng-0.8.1.patch/lib/lowlevel.c --- afpfs-ng-0.8.1/lib/lowlevel.c 2008-02-20 02:33:17.000000000 +0100 +++ afpfs-ng-0.8.1.patch/lib/lowlevel.c 2011-09-10 12:13:50.136124828 +0200 diff --git a/tools/depends/target/config.site.in b/tools/depends/target/config.site.in index 446c3424f4..95187fde21 100644 --- a/tools/depends/target/config.site.in +++ b/tools/depends/target/config.site.in @@ -138,8 +138,16 @@ fi if test "@platform_os@" = "ios"; then # tweaks for libffi (ios must use llvm-gcc-4.2) if test "${PACKAGE_NAME}" = "libffi" ; then - export CC="@use_toolchain@/usr/bin/llvm-gcc-4.2" - export CPP="@use_toolchain@/usr/bin/llvm-gcc-4.2 -E" + case "@use_xcode@" in + 5.* | 5.*.* ) + export CC="@use_toolchain@/usr/bin/clang" + export CPP="@use_toolchain@/usr/bin/clang -E" + ;; + *) + export CC="@use_toolchain@/usr/bin/llvm-gcc-4.2" + export CPP="@use_toolchain@/usr/bin/llvm-gcc-4.2 -E" + ;; + esac unset AS unset CCAS fi diff --git a/tools/depends/target/libgpg-error/Makefile b/tools/depends/target/libgpg-error/Makefile index f402cc449a..fa6ffd58ff 100644 --- a/tools/depends/target/libgpg-error/Makefile +++ b/tools/depends/target/libgpg-error/Makefile @@ -3,7 +3,7 @@ DEPS= ../../Makefile.include Makefile # lib name, version LIBNAME=libgpg-error -VERSION=1.10 +VERSION=1.12 SOURCE=$(LIBNAME)-$(VERSION) ARCHIVE=$(SOURCE).tar.bz2 diff --git a/tools/depends/target/libmpeg2/04-clang-fix.patch b/tools/depends/target/libmpeg2/04-clang-fix.patch new file mode 100644 index 0000000000..2f92e5c29e --- /dev/null +++ b/tools/depends/target/libmpeg2/04-clang-fix.patch @@ -0,0 +1,10 @@ +--- /configure.ac 2013-10-09 22:39:08.000000000 +0400 ++++ /configure.ac 2013-06-24 20:34:58.000000000 +0400 +@@ -149,7 +149,6 @@ AC_CHECK_GENERATE_INTTYPES([include]) + + dnl Checks for typedefs, structures, and compiler characteristics. + AC_C_CONST +-AC_C_ALWAYS_INLINE + AC_C_RESTRICT + AC_C_BUILTIN_EXPECT + AC_C_BIGENDIAN
\ No newline at end of file diff --git a/tools/depends/target/libmpeg2/Makefile b/tools/depends/target/libmpeg2/Makefile index 800d647097..15dbd8cbe8 100644 --- a/tools/depends/target/libmpeg2/Makefile +++ b/tools/depends/target/libmpeg2/Makefile @@ -28,6 +28,8 @@ ifeq ($(OS),ios) cd $(PLATFORM); patch -p0 < ../02-neon.patch cd $(PLATFORM); patch -p1 < ../03-config-fix.patch endif + cd $(PLATFORM); patch -p1 < ../04-clang-fix.patch + cd $(PLATFORM); $(AUTORECONF) -vif cd $(PLATFORM); $(CONFIGURE) $(LIBDYLIB): $(PLATFORM) diff --git a/tools/depends/target/libplist/0002-fixclang.diff b/tools/depends/target/libplist/0002-fixclang.diff new file mode 100644 index 0000000000..b4dd32a20f --- /dev/null +++ b/tools/depends/target/libplist/0002-fixclang.diff @@ -0,0 +1,57 @@ +--- /libcnary/node.c 2011-06-25 05:00:48.000000000 +0400 ++++ /libcnary/node.c 2013-03-19 20:34:11.000000000 +0400 +@@ -95,16 +95,17 @@ + } + + int node_detach(node_t* parent, node_t* child) { +- if (!parent || !child) return 0; +- if (node_list_remove(parent->children, child) == 0) { ++ if (!parent || !child) return -1; ++ int index = node_list_remove(parent->children, child); ++ if (index >= 0) { + parent->count--; + } +- return 0; ++ return index; + } + + int node_insert(node_t* parent, unsigned int index, node_t* child) + { +- if (!parent || !child) return; ++ if (!parent || !child) return -1; + child->isLeaf = TRUE; + child->isRoot = FALSE; + child->parent = parent; +@@ -209,7 +210,7 @@ + node_t* node_copy_deep(node_t* node, copy_func_t copy_func) + { + if (!node) return NULL; +- void *data; ++ void *data = NULL; + if (copy_func) { + data = copy_func(node->data); + } + +--- /src/base64.c 2013-10-06 23:14:24.000000000 +0400 ++++ /src/base64.c 2013-03-19 20:34:11.000000000 +0400 +@@ -104,9 +104,9 @@ + + unsigned char *base64decode(const char *buf, size_t *size) + { +- if (!buf) return; ++ if (!buf) return NULL; + size_t len = strlen(buf); +- if (len <= 0) return; ++ if (len <= 0) return NULL; + unsigned char *outbuf = (unsigned char*)malloc((len/4)*3+3); + + unsigned char *line; +@@ -114,7 +114,7 @@ + + line = (unsigned char*)strtok((char*)buf, "\r\n\t "); + while (line) { +- p+=base64decode_block(outbuf+p, line, strlen((char*)line)); ++ p+=base64decode_block(outbuf+p, (const char*)line, strlen((char*)line)); + + // get next line of base64 encoded block + line = (unsigned char*)strtok(NULL, "\r\n\t ");
\ No newline at end of file diff --git a/tools/depends/target/libplist/Makefile b/tools/depends/target/libplist/Makefile index aa5a9b9fcc..62ba1cfe0e 100644 --- a/tools/depends/target/libplist/Makefile +++ b/tools/depends/target/libplist/Makefile @@ -18,6 +18,7 @@ $(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS) rm -rf $(PLATFORM); mkdir -p $(PLATFORM) cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) cd $(PLATFORM); patch -p1 < ../0001-dontbuildswig.patch + cd $(PLATFORM); patch -p1 < ../0002-fixclang.diff cd $(PLATFORM); sed -ie 's/TARGET_LINK_LIBRARIES( plist /TARGET_LINK_LIBRARIES( plist m z /' src/CMakeLists.txt cd $(PLATFORM); rm -rf build; mkdir -p build cd $(PLATFORM)/build; $(CMAKE) VERBOSE=1 -DCMAKE_C_FLAGS="$(CFLAGS)" -DCMAKE_LD_FLAGS="$(LDFLAGS)" .. diff --git a/tools/depends/target/openssl/Makefile b/tools/depends/target/openssl/Makefile index 1ca4aa5072..deb62397c8 100644 --- a/tools/depends/target/openssl/Makefile +++ b/tools/depends/target/openssl/Makefile @@ -41,6 +41,7 @@ $(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS) cd $(PLATFORM); CFLAGS="$(CFLAGS)" CC=$(CC) RANLIB=$(RANLIB) $(CONFIGURE) if test "$(OS)" = "osx"; then \ sed -ie "s|CC= /usr/bin/gcc-4.2|CC= $(CC)|" "$(PLATFORM)/Makefile"; \ + sed -ie "s|CFLAG= |CFLAG=$(CFLAGS) |" "$(PLATFORM)/Makefile"; \ fi if test "$(OS)" = "ios"; then \ sed -ie "s|CFLAG= |CFLAG=$(CFLAGS) |" "$(PLATFORM)/Makefile"; \ diff --git a/tools/depends/target/pythonmodule-pil/Makefile b/tools/depends/target/pythonmodule-pil/Makefile index 08aafc72f8..4dec450077 100644 --- a/tools/depends/target/pythonmodule-pil/Makefile +++ b/tools/depends/target/pythonmodule-pil/Makefile @@ -33,7 +33,7 @@ $(LIBDYLIB): $(PLATFORM) .installed-$(PLATFORM): $(LIBDYLIB) mkdir -p $(PREFIX)/lib/python2.6/site-packages/PIL - unzip $(LIBDYLIB) -d $(PREFIX)/lib/python2.6/site-packages/PIL/ + unzip -of $(LIBDYLIB) -d $(PREFIX)/lib/python2.6/site-packages/PIL/ echo 'PIL' > $(PREFIX)/lib/python2.6/site-packages/PIL.pth touch $@ |