Changeset View
Changeset View
Standalone View
Standalone View
libraries/osx/build-osx-libs.sh
Show All 40 Lines | |||||
GNUTLS_VERSION="gnutls-3.6.13" | GNUTLS_VERSION="gnutls-3.6.13" | ||||
GLOOX_VERSION="gloox-1.0.22" | GLOOX_VERSION="gloox-1.0.22" | ||||
# OS X only includes part of ICU, and only the dylib | # OS X only includes part of ICU, and only the dylib | ||||
# NOTE: remember to also update LIB_URL below when changing version | # NOTE: remember to also update LIB_URL below when changing version | ||||
ICU_VERSION="icu4c-59_2" | ICU_VERSION="icu4c-59_2" | ||||
ENET_VERSION="enet-1.3.13" | ENET_VERSION="enet-1.3.13" | ||||
MINIUPNPC_VERSION="miniupnpc-2.0.20180222" | MINIUPNPC_VERSION="miniupnpc-2.0.20180222" | ||||
SODIUM_VERSION="libsodium-1.0.18" | SODIUM_VERSION="libsodium-1.0.18" | ||||
FMT_VERSION="7.1.2" | |||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
# Bundled with the game: | # Bundled with the game: | ||||
# * SpiderMonkey | # * SpiderMonkey | ||||
# * NVTT | # * NVTT | ||||
# * FCollada | # * FCollada | ||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
# We use suffixes here in order to force rebuilding when patching these libs | # We use suffixes here in order to force rebuilding when patching these libs | ||||
NVTT_VERSION="nvtt-2.1.1+wildfiregames.2" | NVTT_VERSION="nvtt-2.1.1+wildfiregames.2" | ||||
▲ Show 20 Lines • Show All 832 Lines • ▼ Show 20 Lines | then | ||||
) || die "libsodium build failed" | ) || die "libsodium build failed" | ||||
popd | popd | ||||
echo "$LIB_VERSION" > .already-built | echo "$LIB_VERSION" > .already-built | ||||
else | else | ||||
already_built | already_built | ||||
fi | fi | ||||
popd > /dev/null | popd > /dev/null | ||||
# -------------------------------------------------------------- | |||||
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 | |||||
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 \ | |||||
&& make fmt ${JOBS}) || die "fmt build failed" | |||||
popd | |||||
mkdir -p ../lib | |||||
cp build/libfmt.a ../lib/ | |||||
cp -r include ../include | |||||
popd | |||||
echo "$FMT_VERSION" > .already-built | |||||
else | |||||
already_built | |||||
fi | |||||
popd > /dev/null | |||||
# -------------------------------------------------------------------- | # -------------------------------------------------------------------- | ||||
# The following libraries are shared on different OSes and may | # The following libraries are shared on different OSes and may | ||||
# be customized, so we build and install them from bundled sources | # be customized, so we build and install them from bundled sources | ||||
# -------------------------------------------------------------------- | # -------------------------------------------------------------------- | ||||
# SpiderMonkey - bundled, no download | # SpiderMonkey - bundled, no download | ||||
pushd ../source/spidermonkey/ > /dev/null | pushd ../source/spidermonkey/ > /dev/null | ||||
if [[ "$force_rebuild" = "true" ]] | if [[ "$force_rebuild" = "true" ]] | ||||
▲ Show 20 Lines • Show All 81 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator