2022-07-21 07:27:32 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2024-09-27 07:43:32 +00:00
|
|
|
# SPDX-FileCopyrightText: 2019-2024 Connor McLaughlin <stenzek@gmail.com>
|
|
|
|
# SPDX-License-Identifier: CC-BY-NC-ND-4.0
|
|
|
|
|
2022-07-21 07:27:32 +00:00
|
|
|
set -e
|
|
|
|
|
2024-08-12 07:29:36 +00:00
|
|
|
if [ "$#" -lt 1 ]; then
|
2024-08-25 10:53:25 +00:00
|
|
|
echo "Syntax: $0 [-system-freetype] [-system-harfbuzz] [-system-libjpeg] [-system-libpng] [-system-libwebp] [-system-zstd] [-system-qt] [-skip-download] [-skip-cleanup] <output directory>"
|
2024-02-03 07:12:40 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2024-08-12 07:29:36 +00:00
|
|
|
for arg in "$@"; do
|
2024-08-25 10:53:25 +00:00
|
|
|
if [ "$arg" == "-system-freetype" ]; then
|
|
|
|
echo "Skipping building FreeType."
|
|
|
|
SKIP_FREETYPE=true
|
|
|
|
shift
|
|
|
|
elif [ "$arg" == "-system-harfbuzz" ]; then
|
|
|
|
echo "Skipping building HarfBuzz."
|
|
|
|
SKIP_HARFBUZZ=true
|
|
|
|
shift
|
|
|
|
elif [ "$arg" == "-system-libjpeg" ]; then
|
2024-08-12 07:29:36 +00:00
|
|
|
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
|
2024-08-25 10:53:25 +00:00
|
|
|
elif [ "$arg" == "-skip-cleanup" ]; then
|
|
|
|
echo "Not removing build directory."
|
|
|
|
SKIP_CLEANUP=true
|
|
|
|
shift
|
2024-08-12 07:29:36 +00:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2024-04-04 11:11:13 +00:00
|
|
|
SCRIPTDIR=$(realpath $(dirname "${BASH_SOURCE[0]}"))
|
2022-07-21 07:27:32 +00:00
|
|
|
NPROCS="$(getconf _NPROCESSORS_ONLN)"
|
2024-05-26 11:54:39 +00:00
|
|
|
INSTALLDIR="$1"
|
|
|
|
if [ "${INSTALLDIR:0:1}" != "/" ]; then
|
|
|
|
INSTALLDIR="$PWD/$INSTALLDIR"
|
|
|
|
fi
|
2024-03-24 03:08:23 +00:00
|
|
|
|
2024-08-25 10:53:25 +00:00
|
|
|
FREETYPE=2.13.3
|
2024-09-27 07:43:32 +00:00
|
|
|
HARFBUZZ=10.0.1
|
|
|
|
LIBBACKTRACE=86885d14049fab06ef8a33aac51664230ca09200
|
|
|
|
LIBJPEGTURBO=3.0.4
|
|
|
|
LIBPNG=1.6.44
|
2024-06-23 01:36:24 +00:00
|
|
|
LIBWEBP=1.4.0
|
2024-10-08 10:59:13 +00:00
|
|
|
SDL2=2.30.8
|
|
|
|
QT=6.8.0
|
2024-06-23 01:36:24 +00:00
|
|
|
ZSTD=1.5.6
|
2022-07-21 07:27:32 +00:00
|
|
|
|
2024-07-28 08:56:05 +00:00
|
|
|
CPUINFO=7524ad504fdcfcf75a18a133da6abd75c5d48053
|
2024-08-02 11:45:03 +00:00
|
|
|
DISCORD_RPC=144f3a3f1209994d8d9e8a87964a989cb9911c1e
|
2024-08-25 04:39:40 +00:00
|
|
|
LUNASVG=9af1ac7b90658a279b372add52d6f77a4ebb482c
|
2024-09-27 07:43:32 +00:00
|
|
|
SHADERC=1c0d3d18819aa75ec74f1fbd9ff0461e1b69a4d6
|
2024-08-02 10:53:35 +00:00
|
|
|
SOUNDTOUCH=463ade388f3a51da078dc9ed062bf28e4ba29da7
|
2024-07-28 08:56:05 +00:00
|
|
|
SPIRV_CROSS=vulkan-sdk-1.3.290.0
|
2024-04-04 11:11:13 +00:00
|
|
|
|
2022-07-21 07:27:32 +00:00
|
|
|
mkdir -p deps-build
|
|
|
|
cd deps-build
|
|
|
|
|
2024-08-12 07:29:36 +00:00
|
|
|
if [ "$SKIP_DOWNLOAD" != true ]; then
|
|
|
|
curl -C - -L \
|
2024-09-27 07:43:32 +00:00
|
|
|
-O "https://github.com/ianlancetaylor/libbacktrace/archive/$LIBBACKTRACE.tar.gz" \
|
2024-08-12 07:29:36 +00:00
|
|
|
-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" \
|
2024-08-25 04:39:40 +00:00
|
|
|
-o "lunasvg-$LUNASVG.tar.gz" "https://github.com/stenzek/lunasvg/archive/$LUNASVG.tar.gz" \
|
2024-08-12 07:29:36 +00:00
|
|
|
-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
|
|
|
|
|
2022-07-21 07:27:32 +00:00
|
|
|
cat > SHASUMS <<EOF
|
2024-09-27 07:43:32 +00:00
|
|
|
baf8aebd22002b762d803ba0e1e389b6b4415159334e9d34bba1a938f6de8ce6 $LIBBACKTRACE.tar.gz
|
2024-10-08 10:59:13 +00:00
|
|
|
380c295ea76b9bd72d90075793971c8bcb232ba0a69a9b14da4ae8f603350058 SDL2-$SDL2.tar.gz
|
2024-08-12 07:29:36 +00:00
|
|
|
e1351218d270db49c3dddcba04fb2153b09731ea3fa6830e423f5952f44585be cpuinfo-$CPUINFO.tar.gz
|
|
|
|
3eea5ccce6670c126282f1ba4d32c19d486db49a1a5cbfb8d6f48774784d310c discord-rpc-$DISCORD_RPC.tar.gz
|
2024-08-25 04:39:40 +00:00
|
|
|
3998b024b0d442614a9ee270e76e018bb37a17b8c6941212171731123cbbcac7 lunasvg-$LUNASVG.tar.gz
|
2024-09-27 07:43:32 +00:00
|
|
|
3826d86f8a13564be1c047ac105041a3c5d0dc0bf826fe47cc582fe17a2ce7b1 shaderc-$SHADERC.tar.gz
|
2024-08-12 07:29:36 +00:00
|
|
|
fe45c2af99f6102d2704277d392c1c83b55180a70bfd17fb888cc84a54b70573 soundtouch-$SOUNDTOUCH.tar.gz
|
|
|
|
EOF
|
|
|
|
|
2024-08-25 10:53:25 +00:00
|
|
|
if [ "$SKIP_FREETYPE" != true ]; then
|
|
|
|
if [ "$SKIP_DOWNLOAD" != true ]; then
|
|
|
|
curl -C - -L -o "freetype-$FREETYPE.tar.xz" "https://sourceforge.net/projects/freetype/files/freetype2/$FREETYPE/freetype-$FREETYPE.tar.xz/download"
|
|
|
|
fi
|
|
|
|
cat >> SHASUMS <<EOF
|
|
|
|
0550350666d427c74daeb85d5ac7bb353acba5f76956395995311a9c6f063289 freetype-$FREETYPE.tar.xz
|
|
|
|
EOF
|
|
|
|
fi
|
|
|
|
if [ "$SKIP_HARFBUZZ" != true ]; then
|
|
|
|
if [ "$SKIP_DOWNLOAD" != true ]; then
|
|
|
|
curl -C - -L -o "harfbuzz-$HARFBUZZ.tar.gz" "https://github.com/harfbuzz/harfbuzz/archive/refs/tags/$HARFBUZZ.tar.gz"
|
|
|
|
fi
|
|
|
|
cat >> SHASUMS <<EOF
|
2024-09-27 07:43:32 +00:00
|
|
|
e7358ea86fe10fb9261931af6f010d4358dac64f7074420ca9bc94aae2bdd542 harfbuzz-$HARFBUZZ.tar.gz
|
2024-08-25 10:53:25 +00:00
|
|
|
EOF
|
|
|
|
fi
|
2024-08-12 07:29:36 +00:00
|
|
|
if [ "$SKIP_LIBJPEG" != true ]; then
|
|
|
|
if [ "$SKIP_DOWNLOAD" != true ]; then
|
|
|
|
curl -C - -L -O "https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/$LIBJPEGTURBO/libjpeg-turbo-$LIBJPEGTURBO.tar.gz"
|
|
|
|
fi
|
|
|
|
cat >> SHASUMS <<EOF
|
2024-09-27 07:43:32 +00:00
|
|
|
99130559e7d62e8d695f2c0eaeef912c5828d5b84a0537dcb24c9678c9d5b76b libjpeg-turbo-$LIBJPEGTURBO.tar.gz
|
2024-08-12 07:29:36 +00:00
|
|
|
EOF
|
|
|
|
fi
|
|
|
|
if [ "$SKIP_LIBPNG" != true ]; then
|
|
|
|
if [ "$SKIP_DOWNLOAD" != true ]; then
|
|
|
|
curl -C - -L -O "https://downloads.sourceforge.net/project/libpng/libpng16/$LIBPNG/libpng-$LIBPNG.tar.xz"
|
|
|
|
fi
|
|
|
|
cat >> SHASUMS <<EOF
|
2024-09-27 07:43:32 +00:00
|
|
|
60c4da1d5b7f0aa8d158da48e8f8afa9773c1c8baa5d21974df61f1886b8ce8e libpng-$LIBPNG.tar.xz
|
2024-08-12 07:29:36 +00:00
|
|
|
EOF
|
|
|
|
fi
|
|
|
|
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
|
2024-06-23 01:36:24 +00:00
|
|
|
61f873ec69e3be1b99535634340d5bde750b2e4447caa1db9f61be3fd49ab1e5 libwebp-$LIBWEBP.tar.gz
|
2024-08-12 07:29:36 +00:00
|
|
|
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
|
2024-06-23 01:36:24 +00:00
|
|
|
8c29e06cf42aacc1eafc4077ae2ec6c6fcb96a626157e0593d5e82a34fd403c1 zstd-$ZSTD.tar.gz
|
2024-08-12 07:29:36 +00:00
|
|
|
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
|
2024-10-08 10:59:13 +00:00
|
|
|
1bad481710aa27f872de6c9f72651f89a6107f0077003d0ebfcc9fd15cba3c75 qtbase-everywhere-src-$QT.tar.xz
|
|
|
|
595bf8557b91e1f8ebc726f1e09868a3c7e610ff5045068f2d4ea2428c49a5d4 qtimageformats-everywhere-src-$QT.tar.xz
|
|
|
|
cf7a593d5e520f8177240610d9e55d5b75b0887fe5f385554ff64377f1646199 qtsvg-everywhere-src-$QT.tar.xz
|
|
|
|
403115d8268503c6cc6e43310c8ae28eb9e605072a5d04e4a2de8b6af39981f7 qttools-everywhere-src-$QT.tar.xz
|
|
|
|
84bf2b67c243cd0c50a08acd7bfa9df2b1965028511815c1b6b65a0687437cb6 qttranslations-everywhere-src-$QT.tar.xz
|
|
|
|
175758591638ebf1c6fbb66ac11c7fa0eb8d4ed52e9243cc59075d06a6a2060a qtwayland-everywhere-src-$QT.tar.xz
|
2022-07-21 07:27:32 +00:00
|
|
|
EOF
|
2024-08-12 07:29:36 +00:00
|
|
|
fi
|
2022-07-21 07:27:32 +00:00
|
|
|
|
|
|
|
shasum -a 256 --check SHASUMS
|
|
|
|
|
2024-07-28 08:56:05 +00:00
|
|
|
# Have to clone with git, because it does version detection.
|
2024-08-12 07:29:36 +00:00
|
|
|
if [ "$SKIP_DOWNLOAD" != true ]; then
|
|
|
|
if [ ! -d "SPIRV-Cross" ]; then
|
|
|
|
git clone https://github.com/KhronosGroup/SPIRV-Cross/ -b $SPIRV_CROSS --depth 1
|
|
|
|
fi
|
2024-07-28 08:56:05 +00:00
|
|
|
fi
|
|
|
|
|
2023-09-02 05:34:03 +00:00
|
|
|
echo "Building libbacktrace..."
|
2024-03-24 03:08:23 +00:00
|
|
|
rm -fr "libbacktrace-$LIBBACKTRACE"
|
2024-09-27 07:43:32 +00:00
|
|
|
tar xf "$LIBBACKTRACE.tar.gz"
|
2023-09-02 05:34:03 +00:00
|
|
|
cd "libbacktrace-$LIBBACKTRACE"
|
2024-08-24 08:32:28 +00:00
|
|
|
./configure --prefix="$INSTALLDIR" --with-pic
|
2023-09-02 05:34:03 +00:00
|
|
|
make
|
|
|
|
make install
|
|
|
|
cd ..
|
|
|
|
|
2024-08-12 07:29:36 +00:00
|
|
|
if [ "$SKIP_LIBPNG" != true ]; then
|
|
|
|
echo "Building libpng..."
|
|
|
|
rm -fr "libpng-$LIBPNG"
|
|
|
|
tar xf "libpng-$LIBPNG.tar.xz"
|
|
|
|
cd "libpng-$LIBPNG"
|
|
|
|
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
|
|
|
|
cmake --build build --parallel
|
|
|
|
ninja -C build install
|
|
|
|
cd ..
|
|
|
|
fi
|
2024-03-24 03:08:23 +00:00
|
|
|
|
2024-08-12 07:29:36 +00:00
|
|
|
if [ "$SKIP_LIBJPEG" != true ]; then
|
|
|
|
echo "Building libjpeg..."
|
|
|
|
rm -fr "libjpeg-turbo-$LIBJPEGTURBO"
|
|
|
|
tar xf "libjpeg-turbo-$LIBJPEGTURBO.tar.gz"
|
|
|
|
cd "libjpeg-turbo-$LIBJPEGTURBO"
|
|
|
|
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DENABLE_STATIC=OFF -DENABLE_SHARED=ON -B build -G Ninja
|
|
|
|
cmake --build build --parallel
|
|
|
|
ninja -C build install
|
|
|
|
cd ..
|
|
|
|
fi
|
2024-03-24 03:08:23 +00:00
|
|
|
|
2024-08-12 07:29:36 +00:00
|
|
|
if [ "$SKIP_ZSTD" != true ]; then
|
|
|
|
echo "Building Zstandard..."
|
|
|
|
rm -fr "zstd-$ZSTD"
|
|
|
|
tar xf "zstd-$ZSTD.tar.gz"
|
|
|
|
cd "zstd-$ZSTD"
|
|
|
|
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
|
|
|
|
cmake --build build --parallel
|
|
|
|
ninja -C build install
|
|
|
|
cd ..
|
|
|
|
fi
|
2024-03-24 03:08:23 +00:00
|
|
|
|
2024-08-12 07:29:36 +00:00
|
|
|
if [ "$SKIP_LIBWEBP" != true ]; then
|
|
|
|
echo "Building WebP..."
|
|
|
|
rm -fr "libwebp-$LIBWEBP"
|
|
|
|
tar xf "libwebp-$LIBWEBP.tar.gz"
|
|
|
|
cd "libwebp-$LIBWEBP"
|
|
|
|
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -B build -G Ninja \
|
|
|
|
-DWEBP_BUILD_ANIM_UTILS=OFF -DWEBP_BUILD_CWEBP=OFF -DWEBP_BUILD_DWEBP=OFF -DWEBP_BUILD_GIF2WEBP=OFF -DWEBP_BUILD_IMG2WEBP=OFF \
|
|
|
|
-DWEBP_BUILD_VWEBP=OFF -DWEBP_BUILD_WEBPINFO=OFF -DWEBP_BUILD_WEBPMUX=OFF -DWEBP_BUILD_EXTRAS=OFF -DBUILD_SHARED_LIBS=ON
|
|
|
|
cmake --build build --parallel
|
|
|
|
ninja -C build install
|
|
|
|
cd ..
|
|
|
|
fi
|
2024-03-24 03:08:23 +00:00
|
|
|
|
2024-08-25 10:53:25 +00:00
|
|
|
if [ "$SKIP_FREETYPE" != true ]; then
|
|
|
|
if [ "$SKIP_HARFBUZZ" != true ]; then
|
|
|
|
echo "Building FreeType without HarfBuzz..."
|
|
|
|
rm -fr "freetype-$FREETYPE"
|
|
|
|
tar xf "freetype-$FREETYPE.tar.xz"
|
|
|
|
cd "freetype-$FREETYPE"
|
|
|
|
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DBUILD_SHARED_LIBS=ON -DFT_REQUIRE_ZLIB=ON -DFT_REQUIRE_PNG=ON -DFT_DISABLE_BZIP2=TRUE -DFT_DISABLE_BROTLI=TRUE -DFT_DISABLE_HARFBUZZ=TRUE -B build -G Ninja
|
|
|
|
cmake --build build --parallel
|
|
|
|
ninja -C build install
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
echo "Building HarfBuzz..."
|
|
|
|
rm -fr "harfbuzz-$HARFBUZZ"
|
|
|
|
tar xf "harfbuzz-$HARFBUZZ.tar.gz"
|
|
|
|
cd "harfbuzz-$HARFBUZZ"
|
|
|
|
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DBUILD_SHARED_LIBS=ON -DHB_BUILD_UTILS=OFF -B build -G Ninja
|
|
|
|
cmake --build build --parallel
|
|
|
|
ninja -C build install
|
|
|
|
cd ..
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "Building FreeType with HarfBuzz..."
|
|
|
|
rm -fr "freetype-$FREETYPE"
|
|
|
|
tar xf "freetype-$FREETYPE.tar.xz"
|
|
|
|
cd "freetype-$FREETYPE"
|
|
|
|
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DBUILD_SHARED_LIBS=ON -DFT_REQUIRE_ZLIB=ON -DFT_REQUIRE_PNG=ON -DFT_DISABLE_BZIP2=TRUE -DFT_DISABLE_BROTLI=TRUE -DFT_REQUIRE_HARFBUZZ=TRUE -B build -G Ninja
|
|
|
|
cmake --build build --parallel
|
|
|
|
ninja -C build install
|
|
|
|
cd ..
|
|
|
|
fi
|
|
|
|
|
2024-07-07 03:47:39 +00:00
|
|
|
echo "Building SDL2..."
|
|
|
|
rm -fr "SDL2-$SDL2"
|
|
|
|
tar xf "SDL2-$SDL2.tar.gz"
|
|
|
|
cd "SDL2-$SDL2"
|
2024-04-04 07:18:33 +00:00
|
|
|
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DBUILD_SHARED_LIBS=ON -DSDL_SHARED=ON -DSDL_STATIC=OFF -G Ninja
|
|
|
|
cmake --build build --parallel
|
|
|
|
ninja -C build install
|
2024-03-24 03:08:23 +00:00
|
|
|
cd ..
|
|
|
|
|
2024-08-12 07:29:36 +00:00
|
|
|
if [ "$SKIP_QT" != true ]; then
|
|
|
|
# Couple notes:
|
|
|
|
# -fontconfig is needed otherwise Qt Widgets render only boxes.
|
|
|
|
# -qt-doubleconversion avoids a dependency on libdouble-conversion.
|
|
|
|
# ICU avoids pulling in a bunch of large libraries, and hopefully we can get away without it.
|
|
|
|
# OpenGL is needed to render window decorations in Wayland, apparently.
|
|
|
|
echo "Building Qt Base..."
|
|
|
|
rm -fr "qtbase-everywhere-src-$QT"
|
|
|
|
tar xf "qtbase-everywhere-src-$QT.tar.xz"
|
|
|
|
cd "qtbase-everywhere-src-$QT"
|
|
|
|
patch -p1 < "$SCRIPTDIR/qtbase-disable-pcre2-jit.patch"
|
|
|
|
mkdir build
|
|
|
|
cd 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
|
|
|
|
cmake --build . --parallel
|
|
|
|
ninja install
|
|
|
|
cd ../../
|
|
|
|
|
|
|
|
echo "Building Qt SVG..."
|
|
|
|
rm -fr "qtsvg-everywhere-src-$QT"
|
|
|
|
tar xf "qtsvg-everywhere-src-$QT.tar.xz"
|
|
|
|
cd "qtsvg-everywhere-src-$QT"
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
"$INSTALLDIR/bin/qt-configure-module" .. -- -DCMAKE_PREFIX_PATH="$INSTALLDIR"
|
|
|
|
cmake --build . --parallel
|
|
|
|
ninja install
|
|
|
|
cd ../../
|
|
|
|
|
|
|
|
echo "Building Qt Image Formats..."
|
|
|
|
rm -fr "qtimageformats-everywhere-src-$QT"
|
|
|
|
tar xf "qtimageformats-everywhere-src-$QT.tar.xz"
|
|
|
|
cd "qtimageformats-everywhere-src-$QT"
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
"$INSTALLDIR/bin/qt-configure-module" .. -- -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DFEATURE_system_webp=ON
|
|
|
|
cmake --build . --parallel
|
|
|
|
ninja install
|
|
|
|
cd ../../
|
|
|
|
|
|
|
|
echo "Building Qt Wayland..."
|
|
|
|
rm -fr "qtwayland-everywhere-src-$QT"
|
|
|
|
tar xf "qtwayland-everywhere-src-$QT.tar.xz"
|
|
|
|
cd "qtwayland-everywhere-src-$QT"
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2024-09-27 07:43:32 +00:00
|
|
|
"$INSTALLDIR/bin/qt-configure-module" .. -- -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DFEATURE_wayland_server=OFF
|
2024-08-12 07:29:36 +00:00
|
|
|
cmake --build . --parallel
|
|
|
|
ninja install
|
|
|
|
cd ../../
|
|
|
|
|
|
|
|
echo "Installing Qt Tools..."
|
|
|
|
rm -fr "qttools-everywhere-src-$QT"
|
|
|
|
tar xf "qttools-everywhere-src-$QT.tar.xz"
|
|
|
|
cd "qttools-everywhere-src-$QT"
|
|
|
|
|
|
|
|
# Force disable clang scanning, it gets very confused.
|
|
|
|
patch -u configure.cmake <<EOF
|
2023-09-02 05:34:03 +00:00
|
|
|
--- configure.cmake
|
|
|
|
+++ configure.cmake
|
|
|
|
@@ -14,12 +14,12 @@
|
|
|
|
# Presumably because 6.0 ClangConfig.cmake files are not good enough?
|
|
|
|
# In any case explicitly request a minimum version of 8.x for now, otherwise
|
|
|
|
# building with CMake will fail at compilation time.
|
|
|
|
-qt_find_package(WrapLibClang 8 PROVIDED_TARGETS WrapLibClang::WrapLibClang)
|
|
|
|
+#qt_find_package(WrapLibClang 8 PROVIDED_TARGETS WrapLibClang::WrapLibClang)
|
|
|
|
# special case end
|
|
|
|
|
|
|
|
-if(TARGET WrapLibClang::WrapLibClang)
|
|
|
|
- set(TEST_libclang "ON" CACHE BOOL "Required libclang version found." FORCE)
|
|
|
|
-endif()
|
|
|
|
+#if(TARGET WrapLibClang::WrapLibClang)
|
|
|
|
+# set(TEST_libclang "ON" CACHE BOOL "Required libclang version found." FORCE)
|
|
|
|
+#endif()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
EOF
|
|
|
|
|
2024-08-12 07:29:36 +00:00
|
|
|
mkdir 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
|
|
|
|
cmake --build . --parallel
|
|
|
|
ninja install
|
|
|
|
cd ../../
|
|
|
|
|
|
|
|
echo "Installing Qt Translations..."
|
|
|
|
rm -fr "qttranslations-everywhere-src-$QT"
|
|
|
|
tar xf "qttranslations-everywhere-src-$QT.tar.xz"
|
|
|
|
cd "qttranslations-everywhere-src-$QT"
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
"$INSTALLDIR/bin/qt-configure-module" .. -- -DCMAKE_PREFIX_PATH="$INSTALLDIR"
|
|
|
|
cmake --build . --parallel
|
|
|
|
ninja install
|
|
|
|
cd ../../
|
|
|
|
fi
|
2022-07-21 07:27:32 +00:00
|
|
|
|
2024-04-04 11:11:13 +00:00
|
|
|
echo "Building shaderc..."
|
|
|
|
rm -fr "shaderc-$SHADERC"
|
|
|
|
tar xf "shaderc-$SHADERC.tar.gz"
|
|
|
|
cd "shaderc-$SHADERC"
|
2024-04-05 12:39:39 +00:00
|
|
|
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DSHADERC_SKIP_TESTS=ON -DSHADERC_SKIP_EXAMPLES=ON -DSHADERC_SKIP_COPYRIGHT_CHECK=ON -B build -G Ninja
|
2024-04-04 11:11:13 +00:00
|
|
|
cmake --build build --parallel
|
|
|
|
ninja -C build install
|
|
|
|
cd ..
|
|
|
|
|
2024-07-28 08:56:05 +00:00
|
|
|
echo "Building SPIRV-Cross..."
|
|
|
|
cd SPIRV-Cross
|
|
|
|
rm -fr build
|
2024-04-14 04:20:47 +00:00
|
|
|
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DSPIRV_CROSS_SHARED=ON -DSPIRV_CROSS_STATIC=OFF -DSPIRV_CROSS_CLI=OFF -DSPIRV_CROSS_ENABLE_TESTS=OFF -DSPIRV_CROSS_ENABLE_GLSL=ON -DSPIRV_CROSS_ENABLE_HLSL=OFF -DSPIRV_CROSS_ENABLE_MSL=OFF -DSPIRV_CROSS_ENABLE_CPP=OFF -DSPIRV_CROSS_ENABLE_REFLECT=OFF -DSPIRV_CROSS_ENABLE_C_API=ON -DSPIRV_CROSS_ENABLE_UTIL=ON -B build -G Ninja
|
|
|
|
cmake --build build --parallel
|
|
|
|
ninja -C build install
|
|
|
|
cd ..
|
|
|
|
|
2024-07-28 08:56:05 +00:00
|
|
|
echo "Building cpuinfo..."
|
2024-07-02 07:34:12 +00:00
|
|
|
rm -fr "cpuinfo-$CPUINFO"
|
|
|
|
tar xf "cpuinfo-$CPUINFO.tar.gz"
|
|
|
|
cd "cpuinfo-$CPUINFO"
|
|
|
|
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCPUINFO_LIBRARY_TYPE=shared -DCPUINFO_RUNTIME_TYPE=shared -DCPUINFO_LOG_LEVEL=error -DCPUINFO_LOG_TO_STDIO=ON -DCPUINFO_BUILD_TOOLS=OFF -DCPUINFO_BUILD_UNIT_TESTS=OFF -DCPUINFO_BUILD_MOCK_TESTS=OFF -DCPUINFO_BUILD_BENCHMARKS=OFF -DUSE_SYSTEM_LIBS=ON -B build -G Ninja
|
|
|
|
cmake --build build --parallel
|
|
|
|
ninja -C build install
|
|
|
|
cd ..
|
|
|
|
|
2024-07-28 08:56:05 +00:00
|
|
|
echo "Building discord-rpc..."
|
2024-07-04 04:02:31 +00:00
|
|
|
rm -fr "discord-rpc-$DISCORD_RPC"
|
|
|
|
tar xf "discord-rpc-$DISCORD_RPC.tar.gz"
|
|
|
|
cd "discord-rpc-$DISCORD_RPC"
|
|
|
|
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DBUILD_SHARED_LIBS=ON -B build -G Ninja
|
|
|
|
cmake --build build --parallel
|
|
|
|
ninja -C build install
|
|
|
|
cd ..
|
|
|
|
|
2024-08-25 04:39:40 +00:00
|
|
|
echo "Building lunasvg..."
|
|
|
|
rm -fr "lunasvg-$LUNASVG"
|
|
|
|
tar xf "lunasvg-$LUNASVG.tar.gz"
|
|
|
|
cd "lunasvg-$LUNASVG"
|
|
|
|
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DBUILD_SHARED_LIBS=ON -DLUNASVG_BUILD_EXAMPLES=OFF -B build -G Ninja
|
|
|
|
cmake --build build --parallel
|
|
|
|
ninja -C build install
|
|
|
|
cd ..
|
|
|
|
|
2024-08-02 10:53:35 +00:00
|
|
|
echo "Building soundtouch..."
|
|
|
|
rm -fr "soundtouch-$SOUNDTOUCH"
|
|
|
|
tar xf "soundtouch-$SOUNDTOUCH.tar.gz"
|
|
|
|
cd "soundtouch-$SOUNDTOUCH"
|
|
|
|
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -B build -G Ninja
|
|
|
|
cmake --build build --parallel
|
|
|
|
ninja -C build install
|
|
|
|
cd ..
|
|
|
|
|
2024-08-25 10:53:25 +00:00
|
|
|
if [ "$SKIP_CLEANUP" != true ]; then
|
|
|
|
echo "Cleaning up..."
|
|
|
|
cd ..
|
|
|
|
rm -fr deps-build
|
|
|
|
fi
|