diff options
author | S. Davilla <davilla@4pi.com> | 2012-05-09 19:15:26 -0400 |
---|---|---|
committer | S. Davilla <davilla@4pi.com> | 2012-05-09 20:34:55 -0400 |
commit | 2a406ae494ee21a9ebedbc8fd25e03d8ed1a10e5 (patch) | |
tree | aa0b10fab841732183eeba463603d3b365b00c4d /tools/darwin | |
parent | 2cd1b7c99802e74d0647965623888cacdfa8498f (diff) |
[osx/ios] refactor depends build and switchover to using 10.6sdk for osx
Diffstat (limited to 'tools/darwin')
-rw-r--r-- | tools/darwin/depends/Makefile.buildtools | 11 | ||||
-rw-r--r-- | tools/darwin/depends/Makefile.include.in | 12 | ||||
-rw-r--r-- | tools/darwin/depends/autoconf/Makefile | 2 | ||||
-rw-r--r-- | tools/darwin/depends/automake/Makefile | 2 | ||||
-rw-r--r-- | tools/darwin/depends/boost/Makefile | 25 | ||||
-rw-r--r-- | tools/darwin/depends/boost/user-config.jam.in | 5 | ||||
-rwxr-xr-x | tools/darwin/depends/bootstrap | 16 | ||||
-rw-r--r-- | tools/darwin/depends/cmake/Makefile | 1 | ||||
-rw-r--r-- | tools/darwin/depends/config.site_ios.in | 31 | ||||
-rw-r--r-- | tools/darwin/depends/config.site_ios.mk.in | 34 | ||||
-rw-r--r-- | tools/darwin/depends/config.site_osx.in | 44 | ||||
-rw-r--r-- | tools/darwin/depends/config.site_osx.mk.in | 48 | ||||
-rw-r--r-- | tools/darwin/depends/configure.in | 59 | ||||
-rw-r--r-- | tools/darwin/depends/libflac/Makefile | 2 | ||||
-rw-r--r-- | tools/darwin/depends/libtool/Makefile | 2 | ||||
-rw-r--r-- | tools/darwin/depends/m4/Makefile | 2 | ||||
-rw-r--r-- | tools/darwin/depends/sqlite3/Makefile | 7 | ||||
-rw-r--r-- | tools/darwin/depends/xbmc/Makefile | 1 |
18 files changed, 206 insertions, 98 deletions
diff --git a/tools/darwin/depends/Makefile.buildtools b/tools/darwin/depends/Makefile.buildtools new file mode 100644 index 0000000000..f83a269b1e --- /dev/null +++ b/tools/darwin/depends/Makefile.buildtools @@ -0,0 +1,11 @@ +TOOLCHAIN=/Users/Shared/xbmc-depends/toolchain +export PATH:=$(TOOLCHAIN)/bin:${PATH} + +TARBALLS_LOCATION=/Users/Shared/xbmc-depends/tarballs +BASE_URL=http://mirrors.xbmc.org/build-deps/darwin-libs +MAKE_JOBS=$(shell sysctl hw.ncpu | awk '{print $$2}') + +RETRIEVE_TOOL=/usr/bin/curl +RETRIEVE_TOOL_FLAGS=-Ls --create-dirs --output $(TARBALLS_LOCATION)/$(ARCHIVE) +ARCHIVE_TOOL=tar +ARCHIVE_TOOL_FLAGS=xf diff --git a/tools/darwin/depends/Makefile.include.in b/tools/darwin/depends/Makefile.include.in index 3c212a58a1..a3e6aa403a 100644 --- a/tools/darwin/depends/Makefile.include.in +++ b/tools/darwin/depends/Makefile.include.in @@ -3,12 +3,8 @@ ARCH=@use_arch@ DARWIN=@use_darwin@ PREFIX=@use_prefix@ STAGING=@use_staging@ -TOOLCHAIN=@use_toolchain@ -TARBALLS_LOCATION=@use_staging@/tarballs -BASE_URL=http://mirrors.xbmc.org/build-deps/darwin-libs -MAKE_JOBS=$(shell sysctl hw.ncpu | awk '{print $$2}') -RETRIEVE_TOOL=/usr/bin/curl -RETRIEVE_TOOL_FLAGS=-Ls --create-dirs --output $(TARBALLS_LOCATION)/$(ARCHIVE) -ARCHIVE_TOOL=tar -ARCHIVE_TOOL_FLAGS=xf +# hack, include both possible paths which +# depends on where we do the make. +-include Makefile.buildtools +-include ../Makefile.buildtools diff --git a/tools/darwin/depends/autoconf/Makefile b/tools/darwin/depends/autoconf/Makefile index b657461314..25bc81d8c0 100644 --- a/tools/darwin/depends/autoconf/Makefile +++ b/tools/darwin/depends/autoconf/Makefile @@ -1,4 +1,4 @@ -include ../Makefile.include +include ../Makefile.buildtools # lib name, version APPNAME=autoconf diff --git a/tools/darwin/depends/automake/Makefile b/tools/darwin/depends/automake/Makefile index ebd458fc81..d3017f29bb 100644 --- a/tools/darwin/depends/automake/Makefile +++ b/tools/darwin/depends/automake/Makefile @@ -1,4 +1,4 @@ -include ../Makefile.include +include ../Makefile.buildtools # lib name, version APPNAME=automake diff --git a/tools/darwin/depends/boost/Makefile b/tools/darwin/depends/boost/Makefile index 436801d525..4e331282e1 100644 --- a/tools/darwin/depends/boost/Makefile +++ b/tools/darwin/depends/boost/Makefile @@ -7,6 +7,23 @@ LIBVERSION=1.44.0 SOURCE=$(LIBNAME)_$(VERSION) ARCHIVE=$(SOURCE).tar.bz2 +bjam_args = toolset=darwin-$(platform_gcc_version) +boost_flags = $(platform_sdk_path) -arch $(ARCH) +ifeq ("$(DARWIN)", "ios") + bjam_args += --architecture=arm target-os=iphone macosx-version=iphone-$(platform_sdk_version) define=_LITTLE_ENDIAN + # arm uses non-thread-safe compare-and-swap instruction so use posix thread primitives + boost_flags += -DBOOST_AC_USE_PTHREADS -DBOOST_SP_USE_PTHREADS +else + ifeq ("$(ARCH)", "ppc") + bjam_args += --architecture=$(boost_architecture)=power address-model=32 + else ifeq ("$(ARCH)", "i386") + bjam_args += --architecture=$(boost_architecture)=x86 address-model=32 + else + bjam_args += --architecture=$(boost_architecture)=x86 address-model=64 + endif + bjam_args += target-os=darwin --link=static +endif + all: .installed $(TARBALLS_LOCATION)/$(ARCHIVE): @@ -16,9 +33,11 @@ $(TARBALLS_LOCATION)/$(ARCHIVE): rm -rf $(SOURCE) $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) echo $(SOURCE) > .gitignore - sed -e "s?@boost_flags@?$(boost_flags)?g" \ - -e "s?@platform_gcc_version@?$(platform_gcc_version)?g" \ - user-config.jam.in >> $(SOURCE)/tools/build/v2/user-config.jam + echo 'using darwin : $(platform_gcc_version) : $(platform_cxx) :' >> $(SOURCE)/tools/build/v2/user-config.jam + echo ' <cflags>"-isysroot $(boost_flags) -fvisibility=default -fvisibility-inlines-hidden"' >> $(SOURCE)/tools/build/v2/user-config.jam + echo ' <cxxflags>"-isysroot $(boost_flags) -fvisibility=default -fvisibility-inlines-hidden"' >> $(SOURCE)/tools/build/v2/user-config.jam + echo ' <linkflags>"-Wl,-syslibroot,$(boost_flags)"' >> $(SOURCE)/tools/build/v2/user-config.jam + echo ';' >> $(SOURCE)/tools/build/v2/user-config.jam cd $(SOURCE); patch -p1 < ../add-arm-mem-barrier.patch cd $(SOURCE); patch -p1 < ../fix-deprecated-swp.patch cd $(SOURCE); ./bootstrap.sh --prefix=$(PREFIX) --with-libraries=thread,date_time diff --git a/tools/darwin/depends/boost/user-config.jam.in b/tools/darwin/depends/boost/user-config.jam.in deleted file mode 100644 index 970b4d9881..0000000000 --- a/tools/darwin/depends/boost/user-config.jam.in +++ /dev/null @@ -1,5 +0,0 @@ -using darwin : @platform_gcc_version@ : g++-@platform_gcc_version@ : - <cflags>"-isysroot @boost_flags@ -fvisibility=default -fvisibility-inlines-hidden" - <cxxflags>"-isysroot @boost_flags@ -fvisibility=default -fvisibility-inlines-hidden" - <linkflags>"-Wl,-syslibroot,@boost_flags@" -; diff --git a/tools/darwin/depends/bootstrap b/tools/darwin/depends/bootstrap index 171a93908c..5ab3cf2148 100755 --- a/tools/darwin/depends/bootstrap +++ b/tools/darwin/depends/bootstrap @@ -1 +1,17 @@ +#!/bin/sh + +mkdir -p /Users/Shared/xbmc-depends/toolchain +mkdir -p /Users/Shared/xbmc-depends/tarballs +export PATH="/Users/Shared/xbmc-depends/toolchain/bin:${PATH}" + +# check if we can autoconf +type -P autoconf &>/dev/null && has_autoconf=yes || has_autoconf=no + +if test "$has_autoconf" = "no"; then + # if not then prebuild our autoconf. + echo "autoconf not found, pre-building autoconf" + make -C m4 + make -C autoconf +fi + autoconf diff --git a/tools/darwin/depends/cmake/Makefile b/tools/darwin/depends/cmake/Makefile index 46db23de56..94aeb84684 100644 --- a/tools/darwin/depends/cmake/Makefile +++ b/tools/darwin/depends/cmake/Makefile @@ -5,6 +5,7 @@ APPNAME=cmake VERSION=2.8.8 SOURCE=$(APPNAME)-$(VERSION) ARCHIVE=$(SOURCE).tar.gz +BASE_URL=http://www.cmake.org/files/v2.8 # configuration settings export PATH:=$(TOOLCHAIN)/bin:$(PATH) diff --git a/tools/darwin/depends/config.site_ios.in b/tools/darwin/depends/config.site_ios.in index 090044f880..e6e73c8c1c 100644 --- a/tools/darwin/depends/config.site_ios.in +++ b/tools/darwin/depends/config.site_ios.in @@ -1,23 +1,38 @@ -host_alias=arm-apple-darwin10 +case @use_xcode@ in + 3.*.*) + platform_cc=gcc-4.2 + platform_cpp=cpp-4.2 + platform_cxx=g++-4.2 + ;; + *) + platform_cc=llvm-gcc-4.2 + platform_cpp="llvm-gcc-4.2 -E" + platform_cxx=llvm-g++-4.2 + ;; +esac +platform_gnu=gnu99 platform_gcc_version=4.2 platform_sdk_version=@use_sdk@ +platform_min_version="iphoneos-version-min=4.2" + +host_alias=arm-apple-darwin10 + cross_compiling=yes -platform_min_version="iphoneos-version-min=4.1" -platform_path="/Developer/Platforms/iPhoneOS.platform/Developer" +platform_path="@use_xcodepath@/Platforms/iPhoneOS.platform/Developer" platform_os_cflags="-arch @use_arch@ -mcpu=cortex-a8 -mfpu=neon -ftree-vectorize -mfloat-abi=softfp -pipe -Wno-trigraphs -fpascal-strings -O3 -Wreturn-type -Wunused-variable -fmessage-length=0 -gdwarf-2" platform_os_ldflags="-arch @use_arch@ -mcpu=cortex-a8" -platform_sdk_path="${platform_path}/SDKs/iPhoneOS${platform_sdk_version}.sdk" +platform_sdk_path=@use_sdk_path@ export NM=${platform_path}/usr/bin/nm -export CPP=${platform_path}/usr/bin/cpp-${platform_gcc_version} +export CPP=${platform_path}/usr/bin/${platform_cpp} export CXXCPP=${CPP} export CPPFLAGS="${CPPFLAGS} -no-cpp-precomp -I${prefix}/include -m${platform_min_version} -isysroot ${platform_sdk_path} ${platform_os_cflags}" -export CC=${platform_path}/usr/bin/gcc-${platform_gcc_version} +export CC=${platform_path}/usr/bin/${platform_cc} export CFLAGS="${CFLAGS} -std=gnu99 -no-cpp-precomp -m${platform_min_version} -isysroot ${platform_sdk_path} ${platform_os_cflags} -I${platform_sdk_path}/usr/include" export LD=${platform_path}/usr/bin/ld export LDFLAGS="${LDFLAGS} -m${platform_min_version} -isysroot ${platform_sdk_path} -L${platform_sdk_path}/usr/lib -L${platform_sdk_path}/usr/lib/system ${platform_os_ldflags} -L${prefix}/lib" -export CXX=${platform_path}/usr/bin/g++-${platform_gcc_version} +export CXX=${platform_path}/usr/bin/${platform_cxx} export CXXFLAGS="${CXXFLAGS} -m${platform_min_version} -isysroot ${platform_sdk_path} ${platform_os_cflags}" export AR=${platform_path}/usr/bin/ar export AS="@use_toolchain@/bin/gas-preprocessor.pl ${CC}" @@ -25,7 +40,7 @@ export M4=@use_toolchain@/bin/m4 export CCAS="--tag CC @use_toolchain@/bin/gas-preprocessor.pl ${CC}" export STRIP=${platform_path}/usr/bin/strip export RANLIB=${platform_path}/usr/bin/ranlib -export ACLOCAL="@use_toolchain@/bin/aclocal -I ${prefix}/share/aclocal -I @use_toolchain@/share/aclocal -I /Developer/usr/share/aclocal" +export ACLOCAL="@use_toolchain@/bin/aclocal -I ${prefix}/share/aclocal -I @use_toolchain@/share/aclocal" export LIBTOOL=@use_toolchain@/bin/glibtool export LIBTOOLIZE=@use_toolchain@/bin/glibtoolize export PKG_CONFIG_PATH=${prefix}/lib/pkgconfig:${platform_sdk_path}/usr/lib/pkgconfig diff --git a/tools/darwin/depends/config.site_ios.mk.in b/tools/darwin/depends/config.site_ios.mk.in index 7713851049..dca9adc9ce 100644 --- a/tools/darwin/depends/config.site_ios.mk.in +++ b/tools/darwin/depends/config.site_ios.mk.in @@ -1,23 +1,36 @@ -host_alias=arm-apple-darwin10 +xcode3_chk=case @use_xcode@ in 3.*.*) echo 1 ;; *) echo 0 ;; esac +ifeq ($(shell $(xcode3_chk)) , 1) + platform_cc=gcc-4.2 + platform_cpp=cpp-4.2 + platform_cxx=g++-4.2 +else + platform_cc=llvm-gcc-4.2 + platform_cpp=llvm-gcc-4.2 -E + platform_cxx=llvm-g++-4.2 +endif +platform_gnu=gnu99 platform_gcc_version=4.2 platform_sdk_version=@use_sdk@ +platform_min_version=iphoneos-version-min=4.2 + +host_alias=arm-apple-darwin10 + cross_compiling=yes -platform_min_version=iphoneos-version-min=4.1 -platform_path=/Developer/Platforms/iPhoneOS.platform/Developer +platform_path=@use_xcodepath@/Platforms/iPhoneOS.platform/Developer platform_os_cflags=-arch @use_arch@ -mcpu=cortex-a8 -mfpu=neon -ftree-vectorize -mfloat-abi=softfp -pipe -Wno-trigraphs -fpascal-strings -O3 -Wreturn-type -Wunused-variable -fmessage-length=0 -gdwarf-2 platform_os_ldflags=-arch @use_arch@ -mcpu=cortex-a8 -platform_sdk_path=${platform_path}/SDKs/iPhoneOS${platform_sdk_version}.sdk +platform_sdk_path=@use_sdk_path@ export NM=${platform_path}/usr/bin/nm -export CPP=${platform_path}/usr/bin/cpp-${platform_gcc_version} +export CPP=${platform_path}/usr/bin/${platform_cpp} export CXXCPP=${CPP} export CPPFLAGS+=-no-cpp-precomp -I${PREFIX}/include -m${platform_min_version} -isysroot ${platform_sdk_path} ${platform_os_cflags} -export CC=${platform_path}/usr/bin/gcc-${platform_gcc_version} +export CC=${platform_path}/usr/bin/${platform_cc} export CFLAGS+=-std=gnu99 -no-cpp-precomp -m${platform_min_version} -isysroot ${platform_sdk_path} ${platform_os_cflags} -I${platform_sdk_path}/usr/include export LD=${platform_path}/usr/bin/ld export LDFLAGS+=-m${platform_min_version} -isysroot ${platform_sdk_path} -L${platform_sdk_path}/usr/lib -L${platform_sdk_path}/usr/lib/system ${platform_os_ldflags} -L${PREFIX}/lib -export CXX=${platform_path}/usr/bin/g++-${platform_gcc_version} +export CXX=${platform_path}/usr/bin/${platform_cxx} export CXXFLAGS+=-m${platform_min_version} -isysroot ${platform_sdk_path} ${platform_os_cflags} export AR=${platform_path}/usr/bin/ar export AS=@use_toolchain@/bin/gas-preprocessor.pl ${CC} @@ -25,13 +38,8 @@ export M4=@use_toolchain@/bin/m4 export CCAS=--tag CC @use_toolchain@/bin/gas-preprocessor.pl ${CC} export STRIP=${platform_path}/usr/bin/strip export RANLIB=${platform_path}/usr/bin/ranlib -export ACLOCAL=@use_toolchain@/bin/aclocal -I ${PREFIX}/share/aclocal -I @use_toolchain@/share/aclocal -I /Developer/usr/share/aclocal +export ACLOCAL=@use_toolchain@/bin/aclocal -I ${PREFIX}/share/aclocal -I @use_toolchain@/share/aclocal export LIBTOOL=@use_toolchain@/bin/glibtool export LIBTOOLIZE=@use_toolchain@/bin/glibtoolize export PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig:${platform_sdk_path}/usr/lib/pkgconfig export PATH:=@use_toolchain@/bin:${PREFIX}/bin:${platform_path}/usr/bin:/Developer/usr/bin:${PATH} - -# tweaks for boost -bjam_args=toolset=darwin-${platform_gcc_version} --architecture=arm target-os=iphone macosx-version=iphone-${platform_sdk_version} define=_LITTLE_ENDIAN -# arm uses non-thread-safe compare-and-swap instruction so use posix thread primitives -boost_flags=${platform_sdk_path} -arch @use_arch@ -DBOOST_AC_USE_PTHREADS -DBOOST_SP_USE_PTHREADS diff --git a/tools/darwin/depends/config.site_osx.in b/tools/darwin/depends/config.site_osx.in index 72034d455d..5137623ae3 100644 --- a/tools/darwin/depends/config.site_osx.in +++ b/tools/darwin/depends/config.site_osx.in @@ -5,41 +5,60 @@ if test "@use_sdk@" = "10.4" ; then else host_alias=i386-apple-darwin8 fi + platform_gnu=gnu89 + platform_cc=gcc-4.0 + platform_cpp=cpp-4.0 + platform_cxx=g++-4.0 platform_gcc_version=4.0 platform_sdk_version=@use_sdk@u + export MACOSX_DEPLOYMENT_TARGET=10.4 + platform_min_version=macosx-version-min=10.4 else - host_alias=i686-apple-darwin + case @use_xcode@ in + 3.*.*) + platform_cc=gcc-4.2 + platform_cpp=cpp-4.2 + platform_cxx=g++-4.2 + ;; + *) + platform_cc=llvm-gcc-4.2 + platform_cpp="llvm-gcc-4.2 -E" + platform_cxx=llvm-g++-4.2 + ;; + esac + platform_gnu=gnu99 platform_gcc_version=4.2 platform_sdk_version=@use_sdk@ + host_alias=@use_arch@-apple-darwin + export MACOSX_DEPLOYMENT_TARGET=10.6 + platform_min_version=macosx-version-min=10.6 fi -platform_min_version=macosx-version-min=10.4 -platform_path="/Developer" +platform_path=@use_xcodepath@ platform_os_cflags="-arch @use_arch@ -no_compact_linkedit" platform_os_ldflags="-arch @use_arch@ -Wl,-arch,@use_arch@ -no_compact_linkedit" -platform_sdk_path="${platform_path}/SDKs/MacOSX${platform_sdk_version}.sdk" +platform_sdk_path=@use_sdk_path@ export NM=${platform_path}/usr/bin/nm -export CPP=${platform_path}/usr/bin/cpp-${platform_gcc_version} +export CPP=${platform_path}/usr/bin/${platform_cpp} export CXXCPP=${CPP} export CPPFLAGS="${CPPFLAGS} -no-cpp-precomp -I${prefix}/include -m${platform_min_version} -isysroot ${platform_sdk_path} ${platform_os_cflags}" -export CC=/usr/bin/gcc-${platform_gcc_version} -export CFLAGS="${CFLAGS} -std=gnu89 -no-cpp-precomp -m${platform_min_version} -isysroot ${platform_sdk_path} ${platform_os_cflags}" +export CC=/usr/bin/${platform_cc} +export CFLAGS="${CFLAGS} -std=${platform_gnu} -no-cpp-precomp -m${platform_min_version} -isysroot ${platform_sdk_path} ${platform_os_cflags}" export LD=${platform_path}/usr/bin/ld export LDFLAGS="${LDFLAGS} -m${platform_min_version} -isysroot ${platform_sdk_path} ${platform_os_ldflags} -L${prefix}/lib" -export CXX=/usr/bin/g++-${platform_gcc_version} +export CXX=/usr/bin/${platform_cxx} export CXXFLAGS="${CXXFLAGS} -m${platform_min_version} -isysroot ${platform_sdk_path} ${platform_os_cflags}" export AR=${platform_path}/usr/bin/ar export AS=${platform_path}/usr/bin/as export M4=@use_toolchain@/bin/m4 export STRIP=${platform_path}/usr/bin/strip export RANLIB=${platform_path}/usr/bin/ranlib -export ACLOCAL="@use_toolchain@/bin/aclocal -I ${prefix}/share/aclocal -I @use_toolchain@/share/aclocal -I /Developer/usr/share/aclocal" +export ACLOCAL="@use_toolchain@/bin/aclocal -I ${prefix}/share/aclocal -I @use_toolchain@/share/aclocal" export LIBTOOL=@use_toolchain@/bin/glibtool export LIBTOOLIZE=@use_toolchain@/bin/glibtoolize export PKG_CONFIG_PATH=${prefix}/lib/pkgconfig:${platform_sdk_path}/usr/lib/pkgconfig export PATH="@use_toolchain@/bin:${prefix}/bin:${platform_path}/usr/bin:/Developer/usr/bin:${PATH}" -export MACOSX_DEPLOYMENT_TARGET=10.4 # tweaks for samba if test "${PACKAGE_NAME}" = "Samba" ; then @@ -60,6 +79,11 @@ if test "${PACKAGE_NAME}" = "python" ; then export OPT="${CFLAGS}" fi +# tweaks for libogg / libvorbis +if test "${PACKAGE_NAME}" = "libogg" || test "${PACKAGE_NAME}" = "libvorbis" ; then + export CFLAGS="${CFLAGS} -O" +fi + # tweaks for libjpeg-turbo if test "${PACKAGE_NAME}" = "libjpeg-turbo" ; then export NASM="@use_toolchain@/bin/yasm" diff --git a/tools/darwin/depends/config.site_osx.mk.in b/tools/darwin/depends/config.site_osx.mk.in index 79e9355625..f27d4980dd 100644 --- a/tools/darwin/depends/config.site_osx.mk.in +++ b/tools/darwin/depends/config.site_osx.mk.in @@ -4,47 +4,55 @@ ifeq ("@use_sdk@", "10.4") else host_alias=i386-apple-darwin8 endif + platform_gnu=gnu89 + platform_cc=gcc-4.0 + platform_cpp=cpp-4.0 + platform_cxx=g++-4.0 platform_gcc_version=4.0 platform_sdk_version=@use_sdk@u -else - host_alias=i686-apple-darwin + export MACOSX_DEPLOYMENT_TARGET=10.4 + platform_min_version=macosx-version-min=10.4 +else + xcode3_chk=case @use_xcode@ in 3.*.*) echo 1 ;; *) echo 0 ;; esac + ifeq ($(shell $(xcode3_chk)) , 1) + platform_cc=gcc-4.2 + platform_cpp=cpp-4.2 + platform_cxx=g++-4.2 + else + platform_cc=llvm-gcc-4.2 + platform_cpp=llvm-gcc-4.2 -E + platform_cxx=llvm-g++-4.2 + endif + platform_gnu=gnu99 platform_gcc_version=4.2 platform_sdk_version=@use_sdk@ + host_alias=@use_arch@-apple-darwin + export MACOSX_DEPLOYMENT_TARGET=10.6 + platform_min_version=macosx-version-min=10.6 endif -platform_min_version=macosx-version-min=10.4 -platform_path=/Developer +platform_path=@use_xcodepath@ platform_os_cflags=-arch @use_arch@ -no_compact_linkedit platform_os_ldflags=-arch @use_arch@ -no_compact_linkedit -platform_sdk_path=${platform_path}/SDKs/MacOSX${platform_sdk_version}.sdk +platform_sdk_path=@use_sdk_path@ export NM=${platform_path}/usr/bin/nm -export CPP=${platform_path}/usr/bin/cpp-${platform_gcc_version} +export CPP=${platform_path}/usr/bin/${platform_cpp} export CXXCPP=${CPP} export CPPFLAGS+=-no-cpp-precomp -I${PREFIX}/include -m${platform_min_version} -isysroot ${platform_sdk_path} ${platform_os_cflags} -export CC=/usr/bin/gcc-${platform_gcc_version} -export CFLAGS+=-std=gnu89 -no-cpp-precomp -m${platform_min_version} -isysroot ${platform_sdk_path} ${platform_os_cflags} +export CC=/usr/bin/${platform_cc} +export CFLAGS+=-std=${platform_gnu} -no-cpp-precomp -m${platform_min_version} -isysroot ${platform_sdk_path} ${platform_os_cflags} export LD=${platform_path}/usr/bin/ld export LDFLAGS+=-m${platform_min_version} -isysroot ${platform_sdk_path} ${platform_os_ldflags} -L${PREFIX}/lib -export CXX=/usr/bin/g++-${platform_gcc_version} +export CXX=/usr/bin/${platform_cxx} export CXXFLAGS+=-m${platform_min_version} -isysroot ${platform_sdk_path} ${platform_os_cflags} export AR=${platform_path}/usr/bin/ar export AS=${platform_path}/usr/bin/as export M4=@use_toolchain@/bin/m4 export STRIP=${platform_path}/usr/bin/strip export RANLIB=${platform_path}/usr/bin/ranlib -export ACLOCAL=@use_toolchain@/bin/aclocal -I ${PREFIX}/share/aclocal -I @use_toolchain@/share/aclocal -I /Developer/usr/share/aclocal +export ACLOCAL=@use_toolchain@/bin/aclocal -I ${PREFIX}/share/aclocal -I @use_toolchain@/share/aclocal export LIBTOOL=@use_toolchain@/bin/glibtool export LIBTOOLIZE=@use_toolchain@/bin/glibtoolize export PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig:${platform_sdk_path}/usr/lib/pkgconfig export PATH:=@use_toolchain@/bin:${PREFIX}/bin:${platform_path}/usr/bin:/Developer/usr/bin:${PATH} -export MACOSX_DEPLOYMENT_TARGET=10.4 - -# tweaks for boost -ifeq ("@use_arch@", "ppc") - boost_architecture=power -else - boost_architecture=x86 -endif -bjam_args=toolset=darwin-${platform_gcc_version} --architecture=${boost_architecture} address-model=32 target-os=darwin --link=static -boost_flags=${platform_sdk_path} -arch @use_arch@ diff --git a/tools/darwin/depends/configure.in b/tools/darwin/depends/configure.in index d755e00ce5..4fdc4bb242 100644 --- a/tools/darwin/depends/configure.in +++ b/tools/darwin/depends/configure.in @@ -1,11 +1,5 @@ AC_PREREQ(2.59) -AC_INIT([darwin-depends], [1.00], [http://trac.xbmc.org]) - -AC_ARG_WITH([staging], - [AS_HELP_STRING([--with-staging], - [depends build location (/Users/Shared/xbmc-depends).])], - [use_staging=$withval], - [use_staging="/Users/Shared/xbmc-depends"]) +AC_INIT([darwin-depends], [2.00], [http://trac.xbmc.org]) AC_ARG_WITH([darwin], [AS_HELP_STRING([--with-darwin], @@ -20,43 +14,55 @@ AC_ARG_WITH([arch], AC_ARG_WITH([sdk], [AS_HELP_STRING([--with-sdk], - [build depend libs using sdk 10.4 (default osx) or 4.2 (default ios).])], + [build depend libs using sdk 10.6 (default osx) or 4.2 (default ios).])], [use_sdk=$withval],) +use_staging="/Users/Shared/xbmc-depends" + +# find xcodebuild, test in Xcode.app, if not there, fall back to normal location +use_xcodepath="/Applications/Xcode.app/Contents/Developer" +use_xcodebuild="/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild" +if [[ ! -f "$use_xcodebuild" ]]; then + use_xcodepath="/Developer" + use_xcodebuild="/usr/bin/xcodebuild" +fi +AC_MSG_RESULT(found xcodebuild at $use_xcodebuild) +use_xcode=[`$use_xcodebuild -version | grep Xcode | awk '{ print $2}'`] + OUTPUT_FILES="Makefile Makefile.include" case $use_darwin in osx) use_arch="${use_arch:-i386}" - use_sdk="${use_sdk:-10.4}" - use_prefix=${use_staging}/${use_darwin}-${use_sdk}_${use_arch} if test "$use_arch" = "armv7"; then AC_MSG_ERROR(error in configure of --with-arch=$use_arch) fi + found_sdk_version=[`$use_xcodebuild -showsdks | grep macosx | sort | tail -n 1 | awk '{ print $4}'`] + use_sdk="${use_sdk:-$found_sdk_version}" case $use_sdk in 10.*);; *) AC_MSG_ERROR(error in configure of --with-sdk=$use_sdk) esac + sdk_name=macosx$use_sdk + use_prefix=${use_staging}/${sdk_name}_${use_arch} CONFIG_SITE=" [config.site:config.site_osx.in]" MK_CONFIG_SITE=" [config.site.mk:config.site_osx.mk.in]" ;; ios) - found_sdk=`xcodebuild -showsdks | grep iphoneos | sort | tail -n 1 | awk '{ print $2}'` use_arch="${use_arch:-armv7}" - use_sdk="${use_sdk:-$found_sdk}" - # this is an issue. if we set prefix according to ${use_sdk}_${use_arch}, - # then XBMC_DEPENDS prefix location in xcode must match but xcode uses its - # own defines for build. So just hardcode to 4.2_${use_arch} for now until we - # can figure out a better way. - use_prefix=${use_staging}/${use_darwin}-4.2_${use_arch} if test "$use_arch" != "armv7"; then AC_MSG_ERROR(error in configure of --with-arch=$use_arch) fi + found_sdk_version=[`$use_xcodebuild -showsdks | grep iphoneos | sort | tail -n 1 | awk '{ print $2}'`] + use_sdk="${use_sdk:-$found_sdk_version}" case $use_sdk in 4.*);; + 5.*);; *) AC_MSG_ERROR(error in configure of --with-sdk=$use_sdk) esac + sdk_name=iphoneos$use_sdk + use_prefix=${use_staging}/${sdk_name}_${use_arch} CONFIG_SITE=" [config.site:config.site_ios.in]" MK_CONFIG_SITE=" [config.site.mk:config.site_ios.mk.in]" ;; @@ -65,7 +71,10 @@ case $use_darwin in ;; esac -AC_MSG_RESULT(configuring for darwin $use_darwin-$use_sdk-$use_arch) +use_sdk_path=[`$use_xcodebuild -version -sdk $sdk_name | grep ^Path | awk '{ print $2}'`] + +AC_MSG_RESULT(configuring for darwin $sdk_name) +AC_MSG_RESULT(using the sdk path of $use_sdk_path) AC_MSG_RESULT(creating hostroot at $use_staging) OUTPUT_FILES+=${CONFIG_SITE} @@ -87,12 +96,16 @@ mkdir -p ${use_prefix}/share/aclocal mkdir -p ${use_prefix}/include -AC_SUBST(use_toolchain) -AC_SUBST(use_staging) -AC_SUBST(use_prefix) -AC_SUBST(use_darwin) -AC_SUBST(use_arch) +AC_SUBST(use_xcode) +AC_SUBST(use_xcodepath) + AC_SUBST(use_sdk) +AC_SUBST(use_arch) +AC_SUBST(use_darwin) +AC_SUBST(use_prefix) +AC_SUBST(use_staging) +AC_SUBST(use_sdk_path) +AC_SUBST(use_toolchain) AC_CONFIG_FILES([${OUTPUT_FILES}]) diff --git a/tools/darwin/depends/libflac/Makefile b/tools/darwin/depends/libflac/Makefile index f5b0c37674..c9477ee1b5 100644 --- a/tools/darwin/depends/libflac/Makefile +++ b/tools/darwin/depends/libflac/Makefile @@ -25,7 +25,7 @@ $(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) echo $(SOURCE) > .gitignore cd $(SOURCE); $(CONFIGURE) if test "$(DARWIN)" = "ios"; then \ - sed -i "" -e "s|CC -dynamiclib|CC -arch armv7 -dynamiclib|" "$(SOURCE)/libtool"; \ + sed -ie "s|CC -dynamiclib|CC -arch armv7 -dynamiclib|" "$(SOURCE)/libtool"; \ fi $(LIBDYLIB): $(SOURCE) diff --git a/tools/darwin/depends/libtool/Makefile b/tools/darwin/depends/libtool/Makefile index c8ab6ce7de..de98cb4356 100644 --- a/tools/darwin/depends/libtool/Makefile +++ b/tools/darwin/depends/libtool/Makefile @@ -1,4 +1,4 @@ -include ../Makefile.include +include ../Makefile.buildtools # lib name, version APPNAME=libtool diff --git a/tools/darwin/depends/m4/Makefile b/tools/darwin/depends/m4/Makefile index c8ecf1a1bc..5e61734ba7 100644 --- a/tools/darwin/depends/m4/Makefile +++ b/tools/darwin/depends/m4/Makefile @@ -1,4 +1,4 @@ -include ../Makefile.include +include ../Makefile.buildtools # lib name, version APPNAME=m4 diff --git a/tools/darwin/depends/sqlite3/Makefile b/tools/darwin/depends/sqlite3/Makefile index 47c1d798b8..fbbcaa70b2 100644 --- a/tools/darwin/depends/sqlite3/Makefile +++ b/tools/darwin/depends/sqlite3/Makefile @@ -2,9 +2,10 @@ include ../Makefile.include # lib name, version LIBNAME=sqlite -VERSION=3.6.11 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz +VERSION=3.7.7.1 +SOURCE=sqlite-autoconf-3070701 +ARCHIVE=sqlite-autoconf-3070701.tar.gz +BASE_URL=http://www.sqlite.org # configuration settings export CXXFLAGS+=-DSQLITE_ENABLE_COLUMN_METADATA=1 diff --git a/tools/darwin/depends/xbmc/Makefile b/tools/darwin/depends/xbmc/Makefile index 27845cddef..c9434c447f 100644 --- a/tools/darwin/depends/xbmc/Makefile +++ b/tools/darwin/depends/xbmc/Makefile @@ -5,6 +5,7 @@ SOURCE=../../../../ # configuration settings export PATH:=$(TOOLCHAIN)/bin:$(PREFIX)/bin:$(PATH) CONFIGURE=./configure --prefix=$(PREFIX) \ + --disable-rsxs \ PKG_CONFIG_PATH=$(PREFIX)/lib/pkgconfig \ PYTHON=$(PREFIX)/bin/python |