Forráskód Böngészése

CI: Update OSX deps build scripts

Colin Edwards 7 éve
szülő
commit
e2005044dd

+ 8 - 1
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 ..
+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 ..

+ 1 - 1
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."

+ 22 - 0
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