From e2005044dd920128bda832bb164d6a6dc282a565 Mon Sep 17 00:00:00 2001 From: Colin Edwards Date: Sun, 28 Jan 2018 18:58:36 -0600 Subject: [PATCH] CI: Update OSX deps build scripts --- CI/before-script-osx.sh | 9 ++++++++- CI/install-dependencies-osx.sh | 2 +- CI/util/build-package-deps-osx.sh | 22 ++++++++++++++++++++++ 3 files changed, 31 insertions(+), 2 deletions(-) diff --git a/CI/before-script-osx.sh b/CI/before-script-osx.sh index 6f6d9227c..d20a4f9ed 100755 --- a/CI/before-script-osx.sh +++ b/CI/before-script-osx.sh @@ -3,4 +3,11 @@ export PATH=/usr/local/opt/ccache/libexec:$PATH mkdir build cd build -cmake -DPYTHON_LIBRARY=/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/libpython3.6.dylib -DPYTHON_INCLUDE_DIR=/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/include/python3.6m -DENABLE_SPARKLE_UPDATER=ON -DCMAKE_OSX_DEPLOYMENT_TARGET=10.10 -DDepsPath=/tmp/obsdeps -DVLCPath=$PWD/../../vlc-master -DBUILD_BROWSER=ON -DCEF_ROOT_DIR=$PWD/../../cef_binary_${CEF_BUILD_VERSION}_macosx64 .. \ No newline at end of file +cmake -DPYTHON_LIBRARY=/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/libpython3.6.dylib \ +-DPYTHON_INCLUDE_DIR=/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/include/python3.6m \ +-DENABLE_SPARKLE_UPDATER=ON \ +-DCMAKE_OSX_DEPLOYMENT_TARGET=10.10 \ +-DDepsPath=/tmp/obsdeps \ +-DVLCPath=$PWD/../../vlc-master \ +-DBUILD_BROWSER=ON \ +-DCEF_ROOT_DIR=$PWD/../../cef_binary_${CEF_BUILD_VERSION}_macosx64 .. \ No newline at end of file diff --git a/CI/install-dependencies-osx.sh b/CI/install-dependencies-osx.sh index cd2da21b0..fbe7e78d2 100755 --- a/CI/install-dependencies-osx.sh +++ b/CI/install-dependencies-osx.sh @@ -17,7 +17,7 @@ sudo installer -pkg ./Packages.pkg -target / brew update #Base OBS Deps and ccache -brew install qt5 jack speexdsp ccache python3 swig luajit +brew install qt5 jack speexdsp ccache python3 swig export PATH=/usr/local/opt/ccache/libexec:$PATH ccache -s || echo "CCache is not available." diff --git a/CI/util/build-package-deps-osx.sh b/CI/util/build-package-deps-osx.sh index bf950d736..077cfc6d2 100755 --- a/CI/util/build-package-deps-osx.sh +++ b/CI/util/build-package-deps-osx.sh @@ -1,5 +1,15 @@ #!/usr/bin/env bash +exists() +{ + command -v "$1" >/dev/null 2>&1 +} + +if ! exists nasm; then + echo "nasm not found. Try brew install nasm" + exit +fi + CURDIR=$(pwd) # the temp directory @@ -22,6 +32,7 @@ DEPS_DEST=$WORK_DIR/obsdeps mkdir $DEPS_DEST mkdir $DEPS_DEST/bin mkdir $DEPS_DEST/include +mkdir $DEPS_DEST/lib # OSX COMPAT export MACOSX_DEPLOYMENT_TARGET=10.9 @@ -80,6 +91,7 @@ cd $WORK_DIR # x264 git clone git://git.videolan.org/x264.git cd ./x264 +git checkout origin/stable mkdir build cd ./build ../configure --extra-ldflags="-mmacosx-version-min=10.9" --enable-static --prefix="/tmp/obsdeps" @@ -123,6 +135,16 @@ find . -name \*.dylib -exec cp \{\} $DEPS_DEST/bin/ \; rsync -avh --include="*/" --include="*.h" --exclude="*" ../* $DEPS_DEST/include/ rsync -avh --include="*/" --include="*.h" --exclude="*" ./* $DEPS_DEST/include/ +#luajit +curl -L -O https://luajit.org/download/LuaJIT-2.0.5.tar.gz +tar -xf LuaJIT-2.0.5.tar.gz +cd LuaJIT-2.0.5 +make PREFIX=/tmp/obsdeps +make PREFIX=/tmp/obsdeps install +find /tmp/obsdeps/lib -name libluajit\*.dylib -exec cp \{\} $DEPS_DEST/lib/ \; +rsync -avh --include="*/" --include="*.h" --exclude="*" src/* $DEPS_DEST/include/ +make PREFIX=/tmp/obsdeps uninstall + cd $WORK_DIR tar -czf osx-deps.tar.gz obsdeps