diff options
author | Sam Bingner <sam@bingner.com> | 2019-04-03 10:00:48 -1000 |
---|---|---|
committer | Sam Bingner <sam@bingner.com> | 2019-04-09 23:20:36 -1000 |
commit | 730c46318c57e8a492341dfd7fd0111a6f074691 (patch) | |
tree | 160fbae5450f9602c8412512c930586a2a059686 /data | |
parent | 8a2f4f91276cf89765caa7f13b22bbe27ff11995 (diff) |
Update libvpx make.sh - still minor issue
Diffstat (limited to 'data')
-rw-r--r-- | data/vpx/libvpx-1.8.0.tar.gz (renamed from data/vpx/v1.8.0.tar.gz) | bin | 2879302 -> 2879302 bytes | |||
-rw-r--r-- | data/vpx/make.sh | 19 | ||||
-rw-r--r-- | data/vpx/toolchain.diff | 158 |
3 files changed, 161 insertions, 16 deletions
diff --git a/data/vpx/v1.8.0.tar.gz b/data/vpx/libvpx-1.8.0.tar.gz Binary files differindex 8dc457e83..8dc457e83 100644 --- a/data/vpx/v1.8.0.tar.gz +++ b/data/vpx/libvpx-1.8.0.tar.gz diff --git a/data/vpx/make.sh b/data/vpx/make.sh index 4a90b84fd..07366620e 100644 --- a/data/vpx/make.sh +++ b/data/vpx/make.sh @@ -1,17 +1,4 @@ pkg:setup - -# Should make patches, but these are imported from my stuff. meh. -sed -i '/die \"--enable-shared/c\true/' configure # This one skips a check -sed -i 's/arm64-darwin-gcc/aarch64-darwin-gcc/' configure # This one bypasses xcrun usage. - -# Instead of using xcrun, just set env -export CC=${PKG_TARG}-gcc -export CXX=${PKG_TARG}-g++ -export LD=${CC} -export AR=${PKG_TARG}-ar -export RANLIB=${PKG_TARG}-ranlib - -mkdir macbuild && cd macbuild - ../configure --prefix=/usr --target=aarch64-darwin-gcc - make - pkg:install +CROSS="${PKG_TARG}-" ./configure --target="${PKG_TARG}-gcc" --prefix=$(cat "${PKG_BASE}/arch/${PKG_ARCH}/${PKG_CFTARG}/prefix") --disable-static --enable-shared +pkg:make V=1 +pkg:install diff --git a/data/vpx/toolchain.diff b/data/vpx/toolchain.diff new file mode 100644 index 000000000..b72ec9ae9 --- /dev/null +++ b/data/vpx/toolchain.diff @@ -0,0 +1,158 @@ +diff -ur libvpx-1.8.0/build/make/Makefile libvpx-1.8.0+iPhone/build/make/Makefile +--- libvpx-1.8.0/build/make/Makefile 2019-02-04 07:02:33.000000000 -1000 ++++ libvpx-1.8.0+iPhone/build/make/Makefile 2019-04-03 09:52:14.000000000 -1000 +@@ -70,9 +70,15 @@ + ASFLAGS+=-I$(BUILD_PFX)$(BUILD_ROOT)/ -I$(SRC_PATH)/ + DIST_DIR?=dist + HOSTCC?=gcc ++ifeq ($(words $(subst -, ,$(TOOLCHAIN))),4) ++TGT_ISA:=$(word 1, $(subst -, ,$(TOOLCHAIN))) ++TGT_OS:=$(word 3, $(subst -, ,$(TOOLCHAIN))) ++TGT_CC:=$(word 4, $(subst -, ,$(TOOLCHAIN))) ++else + TGT_ISA:=$(word 1, $(subst -, ,$(TOOLCHAIN))) + TGT_OS:=$(word 2, $(subst -, ,$(TOOLCHAIN))) + TGT_CC:=$(word 3, $(subst -, ,$(TOOLCHAIN))) ++endif + quiet:=$(if $(or $(verbose), $(V)),, yes) + qexec=$(if $(quiet),@) + +diff -ur libvpx-1.8.0/build/make/configure.sh libvpx-1.8.0+iPhone/build/make/configure.sh +--- libvpx-1.8.0/build/make/configure.sh 2019-02-04 07:02:33.000000000 -1000 ++++ libvpx-1.8.0+iPhone/build/make/configure.sh 2019-04-03 09:58:47.000000000 -1000 +@@ -771,35 +771,27 @@ + # detect tgt_os + case "$gcctarget" in + *darwin10*) +- tgt_isa=x86_64 + tgt_os=darwin10 + ;; + *darwin11*) +- tgt_isa=x86_64 + tgt_os=darwin11 + ;; + *darwin12*) +- tgt_isa=x86_64 + tgt_os=darwin12 + ;; + *darwin13*) +- tgt_isa=x86_64 + tgt_os=darwin13 + ;; + *darwin14*) +- tgt_isa=x86_64 + tgt_os=darwin14 + ;; + *darwin15*) +- tgt_isa=x86_64 + tgt_os=darwin15 + ;; + *darwin16*) +- tgt_isa=x86_64 + tgt_os=darwin16 + ;; + *darwin17*) +- tgt_isa=x86_64 + tgt_os=darwin17 + ;; + x86_64*mingw32*) +@@ -838,9 +830,16 @@ + # + # Set up toolchain variables + # +- tgt_isa=$(echo ${toolchain} | awk 'BEGIN{FS="-"}{print $1}') +- tgt_os=$(echo ${toolchain} | awk 'BEGIN{FS="-"}{print $2}') +- tgt_cc=$(echo ${toolchain} | awk 'BEGIN{FS="-"}{print $3}') ++ if [[ "$(echo ${toolchain} | awk 'BEGIN{FS="-"}{print NF}')" == "4" ]]; then ++ tgt_isa=$(echo ${toolchain} | awk 'BEGIN{FS="-"}{print $1}') ++ tgt_flavor=$(echo ${toolchain} | awk 'BEGIN{FS="-"}{print $2}') ++ tgt_os=$(echo ${toolchain} | awk 'BEGIN{FS="-"}{print $3}') ++ tgt_cc=$(echo ${toolchain} | awk 'BEGIN{FS="-"}{print $4}') ++ else ++ tgt_isa=$(echo ${toolchain} | awk 'BEGIN{FS="-"}{print $1}') ++ tgt_os=$(echo ${toolchain} | awk 'BEGIN{FS="-"}{print $2}') ++ tgt_cc=$(echo ${toolchain} | awk 'BEGIN{FS="-"}{print $3}') ++ fi + + # Mark the specific ISA requested as enabled + soft_enable ${tgt_isa} +@@ -876,12 +875,14 @@ + # Handle darwin variants. Newer SDKs allow targeting older + # platforms, so use the newest one available. + case ${toolchain} in +- arm*-darwin*) +- add_cflags "-miphoneos-version-min=${IOS_VERSION_MIN}" +- iphoneos_sdk_dir="$(show_darwin_sdk_path iphoneos)" +- if [ -d "${iphoneos_sdk_dir}" ]; then +- add_cflags "-isysroot ${iphoneos_sdk_dir}" +- add_ldflags "-isysroot ${iphoneos_sdk_dir}" ++ arm*-darwin*|aarch64*-darwin*) ++ if [ -z "${CROSS}" ]; then ++ add_cflags "-miphoneos-version-min=${IOS_VERSION_MIN}" ++ iphoneos_sdk_dir="$(show_darwin_sdk_path iphoneos)" ++ if [ -d "${iphoneos_sdk_dir}" ]; then ++ add_cflags "-isysroot ${iphoneos_sdk_dir}" ++ add_ldflags "-isysroot ${iphoneos_sdk_dir}" ++ fi + fi + ;; + x86*-darwin*) +@@ -894,6 +895,8 @@ + esac + + case ${toolchain} in ++ aarch64-*-darwin*|arm-*-darwin*) ++ ;; + *-darwin8-*) + add_cflags "-mmacosx-version-min=10.4" + add_ldflags "-mmacosx-version-min=10.4" +@@ -1153,16 +1156,17 @@ + ;; + + darwin*) +- XCRUN_FIND="xcrun --sdk iphoneos --find" +- CXX="$(${XCRUN_FIND} clang++)" +- CC="$(${XCRUN_FIND} clang)" +- AR="$(${XCRUN_FIND} ar)" +- AS="$(${XCRUN_FIND} as)" +- STRIP="$(${XCRUN_FIND} strip)" +- NM="$(${XCRUN_FIND} nm)" +- RANLIB="$(${XCRUN_FIND} ranlib)" ++ if [ -z "${CROSS}" ]; then ++ XCRUN_FIND="xcrun --sdk iphoneos --find }" ++ CXX="${CXX:-$(${XCRUN_FIND}clang++)}" ++ CC="${CC:-$(${XCRUN_FIND}clang)}" ++ AR="${AR:-$(${XCRUN_FIND}ar)}" ++ AS="${AS:-$(${XCRUN_FIND}as)}" ++ STRIP="${STRIP:-$(${XCRUN_FIND}strip)}" ++ NM="${NM:-$(${XCRUN_FIND}nm)}" ++ RANLIB="${RANLIB:-$(${XCRUN_FIND}ranlib)}" + AS_SFX=.S +- LD="${CXX:-$(${XCRUN_FIND} ld)}" ++ LD="${CXX:-$(${XCRUN_FIND}ld)}" + + # ASFLAGS is written here instead of using check_add_asflags + # because we need to overwrite all of ASFLAGS and purge the +@@ -1208,6 +1212,7 @@ + check_add_asflags -fembed-bitcode + check_add_ldflags -fembed-bitcode + fi ++ fi + ;; + + linux*) +diff -ur libvpx-1.8.0/configure libvpx-1.8.0+iPhone/configure +--- libvpx-1.8.0/configure 2019-02-04 07:02:33.000000000 -1000 ++++ libvpx-1.8.0+iPhone/configure 2019-04-03 09:08:31.000000000 -1000 +@@ -100,9 +100,11 @@ + # alphabetically by architecture, generic-gnu last. + all_platforms="${all_platforms} arm64-android-gcc" + all_platforms="${all_platforms} arm64-darwin-gcc" ++all_platforms="${all_platforms} aarch64-apple-darwin17-gcc" + all_platforms="${all_platforms} arm64-linux-gcc" + all_platforms="${all_platforms} arm64-win64-gcc" + all_platforms="${all_platforms} arm64-win64-vs15" ++all_platforms="${all_platforms} arm-apple-darwin11-gcc" + all_platforms="${all_platforms} armv7-android-gcc" #neon Cortex-A8 + all_platforms="${all_platforms} armv7-darwin-gcc" #neon Cortex-A8 + all_platforms="${all_platforms} armv7-linux-rvct" #neon Cortex-A8 |