AppImage: use custom Boost instead of system one

The boost coming with AlmaLinux 8 (1.66) fails to compile in C++20
mode.
This commit is contained in:
Moritz Bunkus 2024-04-24 11:02:40 +02:00
parent 381af2d089
commit edf71b66af
No known key found for this signature in database
GPG Key ID: 74AF00ADF2E32C85

View File

@ -128,21 +128,33 @@ if [[ ! -f configure ]]; then
./autogen.sh
fi
if [[ -f /etc/centos-release ]]; then
devtoolset=$(ls -1d /opt/rh/*toolset-* | tail -n 1)
export CC=${devtoolset}/root/bin/gcc
export CXX=${devtoolset}/root/bin/g++
fi
boost_dir=
EXTRA_INCLUDES=
EXTRA_LIBS=
export PKG_CONFIG_PATH="${QTDIR}/lib/pkgconfig:${PKG_CONFIG_PATH}"
export LD_LIBRARY_PATH="${QTDIR}/lib:${LD_LIBRARY_PATH}"
export LDFLAGS="-L${QTDIR}/lib ${LDFLAGS}"
export PATH="${QTDIR}/bin:${PATH}"
if [[ -f /etc/centos-release ]]; then
devtoolset=$(ls -1d /opt/rh/*toolset-* | tail -n 1)
export CC=${devtoolset}/root/bin/gcc
export CXX=${devtoolset}/root/bin/g++
boost_dir=/srv/build/opt/almalinux/8/boost
EXTRA_INCLUDES=${boost_dir}/include
EXTRA_LIBS=${boost_dir}/lib
LD_LIBRARY_PATH="${boost_dir}/lib:${LD_LIBRARY_PATH}"
fi
if [[ ( ! -f build-config ) && ( "$NO_BUILD" != 1 ) ]]; then
./configure \
--prefix=/usr \
--enable-optimization
--enable-optimization \
--with-extra-includes=${EXTRA_INCLUDES} \
--with-extra-libs=${EXTRA_LIBS}
./drake clean
fi
@ -182,6 +194,9 @@ mkdir all_libs
mv ./home all_libs
mv ./lib* all_libs
mv ./usr all_libs
if [[ -n ${boost_dir} ]]; then
cp ${boost_dir}/lib/libboost* all_libs
fi
mkdir lib
# inefficient loop due to the same lib potentially being present in
# several directories & mv throwing a fit about it ("will not
@ -209,5 +224,7 @@ cp ./usr/share/applications/org.bunkus.mkvtoolnix-gui.desktop mkvtoolnix-gui.des
fix_desktop mkvtoolnix-gui.desktop
rm -rf ./usr/srv
cd ..
generate_type2_appimage