Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/libraries/osx/build-osx-libs.sh
Show All 27 Lines | |||||
BOOST_VERSION="boost_1_64_0" | BOOST_VERSION="boost_1_64_0" | ||||
# NOTE: remember to also update LIB_URL below when changing version | # NOTE: remember to also update LIB_URL below when changing version | ||||
WXWIDGETS_VERSION="wxWidgets-3.0.3.1" | WXWIDGETS_VERSION="wxWidgets-3.0.3.1" | ||||
# libpng was included as part of X11 but that's removed from Mountain Lion | # libpng was included as part of X11 but that's removed from Mountain Lion | ||||
# (also the Snow Leopard version was ancient 1.2) | # (also the Snow Leopard version was ancient 1.2) | ||||
PNG_VERSION="libpng-1.6.34" | PNG_VERSION="libpng-1.6.34" | ||||
OGG_VERSION="libogg-1.3.3" | OGG_VERSION="libogg-1.3.3" | ||||
VORBIS_VERSION="libvorbis-1.3.6" | VORBIS_VERSION="libvorbis-1.3.6" | ||||
# gloox is necessary for multiplayer lobby | # gloox requires GnuTLS, GnuTLS requires Nettle and GMP | ||||
GMP_VERSION="gmp-6.1.2" | |||||
NETTLE_VERSION="nettle-3.4" | |||||
GNUTLS_VERSION="gnutls-3.5.19" | |||||
GLOOX_VERSION="gloox-1.0.20" | GLOOX_VERSION="gloox-1.0.20" | ||||
# NSPR is necessary for threadsafe Spidermonkey | # NSPR is necessary for threadsafe Spidermonkey | ||||
NSPR_VERSION="4.15" | NSPR_VERSION="4.15" | ||||
# 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_1" | ICU_VERSION="icu4c-59_1" | ||||
ENET_VERSION="enet-1.3.13" | ENET_VERSION="enet-1.3.13" | ||||
MINIUPNPC_VERSION="miniupnpc-2.0.20180222" | MINIUPNPC_VERSION="miniupnpc-2.0.20180222" | ||||
▲ Show 20 Lines • Show All 413 Lines • ▼ Show 20 Lines | then | ||||
popd | popd | ||||
touch .already-built | touch .already-built | ||||
else | else | ||||
already_built | already_built | ||||
fi | fi | ||||
popd > /dev/null | popd > /dev/null | ||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
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)" | |||||
if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ .already-built -ot $LIB_DIRECTORY ]] | |||||
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 | |||||
(./configure CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" LDFLAGS="$LDFLAGS" --prefix="$INSTALL_DIR" --disable-shared && make ${JOBS} && make install) || die "GMP build failed" | |||||
popd | |||||
touch .already-built | |||||
else | |||||
already_built | |||||
fi | |||||
popd > /dev/null | |||||
# -------------------------------------------------------------- | |||||
echo -e "Building Nettle..." | |||||
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)" | |||||
if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ .already-built -ot $LIB_DIRECTORY ]] | |||||
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 | |||||
(./configure CFLAGS="$CFLAGS -m64" CXXFLAGS="$CXXFLAGS -m64" LDFLAGS="$LDFLAGS -m64" --with-include-path="${GMP_DIR}/include" --with-lib-path="${GMP_DIR}/lib" --prefix="$INSTALL_DIR" --disable-shared --disable-documentation --disable-openssl --disable-assembler && make ${JOBS} && make install) || die "Nettle build failed" | |||||
popd | |||||
touch .already-built | |||||
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" | |||||
LIB_URL="https://www.gnupg.org/ftp/gcrypt/gnutls/v3.5/" | |||||
mkdir -p gnutls | |||||
pushd gnutls > /dev/null | |||||
GNUTLS_DIR="$(pwd)" | |||||
if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ .already-built -ot $LIB_DIRECTORY ]] | |||||
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 | |||||
(./configure CFLAGS="$CFLAGS -m64" CXXFLAGS="$CXXFLAGS -m64" LDFLAGS="$LDFLAGS -m64" 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 --disable-tests && make ${JOBS} && make install) || die "GnuTLS build failed" | |||||
popd | |||||
touch .already-built | |||||
else | |||||
already_built | |||||
fi | |||||
popd > /dev/null | |||||
# -------------------------------------------------------------- | |||||
echo -e "Building gloox..." | echo -e "Building gloox..." | ||||
LIB_VERSION="${GLOOX_VERSION}" | LIB_VERSION="${GLOOX_VERSION}" | ||||
LIB_ARCHIVE="$LIB_VERSION.tar.bz2" | LIB_ARCHIVE="$LIB_VERSION.tar.bz2" | ||||
LIB_DIRECTORY="$LIB_VERSION" | LIB_DIRECTORY="$LIB_VERSION" | ||||
LIB_URL="http://camaya.net/download/" | LIB_URL="http://camaya.net/download/" | ||||
mkdir -p gloox | mkdir -p gloox | ||||
pushd gloox > /dev/null | pushd gloox > /dev/null | ||||
if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ .already-built -ot $LIB_DIRECTORY ]] | if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ .already-built -ot $LIB_DIRECTORY ]] | ||||
then | then | ||||
INSTALL_DIR="$(pwd)" | INSTALL_DIR="$(pwd)" | ||||
rm -f .already-built | rm -f .already-built | ||||
download_lib $LIB_URL $LIB_ARCHIVE | download_lib $LIB_URL $LIB_ARCHIVE | ||||
rm -rf $LIB_DIRECTORY bin include lib | rm -rf $LIB_DIRECTORY bin include lib | ||||
tar -xf $LIB_ARCHIVE | tar -xf $LIB_ARCHIVE | ||||
pushd $LIB_DIRECTORY | pushd $LIB_DIRECTORY | ||||
# TODO: pulls in libresolv dependency from /usr/lib | # TODO: pulls in libresolv dependency from /usr/lib | ||||
# TODO: if we ever use SSL/TLS, that will add yet another dependency... | (./configure CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" LDFLAGS="$LDFLAGS" --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 && make ${JOBS} && make install) || die "gloox build failed" | ||||
(./configure CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" LDFLAGS="$LDFLAGS" --prefix="$INSTALL_DIR" --enable-shared=no --with-zlib="${ZLIB_DIR}" --without-libidn --without-gnutls --without-openssl --without-tests --without-examples && make ${JOBS} && make install) || die "gloox build failed" | |||||
popd | popd | ||||
touch .already-built | touch .already-built | ||||
else | else | ||||
already_built | already_built | ||||
fi | fi | ||||
popd > /dev/null | popd > /dev/null | ||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
▲ Show 20 Lines • Show All 286 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator