mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-21 21:35:38 +00:00
Deps: Make some libraries optional for Linux
This commit is contained in:
parent
cc8e65d444
commit
6bc1d7baf0
|
@ -2,11 +2,39 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
if [ "$#" -ne 1 ]; then
|
if [ "$#" -lt 1 ]; then
|
||||||
echo "Syntax: $0 <output directory>"
|
echo "Syntax: $0 [-system-libjpeg] [-system-libpng] [-system-libwebp] [-system-zstd] [-system-qt] [-skip-download] <output directory>"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
for arg in "$@"; do
|
||||||
|
if [ "$arg" == "-system-libjpeg" ]; then
|
||||||
|
echo "Skipping building libjpeg."
|
||||||
|
SKIP_LIBJPEG=true
|
||||||
|
shift
|
||||||
|
elif [ "$arg" == "-system-libpng" ]; then
|
||||||
|
echo "Skipping building libpng."
|
||||||
|
SKIP_LIBPNG=true
|
||||||
|
shift
|
||||||
|
elif [ "$arg" == "-system-libwebp" ]; then
|
||||||
|
echo "Skipping building libwebp."
|
||||||
|
SKIP_LIBWEBP=true
|
||||||
|
shift
|
||||||
|
elif [ "$arg" == "-system-zstd" ]; then
|
||||||
|
echo "Skipping building zstd."
|
||||||
|
SKIP_ZSTD=true
|
||||||
|
shift
|
||||||
|
elif [ "$arg" == "-system-qt" ]; then
|
||||||
|
echo "Skipping building Qt."
|
||||||
|
SKIP_QT=true
|
||||||
|
shift
|
||||||
|
elif [ "$arg" == "-skip-download" ]; then
|
||||||
|
echo "Not downloading sources."
|
||||||
|
SKIP_DOWNLOAD=true
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
SCRIPTDIR=$(realpath $(dirname "${BASH_SOURCE[0]}"))
|
SCRIPTDIR=$(realpath $(dirname "${BASH_SOURCE[0]}"))
|
||||||
NPROCS="$(getconf _NPROCESSORS_ONLN)"
|
NPROCS="$(getconf _NPROCESSORS_ONLN)"
|
||||||
INSTALLDIR="$1"
|
INSTALLDIR="$1"
|
||||||
|
@ -31,48 +59,84 @@ SPIRV_CROSS=vulkan-sdk-1.3.290.0
|
||||||
mkdir -p deps-build
|
mkdir -p deps-build
|
||||||
cd deps-build
|
cd deps-build
|
||||||
|
|
||||||
|
if [ "$SKIP_DOWNLOAD" != true ]; then
|
||||||
|
curl -C - -L \
|
||||||
|
-O "https://github.com/ianlancetaylor/libbacktrace/archive/$LIBBACKTRACE.zip" \
|
||||||
|
-O "https://github.com/libsdl-org/SDL/releases/download/release-$SDL2/SDL2-$SDL2.tar.gz" \
|
||||||
|
-o "cpuinfo-$CPUINFO.tar.gz" "https://github.com/stenzek/cpuinfo/archive/$CPUINFO.tar.gz" \
|
||||||
|
-o "discord-rpc-$DISCORD_RPC.tar.gz" "https://github.com/stenzek/discord-rpc/archive/$DISCORD_RPC.tar.gz" \
|
||||||
|
-o "shaderc-$SHADERC.tar.gz" "https://github.com/stenzek/shaderc/archive/$SHADERC.tar.gz" \
|
||||||
|
-o "soundtouch-$SOUNDTOUCH.tar.gz" "https://github.com/stenzek/soundtouch/archive/$SOUNDTOUCH.tar.gz"
|
||||||
|
fi
|
||||||
|
|
||||||
cat > SHASUMS <<EOF
|
cat > SHASUMS <<EOF
|
||||||
fd6f417fe9e3a071cf1424a5152d926a34c4a3c5070745470be6cf12a404ed79 $LIBBACKTRACE.zip
|
fd6f417fe9e3a071cf1424a5152d926a34c4a3c5070745470be6cf12a404ed79 $LIBBACKTRACE.zip
|
||||||
343e789069fc7afbcdfe44dbba7dbbf45afa98a15150e079a38e60e44578865d libjpeg-turbo-$LIBJPEGTURBO.tar.gz
|
|
||||||
6a5ca0652392a2d7c9db2ae5b40210843c0bbc081cbd410825ab00cc59f14a6c libpng-$LIBPNG.tar.xz
|
|
||||||
61f873ec69e3be1b99535634340d5bde750b2e4447caa1db9f61be3fd49ab1e5 libwebp-$LIBWEBP.tar.gz
|
|
||||||
c6ef64ca18a19d13df6eb22df9aff19fb0db65610a74cc81dae33a82235cacd4 SDL2-$SDL2.tar.gz
|
c6ef64ca18a19d13df6eb22df9aff19fb0db65610a74cc81dae33a82235cacd4 SDL2-$SDL2.tar.gz
|
||||||
8c29e06cf42aacc1eafc4077ae2ec6c6fcb96a626157e0593d5e82a34fd403c1 zstd-$ZSTD.tar.gz
|
|
||||||
c5f22a5e10fb162895ded7de0963328e7307611c688487b5d152c9ee64767599 qtbase-everywhere-src-$QT.tar.xz
|
|
||||||
e1a1d8785fae67d16ad0a443b01d5f32663a6b68d275f1806ebab257485ce5d6 qtimageformats-everywhere-src-$QT.tar.xz
|
|
||||||
fb0d1286a35be3583fee34aeb5843c94719e07193bdf1d4d8b0dc14009caef01 qtsvg-everywhere-src-$QT.tar.xz
|
|
||||||
58e855ad1b2533094726c8a425766b63a04a0eede2ed85086860e54593aa4b2a qttools-everywhere-src-$QT.tar.xz
|
|
||||||
9845780b5dc1b7279d57836db51aeaf2e4a1160c42be09750616f39157582ca9 qttranslations-everywhere-src-$QT.tar.xz
|
|
||||||
a2a057e1dd644bd44abb9990fecc194b2e25c2e0f39e81aa9fee4c1e5e2a8a5b qtwayland-everywhere-src-$QT.tar.xz
|
|
||||||
e1351218d270db49c3dddcba04fb2153b09731ea3fa6830e423f5952f44585be cpuinfo-$CPUINFO.tar.gz
|
e1351218d270db49c3dddcba04fb2153b09731ea3fa6830e423f5952f44585be cpuinfo-$CPUINFO.tar.gz
|
||||||
3eea5ccce6670c126282f1ba4d32c19d486db49a1a5cbfb8d6f48774784d310c discord-rpc-$DISCORD_RPC.tar.gz
|
3eea5ccce6670c126282f1ba4d32c19d486db49a1a5cbfb8d6f48774784d310c discord-rpc-$DISCORD_RPC.tar.gz
|
||||||
4c1780b6c65c27c4dcb109f08ab632241c98b77fe2e22be726c151ff514482bf shaderc-$SHADERC.tar.gz
|
4c1780b6c65c27c4dcb109f08ab632241c98b77fe2e22be726c151ff514482bf shaderc-$SHADERC.tar.gz
|
||||||
fe45c2af99f6102d2704277d392c1c83b55180a70bfd17fb888cc84a54b70573 soundtouch-$SOUNDTOUCH.tar.gz
|
fe45c2af99f6102d2704277d392c1c83b55180a70bfd17fb888cc84a54b70573 soundtouch-$SOUNDTOUCH.tar.gz
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
curl -C - -L \
|
if [ "$SKIP_LIBJPEG" != true ]; then
|
||||||
-O "https://github.com/ianlancetaylor/libbacktrace/archive/$LIBBACKTRACE.zip" \
|
if [ "$SKIP_DOWNLOAD" != true ]; then
|
||||||
-O "https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/$LIBJPEGTURBO/libjpeg-turbo-$LIBJPEGTURBO.tar.gz" \
|
curl -C - -L -O "https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/$LIBJPEGTURBO/libjpeg-turbo-$LIBJPEGTURBO.tar.gz"
|
||||||
-O "https://downloads.sourceforge.net/project/libpng/libpng16/$LIBPNG/libpng-$LIBPNG.tar.xz" \
|
fi
|
||||||
-O "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-$LIBWEBP.tar.gz" \
|
cat >> SHASUMS <<EOF
|
||||||
-O "https://github.com/libsdl-org/SDL/releases/download/release-$SDL2/SDL2-$SDL2.tar.gz" \
|
343e789069fc7afbcdfe44dbba7dbbf45afa98a15150e079a38e60e44578865d libjpeg-turbo-$LIBJPEGTURBO.tar.gz
|
||||||
-O "https://github.com/facebook/zstd/releases/download/v$ZSTD/zstd-$ZSTD.tar.gz" \
|
EOF
|
||||||
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtbase-everywhere-src-$QT.tar.xz" \
|
fi
|
||||||
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtimageformats-everywhere-src-$QT.tar.xz" \
|
if [ "$SKIP_LIBPNG" != true ]; then
|
||||||
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtsvg-everywhere-src-$QT.tar.xz" \
|
if [ "$SKIP_DOWNLOAD" != true ]; then
|
||||||
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qttools-everywhere-src-$QT.tar.xz" \
|
curl -C - -L -O "https://downloads.sourceforge.net/project/libpng/libpng16/$LIBPNG/libpng-$LIBPNG.tar.xz"
|
||||||
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qttranslations-everywhere-src-$QT.tar.xz" \
|
fi
|
||||||
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtwayland-everywhere-src-$QT.tar.xz" \
|
cat >> SHASUMS <<EOF
|
||||||
-o "cpuinfo-$CPUINFO.tar.gz" "https://github.com/stenzek/cpuinfo/archive/$CPUINFO.tar.gz" \
|
6a5ca0652392a2d7c9db2ae5b40210843c0bbc081cbd410825ab00cc59f14a6c libpng-$LIBPNG.tar.xz
|
||||||
-o "discord-rpc-$DISCORD_RPC.tar.gz" "https://github.com/stenzek/discord-rpc/archive/$DISCORD_RPC.tar.gz" \
|
EOF
|
||||||
-o "shaderc-$SHADERC.tar.gz" "https://github.com/stenzek/shaderc/archive/$SHADERC.tar.gz" \
|
fi
|
||||||
-o "soundtouch-$SOUNDTOUCH.tar.gz" "https://github.com/stenzek/soundtouch/archive/$SOUNDTOUCH.tar.gz"
|
if [ "$SKIP_LIBWEBP" != true ]; then
|
||||||
|
if [ "$SKIP_DOWNLOAD" != true ]; then
|
||||||
|
curl -C - -L -O "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-$LIBWEBP.tar.gz"
|
||||||
|
fi
|
||||||
|
cat >> SHASUMS <<EOF
|
||||||
|
61f873ec69e3be1b99535634340d5bde750b2e4447caa1db9f61be3fd49ab1e5 libwebp-$LIBWEBP.tar.gz
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
if [ "$SKIP_ZSTD" != true ]; then
|
||||||
|
if [ "$SKIP_DOWNLOAD" != true ]; then
|
||||||
|
curl -C - -L -O "https://github.com/facebook/zstd/releases/download/v$ZSTD/zstd-$ZSTD.tar.gz"
|
||||||
|
fi
|
||||||
|
cat >> SHASUMS <<EOF
|
||||||
|
8c29e06cf42aacc1eafc4077ae2ec6c6fcb96a626157e0593d5e82a34fd403c1 zstd-$ZSTD.tar.gz
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
if [ "$SKIP_QT" != true ]; then
|
||||||
|
if [ "$SKIP_DOWNLOAD" != true ]; then
|
||||||
|
curl -C - -L \
|
||||||
|
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtbase-everywhere-src-$QT.tar.xz" \
|
||||||
|
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtimageformats-everywhere-src-$QT.tar.xz" \
|
||||||
|
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtsvg-everywhere-src-$QT.tar.xz" \
|
||||||
|
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qttools-everywhere-src-$QT.tar.xz" \
|
||||||
|
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qttranslations-everywhere-src-$QT.tar.xz" \
|
||||||
|
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtwayland-everywhere-src-$QT.tar.xz"
|
||||||
|
fi
|
||||||
|
cat >> SHASUMS <<EOF
|
||||||
|
c5f22a5e10fb162895ded7de0963328e7307611c688487b5d152c9ee64767599 qtbase-everywhere-src-$QT.tar.xz
|
||||||
|
e1a1d8785fae67d16ad0a443b01d5f32663a6b68d275f1806ebab257485ce5d6 qtimageformats-everywhere-src-$QT.tar.xz
|
||||||
|
fb0d1286a35be3583fee34aeb5843c94719e07193bdf1d4d8b0dc14009caef01 qtsvg-everywhere-src-$QT.tar.xz
|
||||||
|
58e855ad1b2533094726c8a425766b63a04a0eede2ed85086860e54593aa4b2a qttools-everywhere-src-$QT.tar.xz
|
||||||
|
9845780b5dc1b7279d57836db51aeaf2e4a1160c42be09750616f39157582ca9 qttranslations-everywhere-src-$QT.tar.xz
|
||||||
|
a2a057e1dd644bd44abb9990fecc194b2e25c2e0f39e81aa9fee4c1e5e2a8a5b qtwayland-everywhere-src-$QT.tar.xz
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
shasum -a 256 --check SHASUMS
|
shasum -a 256 --check SHASUMS
|
||||||
|
|
||||||
# Have to clone with git, because it does version detection.
|
# Have to clone with git, because it does version detection.
|
||||||
if [ ! -d "SPIRV-Cross" ]; then
|
if [ "$SKIP_DOWNLOAD" != true ]; then
|
||||||
git clone https://github.com/KhronosGroup/SPIRV-Cross/ -b $SPIRV_CROSS --depth 1
|
if [ ! -d "SPIRV-Cross" ]; then
|
||||||
|
git clone https://github.com/KhronosGroup/SPIRV-Cross/ -b $SPIRV_CROSS --depth 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Building libbacktrace..."
|
echo "Building libbacktrace..."
|
||||||
|
@ -84,43 +148,51 @@ make
|
||||||
make install
|
make install
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
echo "Building libpng..."
|
if [ "$SKIP_LIBPNG" != true ]; then
|
||||||
rm -fr "libpng-$LIBPNG"
|
echo "Building libpng..."
|
||||||
tar xf "libpng-$LIBPNG.tar.xz"
|
rm -fr "libpng-$LIBPNG"
|
||||||
cd "libpng-$LIBPNG"
|
tar xf "libpng-$LIBPNG.tar.xz"
|
||||||
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DBUILD_SHARED_LIBS=ON -DPNG_TESTS=OFF -DPNG_STATIC=OFF -DPNG_SHARED=ON -DPNG_TOOLS=OFF -B build -G Ninja
|
cd "libpng-$LIBPNG"
|
||||||
cmake --build build --parallel
|
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DBUILD_SHARED_LIBS=ON -DPNG_TESTS=OFF -DPNG_STATIC=OFF -DPNG_SHARED=ON -DPNG_TOOLS=OFF -B build -G Ninja
|
||||||
ninja -C build install
|
cmake --build build --parallel
|
||||||
cd ..
|
ninja -C build install
|
||||||
|
cd ..
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Building libjpeg..."
|
if [ "$SKIP_LIBJPEG" != true ]; then
|
||||||
rm -fr "libjpeg-turbo-$LIBJPEGTURBO"
|
echo "Building libjpeg..."
|
||||||
tar xf "libjpeg-turbo-$LIBJPEGTURBO.tar.gz"
|
rm -fr "libjpeg-turbo-$LIBJPEGTURBO"
|
||||||
cd "libjpeg-turbo-$LIBJPEGTURBO"
|
tar xf "libjpeg-turbo-$LIBJPEGTURBO.tar.gz"
|
||||||
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DENABLE_STATIC=OFF -DENABLE_SHARED=ON -B build -G Ninja
|
cd "libjpeg-turbo-$LIBJPEGTURBO"
|
||||||
cmake --build build --parallel
|
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DENABLE_STATIC=OFF -DENABLE_SHARED=ON -B build -G Ninja
|
||||||
ninja -C build install
|
cmake --build build --parallel
|
||||||
cd ..
|
ninja -C build install
|
||||||
|
cd ..
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Building Zstandard..."
|
if [ "$SKIP_ZSTD" != true ]; then
|
||||||
rm -fr "zstd-$ZSTD"
|
echo "Building Zstandard..."
|
||||||
tar xf "zstd-$ZSTD.tar.gz"
|
rm -fr "zstd-$ZSTD"
|
||||||
cd "zstd-$ZSTD"
|
tar xf "zstd-$ZSTD.tar.gz"
|
||||||
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DBUILD_SHARED_LIBS=ON -DZSTD_BUILD_SHARED=ON -DZSTD_BUILD_STATIC=OFF -DZSTD_BUILD_PROGRAMS=OFF -B build -G Ninja build/cmake
|
cd "zstd-$ZSTD"
|
||||||
cmake --build build --parallel
|
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DBUILD_SHARED_LIBS=ON -DZSTD_BUILD_SHARED=ON -DZSTD_BUILD_STATIC=OFF -DZSTD_BUILD_PROGRAMS=OFF -B build -G Ninja build/cmake
|
||||||
ninja -C build install
|
cmake --build build --parallel
|
||||||
cd ..
|
ninja -C build install
|
||||||
|
cd ..
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Building WebP..."
|
if [ "$SKIP_LIBWEBP" != true ]; then
|
||||||
rm -fr "libwebp-$LIBWEBP"
|
echo "Building WebP..."
|
||||||
tar xf "libwebp-$LIBWEBP.tar.gz"
|
rm -fr "libwebp-$LIBWEBP"
|
||||||
cd "libwebp-$LIBWEBP"
|
tar xf "libwebp-$LIBWEBP.tar.gz"
|
||||||
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -B build -G Ninja \
|
cd "libwebp-$LIBWEBP"
|
||||||
-DWEBP_BUILD_ANIM_UTILS=OFF -DWEBP_BUILD_CWEBP=OFF -DWEBP_BUILD_DWEBP=OFF -DWEBP_BUILD_GIF2WEBP=OFF -DWEBP_BUILD_IMG2WEBP=OFF \
|
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -B build -G Ninja \
|
||||||
-DWEBP_BUILD_VWEBP=OFF -DWEBP_BUILD_WEBPINFO=OFF -DWEBP_BUILD_WEBPMUX=OFF -DWEBP_BUILD_EXTRAS=OFF -DBUILD_SHARED_LIBS=ON
|
-DWEBP_BUILD_ANIM_UTILS=OFF -DWEBP_BUILD_CWEBP=OFF -DWEBP_BUILD_DWEBP=OFF -DWEBP_BUILD_GIF2WEBP=OFF -DWEBP_BUILD_IMG2WEBP=OFF \
|
||||||
cmake --build build --parallel
|
-DWEBP_BUILD_VWEBP=OFF -DWEBP_BUILD_WEBPINFO=OFF -DWEBP_BUILD_WEBPMUX=OFF -DWEBP_BUILD_EXTRAS=OFF -DBUILD_SHARED_LIBS=ON
|
||||||
ninja -C build install
|
cmake --build build --parallel
|
||||||
cd ..
|
ninja -C build install
|
||||||
|
cd ..
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Building SDL2..."
|
echo "Building SDL2..."
|
||||||
rm -fr "SDL2-$SDL2"
|
rm -fr "SDL2-$SDL2"
|
||||||
|
@ -131,63 +203,64 @@ cmake --build build --parallel
|
||||||
ninja -C build install
|
ninja -C build install
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
# Couple notes:
|
if [ "$SKIP_QT" != true ]; then
|
||||||
# -fontconfig is needed otherwise Qt Widgets render only boxes.
|
# Couple notes:
|
||||||
# -qt-doubleconversion avoids a dependency on libdouble-conversion.
|
# -fontconfig is needed otherwise Qt Widgets render only boxes.
|
||||||
# ICU avoids pulling in a bunch of large libraries, and hopefully we can get away without it.
|
# -qt-doubleconversion avoids a dependency on libdouble-conversion.
|
||||||
# OpenGL is needed to render window decorations in Wayland, apparently.
|
# ICU avoids pulling in a bunch of large libraries, and hopefully we can get away without it.
|
||||||
echo "Building Qt Base..."
|
# OpenGL is needed to render window decorations in Wayland, apparently.
|
||||||
rm -fr "qtbase-everywhere-src-$QT"
|
echo "Building Qt Base..."
|
||||||
tar xf "qtbase-everywhere-src-$QT.tar.xz"
|
rm -fr "qtbase-everywhere-src-$QT"
|
||||||
cd "qtbase-everywhere-src-$QT"
|
tar xf "qtbase-everywhere-src-$QT.tar.xz"
|
||||||
patch -p1 < "$SCRIPTDIR/qtbase-disable-pcre2-jit.patch"
|
cd "qtbase-everywhere-src-$QT"
|
||||||
mkdir build
|
patch -p1 < "$SCRIPTDIR/qtbase-disable-pcre2-jit.patch"
|
||||||
cd build
|
mkdir build
|
||||||
../configure -prefix "$INSTALLDIR" -release -dbus-linked -gui -widgets -fontconfig -qt-doubleconversion -ssl -openssl-runtime -opengl desktop -qpa xcb,wayland -xkbcommon -xcb -gtk -- -DFEATURE_cups=OFF -DFEATURE_dbus=ON -DFEATURE_icu=OFF -DFEATURE_sql=OFF -DFEATURE_system_png=ON -DFEATURE_system_jpeg=ON -DFEATURE_system_zlib=ON -DFEATURE_system_freetype=ON -DFEATURE_system_harfbuzz=ON
|
cd build
|
||||||
cmake --build . --parallel
|
../configure -prefix "$INSTALLDIR" -release -dbus-linked -gui -widgets -fontconfig -qt-doubleconversion -ssl -openssl-runtime -opengl desktop -qpa xcb,wayland -xkbcommon -xcb -gtk -- -DFEATURE_cups=OFF -DFEATURE_dbus=ON -DFEATURE_icu=OFF -DFEATURE_sql=OFF -DFEATURE_system_png=ON -DFEATURE_system_jpeg=ON -DFEATURE_system_zlib=ON -DFEATURE_system_freetype=ON -DFEATURE_system_harfbuzz=ON
|
||||||
ninja install
|
cmake --build . --parallel
|
||||||
cd ../../
|
ninja install
|
||||||
|
cd ../../
|
||||||
|
|
||||||
echo "Building Qt SVG..."
|
echo "Building Qt SVG..."
|
||||||
rm -fr "qtsvg-everywhere-src-$QT"
|
rm -fr "qtsvg-everywhere-src-$QT"
|
||||||
tar xf "qtsvg-everywhere-src-$QT.tar.xz"
|
tar xf "qtsvg-everywhere-src-$QT.tar.xz"
|
||||||
cd "qtsvg-everywhere-src-$QT"
|
cd "qtsvg-everywhere-src-$QT"
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
"$INSTALLDIR/bin/qt-configure-module" .. -- -DCMAKE_PREFIX_PATH="$INSTALLDIR"
|
"$INSTALLDIR/bin/qt-configure-module" .. -- -DCMAKE_PREFIX_PATH="$INSTALLDIR"
|
||||||
cmake --build . --parallel
|
cmake --build . --parallel
|
||||||
ninja install
|
ninja install
|
||||||
cd ../../
|
cd ../../
|
||||||
|
|
||||||
echo "Building Qt Image Formats..."
|
echo "Building Qt Image Formats..."
|
||||||
rm -fr "qtimageformats-everywhere-src-$QT"
|
rm -fr "qtimageformats-everywhere-src-$QT"
|
||||||
tar xf "qtimageformats-everywhere-src-$QT.tar.xz"
|
tar xf "qtimageformats-everywhere-src-$QT.tar.xz"
|
||||||
cd "qtimageformats-everywhere-src-$QT"
|
cd "qtimageformats-everywhere-src-$QT"
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
"$INSTALLDIR/bin/qt-configure-module" .. -- -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DFEATURE_system_webp=ON
|
"$INSTALLDIR/bin/qt-configure-module" .. -- -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DFEATURE_system_webp=ON
|
||||||
cmake --build . --parallel
|
cmake --build . --parallel
|
||||||
ninja install
|
ninja install
|
||||||
cd ../../
|
cd ../../
|
||||||
|
|
||||||
echo "Building Qt Wayland..."
|
echo "Building Qt Wayland..."
|
||||||
rm -fr "qtwayland-everywhere-src-$QT"
|
rm -fr "qtwayland-everywhere-src-$QT"
|
||||||
tar xf "qtwayland-everywhere-src-$QT.tar.xz"
|
tar xf "qtwayland-everywhere-src-$QT.tar.xz"
|
||||||
cd "qtwayland-everywhere-src-$QT"
|
cd "qtwayland-everywhere-src-$QT"
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
"$INSTALLDIR/bin/qt-configure-module" .. -- -DCMAKE_PREFIX_PATH="$INSTALLDIR"
|
"$INSTALLDIR/bin/qt-configure-module" .. -- -DCMAKE_PREFIX_PATH="$INSTALLDIR"
|
||||||
cmake --build . --parallel
|
cmake --build . --parallel
|
||||||
ninja install
|
ninja install
|
||||||
cd ../../
|
cd ../../
|
||||||
|
|
||||||
echo "Installing Qt Tools..."
|
echo "Installing Qt Tools..."
|
||||||
rm -fr "qttools-everywhere-src-$QT"
|
rm -fr "qttools-everywhere-src-$QT"
|
||||||
tar xf "qttools-everywhere-src-$QT.tar.xz"
|
tar xf "qttools-everywhere-src-$QT.tar.xz"
|
||||||
cd "qttools-everywhere-src-$QT"
|
cd "qttools-everywhere-src-$QT"
|
||||||
|
|
||||||
# Force disable clang scanning, it gets very confused.
|
# Force disable clang scanning, it gets very confused.
|
||||||
patch -u configure.cmake <<EOF
|
patch -u configure.cmake <<EOF
|
||||||
--- configure.cmake
|
--- configure.cmake
|
||||||
+++ configure.cmake
|
+++ configure.cmake
|
||||||
@@ -14,12 +14,12 @@
|
@@ -14,12 +14,12 @@
|
||||||
|
@ -209,23 +282,24 @@ patch -u configure.cmake <<EOF
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
"$INSTALLDIR/bin/qt-configure-module" .. -- -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DFEATURE_assistant=OFF -DFEATURE_clang=OFF -DFEATURE_designer=ON -DFEATURE_kmap2qmap=OFF -DFEATURE_pixeltool=OFF -DFEATURE_pkg_config=OFF -DFEATURE_qev=OFF -DFEATURE_qtattributionsscanner=OFF -DFEATURE_qtdiag=OFF -DFEATURE_qtplugininfo=OFF
|
"$INSTALLDIR/bin/qt-configure-module" .. -- -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DFEATURE_assistant=OFF -DFEATURE_clang=OFF -DFEATURE_designer=ON -DFEATURE_kmap2qmap=OFF -DFEATURE_pixeltool=OFF -DFEATURE_pkg_config=OFF -DFEATURE_qev=OFF -DFEATURE_qtattributionsscanner=OFF -DFEATURE_qtdiag=OFF -DFEATURE_qtplugininfo=OFF
|
||||||
cmake --build . --parallel
|
cmake --build . --parallel
|
||||||
ninja install
|
ninja install
|
||||||
cd ../../
|
cd ../../
|
||||||
|
|
||||||
echo "Installing Qt Translations..."
|
echo "Installing Qt Translations..."
|
||||||
rm -fr "qttranslations-everywhere-src-$QT"
|
rm -fr "qttranslations-everywhere-src-$QT"
|
||||||
tar xf "qttranslations-everywhere-src-$QT.tar.xz"
|
tar xf "qttranslations-everywhere-src-$QT.tar.xz"
|
||||||
cd "qttranslations-everywhere-src-$QT"
|
cd "qttranslations-everywhere-src-$QT"
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
"$INSTALLDIR/bin/qt-configure-module" .. -- -DCMAKE_PREFIX_PATH="$INSTALLDIR"
|
"$INSTALLDIR/bin/qt-configure-module" .. -- -DCMAKE_PREFIX_PATH="$INSTALLDIR"
|
||||||
cmake --build . --parallel
|
cmake --build . --parallel
|
||||||
ninja install
|
ninja install
|
||||||
cd ../../
|
cd ../../
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Building shaderc..."
|
echo "Building shaderc..."
|
||||||
rm -fr "shaderc-$SHADERC"
|
rm -fr "shaderc-$SHADERC"
|
||||||
|
|
Loading…
Reference in a new issue