From 1e941d50db84428ef2412abae1f4e8afbd8f7341 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=91=E8=89=B2=E9=98=9F=E9=95=BF?= Date: Mon, 5 Sep 2016 16:30:10 +0800 Subject: [PATCH 1/4] Create decode_core.patch-1.1.3 patch for Xcode 7.3 ld error --- decode_core.patch-1.1.3 | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 decode_core.patch-1.1.3 diff --git a/decode_core.patch-1.1.3 b/decode_core.patch-1.1.3 new file mode 100644 index 0000000..ccabbc9 --- /dev/null +++ b/decode_core.patch-1.1.3 @@ -0,0 +1,10 @@ +--- decode_core copy.c 2016-09-05 16:08:12.000000000 +0800 ++++ decode_core.c 2016-09-05 16:06:45.000000000 +0800 +@@ -172,6 +172,7 @@ + if( signalType == TYPE_VOICED ) { + /* Set up pointer */ + pred_lag_ptr = &sLTP_Q15[ sLTP_buf_idx - lag + LTP_ORDER / 2 ]; ++ #pragma clang loop vectorize(disable) interleave(disable) + for( i = 0; i < psDec->subfr_length; i++ ) { + /* Unrolled loop */ + /* Avoids introducing a bias because silk_SMLAWB() always rounds to -inf */ From c58355bb9f022a88ab9706d3e8315b41c592cef2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=91=E8=89=B2=E9=98=9F=E9=95=BF?= Date: Mon, 5 Sep 2016 16:31:08 +0800 Subject: [PATCH 2/4] Update build-libopus.sh using opus-1.1.3 on iOS SDK 9.3 --- build-libopus.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build-libopus.sh b/build-libopus.sh index dcdc910..e36afd2 100644 --- a/build-libopus.sh +++ b/build-libopus.sh @@ -22,8 +22,8 @@ ########################################################################### # Choose your libopus version and your currently-installed iOS SDK version: # -VERSION="1.1.2" -SDKVERSION="9.2" +VERSION="1.1.3" +SDKVERSION="9.3" MINIOSVERSION="8.0" ########################################################################### From 28e4d9361501f98a71aa3f49659a6ee0cb696555 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=91=E8=89=B2=E9=98=9F=E9=95=BF?= Date: Mon, 5 Sep 2016 16:38:26 +0800 Subject: [PATCH 3/4] Update build-libopus.sh patch silk/decode_core.c just for silence clang error message --- build-libopus.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build-libopus.sh b/build-libopus.sh index e36afd2..ab0828e 100644 --- a/build-libopus.sh +++ b/build-libopus.sh @@ -86,6 +86,11 @@ echo "Using opus-${VERSION}.tar.gz" tar zxf opus-${VERSION}.tar.gz -C $SRCDIR cd "${SRCDIR}/opus-${VERSION}" +if [ -e "${REPOROOT}/decode_core.patch-${VERSION}" ]; then + echo "Patching decode_core.patch-${VERSION}" + patch silk/decode_core.c < ${REPOROOT}/decode_core.patch-${VERSION} +fi + set +e # don't bail out of bash script if ccache doesn't exist CCACHE=`which ccache` if [ $? == "0" ]; then From 9109aec57092307e72b986e0987756d1d559db90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=91=E8=89=B2=E9=98=9F=E9=95=BF?= Date: Mon, 5 Sep 2016 17:25:48 +0800 Subject: [PATCH 4/4] make a framework --- pack-framework | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 pack-framework diff --git a/pack-framework b/pack-framework new file mode 100644 index 0000000..5d11a0c --- /dev/null +++ b/pack-framework @@ -0,0 +1,25 @@ +#!/bin/bash + +FWNAME=opus + +if [ ! -d dependencies ]; then + echo "Please run build-libopus.sh first!" + exit 1 +fi + +if [ -d $FWNAME.framework ]; then + echo "Removing previous $FWNAME.framework copy" + rm -rf $FWNAME.framework +fi + +if [ "$1" == "dynamic" ]; then + LIBTOOL_FLAGS="-dynamic -undefined dynamic_lookup" +else + LIBTOOL_FLAGS="-static" +fi + +echo "Creating $FWNAME.framework" +mkdir -p $FWNAME.framework/Headers +libtool -no_warning_for_no_symbols $LIBTOOL_FLAGS -o $FWNAME.framework/$FWNAME dependencies/lib/libopus.a +cp -r dependencies/include/* $FWNAME.framework/Headers/ +echo "Created $FWNAME.framework"