mirror of
https://github.com/clangen/musikcube.git
synced 2025-01-30 15:32:37 +00:00
Let's try to build a vendor'd taglib. WIP.
This commit is contained in:
parent
e691db7f47
commit
f25af1f683
@ -33,6 +33,7 @@ LIBMICROHTTPD_VERSION="0.9.75"
|
|||||||
FFMPEG_VERSION="5.1.2"
|
FFMPEG_VERSION="5.1.2"
|
||||||
LAME_VERSION="3.100"
|
LAME_VERSION="3.100"
|
||||||
LIBOPENMPT_VERSION="0.6.6"
|
LIBOPENMPT_VERSION="0.6.6"
|
||||||
|
TAGLIB_VERSION="1.13"
|
||||||
OUTDIR="$(pwd)/vendor/bin"
|
OUTDIR="$(pwd)/vendor/bin"
|
||||||
LIBDIR="$OUTDIR/lib"
|
LIBDIR="$OUTDIR/lib"
|
||||||
|
|
||||||
@ -57,6 +58,7 @@ if [[ $CROSSCOMPILE == "rpi" ]]; then
|
|||||||
OPENSSL_CROSSCOMPILE_PREFIX="--cross-compile-prefix=arm-linux-gnueabihf-"
|
OPENSSL_CROSSCOMPILE_PREFIX="--cross-compile-prefix=arm-linux-gnueabihf-"
|
||||||
GENERIC_CONFIGURE_FLAGS="--build=x86_64-pc-linux-gnu --host=arm-linux-gnueabihf --with-sysroot=${ARM_ROOT}"
|
GENERIC_CONFIGURE_FLAGS="--build=x86_64-pc-linux-gnu --host=arm-linux-gnueabihf --with-sysroot=${ARM_ROOT}"
|
||||||
FFMPEG_CONFIGURE_FLAGS="--arch=${ARCH} --target-os=linux --cross-prefix=arm-linux-gnueabihf-"
|
FFMPEG_CONFIGURE_FLAGS="--arch=${ARCH} --target-os=linux --cross-prefix=arm-linux-gnueabihf-"
|
||||||
|
TAGLIB_COMPILER_TOOLCHAIN="-DCMAKE_TOOLCHAIN_FILE=/build/musikcube/.cmake/RaspberryPiToolchain.cmake"
|
||||||
PKG_CONFIG_PATH="${LIBDIR}/pkgconfig/:${ARM_ROOT}/usr/lib/arm-linux-gnueabihf/pkgconfig/"
|
PKG_CONFIG_PATH="${LIBDIR}/pkgconfig/:${ARM_ROOT}/usr/lib/arm-linux-gnueabihf/pkgconfig/"
|
||||||
printf "\n\ndetected CROSSCOMPILE=${CROSSCOMPILE}\n"
|
printf "\n\ndetected CROSSCOMPILE=${CROSSCOMPILE}\n"
|
||||||
printf " CFLAGS=${CFLAGS}\n CXXFLAGS=${CXXFLAGS}\n LDFLAGS=${LDFLAGS}\n GENERIC_CONFIGURE_FLAGS=${GENERIC_CONFIGURE_FLAGS}\n"
|
printf " CFLAGS=${CFLAGS}\n CXXFLAGS=${CXXFLAGS}\n LDFLAGS=${LDFLAGS}\n GENERIC_CONFIGURE_FLAGS=${GENERIC_CONFIGURE_FLAGS}\n"
|
||||||
@ -93,8 +95,9 @@ function fetch_packages() {
|
|||||||
copy_or_download https://curl.se/download curl-${CURL_VERSION}.tar.gz
|
copy_or_download https://curl.se/download curl-${CURL_VERSION}.tar.gz
|
||||||
copy_or_download https://ftp.gnu.org/gnu/libmicrohttpd libmicrohttpd-${LIBMICROHTTPD_VERSION}.tar.gz
|
copy_or_download https://ftp.gnu.org/gnu/libmicrohttpd libmicrohttpd-${LIBMICROHTTPD_VERSION}.tar.gz
|
||||||
copy_or_download https://ffmpeg.org/releases ffmpeg-${FFMPEG_VERSION}.tar.bz2
|
copy_or_download https://ffmpeg.org/releases ffmpeg-${FFMPEG_VERSION}.tar.bz2
|
||||||
copy_or_download https://downloads.sourceforge.net/project/lame/lame/3.100 lame-${LAME_VERSION}.tar.gz
|
copy_or_download https://downloads.sourceforge.net/project/lame/lame/${LAME_VERSION} lame-${LAME_VERSION}.tar.gz
|
||||||
copy_or_download https://lib.openmpt.org/files/libopenmpt/src libopenmpt-${LIBOPENMPT_VERSION}+release.autotools.tar.gz
|
copy_or_download https://lib.openmpt.org/files/libopenmpt/src libopenmpt-${LIBOPENMPT_VERSION}+release.autotools.tar.gz
|
||||||
|
copy_or_download https://github.com/taglib/taglib/releases/download/v${TAGLIB_VERSION} taglib-${TAGLIB_VERSION}.tar.gz
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -412,6 +415,24 @@ function build_libopenmpt() {
|
|||||||
cd ..
|
cd ..
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# taglib
|
||||||
|
#
|
||||||
|
|
||||||
|
function build_taglib() {
|
||||||
|
rm -rf taglib-${TAGLIB_VERSION}
|
||||||
|
tar xvfz taglib-${TAGLIB_VERSION}.tar.gz
|
||||||
|
cd taglib-${TAGLIB_VERSION}
|
||||||
|
cmake \
|
||||||
|
-DCMAKE_INSTALL_PREFIX=${OUTDIR} \
|
||||||
|
${TAGLIB_COMPILER_TOOLCHAIN} \
|
||||||
|
-DBUILD_SHARED_LIBS=1 \
|
||||||
|
. || exit $?
|
||||||
|
make ${JOBS} || exit $?
|
||||||
|
make install
|
||||||
|
cd ..
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# macOS dylib rpaths
|
# macOS dylib rpaths
|
||||||
#
|
#
|
||||||
@ -457,27 +478,28 @@ function delete_unused_libraries() {
|
|||||||
cd ../../
|
cd ../../
|
||||||
}
|
}
|
||||||
|
|
||||||
clean
|
#clean
|
||||||
|
|
||||||
mkdir vendor
|
mkdir vendor
|
||||||
cd vendor
|
cd vendor
|
||||||
|
|
||||||
stage_prebuilt_libraries
|
stage_prebuilt_libraries
|
||||||
fetch_packages
|
fetch_packages
|
||||||
build_openssl
|
#build_openssl
|
||||||
build_curl
|
#build_curl
|
||||||
build_libmicrohttpd
|
#build_libmicrohttpd
|
||||||
build_ffmpeg
|
#build_ffmpeg
|
||||||
build_lame
|
#build_lame
|
||||||
build_libopenmpt
|
#build_libopenmpt
|
||||||
delete_unused_libraries
|
build_taglib
|
||||||
relink_dynamic_libraries
|
#delete_unused_libraries
|
||||||
|
#relink_dynamic_libraries
|
||||||
|
|
||||||
cd ..
|
# cd ..
|
||||||
if [[ $CROSSCOMPILE == "rpi" ]]; then
|
# if [[ $CROSSCOMPILE == "rpi" ]]; then
|
||||||
mv vendor vendor-${CROSSCOMPILE}
|
# mv vendor vendor-${CROSSCOMPILE}
|
||||||
else
|
# else
|
||||||
mv vendor vendor-$(uname -m)
|
# mv vendor vendor-$(uname -m)
|
||||||
fi
|
# fi
|
||||||
|
|
||||||
printf "\n\ndone!\n\n"
|
printf "\n\ndone!\n\n"
|
||||||
|
@ -45,6 +45,7 @@ elif [[ "$PLATFORM" == 'Linux' ]]; then
|
|||||||
cp vendor/bin/lib/libmp3lame.so.0 ./bin/lib
|
cp vendor/bin/lib/libmp3lame.so.0 ./bin/lib
|
||||||
cp vendor/bin/lib/libmicrohttpd.so.12 ./bin/lib
|
cp vendor/bin/lib/libmicrohttpd.so.12 ./bin/lib
|
||||||
cp vendor/bin/lib/libopenmpt.so.0 ./bin/lib
|
cp vendor/bin/lib/libopenmpt.so.0 ./bin/lib
|
||||||
|
cp vendor/bin/lib/libtag.so.1.19.0 ./bin/lib
|
||||||
|
|
||||||
SYSTEM_ROOT=""
|
SYSTEM_ROOT=""
|
||||||
SYSTEM_TYPE="x86_64-linux-gnu"
|
SYSTEM_TYPE="x86_64-linux-gnu"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user