#!/usr/bin/env bash # SPDX-FileCopyrightText: 2019-2025 Connor McLaughlin # SPDX-License-Identifier: CC-BY-NC-ND-4.0 # # NOTE: In addition to the terms of CC-BY-NC-ND-4.0, you may not use this file to create # packages or build recipes without explicit permission from the copyright holder. # set -e if [ "$#" -lt 1 ]; then echo "Syntax: $0 [-system-freetype] [-system-harfbuzz] [-system-libjpeg] [-system-libpng] [-system-libwebp] [-system-libzip] [-system-zlib] [-system-zstd] [-system-qt] [-skip-download] [-skip-cleanup] [-only-download] " exit 1 fi for arg in "$@"; do 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 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-libzip" ]; then echo "Skipping building libzip." SKIP_LIBZIP=true shift elif [ "$arg" == "-system-zlib" ]; then echo "Skipping building zlib-ng." SKIP_ZLIBNG=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 elif [ "$arg" == "-skip-cleanup" ]; then echo "Not removing build directory." SKIP_CLEANUP=true shift elif [ "$arg" == "-only-download" ]; then echo "Only downloading sources." ONLY_DOWNLOAD=true shift fi done SCRIPTDIR=$(realpath $(dirname "${BASH_SOURCE[0]}")) NPROCS="$(getconf _NPROCESSORS_ONLN)" INSTALLDIR="$1" if [ "${INSTALLDIR:0:1}" != "/" ]; then INSTALLDIR="$PWD/$INSTALLDIR" fi source "$SCRIPTDIR/versions" mkdir -p deps-build cd deps-build if [[ "$SKIP_DOWNLOAD" != true && ! -f "libbacktrace-$LIBBACKTRACE.tar.gz" ]]; then curl -C - -L \ -o "libbacktrace-$LIBBACKTRACE.tar.gz" "https://github.com/ianlancetaylor/libbacktrace/archive/$LIBBACKTRACE.tar.gz" \ -O "https://github.com/libsdl-org/SDL/releases/download/release-$SDL3/SDL3-$SDL3.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 "plutosvg-$PLUTOSVG.tar.gz" "https://github.com/stenzek/plutosvg/archive/$PLUTOSVG.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 <> SHASUMS <> SHASUMS <> SHASUMS <> SHASUMS <> SHASUMS <> SHASUMS <> SHASUMS <> SHASUMS <> SHASUMS <