Opus support for standalone macOS.

This commit is contained in:
casey langen 2022-02-09 19:24:29 -08:00
parent c8bdcc70cf
commit 093a23ed48
2 changed files with 20 additions and 6 deletions

View File

@ -9,6 +9,7 @@ set -x
export CFLAGS="-fPIC"
export CXXFLAGS="-fPIC"
OS=$(uname)
ARCH=$(uname -m)
BOOST_VERSION="1_76_0"
OPENSSL_VERSION="1.1.1m"
@ -356,6 +357,18 @@ function build_ffmpeg() {
mkdir ../ffmpeg-bin
cp -rfp \@rpath/* ../ffmpeg-bin
cd ..
if [ $OS == "Darwin" ]; then
LIBOPUS="/opt/homebrew/opt/opus/lib/libopus.0.dylib"
cd ffmpeg-bin/lib/
cp ${LIBOPUS} .
codesign --remove-signature ./libopus.0.dylib
chmod 755 ./libopus.0.dylib
install_name_tool -id "@rpath/libopus.0.dylib" ./libopus.0.dylib
install_name_tool -change "${LIBOPUS}" "@rpath/libopus.0.dylib" libavcodec-musikcube.59.dylib
install_name_tool -change "${LIBOPUS}" "@rpath/libopus.0.dylib" libavformat-musikcube.59.dylib
cd ../../
fi
}
#
@ -384,10 +397,10 @@ function build_lame() {
}
cd vendor
fetch_packages
build_boost
build_openssl
build_curl
build_libmicrohttpd
#fetch_packages
#build_boost
#build_openssl
#build_curl
#build_libmicrohttpd
build_ffmpeg
build_lame
#build_lame

View File

@ -15,6 +15,7 @@ if [[ "$PLATFORM" == 'Darwin' ]]; then
cp vendor/ffmpeg-bin/lib/libavformat-musikcube.59.dylib ./bin/lib
cp vendor/ffmpeg-bin/lib/libavutil-musikcube.57.dylib ./bin/lib
cp vendor/ffmpeg-bin/lib/libswresample-musikcube.4.dylib ./bin/lib
cp vendor/ffmpeg-bin/lib/libopus.0.dylib ./bin/lib
cp vendor/boost-bin/lib/libboost_atomic.dylib ./bin/lib
cp vendor/boost-bin/lib/libboost_chrono.dylib ./bin/lib