2013-02-04 00:49:29 +01:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
|
|
|
# Script for acquiring and building OS X dependencies for 0 A.D.
|
|
|
|
#
|
|
|
|
# The script checks whether a source tarball exists for each
|
|
|
|
# dependency, if not it will download the correct version from
|
|
|
|
# the project's website, then it removes previous build files,
|
|
|
|
# extracts the tarball, configures and builds the lib. The script
|
|
|
|
# should die on any errors to ease troubleshooting.
|
|
|
|
#
|
|
|
|
# make install is used to copy the compiled libs to each specific
|
|
|
|
# directory and also the config tools (e.g. sdl-config). Because
|
|
|
|
# of this, OS X developers must run this script at least once,
|
|
|
|
# to configure the correct lib directories. It must be run again
|
|
|
|
# if the libraries are moved.
|
|
|
|
#
|
|
|
|
# Building against an SDK is an option, though not required,
|
|
|
|
# as not all build environments contain the Developer SDKs
|
|
|
|
# (Xcode does, but the Command Line Tools package does not)
|
|
|
|
#
|
|
|
|
# --------------------------------------------------------------
|
|
|
|
# Library versions for ease of updating:
|
2017-06-25 16:58:51 +02:00
|
|
|
ZLIB_VERSION="zlib-1.2.11"
|
2020-11-26 08:20:10 +01:00
|
|
|
CURL_VERSION="curl-7.71.0"
|
|
|
|
ICONV_VERSION="libiconv-1.16"
|
|
|
|
XML2_VERSION="libxml2-2.9.10"
|
2022-01-13 15:42:42 +01:00
|
|
|
SDL2_VERSION="SDL2-2.0.18"
|
2020-06-23 16:42:54 +02:00
|
|
|
# NOTE: remember to also update LIB_URL below when changing version
|
2021-05-05 10:25:01 +02:00
|
|
|
BOOST_VERSION="boost_1_76_0"
|
2017-06-30 02:33:11 +02:00
|
|
|
# NOTE: remember to also update LIB_URL below when changing version
|
2021-03-23 16:47:29 +01:00
|
|
|
WXWIDGETS_VERSION="wxWidgets-3.1.4"
|
2016-01-18 17:42:54 +01:00
|
|
|
# libpng was included as part of X11 but that's removed from Mountain Lion
|
|
|
|
# (also the Snow Leopard version was ancient 1.2)
|
2020-11-26 08:20:10 +01:00
|
|
|
PNG_VERSION="libpng-1.6.36"
|
2021-12-08 23:14:43 +01:00
|
|
|
FREETYPE_VERSION="freetype-2.10.4"
|
2018-03-18 18:21:29 +01:00
|
|
|
OGG_VERSION="libogg-1.3.3"
|
2020-11-26 08:20:10 +01:00
|
|
|
VORBIS_VERSION="libvorbis-1.3.7"
|
2018-12-02 21:52:40 +01:00
|
|
|
# gloox requires GnuTLS, GnuTLS requires Nettle and GMP
|
2022-05-15 08:45:53 +02:00
|
|
|
GMP_VERSION="gmp-6.2.1"
|
2023-06-06 09:07:50 +02:00
|
|
|
NETTLE_VERSION="nettle-3.9"
|
2019-07-11 23:48:50 +02:00
|
|
|
# NOTE: remember to also update LIB_URL below when changing version
|
2020-11-26 08:20:10 +01:00
|
|
|
GLOOX_VERSION="gloox-1.0.24"
|
2023-06-06 09:07:50 +02:00
|
|
|
GNUTLS_VERSION="gnutls-3.8.0"
|
2014-04-20 21:17:32 +02:00
|
|
|
# OS X only includes part of ICU, and only the dylib
|
2016-01-18 17:42:54 +01:00
|
|
|
# NOTE: remember to also update LIB_URL below when changing version
|
2022-05-15 08:45:53 +02:00
|
|
|
ICU_VERSION="icu4c-69_1"
|
2020-11-26 08:20:10 +01:00
|
|
|
ENET_VERSION="enet-1.3.17"
|
2021-03-03 17:06:43 +01:00
|
|
|
MINIUPNPC_VERSION="miniupnpc-2.2.2"
|
2019-12-28 19:12:43 +01:00
|
|
|
SODIUM_VERSION="libsodium-1.0.18"
|
2020-11-26 22:01:32 +01:00
|
|
|
FMT_VERSION="7.1.3"
|
2023-01-26 16:24:12 +01:00
|
|
|
MOLTENVK_VERSION="1.2.2"
|
2013-02-04 00:49:29 +01:00
|
|
|
# --------------------------------------------------------------
|
|
|
|
# Bundled with the game:
|
2020-11-18 15:34:17 +01:00
|
|
|
# * SpiderMonkey
|
2013-02-04 00:49:29 +01:00
|
|
|
# * NVTT
|
|
|
|
# * FCollada
|
2020-12-01 20:29:21 +01:00
|
|
|
|
2013-02-04 00:49:29 +01:00
|
|
|
# Provided by OS X:
|
|
|
|
# * OpenAL
|
|
|
|
# * OpenGL
|
|
|
|
# --------------------------------------------------------------
|
|
|
|
|
2014-06-22 10:27:58 +02:00
|
|
|
export CC=${CC:="clang"} CXX=${CXX:="clang++"}
|
2020-11-26 08:20:10 +01:00
|
|
|
export MIN_OSX_VERSION=${MIN_OSX_VERSION:="10.12"}
|
2022-05-15 08:45:53 +02:00
|
|
|
export ARCH=${ARCH:=""}
|
2013-02-04 00:49:29 +01:00
|
|
|
|
|
|
|
# The various libs offer inconsistent configure options, some allow
|
|
|
|
# setting sysroot and OS X-specific options, others don't. Adding to
|
|
|
|
# the confusion, Apple moved /Developer/SDKs into the Xcode app bundle
|
|
|
|
# so the path can't be guessed by clever build tools (like Boost.Build).
|
|
|
|
# Sometimes configure gets it wrong anyway, especially on cross compiles.
|
2014-03-14 06:18:40 +01:00
|
|
|
# This is why we prefer using (OBJ)CFLAGS, (OBJ)CXXFLAGS, and LDFLAGS.
|
2013-02-04 00:49:29 +01:00
|
|
|
|
|
|
|
# Check if SYSROOT is set and not empty
|
|
|
|
if [[ $SYSROOT && ${SYSROOT-_} ]]; then
|
2014-03-14 06:18:40 +01:00
|
|
|
C_FLAGS="-isysroot $SYSROOT"
|
2013-02-04 00:49:29 +01:00
|
|
|
LDFLAGS="$LDFLAGS -Wl,-syslibroot,$SYSROOT"
|
|
|
|
fi
|
|
|
|
# Check if MIN_OSX_VERSION is set and not empty
|
|
|
|
if [[ $MIN_OSX_VERSION && ${MIN_OSX_VERSION-_} ]]; then
|
2014-03-14 06:18:40 +01:00
|
|
|
C_FLAGS="$C_FLAGS -mmacosx-version-min=$MIN_OSX_VERSION"
|
2013-11-11 01:04:07 +01:00
|
|
|
# clang and llvm-gcc look at mmacosx-version-min to determine link target
|
|
|
|
# and CRT version, and use it to set the macosx_version_min linker flag
|
2013-02-04 00:49:29 +01:00
|
|
|
LDFLAGS="$LDFLAGS -mmacosx-version-min=$MIN_OSX_VERSION"
|
|
|
|
fi
|
2020-11-22 15:34:31 +01:00
|
|
|
|
|
|
|
CFLAGS="$CFLAGS $C_FLAGS -fvisibility=hidden"
|
2022-05-15 08:45:53 +02:00
|
|
|
CXXFLAGS="$CXXFLAGS $C_FLAGS -stdlib=libc++ -std=c++17"
|
2014-03-14 06:18:40 +01:00
|
|
|
OBJCFLAGS="$OBJCFLAGS $C_FLAGS"
|
|
|
|
OBJCXXFLAGS="$OBJCXXFLAGS $C_FLAGS"
|
|
|
|
|
2022-01-13 15:42:42 +01:00
|
|
|
# Force x86_64 architecture on MacOS for now.
|
|
|
|
# NB: annoyingly, this is rather unstandardised. Some libs expect -arch, others different things.
|
|
|
|
# Further: wxWidgets uses its own system and actually fails to compile with arch arguments.
|
|
|
|
ARCHLESS_CFLAGS=$CFLAGS
|
|
|
|
ARCHLESS_CXXFLAGS=$CXXFLAGS
|
|
|
|
ARCHLESS_LDFLAGS="$LDFLAGS -stdlib=libc++"
|
|
|
|
|
2022-05-15 08:45:53 +02:00
|
|
|
# If ARCH isn't set, select either x86_64 or arm64
|
|
|
|
if [ -z "${ARCH}" ]; then
|
2022-05-15 23:22:49 +02:00
|
|
|
ARCH=`uname -m`
|
|
|
|
fi
|
|
|
|
if [ $ARCH == "arm64" ]; then
|
|
|
|
# Some libs want this passed to configure for cross compilation.
|
|
|
|
HOST_PLATFORM="--host=aarch64-apple-darwin"
|
|
|
|
else
|
|
|
|
CXXFLAGS="$CXXFLAGS -msse4.1"
|
|
|
|
# Some libs want this passed to configure for cross compilation.
|
|
|
|
HOST_PLATFORM="--host=x86_64-apple-darwin"
|
2022-05-15 08:45:53 +02:00
|
|
|
fi
|
2022-01-13 15:42:42 +01:00
|
|
|
|
2022-05-15 08:45:53 +02:00
|
|
|
CFLAGS="$CFLAGS -arch $ARCH"
|
|
|
|
CXXFLAGS="$CXXFLAGS -arch $ARCH"
|
2022-01-13 15:42:42 +01:00
|
|
|
|
2022-05-15 08:45:53 +02:00
|
|
|
LDFLAGS="$LDFLAGS -arch $ARCH"
|
2022-01-13 15:42:42 +01:00
|
|
|
|
|
|
|
# CMake doesn't seem to pick up on architecture with CFLAGS only
|
2023-01-19 22:10:18 +01:00
|
|
|
CMAKE_FLAGS="-DCMAKE_OSX_ARCHITECTURES=$ARCH -DCMAKE_OSX_DEPLOYMENT_TARGET=$MIN_OSX_VERSION"
|
2020-11-22 15:34:31 +01:00
|
|
|
|
2013-02-04 00:49:29 +01:00
|
|
|
JOBS=${JOBS:="-j2"}
|
|
|
|
|
2013-02-15 23:43:28 +01:00
|
|
|
set -e
|
|
|
|
|
|
|
|
die()
|
|
|
|
{
|
|
|
|
echo ERROR: $*
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
|
|
|
download_lib()
|
|
|
|
{
|
|
|
|
local url=$1
|
|
|
|
local filename=$2
|
|
|
|
|
|
|
|
if [ ! -e $filename ]; then
|
|
|
|
echo "Downloading $filename"
|
2019-07-17 16:32:26 +02:00
|
|
|
curl -fLo ${filename} ${url}${filename} || die "Download of $url$filename failed"
|
2013-02-15 23:43:28 +01:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2013-11-11 01:04:07 +01:00
|
|
|
already_built()
|
|
|
|
{
|
|
|
|
echo -e "Skipping - already built (use --force-rebuild to override)"
|
|
|
|
}
|
|
|
|
|
2013-02-04 00:49:29 +01:00
|
|
|
# Check that we're actually on OS X
|
|
|
|
if [ "`uname -s`" != "Darwin" ]; then
|
|
|
|
die "This script is intended for OS X only"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Parse command-line options:
|
|
|
|
force_rebuild=false
|
|
|
|
|
|
|
|
for i in "$@"
|
|
|
|
do
|
|
|
|
case $i in
|
|
|
|
--force-rebuild ) force_rebuild=true;;
|
|
|
|
-j* ) JOBS=$i ;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
|
|
|
cd "$(dirname $0)"
|
|
|
|
# Now in libraries/osx/ (where we assume this script resides)
|
|
|
|
|
2021-09-23 18:10:25 +02:00
|
|
|
# Create a location to create copies of dependencies' *.pc files, so they can be found by pkg-config
|
|
|
|
PC_PATH="$(pwd)/pkgconfig/"
|
|
|
|
if [[ "$force_rebuild" = "true" ]]; then
|
|
|
|
rm -rf $PC_PATH
|
|
|
|
fi
|
|
|
|
mkdir -p $PC_PATH
|
|
|
|
|
2013-02-04 00:49:29 +01:00
|
|
|
# --------------------------------------------------------------
|
2013-11-11 01:04:07 +01:00
|
|
|
echo -e "Building zlib..."
|
|
|
|
|
|
|
|
LIB_VERSION="${ZLIB_VERSION}"
|
|
|
|
LIB_ARCHIVE="$LIB_VERSION.tar.gz"
|
|
|
|
LIB_DIRECTORY=$LIB_VERSION
|
2022-04-15 00:35:17 +02:00
|
|
|
LIB_URL="https://zlib.net/fossils/"
|
2013-11-11 01:04:07 +01:00
|
|
|
|
|
|
|
mkdir -p zlib
|
|
|
|
pushd zlib > /dev/null
|
|
|
|
|
|
|
|
ZLIB_DIR="$(pwd)"
|
|
|
|
|
2020-05-21 17:28:38 +02:00
|
|
|
if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]
|
2013-11-11 01:04:07 +01:00
|
|
|
then
|
2013-12-15 03:14:45 +01:00
|
|
|
rm -f .already-built
|
2013-11-11 01:04:07 +01:00
|
|
|
download_lib $LIB_URL $LIB_ARCHIVE
|
|
|
|
|
2013-12-15 03:14:45 +01:00
|
|
|
rm -rf $LIB_DIRECTORY include lib share
|
2013-11-11 01:04:07 +01:00
|
|
|
tar -xf $LIB_ARCHIVE
|
|
|
|
pushd $LIB_DIRECTORY
|
|
|
|
|
|
|
|
# patch zlib's configure script to use our CFLAGS and LDFLAGS
|
2019-07-17 16:20:40 +02:00
|
|
|
(patch -Np0 -i ../../patches/zlib_flags.diff \
|
|
|
|
&& CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" \
|
|
|
|
./configure --prefix="$ZLIB_DIR" \
|
|
|
|
--static \
|
|
|
|
&& make ${JOBS} && make install) || die "zlib build failed"
|
2021-09-23 18:10:25 +02:00
|
|
|
|
2013-11-11 01:04:07 +01:00
|
|
|
popd
|
2021-09-23 18:10:25 +02:00
|
|
|
cp -f lib/pkgconfig/* $PC_PATH
|
2020-05-21 17:28:38 +02:00
|
|
|
echo "$LIB_VERSION" > .already-built
|
2013-11-11 01:04:07 +01:00
|
|
|
else
|
|
|
|
already_built
|
|
|
|
fi
|
|
|
|
popd > /dev/null
|
|
|
|
|
|
|
|
# --------------------------------------------------------------
|
|
|
|
echo -e "Building libcurl..."
|
|
|
|
|
|
|
|
LIB_VERSION="${CURL_VERSION}"
|
|
|
|
LIB_ARCHIVE="$LIB_VERSION.tar.bz2"
|
|
|
|
LIB_DIRECTORY="$LIB_VERSION"
|
|
|
|
LIB_URL="http://curl.haxx.se/download/"
|
|
|
|
|
|
|
|
mkdir -p libcurl
|
|
|
|
pushd libcurl > /dev/null
|
|
|
|
|
2020-05-21 17:28:38 +02:00
|
|
|
if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]
|
2013-11-11 01:04:07 +01:00
|
|
|
then
|
|
|
|
INSTALL_DIR="$(pwd)"
|
|
|
|
|
2013-12-15 03:14:45 +01:00
|
|
|
rm -f .already-built
|
2013-11-11 01:04:07 +01:00
|
|
|
download_lib $LIB_URL $LIB_ARCHIVE
|
|
|
|
|
2013-12-15 03:14:45 +01:00
|
|
|
rm -rf $LIB_DIRECTORY bin include lib share
|
2013-11-11 01:04:07 +01:00
|
|
|
tar -xf $LIB_ARCHIVE
|
|
|
|
pushd $LIB_DIRECTORY
|
|
|
|
|
2019-07-17 16:20:40 +02:00
|
|
|
(./configure CFLAGS="$CFLAGS" \
|
|
|
|
LDFLAGS="$LDFLAGS" \
|
|
|
|
--prefix="$INSTALL_DIR" \
|
|
|
|
--enable-ipv6 \
|
|
|
|
--with-darwinssl \
|
|
|
|
--without-gssapi \
|
|
|
|
--without-libmetalink \
|
|
|
|
--without-libpsl \
|
|
|
|
--without-librtmp \
|
|
|
|
--without-libssh2 \
|
|
|
|
--without-nghttp2 \
|
|
|
|
--without-nss \
|
|
|
|
--without-polarssl \
|
|
|
|
--without-ssl \
|
|
|
|
--without-gnutls \
|
|
|
|
--without-brotli \
|
|
|
|
--without-cyassl \
|
|
|
|
--without-winssl \
|
|
|
|
--without-mbedtls \
|
|
|
|
--without-wolfssl \
|
|
|
|
--without-spnego \
|
|
|
|
--disable-ares \
|
|
|
|
--disable-ldap \
|
|
|
|
--disable-ldaps \
|
|
|
|
--without-libidn2 \
|
|
|
|
--with-zlib="${ZLIB_DIR}" \
|
|
|
|
--enable-shared=no \
|
|
|
|
&& make ${JOBS} && make install) || die "libcurl build failed"
|
2021-09-23 18:10:25 +02:00
|
|
|
|
2013-11-11 01:04:07 +01:00
|
|
|
popd
|
2021-09-23 18:10:25 +02:00
|
|
|
cp -f lib/pkgconfig/* $PC_PATH
|
2020-05-21 17:28:38 +02:00
|
|
|
echo "$LIB_VERSION" > .already-built
|
2013-11-11 01:04:07 +01:00
|
|
|
else
|
|
|
|
already_built
|
|
|
|
fi
|
|
|
|
popd > /dev/null
|
|
|
|
|
|
|
|
# --------------------------------------------------------------
|
|
|
|
echo -e "Building libiconv..."
|
|
|
|
|
|
|
|
LIB_VERSION="${ICONV_VERSION}"
|
|
|
|
LIB_ARCHIVE="$LIB_VERSION.tar.gz"
|
|
|
|
LIB_DIRECTORY="$LIB_VERSION"
|
|
|
|
LIB_URL="http://ftp.gnu.org/pub/gnu/libiconv/"
|
|
|
|
|
2014-06-22 10:27:58 +02:00
|
|
|
mkdir -p iconv
|
|
|
|
pushd iconv > /dev/null
|
2013-11-11 01:04:07 +01:00
|
|
|
|
|
|
|
ICONV_DIR="$(pwd)"
|
|
|
|
|
2020-05-21 17:28:38 +02:00
|
|
|
if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]
|
2013-11-11 01:04:07 +01:00
|
|
|
then
|
2013-12-15 03:14:45 +01:00
|
|
|
rm -f .already-built
|
2013-11-11 01:04:07 +01:00
|
|
|
download_lib $LIB_URL $LIB_ARCHIVE
|
|
|
|
|
2013-12-15 03:14:45 +01:00
|
|
|
rm -rf $LIB_DIRECTORY bin include lib share
|
2013-11-11 01:04:07 +01:00
|
|
|
tar -xf $LIB_ARCHIVE
|
|
|
|
pushd $LIB_DIRECTORY
|
2013-02-04 00:49:29 +01:00
|
|
|
|
2019-07-17 16:20:40 +02:00
|
|
|
(./configure CFLAGS="$CFLAGS" \
|
|
|
|
LDFLAGS="$LDFLAGS" \
|
|
|
|
--prefix="$ICONV_DIR" \
|
|
|
|
--without-libiconv-prefix \
|
|
|
|
--without-libintl-prefix \
|
|
|
|
--disable-nls \
|
|
|
|
--enable-shared=no \
|
|
|
|
&& make ${JOBS} && make install) || die "libiconv build failed"
|
2013-11-11 01:04:07 +01:00
|
|
|
popd
|
2020-05-21 17:28:38 +02:00
|
|
|
echo "$LIB_VERSION" > .already-built
|
2013-11-11 01:04:07 +01:00
|
|
|
else
|
|
|
|
already_built
|
|
|
|
fi
|
|
|
|
popd > /dev/null
|
|
|
|
|
|
|
|
# --------------------------------------------------------------
|
|
|
|
echo -e "Building libxml2..."
|
|
|
|
|
|
|
|
LIB_VERSION="${XML2_VERSION}"
|
|
|
|
LIB_ARCHIVE="$LIB_VERSION.tar.gz"
|
|
|
|
LIB_DIRECTORY="$LIB_VERSION"
|
|
|
|
LIB_URL="ftp://xmlsoft.org/libxml2/"
|
|
|
|
|
|
|
|
mkdir -p libxml2
|
|
|
|
pushd libxml2 > /dev/null
|
|
|
|
|
2020-05-21 17:28:38 +02:00
|
|
|
if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]
|
2013-11-11 01:04:07 +01:00
|
|
|
then
|
|
|
|
INSTALL_DIR="$(pwd)"
|
|
|
|
|
2013-12-15 03:14:45 +01:00
|
|
|
rm -f .already-built
|
2013-11-11 01:04:07 +01:00
|
|
|
download_lib $LIB_URL $LIB_ARCHIVE
|
|
|
|
|
2013-12-15 03:14:45 +01:00
|
|
|
rm -rf $LIB_DIRECTORY bin include lib share
|
2013-11-11 01:04:07 +01:00
|
|
|
tar -xf $LIB_ARCHIVE
|
|
|
|
pushd $LIB_DIRECTORY
|
|
|
|
|
2019-07-17 16:20:40 +02:00
|
|
|
(./configure CFLAGS="$CFLAGS" \
|
|
|
|
LDFLAGS="$LDFLAGS" \
|
|
|
|
--prefix="$INSTALL_DIR" \
|
|
|
|
--without-lzma \
|
|
|
|
--without-python \
|
|
|
|
--with-iconv="${ICONV_DIR}" \
|
|
|
|
--with-zlib="${ZLIB_DIR}" \
|
|
|
|
--enable-shared=no \
|
|
|
|
&& make ${JOBS} && make install) || die "libxml2 build failed"
|
2021-09-23 18:10:25 +02:00
|
|
|
|
2013-11-11 01:04:07 +01:00
|
|
|
popd
|
2021-09-23 18:10:25 +02:00
|
|
|
cp -f lib/pkgconfig/* $PC_PATH
|
2020-05-21 17:28:38 +02:00
|
|
|
echo "$LIB_VERSION" > .already-built
|
2013-11-11 01:04:07 +01:00
|
|
|
else
|
|
|
|
already_built
|
|
|
|
fi
|
|
|
|
popd > /dev/null
|
|
|
|
|
|
|
|
# --------------------------------------------------------------
|
|
|
|
|
2014-09-20 21:02:24 +02:00
|
|
|
echo -e "Building SDL2..."
|
|
|
|
|
|
|
|
LIB_VERSION="${SDL2_VERSION}"
|
|
|
|
LIB_ARCHIVE="$LIB_VERSION.tar.gz"
|
|
|
|
LIB_DIRECTORY=$LIB_VERSION
|
2016-01-10 14:23:25 +01:00
|
|
|
LIB_URL="https://libsdl.org/release/"
|
2014-09-20 21:02:24 +02:00
|
|
|
|
|
|
|
mkdir -p sdl2
|
|
|
|
pushd sdl2 > /dev/null
|
|
|
|
|
2020-05-21 17:28:38 +02:00
|
|
|
if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]
|
2014-09-20 21:02:24 +02:00
|
|
|
then
|
|
|
|
INSTALL_DIR="$(pwd)"
|
|
|
|
|
|
|
|
rm -f .already-built
|
|
|
|
download_lib $LIB_URL $LIB_ARCHIVE
|
|
|
|
|
|
|
|
rm -rf $LIB_DIRECTORY bin include lib share
|
|
|
|
tar -xf $LIB_ARCHIVE
|
|
|
|
pushd $LIB_DIRECTORY
|
|
|
|
|
|
|
|
# We don't want SDL2 to pull in system iconv, force it to detect ours with flags.
|
|
|
|
# Don't use X11 - we don't need it and Mountain Lion removed it
|
2019-07-17 16:20:40 +02:00
|
|
|
(./configure CPPFLAGS="-I${ICONV_DIR}/include" \
|
|
|
|
CFLAGS="$CFLAGS" \
|
|
|
|
CXXFLAGS="$CXXFLAGS" \
|
|
|
|
LDFLAGS="$LDFLAGS -L${ICONV_DIR}/lib" \
|
|
|
|
--prefix="$INSTALL_DIR" \
|
|
|
|
--disable-video-x11 \
|
|
|
|
--without-x \
|
2020-05-17 16:12:53 +02:00
|
|
|
--enable-video-cocoa \
|
2019-07-17 16:20:40 +02:00
|
|
|
--enable-shared=no \
|
|
|
|
&& make $JOBS && make install) || die "SDL2 build failed"
|
2021-09-23 18:10:25 +02:00
|
|
|
|
2014-09-20 21:02:24 +02:00
|
|
|
popd
|
2021-09-23 18:10:25 +02:00
|
|
|
cp -f lib/pkgconfig/* $PC_PATH
|
2020-05-21 17:28:38 +02:00
|
|
|
echo "$LIB_VERSION" > .already-built
|
2014-09-20 21:02:24 +02:00
|
|
|
else
|
|
|
|
already_built
|
|
|
|
fi
|
|
|
|
popd > /dev/null
|
|
|
|
|
2013-02-04 00:49:29 +01:00
|
|
|
# --------------------------------------------------------------
|
2013-11-11 01:04:07 +01:00
|
|
|
echo -e "Building Boost..."
|
2013-02-04 00:49:29 +01:00
|
|
|
|
|
|
|
LIB_VERSION="${BOOST_VERSION}"
|
|
|
|
LIB_ARCHIVE="$LIB_VERSION.tar.bz2"
|
|
|
|
LIB_DIRECTORY="$LIB_VERSION"
|
2021-05-05 10:25:01 +02:00
|
|
|
LIB_URL="https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/"
|
2013-02-04 00:49:29 +01:00
|
|
|
|
|
|
|
mkdir -p boost
|
2013-11-11 01:04:07 +01:00
|
|
|
pushd boost > /dev/null
|
2013-02-04 00:49:29 +01:00
|
|
|
|
2020-05-21 17:28:38 +02:00
|
|
|
if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]
|
2013-02-04 00:49:29 +01:00
|
|
|
then
|
|
|
|
INSTALL_DIR="$(pwd)"
|
|
|
|
|
2013-12-15 03:14:45 +01:00
|
|
|
rm -f .already-built
|
2013-02-04 00:49:29 +01:00
|
|
|
download_lib $LIB_URL $LIB_ARCHIVE
|
|
|
|
|
2013-12-15 03:14:45 +01:00
|
|
|
rm -rf $LIB_DIRECTORY include lib
|
2013-02-04 00:49:29 +01:00
|
|
|
tar -xf $LIB_ARCHIVE
|
|
|
|
pushd $LIB_DIRECTORY
|
|
|
|
|
|
|
|
# Can't use macosx-version, see above comment.
|
2019-07-17 16:20:40 +02:00
|
|
|
(./bootstrap.sh --with-libraries=filesystem,system \
|
|
|
|
--prefix=$INSTALL_DIR \
|
|
|
|
&& ./b2 cflags="$CFLAGS" \
|
|
|
|
toolset=clang \
|
|
|
|
cxxflags="$CXXFLAGS" \
|
|
|
|
linkflags="$LDFLAGS" ${JOBS} \
|
|
|
|
-d2 \
|
2020-11-26 08:20:10 +01:00
|
|
|
--layout=system \
|
2019-07-17 16:20:40 +02:00
|
|
|
--debug-configuration \
|
|
|
|
link=static \
|
|
|
|
threading=multi \
|
2020-11-26 08:20:10 +01:00
|
|
|
variant=release install \
|
2019-07-17 16:20:40 +02:00
|
|
|
) || die "Boost build failed"
|
2013-02-04 00:49:29 +01:00
|
|
|
|
|
|
|
popd
|
2020-05-21 17:28:38 +02:00
|
|
|
echo "$LIB_VERSION" > .already-built
|
2013-02-04 00:49:29 +01:00
|
|
|
else
|
2013-11-11 01:04:07 +01:00
|
|
|
already_built
|
2013-02-04 00:49:29 +01:00
|
|
|
fi
|
2013-11-11 01:04:07 +01:00
|
|
|
popd > /dev/null
|
2013-02-04 00:49:29 +01:00
|
|
|
|
|
|
|
# --------------------------------------------------------------
|
2016-03-12 19:15:04 +01:00
|
|
|
# TODO: This build takes ages, anything we can exclude?
|
2013-11-11 01:04:07 +01:00
|
|
|
echo -e "Building wxWidgets..."
|
2013-02-04 00:49:29 +01:00
|
|
|
|
|
|
|
LIB_VERSION="${WXWIDGETS_VERSION}"
|
|
|
|
LIB_ARCHIVE="$LIB_VERSION.tar.bz2"
|
|
|
|
LIB_DIRECTORY="$LIB_VERSION"
|
2021-03-23 16:47:29 +01:00
|
|
|
LIB_URL="http://github.com/wxWidgets/wxWidgets/releases/download/v3.1.4/"
|
2013-02-04 00:49:29 +01:00
|
|
|
|
|
|
|
mkdir -p wxwidgets
|
2013-11-11 01:04:07 +01:00
|
|
|
pushd wxwidgets > /dev/null
|
2013-02-04 00:49:29 +01:00
|
|
|
|
2020-05-21 17:28:38 +02:00
|
|
|
if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]
|
2013-02-04 00:49:29 +01:00
|
|
|
then
|
|
|
|
INSTALL_DIR="$(pwd)"
|
|
|
|
|
2013-12-15 03:14:45 +01:00
|
|
|
rm -f .already-built
|
2013-02-04 00:49:29 +01:00
|
|
|
download_lib $LIB_URL $LIB_ARCHIVE
|
|
|
|
|
2013-12-15 03:14:45 +01:00
|
|
|
rm -rf $LIB_DIRECTORY bin include lib share
|
2013-02-04 00:49:29 +01:00
|
|
|
tar -xf $LIB_ARCHIVE
|
|
|
|
pushd $LIB_DIRECTORY
|
|
|
|
|
|
|
|
mkdir -p build-release
|
|
|
|
pushd build-release
|
2013-12-15 03:14:45 +01:00
|
|
|
|
2019-07-17 16:20:40 +02:00
|
|
|
CONF_OPTS="--prefix=$INSTALL_DIR
|
|
|
|
--disable-shared
|
|
|
|
--enable-unicode
|
|
|
|
--with-cocoa
|
|
|
|
--with-opengl
|
|
|
|
--with-libiconv-prefix=${ICONV_DIR}
|
2022-05-15 23:22:49 +02:00
|
|
|
--enable-universal-binary=${ARCH}
|
2019-07-17 16:20:40 +02:00
|
|
|
--with-expat=builtin
|
|
|
|
--with-libpng=builtin
|
|
|
|
--without-libtiff
|
|
|
|
--without-sdl
|
|
|
|
--without-x
|
2020-12-01 15:17:12 +01:00
|
|
|
--disable-stc
|
2019-07-17 16:20:40 +02:00
|
|
|
--disable-webview
|
|
|
|
--disable-webkit
|
|
|
|
--disable-webviewwebkit
|
|
|
|
--disable-webviewie
|
|
|
|
--without-libjpeg"
|
2013-12-15 03:14:45 +01:00
|
|
|
# wxWidgets configure now defaults to targeting 10.5, if not specified,
|
|
|
|
# but that conflicts with our flags
|
|
|
|
if [[ $MIN_OSX_VERSION && ${MIN_OSX_VERSION-_} ]]; then
|
|
|
|
CONF_OPTS="$CONF_OPTS --with-macosx-version-min=$MIN_OSX_VERSION"
|
|
|
|
fi
|
2022-01-13 15:42:42 +01:00
|
|
|
(../configure CFLAGS="$ARCHLESS_CFLAGS" \
|
|
|
|
CXXFLAGS="$ARCHLESS_CXXFLAGS" \
|
|
|
|
CPPFLAGS="-D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES=1" \
|
|
|
|
LDFLAGS="$ARCHLESS_LDFLAGS" $CONF_OPTS \
|
2019-07-17 16:20:40 +02:00
|
|
|
&& make ${JOBS} && make install) || die "wxWidgets build failed"
|
2013-02-04 00:49:29 +01:00
|
|
|
popd
|
|
|
|
popd
|
2020-05-21 17:28:38 +02:00
|
|
|
echo "$LIB_VERSION" > .already-built
|
2013-02-04 00:49:29 +01:00
|
|
|
else
|
2013-11-11 01:04:07 +01:00
|
|
|
already_built
|
2013-02-04 00:49:29 +01:00
|
|
|
fi
|
2013-11-11 01:04:07 +01:00
|
|
|
popd > /dev/null
|
2013-02-04 00:49:29 +01:00
|
|
|
|
|
|
|
# --------------------------------------------------------------
|
2013-11-11 01:04:07 +01:00
|
|
|
echo -e "Building libpng..."
|
2013-02-04 00:49:29 +01:00
|
|
|
|
|
|
|
LIB_VERSION="${PNG_VERSION}"
|
|
|
|
LIB_ARCHIVE="$LIB_VERSION.tar.gz"
|
|
|
|
LIB_DIRECTORY="$LIB_VERSION"
|
|
|
|
LIB_URL="http://download.sourceforge.net/libpng/"
|
|
|
|
|
|
|
|
mkdir -p libpng
|
2013-11-11 01:04:07 +01:00
|
|
|
pushd libpng > /dev/null
|
2013-02-04 00:49:29 +01:00
|
|
|
|
2020-05-21 17:28:38 +02:00
|
|
|
if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]
|
2013-02-04 00:49:29 +01:00
|
|
|
then
|
|
|
|
INSTALL_DIR="$(pwd)"
|
|
|
|
|
2013-12-15 03:14:45 +01:00
|
|
|
rm -f .already-built
|
2013-02-04 00:49:29 +01:00
|
|
|
download_lib $LIB_URL $LIB_ARCHIVE
|
|
|
|
|
2013-12-15 03:14:45 +01:00
|
|
|
rm -rf $LIB_DIRECTORY bin include lib share
|
2013-02-04 00:49:29 +01:00
|
|
|
tar -xf $LIB_ARCHIVE
|
|
|
|
pushd $LIB_DIRECTORY
|
|
|
|
|
2020-11-26 10:15:36 +01:00
|
|
|
# libpng has no flags for zlib but the 10.12 version is too old, so link our own.
|
|
|
|
(./configure CFLAGS="$CFLAGS" CPPFLAGS=" -I $ZLIB_DIR/include "\
|
|
|
|
LDFLAGS="$LDFLAGS -L$ZLIB_DIR/lib" \
|
2019-07-17 16:20:40 +02:00
|
|
|
--prefix=$INSTALL_DIR \
|
|
|
|
--enable-shared=no \
|
|
|
|
&& make ${JOBS} && make install) || die "libpng build failed"
|
2021-09-23 18:10:25 +02:00
|
|
|
|
2013-02-04 00:49:29 +01:00
|
|
|
popd
|
2021-09-23 18:10:25 +02:00
|
|
|
cp -f lib/pkgconfig/* $PC_PATH
|
2020-05-21 17:28:38 +02:00
|
|
|
echo "$LIB_VERSION" > .already-built
|
2013-02-04 00:49:29 +01:00
|
|
|
else
|
2013-11-11 01:04:07 +01:00
|
|
|
already_built
|
2013-02-04 00:49:29 +01:00
|
|
|
fi
|
2013-11-11 01:04:07 +01:00
|
|
|
popd > /dev/null
|
2013-02-04 00:49:29 +01:00
|
|
|
|
2021-12-08 23:14:43 +01:00
|
|
|
# --------------------------------------------------------------
|
|
|
|
echo -e "Building freetype..."
|
|
|
|
|
|
|
|
LIB_VERSION="${FREETYPE_VERSION}"
|
|
|
|
LIB_ARCHIVE="$LIB_VERSION.tar.gz"
|
|
|
|
LIB_DIRECTORY="$LIB_VERSION"
|
|
|
|
LIB_URL="https://download.savannah.gnu.org/releases/freetype/"
|
|
|
|
|
|
|
|
mkdir -p freetype
|
|
|
|
pushd freetype > /dev/null
|
|
|
|
|
|
|
|
if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]
|
|
|
|
then
|
|
|
|
INSTALL_DIR="$(pwd)"
|
|
|
|
|
|
|
|
rm -f .already-built
|
|
|
|
download_lib $LIB_URL $LIB_ARCHIVE
|
|
|
|
|
|
|
|
rm -rf $LIB_DIRECTORY bin include lib share
|
|
|
|
tar -xf $LIB_ARCHIVE
|
|
|
|
pushd $LIB_DIRECTORY
|
|
|
|
|
|
|
|
(./configure CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" \
|
|
|
|
--prefix=$INSTALL_DIR \
|
2022-05-15 23:22:49 +02:00
|
|
|
"$HOST_PLATFORM" \
|
2021-12-08 23:14:43 +01:00
|
|
|
--enable-shared=no \
|
2022-05-15 23:22:49 +02:00
|
|
|
--with-harfbuzz=no \
|
2021-12-08 23:14:43 +01:00
|
|
|
--with-bzip2=no \
|
|
|
|
--with-brotli=no \
|
|
|
|
&& make ${JOBS} && make install) || die "freetype build failed"
|
|
|
|
popd
|
|
|
|
cp -f lib/pkgconfig/* $PC_PATH
|
|
|
|
echo "$LIB_VERSION" > .already-built
|
|
|
|
else
|
|
|
|
already_built
|
|
|
|
fi
|
|
|
|
popd > /dev/null
|
|
|
|
|
2013-02-04 00:49:29 +01:00
|
|
|
# --------------------------------------------------------------
|
2021-09-23 18:10:25 +02:00
|
|
|
# Dependency of vorbis
|
2013-11-11 01:04:07 +01:00
|
|
|
echo -e "Building libogg..."
|
2013-02-04 00:49:29 +01:00
|
|
|
|
|
|
|
LIB_VERSION="${OGG_VERSION}"
|
|
|
|
LIB_ARCHIVE="$LIB_VERSION.tar.gz"
|
|
|
|
LIB_DIRECTORY="$LIB_VERSION"
|
|
|
|
LIB_URL="http://downloads.xiph.org/releases/ogg/"
|
|
|
|
|
|
|
|
mkdir -p libogg
|
2013-11-11 01:04:07 +01:00
|
|
|
pushd libogg > /dev/null
|
2013-12-15 03:14:45 +01:00
|
|
|
OGG_DIR="$(pwd)"
|
2013-02-04 00:49:29 +01:00
|
|
|
|
2020-05-21 17:28:38 +02:00
|
|
|
if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]
|
2013-02-04 00:49:29 +01:00
|
|
|
then
|
2013-12-15 03:14:45 +01:00
|
|
|
rm -f .already-built
|
2013-02-04 00:49:29 +01:00
|
|
|
download_lib $LIB_URL $LIB_ARCHIVE
|
|
|
|
|
2013-12-15 03:14:45 +01:00
|
|
|
rm -rf $LIB_DIRECTORY include lib share
|
2013-02-04 00:49:29 +01:00
|
|
|
tar -xf $LIB_ARCHIVE
|
|
|
|
pushd $LIB_DIRECTORY
|
|
|
|
|
2019-07-17 16:20:40 +02:00
|
|
|
(./configure CFLAGS="$CFLAGS" \
|
|
|
|
LDFLAGS="$LDFLAGS" \
|
|
|
|
--prefix=$OGG_DIR \
|
|
|
|
--enable-shared=no \
|
|
|
|
&& make ${JOBS} && make install) || die "libogg build failed"
|
2021-09-23 18:10:25 +02:00
|
|
|
|
2013-02-04 00:49:29 +01:00
|
|
|
popd
|
2021-09-23 18:10:25 +02:00
|
|
|
cp -f lib/pkgconfig/* $PC_PATH
|
2020-05-21 17:28:38 +02:00
|
|
|
echo "$LIB_VERSION" > .already-built
|
2013-02-04 00:49:29 +01:00
|
|
|
else
|
2013-11-11 01:04:07 +01:00
|
|
|
already_built
|
2013-02-04 00:49:29 +01:00
|
|
|
fi
|
2013-11-11 01:04:07 +01:00
|
|
|
popd > /dev/null
|
2013-02-04 00:49:29 +01:00
|
|
|
|
|
|
|
# --------------------------------------------------------------
|
2013-11-11 01:04:07 +01:00
|
|
|
echo -e "Building libvorbis..."
|
2013-02-04 00:49:29 +01:00
|
|
|
|
|
|
|
LIB_VERSION="${VORBIS_VERSION}"
|
|
|
|
LIB_ARCHIVE="$LIB_VERSION.tar.gz"
|
|
|
|
LIB_DIRECTORY="$LIB_VERSION"
|
|
|
|
LIB_URL="http://downloads.xiph.org/releases/vorbis/"
|
|
|
|
|
2021-09-23 18:10:25 +02:00
|
|
|
mkdir -p vorbis
|
2013-11-11 01:04:07 +01:00
|
|
|
pushd vorbis > /dev/null
|
2013-02-04 00:49:29 +01:00
|
|
|
|
2020-05-21 17:28:38 +02:00
|
|
|
if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]
|
2013-02-04 00:49:29 +01:00
|
|
|
then
|
|
|
|
INSTALL_DIR="$(pwd)"
|
|
|
|
|
2013-12-15 03:14:45 +01:00
|
|
|
rm -f .already-built
|
2013-02-04 00:49:29 +01:00
|
|
|
download_lib $LIB_URL $LIB_ARCHIVE
|
|
|
|
|
2013-12-15 03:14:45 +01:00
|
|
|
rm -rf $LIB_DIRECTORY include lib share
|
2013-02-04 00:49:29 +01:00
|
|
|
tar -xf $LIB_ARCHIVE
|
|
|
|
pushd $LIB_DIRECTORY
|
|
|
|
|
2019-07-17 16:20:40 +02:00
|
|
|
(./configure CFLAGS="$CFLAGS" \
|
|
|
|
LDFLAGS="$LDFLAGS" \
|
|
|
|
--prefix="$INSTALL_DIR" \
|
|
|
|
--enable-shared=no \
|
|
|
|
--with-ogg="$OGG_DIR" \
|
|
|
|
&& make ${JOBS} && make install) || die "libvorbis build failed"
|
2021-09-23 18:10:25 +02:00
|
|
|
|
2013-02-04 00:49:29 +01:00
|
|
|
popd
|
2021-09-23 18:10:25 +02:00
|
|
|
cp -f lib/pkgconfig/* $PC_PATH
|
2020-05-21 17:28:38 +02:00
|
|
|
echo "$LIB_VERSION" > .already-built
|
2013-02-04 00:49:29 +01:00
|
|
|
else
|
2013-11-11 01:04:07 +01:00
|
|
|
already_built
|
2013-02-04 00:49:29 +01:00
|
|
|
fi
|
2013-11-11 01:04:07 +01:00
|
|
|
popd > /dev/null
|
2013-02-04 00:49:29 +01:00
|
|
|
|
2018-12-02 21:52:40 +01:00
|
|
|
# --------------------------------------------------------------
|
|
|
|
echo -e "Building GMP..."
|
|
|
|
|
|
|
|
LIB_VERSION="${GMP_VERSION}"
|
|
|
|
LIB_ARCHIVE="$LIB_VERSION.tar.bz2"
|
|
|
|
LIB_DIRECTORY="$LIB_VERSION"
|
|
|
|
LIB_URL="https://gmplib.org/download/gmp/"
|
|
|
|
|
|
|
|
mkdir -p gmp
|
|
|
|
pushd gmp > /dev/null
|
|
|
|
|
|
|
|
GMP_DIR="$(pwd)"
|
|
|
|
|
2020-05-21 17:28:38 +02:00
|
|
|
if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]
|
2018-12-02 21:52:40 +01:00
|
|
|
then
|
|
|
|
INSTALL_DIR="$(pwd)"
|
|
|
|
|
|
|
|
rm -f .already-built
|
|
|
|
download_lib $LIB_URL $LIB_ARCHIVE
|
|
|
|
|
|
|
|
rm -rf $LIB_DIRECTORY bin include lib
|
|
|
|
tar -xf $LIB_ARCHIVE
|
|
|
|
pushd $LIB_DIRECTORY
|
|
|
|
|
2019-07-11 23:48:50 +02:00
|
|
|
# NOTE: enable-fat in this case allows building and running on different CPUS.
|
|
|
|
# Otherwise CPU-specific instructions will be used with no fallback for older CPUs.
|
2019-07-17 16:20:40 +02:00
|
|
|
(./configure CFLAGS="$CFLAGS" \
|
|
|
|
CXXFLAGS="$CXXFLAGS" \
|
|
|
|
LDFLAGS="$LDFLAGS" \
|
2022-01-13 15:42:42 +01:00
|
|
|
"$HOST_PLATFORM" \
|
2019-07-17 16:20:40 +02:00
|
|
|
--prefix="$INSTALL_DIR" \
|
|
|
|
--enable-fat \
|
|
|
|
--disable-shared \
|
|
|
|
--with-pic \
|
|
|
|
&& make ${JOBS} && make install) || die "GMP build failed"
|
2021-09-23 18:10:25 +02:00
|
|
|
|
2018-12-02 21:52:40 +01:00
|
|
|
popd
|
2021-09-23 18:10:25 +02:00
|
|
|
cp -f lib/pkgconfig/* $PC_PATH
|
2020-05-21 17:28:38 +02:00
|
|
|
echo "$LIB_VERSION" > .already-built
|
2018-12-02 21:52:40 +01:00
|
|
|
else
|
|
|
|
already_built
|
|
|
|
fi
|
|
|
|
popd > /dev/null
|
|
|
|
|
|
|
|
# --------------------------------------------------------------
|
|
|
|
echo -e "Building Nettle..."
|
2021-09-23 18:10:25 +02:00
|
|
|
# Also builds hogweed
|
2018-12-02 21:52:40 +01:00
|
|
|
|
|
|
|
LIB_VERSION="${NETTLE_VERSION}"
|
|
|
|
LIB_ARCHIVE="$LIB_VERSION.tar.gz"
|
|
|
|
LIB_DIRECTORY="$LIB_VERSION"
|
|
|
|
LIB_URL="https://ftp.gnu.org/gnu/nettle/"
|
|
|
|
|
|
|
|
mkdir -p nettle
|
|
|
|
pushd nettle > /dev/null
|
|
|
|
|
|
|
|
NETTLE_DIR="$(pwd)"
|
|
|
|
|
2020-05-21 17:28:38 +02:00
|
|
|
if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]
|
2018-12-02 21:52:40 +01:00
|
|
|
then
|
|
|
|
INSTALL_DIR="$(pwd)"
|
|
|
|
|
|
|
|
rm -f .already-built
|
|
|
|
download_lib $LIB_URL $LIB_ARCHIVE
|
|
|
|
|
|
|
|
rm -rf $LIB_DIRECTORY bin include lib
|
|
|
|
tar -xf $LIB_ARCHIVE
|
|
|
|
pushd $LIB_DIRECTORY
|
|
|
|
|
2019-07-11 23:48:50 +02:00
|
|
|
# NOTE: enable-fat in this case allows building and running on different CPUS.
|
|
|
|
# Otherwise CPU-specific instructions will be used with no fallback for older CPUs.
|
2019-07-17 16:20:40 +02:00
|
|
|
(./configure CFLAGS="$CFLAGS" \
|
|
|
|
CXXFLAGS="$CXXFLAGS" \
|
|
|
|
LDFLAGS="$LDFLAGS" \
|
|
|
|
--with-include-path="${GMP_DIR}/include" \
|
|
|
|
--with-lib-path="${GMP_DIR}/lib" \
|
|
|
|
--prefix="$INSTALL_DIR" \
|
|
|
|
--enable-fat \
|
|
|
|
--disable-shared \
|
|
|
|
--disable-documentation \
|
|
|
|
--disable-openssl \
|
|
|
|
--disable-assembler \
|
|
|
|
&& make ${JOBS} && make install) || die "Nettle build failed"
|
2021-09-23 18:10:25 +02:00
|
|
|
|
2018-12-02 21:52:40 +01:00
|
|
|
popd
|
2021-09-23 18:10:25 +02:00
|
|
|
cp -f lib/pkgconfig/* $PC_PATH
|
2020-05-21 17:28:38 +02:00
|
|
|
echo "$LIB_VERSION" > .already-built
|
2018-12-02 21:52:40 +01:00
|
|
|
else
|
|
|
|
already_built
|
|
|
|
fi
|
|
|
|
popd > /dev/null
|
|
|
|
|
|
|
|
# --------------------------------------------------------------
|
|
|
|
echo -e "Building GnuTLS..."
|
|
|
|
|
|
|
|
LIB_VERSION="${GNUTLS_VERSION}"
|
|
|
|
LIB_ARCHIVE="$LIB_VERSION.tar.xz"
|
|
|
|
LIB_DIRECTORY="$LIB_VERSION"
|
2023-06-06 09:07:50 +02:00
|
|
|
LIB_URL="https://www.gnupg.org/ftp/gcrypt/gnutls/v3.8/"
|
2018-12-02 21:52:40 +01:00
|
|
|
|
|
|
|
mkdir -p gnutls
|
|
|
|
pushd gnutls > /dev/null
|
|
|
|
|
|
|
|
GNUTLS_DIR="$(pwd)"
|
|
|
|
|
2020-05-21 17:28:38 +02:00
|
|
|
if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]
|
2018-12-02 21:52:40 +01:00
|
|
|
then
|
|
|
|
INSTALL_DIR="$(pwd)"
|
|
|
|
|
|
|
|
rm -f .already-built
|
|
|
|
download_lib $LIB_URL $LIB_ARCHIVE
|
|
|
|
|
|
|
|
rm -rf $LIB_DIRECTORY bin include lib
|
|
|
|
tar -xf $LIB_ARCHIVE
|
|
|
|
pushd $LIB_DIRECTORY
|
|
|
|
|
2020-11-26 08:20:10 +01:00
|
|
|
# Patch GNUTLS for a linking issue with isdigit
|
|
|
|
# Patch by Ross Nicholson: https://gitlab.com/gnutls/gnutls/-/issues/1033#note_379529145
|
|
|
|
(patch -Np1 -i ../../patches/03-undo-libtasn1-cisdigit.patch \
|
2019-07-17 16:20:40 +02:00
|
|
|
&& ./configure CFLAGS="$CFLAGS" \
|
|
|
|
CXXFLAGS="$CXXFLAGS" \
|
|
|
|
LDFLAGS="$LDFLAGS" \
|
|
|
|
LIBS="-L${GMP_DIR}/lib -lgmp" \
|
|
|
|
NETTLE_CFLAGS="-I${NETTLE_DIR}/include" \
|
|
|
|
NETTLE_LIBS="-L${NETTLE_DIR}/lib -lnettle" \
|
|
|
|
HOGWEED_CFLAGS="-I${NETTLE_DIR}/include" \
|
|
|
|
HOGWEED_LIBS="-L${NETTLE_DIR}/lib -lhogweed" \
|
|
|
|
GMP_CFLAGS="-I${GMP_DIR}/include" \
|
|
|
|
GMP_LIBS="-L${GMP_DIR}/lib -lgmp" \
|
|
|
|
--prefix="$INSTALL_DIR" \
|
|
|
|
--enable-shared=no \
|
|
|
|
--without-idn \
|
|
|
|
--with-included-unistring \
|
|
|
|
--with-included-libtasn1 \
|
|
|
|
--without-p11-kit \
|
2023-06-06 09:07:50 +02:00
|
|
|
--without-brotli \
|
2019-07-17 16:20:40 +02:00
|
|
|
--disable-tests \
|
2020-06-14 12:30:14 +02:00
|
|
|
--disable-guile \
|
2020-11-26 08:20:10 +01:00
|
|
|
--disable-doc \
|
2020-11-26 15:47:36 +01:00
|
|
|
--disable-tools \
|
2019-07-17 16:51:57 +02:00
|
|
|
--disable-nls \
|
2020-06-14 12:30:14 +02:00
|
|
|
&& make ${JOBS} LDFLAGS= install) || die "GnuTLS build failed"
|
2021-09-23 18:10:25 +02:00
|
|
|
|
2018-12-02 21:52:40 +01:00
|
|
|
popd
|
2021-09-23 18:10:25 +02:00
|
|
|
cp -f lib/pkgconfig/* $PC_PATH
|
2020-05-21 17:28:38 +02:00
|
|
|
echo "$LIB_VERSION" > .already-built
|
2018-12-02 21:52:40 +01:00
|
|
|
else
|
|
|
|
already_built
|
|
|
|
fi
|
|
|
|
popd > /dev/null
|
|
|
|
|
2013-11-11 05:41:44 +01:00
|
|
|
# --------------------------------------------------------------
|
|
|
|
echo -e "Building gloox..."
|
|
|
|
|
|
|
|
LIB_VERSION="${GLOOX_VERSION}"
|
|
|
|
LIB_ARCHIVE="$LIB_VERSION.tar.bz2"
|
|
|
|
LIB_DIRECTORY="$LIB_VERSION"
|
|
|
|
LIB_URL="http://camaya.net/download/"
|
|
|
|
|
|
|
|
mkdir -p gloox
|
|
|
|
pushd gloox > /dev/null
|
|
|
|
|
2020-05-21 17:28:38 +02:00
|
|
|
if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]
|
2013-11-11 05:41:44 +01:00
|
|
|
then
|
|
|
|
INSTALL_DIR="$(pwd)"
|
|
|
|
|
2013-12-15 03:14:45 +01:00
|
|
|
rm -f .already-built
|
2013-11-11 05:41:44 +01:00
|
|
|
download_lib $LIB_URL $LIB_ARCHIVE
|
|
|
|
|
2013-12-15 03:14:45 +01:00
|
|
|
rm -rf $LIB_DIRECTORY bin include lib
|
2013-11-11 05:41:44 +01:00
|
|
|
tar -xf $LIB_ARCHIVE
|
|
|
|
pushd $LIB_DIRECTORY
|
|
|
|
|
|
|
|
# TODO: pulls in libresolv dependency from /usr/lib
|
2019-07-17 16:20:40 +02:00
|
|
|
(./configure CFLAGS="$CFLAGS" \
|
|
|
|
CXXFLAGS="$CXXFLAGS" \
|
|
|
|
LDFLAGS="$LDFLAGS" \
|
2022-01-13 15:42:42 +01:00
|
|
|
"$HOST_PLATFORM" \
|
2019-07-17 16:20:40 +02:00
|
|
|
--prefix="$INSTALL_DIR" \
|
|
|
|
GNUTLS_CFLAGS="-I${GNUTLS_DIR}/include" \
|
|
|
|
GNUTLS_LIBS="-L${GNUTLS_DIR}/lib -lgnutls" \
|
|
|
|
--enable-shared=no \
|
|
|
|
--with-zlib="${ZLIB_DIR}" \
|
|
|
|
--without-libidn \
|
|
|
|
--with-gnutls="yes" \
|
|
|
|
--without-openssl \
|
|
|
|
--without-tests \
|
|
|
|
--without-examples \
|
|
|
|
--disable-getaddrinfo \
|
|
|
|
&& make ${JOBS} && make install) || die "gloox build failed"
|
2021-09-23 18:10:25 +02:00
|
|
|
|
2013-11-11 05:41:44 +01:00
|
|
|
popd
|
2021-09-23 18:10:25 +02:00
|
|
|
cp -f lib/pkgconfig/* $PC_PATH
|
2020-05-21 17:28:38 +02:00
|
|
|
echo "$LIB_VERSION" > .already-built
|
2013-11-11 05:41:44 +01:00
|
|
|
else
|
|
|
|
already_built
|
|
|
|
fi
|
|
|
|
popd > /dev/null
|
|
|
|
|
2014-04-20 21:17:32 +02:00
|
|
|
# --------------------------------------------------------------
|
|
|
|
echo -e "Building ICU..."
|
|
|
|
|
|
|
|
LIB_VERSION="${ICU_VERSION}"
|
|
|
|
LIB_ARCHIVE="$LIB_VERSION-src.tgz"
|
|
|
|
LIB_DIRECTORY="icu"
|
2022-05-15 08:45:53 +02:00
|
|
|
LIB_URL="https://github.com/unicode-org/icu/releases/download/release-69-1/"
|
2014-04-20 21:17:32 +02:00
|
|
|
|
2021-09-23 18:10:25 +02:00
|
|
|
mkdir -p icu
|
2014-04-20 21:17:32 +02:00
|
|
|
pushd icu > /dev/null
|
|
|
|
|
2020-05-21 17:28:38 +02:00
|
|
|
if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]
|
2014-04-20 21:17:32 +02:00
|
|
|
then
|
|
|
|
INSTALL_DIR="$(pwd)"
|
|
|
|
|
|
|
|
rm -f .already-built
|
|
|
|
download_lib $LIB_URL $LIB_ARCHIVE
|
|
|
|
|
|
|
|
rm -rf $LIB_DIRECTORY bin include lib sbin share
|
|
|
|
tar -xf $LIB_ARCHIVE
|
|
|
|
pushd $LIB_DIRECTORY
|
|
|
|
|
|
|
|
mkdir -p source/build
|
|
|
|
pushd source/build
|
|
|
|
|
2019-07-17 16:20:40 +02:00
|
|
|
(CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" LDFLAGS="$LDFLAGS" \
|
|
|
|
../runConfigureICU MacOSX \
|
2022-01-13 15:42:42 +01:00
|
|
|
"$HOST_PLATFORM" \
|
2019-07-17 16:20:40 +02:00
|
|
|
--prefix=$INSTALL_DIR \
|
|
|
|
--disable-shared \
|
|
|
|
--enable-static \
|
|
|
|
--disable-samples \
|
|
|
|
--enable-extras \
|
|
|
|
--enable-icuio \
|
|
|
|
--enable-tools \
|
|
|
|
&& make ${JOBS} && make install) || die "ICU build failed"
|
2021-09-23 18:10:25 +02:00
|
|
|
|
2014-04-20 21:17:32 +02:00
|
|
|
popd
|
|
|
|
popd
|
2021-09-23 18:10:25 +02:00
|
|
|
cp -f lib/pkgconfig/* $PC_PATH
|
2020-05-21 17:28:38 +02:00
|
|
|
echo "$LIB_VERSION" > .already-built
|
2014-03-28 21:26:32 +01:00
|
|
|
else
|
|
|
|
already_built
|
|
|
|
fi
|
|
|
|
popd > /dev/null
|
|
|
|
|
2014-06-28 07:48:51 +02:00
|
|
|
# --------------------------------------------------------------
|
|
|
|
echo -e "Building ENet..."
|
|
|
|
|
|
|
|
LIB_VERSION="${ENET_VERSION}"
|
|
|
|
LIB_ARCHIVE="$LIB_VERSION.tar.gz"
|
|
|
|
LIB_DIRECTORY="$LIB_VERSION"
|
|
|
|
LIB_URL="http://enet.bespin.org/download/"
|
|
|
|
|
|
|
|
mkdir -p enet
|
|
|
|
pushd enet > /dev/null
|
|
|
|
|
2020-05-21 17:28:38 +02:00
|
|
|
if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]
|
2014-06-28 07:48:51 +02:00
|
|
|
then
|
|
|
|
INSTALL_DIR="$(pwd)"
|
|
|
|
|
|
|
|
rm -f .already-built
|
|
|
|
download_lib $LIB_URL $LIB_ARCHIVE
|
|
|
|
|
|
|
|
rm -rf $LIB_DIRECTORY bin include lib sbin share
|
|
|
|
tar -xf $LIB_ARCHIVE
|
|
|
|
pushd $LIB_DIRECTORY
|
|
|
|
|
2019-07-17 16:20:40 +02:00
|
|
|
(./configure CFLAGS="$CFLAGS" \
|
|
|
|
LDFLAGS="$LDFLAGS" \
|
|
|
|
--prefix=${INSTALL_DIR} \
|
|
|
|
--enable-shared=no \
|
|
|
|
&& make clean && make ${JOBS} && make install) || die "ENet build failed"
|
2021-09-23 18:10:25 +02:00
|
|
|
|
2014-06-28 07:48:51 +02:00
|
|
|
popd
|
2021-09-23 18:10:25 +02:00
|
|
|
cp -f lib/pkgconfig/* $PC_PATH
|
2020-05-21 17:28:38 +02:00
|
|
|
echo "$LIB_VERSION" > .already-built
|
2014-06-28 07:48:51 +02:00
|
|
|
else
|
|
|
|
already_built
|
|
|
|
fi
|
|
|
|
popd > /dev/null
|
|
|
|
|
2014-10-15 05:47:13 +02:00
|
|
|
# --------------------------------------------------------------
|
|
|
|
echo -e "Building MiniUPnPc..."
|
|
|
|
|
|
|
|
LIB_VERSION="${MINIUPNPC_VERSION}"
|
|
|
|
LIB_ARCHIVE="$LIB_VERSION.tar.gz"
|
|
|
|
LIB_DIRECTORY="$LIB_VERSION"
|
|
|
|
LIB_URL="http://miniupnp.tuxfamily.org/files/download.php?file="
|
|
|
|
|
|
|
|
mkdir -p miniupnpc
|
|
|
|
pushd miniupnpc > /dev/null
|
|
|
|
|
2020-05-21 17:28:38 +02:00
|
|
|
if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]
|
2014-10-15 05:47:13 +02:00
|
|
|
then
|
|
|
|
INSTALL_DIR="$(pwd)"
|
|
|
|
|
|
|
|
rm -f .already-built
|
|
|
|
download_lib $LIB_URL $LIB_ARCHIVE
|
|
|
|
|
|
|
|
rm -rf $LIB_DIRECTORY bin include lib share
|
|
|
|
tar -xf $LIB_ARCHIVE
|
|
|
|
pushd $LIB_DIRECTORY
|
|
|
|
|
2019-07-17 16:20:40 +02:00
|
|
|
(make clean \
|
|
|
|
&& CFLAGS=$CFLAGS LDFLAGS=$LDFLAGS make ${JOBS} \
|
|
|
|
&& INSTALLPREFIX="$INSTALL_DIR" make install \
|
|
|
|
) || die "MiniUPnPc build failed"
|
2021-09-23 18:10:25 +02:00
|
|
|
|
2014-10-15 05:47:13 +02:00
|
|
|
popd
|
|
|
|
# TODO: how can we not build the dylibs?
|
|
|
|
rm -f lib/*.dylib
|
2021-09-23 18:10:25 +02:00
|
|
|
cp -f lib/pkgconfig/* $PC_PATH
|
2020-05-21 17:28:38 +02:00
|
|
|
echo "$LIB_VERSION" > .already-built
|
2014-10-15 05:47:13 +02:00
|
|
|
else
|
|
|
|
already_built
|
|
|
|
fi
|
|
|
|
popd > /dev/null
|
|
|
|
|
2018-04-08 23:41:31 +02:00
|
|
|
# --------------------------------------------------------------
|
|
|
|
echo -e "Building libsodium..."
|
|
|
|
|
|
|
|
LIB_VERSION="${SODIUM_VERSION}"
|
|
|
|
LIB_ARCHIVE="$SODIUM_VERSION.tar.gz"
|
|
|
|
LIB_DIRECTORY="$LIB_VERSION"
|
|
|
|
LIB_URL="https://download.libsodium.org/libsodium/releases/"
|
|
|
|
|
|
|
|
mkdir -p libsodium
|
|
|
|
pushd libsodium > /dev/null
|
|
|
|
|
2020-05-21 17:28:38 +02:00
|
|
|
if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]]
|
2018-04-08 23:41:31 +02:00
|
|
|
then
|
|
|
|
INSTALL_DIR="$(pwd)"
|
|
|
|
|
|
|
|
rm -f .already-built
|
|
|
|
download_lib $LIB_URL $LIB_ARCHIVE
|
|
|
|
|
|
|
|
rm -rf $LIB_DIRECTORY include lib
|
|
|
|
tar -xf $LIB_ARCHIVE
|
|
|
|
pushd $LIB_DIRECTORY
|
|
|
|
|
2019-07-17 16:20:40 +02:00
|
|
|
(./configure CFLAGS="$CFLAGS" \
|
|
|
|
LDFLAGS="$LDFLAGS" \
|
|
|
|
--prefix=${INSTALL_DIR} \
|
|
|
|
--enable-shared=no \
|
|
|
|
&& make clean \
|
|
|
|
&& CFLAGS=$CFLAGS LDFLAGS=$LDFLAGS make ${JOBS} \
|
|
|
|
&& make check \
|
|
|
|
&& INSTALLPREFIX="$INSTALL_DIR" make install \
|
|
|
|
) || die "libsodium build failed"
|
2021-09-23 18:10:25 +02:00
|
|
|
|
2018-04-08 23:41:31 +02:00
|
|
|
popd
|
2021-09-23 18:10:25 +02:00
|
|
|
cp -f lib/pkgconfig/* $PC_PATH
|
2020-05-21 17:28:38 +02:00
|
|
|
echo "$LIB_VERSION" > .already-built
|
2018-04-08 23:41:31 +02:00
|
|
|
else
|
|
|
|
already_built
|
|
|
|
fi
|
|
|
|
popd > /dev/null
|
|
|
|
|
2020-11-26 22:01:32 +01:00
|
|
|
# --------------------------------------------------------------
|
|
|
|
echo -e "Building fmt..."
|
|
|
|
|
|
|
|
LIB_DIRECTORY="fmt-$FMT_VERSION"
|
|
|
|
LIB_ARCHIVE="$FMT_VERSION.tar.gz"
|
|
|
|
LIB_URL="https://github.com/fmtlib/fmt/archive/"
|
|
|
|
|
|
|
|
mkdir -p fmt
|
|
|
|
pushd fmt > /dev/null
|
|
|
|
|
|
|
|
if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$FMT_VERSION" ]]
|
|
|
|
then
|
2021-03-03 00:40:48 +01:00
|
|
|
INSTALL_DIR="$(pwd)"
|
2020-11-26 22:01:32 +01:00
|
|
|
rm -f .already-built
|
|
|
|
|
|
|
|
download_lib $LIB_URL $LIB_ARCHIVE
|
|
|
|
|
|
|
|
rm -rf $LIB_DIRECTORY include lib
|
|
|
|
tar -xf $LIB_ARCHIVE
|
|
|
|
pushd $LIB_DIRECTORY
|
|
|
|
|
|
|
|
# It appears that older versions of Clang require constexpr statements to have a user-set constructor.
|
|
|
|
patch -Np1 -i ../../patches/fmt_constexpr.diff
|
|
|
|
|
|
|
|
mkdir -p build
|
|
|
|
pushd build
|
|
|
|
|
|
|
|
(cmake .. \
|
|
|
|
-DFMT_TEST=False \
|
|
|
|
-DFMT_DOC=False \
|
2021-03-03 00:40:48 +01:00
|
|
|
-DCMAKE_INSTALL_PREFIX="$INSTALL_DIR" \
|
2023-01-19 22:10:18 +01:00
|
|
|
$CMAKE_FLAGS \
|
2021-03-03 00:40:48 +01:00
|
|
|
&& make fmt ${JOBS} && make install) || die "fmt build failed"
|
2020-11-26 22:01:32 +01:00
|
|
|
|
2021-03-03 00:40:48 +01:00
|
|
|
popd
|
2020-11-26 22:01:32 +01:00
|
|
|
popd
|
2021-09-23 18:10:25 +02:00
|
|
|
cp -f lib/pkgconfig/* $PC_PATH
|
2020-11-26 22:01:32 +01:00
|
|
|
echo "$FMT_VERSION" > .already-built
|
|
|
|
else
|
|
|
|
already_built
|
|
|
|
fi
|
|
|
|
popd > /dev/null
|
|
|
|
|
2023-01-26 16:24:12 +01:00
|
|
|
# --------------------------------------------------------------
|
|
|
|
echo -e "Building Molten VK..."
|
|
|
|
LIB_DIRECTORY="MoltenVK-$MOLTENVK_VERSION"
|
|
|
|
LIB_ARCHIVE="MoltenVK-$MOLTENVK_VERSION.tar.gz"
|
|
|
|
LIB_URL="https://releases.wildfiregames.com/libs/"
|
|
|
|
|
|
|
|
mkdir -p "molten-vk"
|
|
|
|
pushd "molten-vk" > /dev/null
|
2023-02-13 13:07:35 +01:00
|
|
|
if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$MOLTENVK_VERSION" ]] || [[ ! -e ../../../binaries/system/libMoltenVK.dylib ]]
|
2023-01-26 16:24:12 +01:00
|
|
|
then
|
|
|
|
INSTALL_DIR="../../../../binaries/system/"
|
|
|
|
rm -f .already-built
|
|
|
|
download_lib $LIB_URL $LIB_ARCHIVE
|
|
|
|
rm -rf "$LIB_DIRECTORY"
|
|
|
|
tar -xf $LIB_ARCHIVE
|
|
|
|
pushd $LIB_DIRECTORY
|
|
|
|
# The CI cannot build MoltenVK so we provide prebuild binaries instead.
|
|
|
|
# Use mv instead of copy to preserve binary signature integrity. See:
|
|
|
|
# https://developer.apple.com/forums/thread/130313?answerId=410541022#410541022
|
|
|
|
mv dylib/libMoltenVK.dylib $INSTALL_DIR
|
|
|
|
popd > /dev/null
|
|
|
|
echo "$MOLTENVK_VERSION" > .already-built
|
|
|
|
else
|
|
|
|
already_built
|
|
|
|
fi
|
|
|
|
popd > /dev/null
|
|
|
|
|
2013-02-04 00:49:29 +01:00
|
|
|
# --------------------------------------------------------------------
|
|
|
|
# The following libraries are shared on different OSes and may
|
2014-06-28 07:48:51 +02:00
|
|
|
# be customized, so we build and install them from bundled sources
|
2013-02-04 00:49:29 +01:00
|
|
|
# --------------------------------------------------------------------
|
2020-05-21 17:28:38 +02:00
|
|
|
# SpiderMonkey - bundled, no download
|
2013-11-11 01:04:07 +01:00
|
|
|
pushd ../source/spidermonkey/ > /dev/null
|
2013-02-04 00:49:29 +01:00
|
|
|
|
2020-11-18 15:34:17 +01:00
|
|
|
if [[ "$force_rebuild" = "true" ]]
|
2013-02-04 00:49:29 +01:00
|
|
|
then
|
2013-12-15 03:14:45 +01:00
|
|
|
rm -f .already-built
|
2020-11-18 15:34:17 +01:00
|
|
|
fi
|
2013-02-04 00:49:29 +01:00
|
|
|
|
2020-11-18 15:34:17 +01:00
|
|
|
# Use the regular build script for SM.
|
2022-05-15 08:45:53 +02:00
|
|
|
JOBS="$JOBS" ZLIB_DIR="$ZLIB_DIR" ARCH="$ARCH" ./build.sh || die "Error building spidermonkey"
|
2013-02-04 00:49:29 +01:00
|
|
|
|
2013-11-11 01:04:07 +01:00
|
|
|
popd > /dev/null
|
2013-02-04 00:49:29 +01:00
|
|
|
|
|
|
|
# --------------------------------------------------------------
|
2020-05-21 17:28:38 +02:00
|
|
|
# NVTT - bundled, no download
|
2013-11-11 01:04:07 +01:00
|
|
|
pushd ../source/nvtt > /dev/null
|
2013-02-04 00:49:29 +01:00
|
|
|
|
2020-12-01 20:29:21 +01:00
|
|
|
if [[ "$force_rebuild" = "true" ]]
|
2013-02-04 00:49:29 +01:00
|
|
|
then
|
2013-12-15 03:14:45 +01:00
|
|
|
rm -f .already-built
|
2020-12-01 20:29:21 +01:00
|
|
|
fi
|
2013-02-04 00:49:29 +01:00
|
|
|
|
2023-01-19 22:10:18 +01:00
|
|
|
CXXFLAGS="$CXXFLAGS" CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" CMAKE_FLAGS=$CMAKE_FLAGS JOBS="$JOBS" ./build.sh || die "Error building NVTT"
|
2013-02-04 00:49:29 +01:00
|
|
|
|
2013-11-11 01:04:07 +01:00
|
|
|
popd > /dev/null
|
2013-02-04 00:49:29 +01:00
|
|
|
|
|
|
|
# --------------------------------------------------------------
|
2020-05-21 17:28:38 +02:00
|
|
|
# FCollada - bundled, no download
|
2020-12-01 20:29:21 +01:00
|
|
|
pushd ../source/fcollada/ > /dev/null
|
2020-05-21 17:28:38 +02:00
|
|
|
|
2020-12-01 20:29:21 +01:00
|
|
|
if [[ "$force_rebuild" = "true" ]]
|
2013-02-04 00:49:29 +01:00
|
|
|
then
|
2013-12-15 03:14:45 +01:00
|
|
|
rm -f .already-built
|
2013-02-04 00:49:29 +01:00
|
|
|
fi
|
2020-12-01 20:29:21 +01:00
|
|
|
|
|
|
|
CXXFLAGS="$CXXFLAGS" CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" JOBS="$JOBS" ./build.sh || die "Error building FCollada"
|
|
|
|
|
2013-11-11 01:04:07 +01:00
|
|
|
popd > /dev/null
|