Script updates.

This commit is contained in:
casey langen 2022-02-09 16:58:56 -08:00
parent 42782ee6ea
commit 90e0573e15
2 changed files with 42 additions and 16 deletions

View File

@ -26,9 +26,9 @@ LAME_VERSION="3.100"
# download deps
#
wget https://boostorg.jfrog.io/artifactory/main/release/1.78.0/source/boost_${BOOST_VERSION}.tar.bz2
wget https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_${BOOST_VERSION}.tar.bz2
wget https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz
wget https://curl.se/download/${CURL_VERSION}.tar.gz
wget https://curl.se/download/curl-${CURL_VERSION}.tar.gz
wget https://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-${LIBMICROHTTPD_VERSION}.tar.gz
wget https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2
wget https://downloads.sourceforge.net/project/lame/lame/3.100/lame-${LAME_VERSION}.tar.gz
@ -37,21 +37,31 @@ wget https://downloads.sourceforge.net/project/lame/lame/3.100/lame-${LAME_VERSI
# boost
#
BOOST_CXX_FLAGS="-fPIC"
if [ $OS == "Darwin" ]; then
BOOST_CXX_FLAGS="-fPIC -std=c++14 -stdlib=libc++"
fi
tar xvfj boost_${BOOST_VERSION}.tar.bz2
cd boost_${BOOST_VERSION}
./bootstrap.sh
./b2 headers
./b2 -d -j8 -sNO_LZMA=1 -sNO_ZSTD=1 threading=multi link=shared,static cxxflags="-fPIC -std=c++14 -stdlib=libc++" --prefix=../boost-bin/ install || exit $?
./b2 -d -j8 -sNO_LZMA=1 -sNO_ZSTD=1 threading=multi link=shared,static cxxflags=${BOOST_CXX_FLAGS} --prefix=../boost-bin/ install || exit $?
cd ..
#
# openssl
#
OPENSSL_TYPE="linux-${ARCH}"
if [ $OS == "Darwin" ]; then
OPENSSL_TYPE="darwin64-${ARCH}-cc"
fi
rm -rf openssl-bin
tar xvfz openssl-${OPENSSL_VERSION}.tar.gz
cd openssl-${OPENSSL_VERSION}
perl ./Configure --prefix=`pwd`/output no-ssl3 no-ssl3-method no-zlib "darwin64-${ARCH}-cc"
perl ./Configure --prefix=`pwd`/output no-ssl3 no-ssl3-method no-zlib ${OPENSSL_TYPE}
make
make install
mkdir ../openssl-bin
@ -352,4 +362,4 @@ if [ $OS == "Darwin" ]; then
install_name_tool -id "@rpath/libmp3lame.dylib" libmp3lame.dylib
install_name_tool -id "@rpath/libmp3lame.0.dylib" libmp3lame.0.dylib
cd ../../
fi
fi

View File

@ -33,20 +33,24 @@ if [[ "$PLATFORM" == 'Darwin' ]]; then
elif [[ "$PLATFORM" == 'Linux' ]]; then
echo "[stage-static-vendor-libraries] staging Linux .so files..."
cp vendor/boost-bin/lib/libboost_filesystem.so.1.78.0 ./bin/lib/
cp vendor/boost-bin/lib/libboost_thread.so.1.78.0 ./bin/lib/
cp vendor/ffmpeg-bin/lib/libavcodec-musikcube.so.59 ./bin/lib
cp vendor/ffmpeg-bin/lib/libavformat-musikcube.so.59 ./bin/lib
cp vendor/ffmpeg-bin/lib/libavutil-musikcube.so.57 ./bin/lib
cp vendor/ffmpeg-bin/lib/libswresample-musikcube.so.4 ./bin/lib
cp vendor/ffmpeg-bin/lib/libavcodec-musikcube.so.59 ./bin/lib/
cp vendor/ffmpeg-bin/lib/libavformat-musikcube.so.59 ./bin/lib/
cp vendor/ffmpeg-bin/lib/libavutil-musikcube.so.57 ./bin/lib/
cp vendor/ffmpeg-bin/lib/libswresample-musikcube.so.4 ./bin/lib/
cp vendor/boost-bin/lib/libboost_filesystem.so.1.76.0 ./bin/lib
cp vendor/boost-bin/lib/libboost_thread.so.1.76.0 ./bin/lib
cp vendor/curl-bin/lib/libcurl.so.4 ./bin/lib/
cp vendor/openssl-bin/lib/libcrypto.so.1.1 ./bin/lib
cp vendor/openssl-bin/lib/libssl.so.1.1 ./bin/lib
cp /lib/x86_64-linux-gnu/libssl.so.1.1 ./bin/lib/
cp /lib/x86_64-linux-gnu/libcrypto.so.1.1 ./bin/lib/
cp /lib/x86_64-linux-gnu/libz.so.1 ./bin/lib/
cp /lib/x86_64-linux-gnu/libmp3lame.so.0 ./bin/lib/
cp vendor/curl-bin/lib/libcurl.so.4 ./bin/lib
cp vendor/lame-bin/lib/libmp3lame.so.0 ./bin/lib
cp vendor/libmicrohttpd-bin/lib/libmicrohttpd.so.12 ./bin/lib
cp /lib/x86_64-linux-gnu/libz.so.1 ./bin/lib
cp /lib/x86_64-linux-gnu/libopenmpt.so.0 ./bin/lib
cp /lib/x86_64-linux-gnu/libmpg123.so.0 ./bin/lib
cp /lib/x86_64-linux-gnu/libvorbis.so.0 ./bin/lib
@ -56,5 +60,17 @@ elif [[ "$PLATFORM" == 'Linux' ]]; then
cp /lib/x86_64-linux-gnu/libpanelw.so.6 ./bin/lib
cp /lib/x86_64-linux-gnu/libtinfo.so.6 ./bin/lib
FILES="./bin/lib/*"
for f in $FILES
do
patchelf --set-rpath "\$ORIGIN" "$f"
done
FILES="./bin/plugins/*.so"
for f in $FILES
do
patchelf --set-rpath "\$ORIGIN:\$ORIGIN/../lib" "$f"
done
chmod -x ./bin/lib/*
fi