Changeset View
Changeset View
Standalone View
Standalone View
libraries/osx/build-osx-libs.sh
Show First 20 Lines • Show All 127 Lines • ▼ Show 20 Lines | case $i in | ||||
--force-rebuild ) force_rebuild=true;; | --force-rebuild ) force_rebuild=true;; | ||||
-j* ) JOBS=$i ;; | -j* ) JOBS=$i ;; | ||||
esac | esac | ||||
done | done | ||||
cd "$(dirname $0)" | cd "$(dirname $0)" | ||||
# Now in libraries/osx/ (where we assume this script resides) | # Now in libraries/osx/ (where we assume this script resides) | ||||
# Create a location to create soft-links to *.pc files, so they can be found by pkg-config | |||||
PC_PATH="$(pwd)/pkgconfig/" | |||||
if [[ "$force_rebuild" = "true" ]]; then | |||||
wraitii: commented out | |||||
rm -rf $PC_PATH | |||||
fi | |||||
mkdir -p $PC_PATH | |||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
echo -e "Building zlib..." | echo -e "Building zlib..." | ||||
LIB_VERSION="${ZLIB_VERSION}" | LIB_VERSION="${ZLIB_VERSION}" | ||||
LIB_ARCHIVE="$LIB_VERSION.tar.gz" | LIB_ARCHIVE="$LIB_VERSION.tar.gz" | ||||
LIB_DIRECTORY=$LIB_VERSION | LIB_DIRECTORY=$LIB_VERSION | ||||
LIB_URL="http://zlib.net/" | LIB_URL="http://zlib.net/" | ||||
▲ Show 20 Lines • Show All 69 Lines • ▼ Show 20 Lines | (./configure CFLAGS="$CFLAGS" \ | ||||
--without-spnego \ | --without-spnego \ | ||||
--disable-ares \ | --disable-ares \ | ||||
--disable-ldap \ | --disable-ldap \ | ||||
--disable-ldaps \ | --disable-ldaps \ | ||||
--without-libidn2 \ | --without-libidn2 \ | ||||
--with-zlib="${ZLIB_DIR}" \ | --with-zlib="${ZLIB_DIR}" \ | ||||
--enable-shared=no \ | --enable-shared=no \ | ||||
&& make ${JOBS} && make install) || die "libcurl build failed" | && make ${JOBS} && make install) || die "libcurl build failed" | ||||
popd | popd | ||||
echo "$LIB_VERSION" > .already-built | echo "$LIB_VERSION" > .already-built | ||||
else | else | ||||
already_built | already_built | ||||
fi | fi | ||||
ln -sf $(pwd)/lib/pkgconfig/* $PC_PATH | |||||
popd > /dev/null | popd > /dev/null | ||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
echo -e "Building libiconv..." | echo -e "Building libiconv..." | ||||
LIB_VERSION="${ICONV_VERSION}" | LIB_VERSION="${ICONV_VERSION}" | ||||
LIB_ARCHIVE="$LIB_VERSION.tar.gz" | LIB_ARCHIVE="$LIB_VERSION.tar.gz" | ||||
LIB_DIRECTORY="$LIB_VERSION" | LIB_DIRECTORY="$LIB_VERSION" | ||||
▲ Show 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | (./configure CFLAGS="$CFLAGS" \ | ||||
LDFLAGS="$LDFLAGS" \ | LDFLAGS="$LDFLAGS" \ | ||||
--prefix="$INSTALL_DIR" \ | --prefix="$INSTALL_DIR" \ | ||||
--without-lzma \ | --without-lzma \ | ||||
--without-python \ | --without-python \ | ||||
--with-iconv="${ICONV_DIR}" \ | --with-iconv="${ICONV_DIR}" \ | ||||
--with-zlib="${ZLIB_DIR}" \ | --with-zlib="${ZLIB_DIR}" \ | ||||
--enable-shared=no \ | --enable-shared=no \ | ||||
&& make ${JOBS} && make install) || die "libxml2 build failed" | && make ${JOBS} && make install) || die "libxml2 build failed" | ||||
popd | popd | ||||
echo "$LIB_VERSION" > .already-built | echo "$LIB_VERSION" > .already-built | ||||
else | else | ||||
already_built | already_built | ||||
fi | fi | ||||
ln -sf $(pwd)/lib/pkgconfig/* $PC_PATH | |||||
popd > /dev/null | popd > /dev/null | ||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
echo -e "Building SDL2..." | echo -e "Building SDL2..." | ||||
LIB_VERSION="${SDL2_VERSION}" | LIB_VERSION="${SDL2_VERSION}" | ||||
LIB_ARCHIVE="$LIB_VERSION.tar.gz" | LIB_ARCHIVE="$LIB_VERSION.tar.gz" | ||||
Show All 21 Lines | (./configure CPPFLAGS="-I${ICONV_DIR}/include" \ | ||||
CXXFLAGS="$CXXFLAGS" \ | CXXFLAGS="$CXXFLAGS" \ | ||||
LDFLAGS="$LDFLAGS -L${ICONV_DIR}/lib" \ | LDFLAGS="$LDFLAGS -L${ICONV_DIR}/lib" \ | ||||
--prefix="$INSTALL_DIR" \ | --prefix="$INSTALL_DIR" \ | ||||
--disable-video-x11 \ | --disable-video-x11 \ | ||||
--without-x \ | --without-x \ | ||||
--enable-video-cocoa \ | --enable-video-cocoa \ | ||||
--enable-shared=no \ | --enable-shared=no \ | ||||
&& make $JOBS && make install) || die "SDL2 build failed" | && make $JOBS && make install) || die "SDL2 build failed" | ||||
popd | popd | ||||
echo "$LIB_VERSION" > .already-built | echo "$LIB_VERSION" > .already-built | ||||
else | else | ||||
already_built | already_built | ||||
fi | fi | ||||
ln -sf $(pwd)/lib/pkgconfig/* $PC_PATH | |||||
popd > /dev/null | popd > /dev/null | ||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
echo -e "Building Boost..." | echo -e "Building Boost..." | ||||
LIB_VERSION="${BOOST_VERSION}" | LIB_VERSION="${BOOST_VERSION}" | ||||
LIB_ARCHIVE="$LIB_VERSION.tar.bz2" | LIB_ARCHIVE="$LIB_VERSION.tar.bz2" | ||||
LIB_DIRECTORY="$LIB_VERSION" | LIB_DIRECTORY="$LIB_VERSION" | ||||
▲ Show 20 Lines • Show All 119 Lines • ▼ Show 20 Lines | then | ||||
pushd $LIB_DIRECTORY | pushd $LIB_DIRECTORY | ||||
# libpng has no flags for zlib but the 10.12 version is too old, so link our own. | # 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 "\ | (./configure CFLAGS="$CFLAGS" CPPFLAGS=" -I $ZLIB_DIR/include "\ | ||||
LDFLAGS="$LDFLAGS -L$ZLIB_DIR/lib" \ | LDFLAGS="$LDFLAGS -L$ZLIB_DIR/lib" \ | ||||
--prefix=$INSTALL_DIR \ | --prefix=$INSTALL_DIR \ | ||||
--enable-shared=no \ | --enable-shared=no \ | ||||
&& make ${JOBS} && make install) || die "libpng build failed" | && make ${JOBS} && make install) || die "libpng build failed" | ||||
popd | popd | ||||
echo "$LIB_VERSION" > .already-built | echo "$LIB_VERSION" > .already-built | ||||
else | else | ||||
already_built | already_built | ||||
fi | fi | ||||
ln -sf $(pwd)/lib/pkgconfig/* $PC_PATH | |||||
popd > /dev/null | popd > /dev/null | ||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
# Dependency of vorbis | |||||
echo -e "Building libogg..." | echo -e "Building libogg..." | ||||
LIB_VERSION="${OGG_VERSION}" | LIB_VERSION="${OGG_VERSION}" | ||||
LIB_ARCHIVE="$LIB_VERSION.tar.gz" | LIB_ARCHIVE="$LIB_VERSION.tar.gz" | ||||
LIB_DIRECTORY="$LIB_VERSION" | LIB_DIRECTORY="$LIB_VERSION" | ||||
LIB_URL="http://downloads.xiph.org/releases/ogg/" | LIB_URL="http://downloads.xiph.org/releases/ogg/" | ||||
# Dependency of vorbis | |||||
# we can install them in the same directory for convenience | |||||
mkdir -p libogg | mkdir -p libogg | ||||
mkdir -p vorbis | |||||
pushd libogg > /dev/null | pushd libogg > /dev/null | ||||
OGG_DIR="$(pwd)" | OGG_DIR="$(pwd)" | ||||
if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]] | if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]] | ||||
then | then | ||||
rm -f .already-built | rm -f .already-built | ||||
download_lib $LIB_URL $LIB_ARCHIVE | download_lib $LIB_URL $LIB_ARCHIVE | ||||
rm -rf $LIB_DIRECTORY include lib share | rm -rf $LIB_DIRECTORY include lib share | ||||
tar -xf $LIB_ARCHIVE | tar -xf $LIB_ARCHIVE | ||||
pushd $LIB_DIRECTORY | pushd $LIB_DIRECTORY | ||||
(./configure CFLAGS="$CFLAGS" \ | (./configure CFLAGS="$CFLAGS" \ | ||||
LDFLAGS="$LDFLAGS" \ | LDFLAGS="$LDFLAGS" \ | ||||
--prefix=$OGG_DIR \ | --prefix=$OGG_DIR \ | ||||
--enable-shared=no \ | --enable-shared=no \ | ||||
&& make ${JOBS} && make install) || die "libogg build failed" | && make ${JOBS} && make install) || die "libogg build failed" | ||||
popd | popd | ||||
echo "$LIB_VERSION" > .already-built | echo "$LIB_VERSION" > .already-built | ||||
else | else | ||||
already_built | already_built | ||||
fi | fi | ||||
ln -sf $(pwd)/lib/pkgconfig/* $PC_PATH | |||||
popd > /dev/null | popd > /dev/null | ||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
echo -e "Building libvorbis..." | echo -e "Building libvorbis..." | ||||
LIB_VERSION="${VORBIS_VERSION}" | LIB_VERSION="${VORBIS_VERSION}" | ||||
LIB_ARCHIVE="$LIB_VERSION.tar.gz" | LIB_ARCHIVE="$LIB_VERSION.tar.gz" | ||||
LIB_DIRECTORY="$LIB_VERSION" | LIB_DIRECTORY="$LIB_VERSION" | ||||
LIB_URL="http://downloads.xiph.org/releases/vorbis/" | LIB_URL="http://downloads.xiph.org/releases/vorbis/" | ||||
mkdir -p vorbis | |||||
pushd vorbis > /dev/null | pushd vorbis > /dev/null | ||||
if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]] | if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]] | ||||
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 include lib share | rm -rf $LIB_DIRECTORY include lib share | ||||
tar -xf $LIB_ARCHIVE | tar -xf $LIB_ARCHIVE | ||||
pushd $LIB_DIRECTORY | pushd $LIB_DIRECTORY | ||||
(./configure CFLAGS="$CFLAGS" \ | (./configure CFLAGS="$CFLAGS" \ | ||||
LDFLAGS="$LDFLAGS" \ | LDFLAGS="$LDFLAGS" \ | ||||
--prefix="$INSTALL_DIR" \ | --prefix="$INSTALL_DIR" \ | ||||
--enable-shared=no \ | --enable-shared=no \ | ||||
--with-ogg="$OGG_DIR" \ | --with-ogg="$OGG_DIR" \ | ||||
&& make ${JOBS} && make install) || die "libvorbis build failed" | && make ${JOBS} && make install) || die "libvorbis build failed" | ||||
popd | popd | ||||
echo "$LIB_VERSION" > .already-built | echo "$LIB_VERSION" > .already-built | ||||
else | else | ||||
already_built | already_built | ||||
fi | fi | ||||
ln -sf $(pwd)/lib/pkgconfig/* $PC_PATH | |||||
popd > /dev/null | popd > /dev/null | ||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
echo -e "Building GMP..." | echo -e "Building GMP..." | ||||
LIB_VERSION="${GMP_VERSION}" | LIB_VERSION="${GMP_VERSION}" | ||||
LIB_ARCHIVE="$LIB_VERSION.tar.bz2" | LIB_ARCHIVE="$LIB_VERSION.tar.bz2" | ||||
LIB_DIRECTORY="$LIB_VERSION" | LIB_DIRECTORY="$LIB_VERSION" | ||||
Show All 20 Lines | then | ||||
(./configure CFLAGS="$CFLAGS" \ | (./configure CFLAGS="$CFLAGS" \ | ||||
CXXFLAGS="$CXXFLAGS" \ | CXXFLAGS="$CXXFLAGS" \ | ||||
LDFLAGS="$LDFLAGS" \ | LDFLAGS="$LDFLAGS" \ | ||||
--prefix="$INSTALL_DIR" \ | --prefix="$INSTALL_DIR" \ | ||||
--enable-fat \ | --enable-fat \ | ||||
--disable-shared \ | --disable-shared \ | ||||
--with-pic \ | --with-pic \ | ||||
&& make ${JOBS} && make install) || die "GMP build failed" | && make ${JOBS} && make install) || die "GMP build failed" | ||||
popd | popd | ||||
echo "$LIB_VERSION" > .already-built | echo "$LIB_VERSION" > .already-built | ||||
else | else | ||||
already_built | already_built | ||||
fi | fi | ||||
ln -sf $(pwd)/lib/pkgconfig/* $PC_PATH | |||||
popd > /dev/null | popd > /dev/null | ||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
echo -e "Building Nettle..." | echo -e "Building Nettle..." | ||||
# Also builds hogweed | |||||
LIB_VERSION="${NETTLE_VERSION}" | LIB_VERSION="${NETTLE_VERSION}" | ||||
LIB_ARCHIVE="$LIB_VERSION.tar.gz" | LIB_ARCHIVE="$LIB_VERSION.tar.gz" | ||||
LIB_DIRECTORY="$LIB_VERSION" | LIB_DIRECTORY="$LIB_VERSION" | ||||
LIB_URL="https://ftp.gnu.org/gnu/nettle/" | LIB_URL="https://ftp.gnu.org/gnu/nettle/" | ||||
mkdir -p nettle | mkdir -p nettle | ||||
pushd nettle > /dev/null | pushd nettle > /dev/null | ||||
Show All 20 Lines | (./configure CFLAGS="$CFLAGS" \ | ||||
--with-lib-path="${GMP_DIR}/lib" \ | --with-lib-path="${GMP_DIR}/lib" \ | ||||
--prefix="$INSTALL_DIR" \ | --prefix="$INSTALL_DIR" \ | ||||
--enable-fat \ | --enable-fat \ | ||||
--disable-shared \ | --disable-shared \ | ||||
--disable-documentation \ | --disable-documentation \ | ||||
--disable-openssl \ | --disable-openssl \ | ||||
--disable-assembler \ | --disable-assembler \ | ||||
&& make ${JOBS} && make install) || die "Nettle build failed" | && make ${JOBS} && make install) || die "Nettle build failed" | ||||
popd | popd | ||||
echo "$LIB_VERSION" > .already-built | echo "$LIB_VERSION" > .already-built | ||||
else | else | ||||
already_built | already_built | ||||
fi | fi | ||||
ln -sf $(pwd)/lib/pkgconfig/* $PC_PATH | |||||
popd > /dev/null | popd > /dev/null | ||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
echo -e "Building GnuTLS..." | echo -e "Building GnuTLS..." | ||||
LIB_VERSION="${GNUTLS_VERSION}" | LIB_VERSION="${GNUTLS_VERSION}" | ||||
LIB_ARCHIVE="$LIB_VERSION.tar.xz" | LIB_ARCHIVE="$LIB_VERSION.tar.xz" | ||||
LIB_DIRECTORY="$LIB_VERSION" | LIB_DIRECTORY="$LIB_VERSION" | ||||
Show All 35 Lines | && ./configure CFLAGS="$CFLAGS" \ | ||||
--with-included-libtasn1 \ | --with-included-libtasn1 \ | ||||
--without-p11-kit \ | --without-p11-kit \ | ||||
--disable-tests \ | --disable-tests \ | ||||
--disable-guile \ | --disable-guile \ | ||||
--disable-doc \ | --disable-doc \ | ||||
--disable-tools \ | --disable-tools \ | ||||
--disable-nls \ | --disable-nls \ | ||||
&& make ${JOBS} LDFLAGS= install) || die "GnuTLS build failed" | && make ${JOBS} LDFLAGS= install) || die "GnuTLS build failed" | ||||
popd | popd | ||||
echo "$LIB_VERSION" > .already-built | echo "$LIB_VERSION" > .already-built | ||||
else | else | ||||
already_built | already_built | ||||
fi | fi | ||||
ln -sf $(pwd)/lib/pkgconfig/* $PC_PATH | |||||
popd > /dev/null | 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" | ||||
Show All 24 Lines | (./configure CFLAGS="$CFLAGS" \ | ||||
--with-zlib="${ZLIB_DIR}" \ | --with-zlib="${ZLIB_DIR}" \ | ||||
--without-libidn \ | --without-libidn \ | ||||
--with-gnutls="yes" \ | --with-gnutls="yes" \ | ||||
--without-openssl \ | --without-openssl \ | ||||
--without-tests \ | --without-tests \ | ||||
--without-examples \ | --without-examples \ | ||||
--disable-getaddrinfo \ | --disable-getaddrinfo \ | ||||
&& make ${JOBS} && make install) || die "gloox build failed" | && make ${JOBS} && make install) || die "gloox build failed" | ||||
popd | popd | ||||
echo "$LIB_VERSION" > .already-built | echo "$LIB_VERSION" > .already-built | ||||
else | else | ||||
already_built | already_built | ||||
fi | fi | ||||
ln -sf $(pwd)/lib/pkgconfig/* $PC_PATH | |||||
popd > /dev/null | popd > /dev/null | ||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
echo -e "Building ICU..." | echo -e "Building ICU..." | ||||
LIB_VERSION="${ICU_VERSION}" | LIB_VERSION="${ICU_VERSION}" | ||||
LIB_ARCHIVE="$LIB_VERSION-src.tgz" | LIB_ARCHIVE="$LIB_VERSION-src.tgz" | ||||
LIB_DIRECTORY="icu" | LIB_DIRECTORY="icu" | ||||
LIB_URL="https://github.com/unicode-org/icu/releases/download/release-67-1/" | LIB_URL="https://github.com/unicode-org/icu/releases/download/release-67-1/" | ||||
mkdir -p $LIB_DIRECTORY | mkdir -p icu | ||||
Not Done Inline ActionsDon't need that change anymore do you? Stan: Don't need that change anymore do you? | |||||
Not Done Inline ActionsIt's consistent with the other dependency definitions; and means that if the compressed file decompresses to a different folder in future (necessitating LIB_DIRECTORY to be changed), we don't have to worry about leaving orphaned files. s0600204: It's consistent with the other dependency definitions; and means that if the compressed file… | |||||
pushd icu > /dev/null | pushd icu > /dev/null | ||||
if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]] | if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$LIB_VERSION" ]] | ||||
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 | ||||
Show All 10 Lines | ../runConfigureICU MacOSX \ | ||||
--prefix=$INSTALL_DIR \ | --prefix=$INSTALL_DIR \ | ||||
--disable-shared \ | --disable-shared \ | ||||
--enable-static \ | --enable-static \ | ||||
--disable-samples \ | --disable-samples \ | ||||
--enable-extras \ | --enable-extras \ | ||||
--enable-icuio \ | --enable-icuio \ | ||||
--enable-tools \ | --enable-tools \ | ||||
&& make ${JOBS} && make install) || die "ICU build failed" | && make ${JOBS} && make install) || die "ICU build failed" | ||||
popd | popd | ||||
popd | popd | ||||
echo "$LIB_VERSION" > .already-built | echo "$LIB_VERSION" > .already-built | ||||
else | else | ||||
already_built | already_built | ||||
fi | fi | ||||
ln -sf $(pwd)/lib/pkgconfig/* $PC_PATH | |||||
popd > /dev/null | popd > /dev/null | ||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
echo -e "Building ENet..." | echo -e "Building ENet..." | ||||
LIB_VERSION="${ENET_VERSION}" | LIB_VERSION="${ENET_VERSION}" | ||||
LIB_ARCHIVE="$LIB_VERSION.tar.gz" | LIB_ARCHIVE="$LIB_VERSION.tar.gz" | ||||
LIB_DIRECTORY="$LIB_VERSION" | LIB_DIRECTORY="$LIB_VERSION" | ||||
Show All 13 Lines | then | ||||
tar -xf $LIB_ARCHIVE | tar -xf $LIB_ARCHIVE | ||||
pushd $LIB_DIRECTORY | pushd $LIB_DIRECTORY | ||||
(./configure CFLAGS="$CFLAGS" \ | (./configure CFLAGS="$CFLAGS" \ | ||||
LDFLAGS="$LDFLAGS" \ | LDFLAGS="$LDFLAGS" \ | ||||
--prefix=${INSTALL_DIR} \ | --prefix=${INSTALL_DIR} \ | ||||
--enable-shared=no \ | --enable-shared=no \ | ||||
&& make clean && make ${JOBS} && make install) || die "ENet build failed" | && make clean && make ${JOBS} && make install) || die "ENet build failed" | ||||
popd | popd | ||||
echo "$LIB_VERSION" > .already-built | echo "$LIB_VERSION" > .already-built | ||||
else | else | ||||
already_built | already_built | ||||
fi | fi | ||||
ln -sf $(pwd)/lib/pkgconfig/* $PC_PATH | |||||
popd > /dev/null | popd > /dev/null | ||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
echo -e "Building MiniUPnPc..." | echo -e "Building MiniUPnPc..." | ||||
LIB_VERSION="${MINIUPNPC_VERSION}" | LIB_VERSION="${MINIUPNPC_VERSION}" | ||||
LIB_ARCHIVE="$LIB_VERSION.tar.gz" | LIB_ARCHIVE="$LIB_VERSION.tar.gz" | ||||
LIB_DIRECTORY="$LIB_VERSION" | LIB_DIRECTORY="$LIB_VERSION" | ||||
Show All 12 Lines | then | ||||
rm -rf $LIB_DIRECTORY bin include lib share | rm -rf $LIB_DIRECTORY bin include lib share | ||||
tar -xf $LIB_ARCHIVE | tar -xf $LIB_ARCHIVE | ||||
pushd $LIB_DIRECTORY | pushd $LIB_DIRECTORY | ||||
(make clean \ | (make clean \ | ||||
&& CFLAGS=$CFLAGS LDFLAGS=$LDFLAGS make ${JOBS} \ | && CFLAGS=$CFLAGS LDFLAGS=$LDFLAGS make ${JOBS} \ | ||||
&& INSTALLPREFIX="$INSTALL_DIR" make install \ | && INSTALLPREFIX="$INSTALL_DIR" make install \ | ||||
) || die "MiniUPnPc build failed" | ) || die "MiniUPnPc build failed" | ||||
popd | popd | ||||
# TODO: how can we not build the dylibs? | # TODO: how can we not build the dylibs? | ||||
rm -f lib/*.dylib | rm -f lib/*.dylib | ||||
echo "$LIB_VERSION" > .already-built | echo "$LIB_VERSION" > .already-built | ||||
else | else | ||||
already_built | already_built | ||||
fi | fi | ||||
ln -sf $(pwd)/lib/pkgconfig/* $PC_PATH | |||||
popd > /dev/null | popd > /dev/null | ||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
echo -e "Building libsodium..." | echo -e "Building libsodium..." | ||||
LIB_VERSION="${SODIUM_VERSION}" | LIB_VERSION="${SODIUM_VERSION}" | ||||
LIB_ARCHIVE="$SODIUM_VERSION.tar.gz" | LIB_ARCHIVE="$SODIUM_VERSION.tar.gz" | ||||
LIB_DIRECTORY="$LIB_VERSION" | LIB_DIRECTORY="$LIB_VERSION" | ||||
Show All 17 Lines | (./configure CFLAGS="$CFLAGS" \ | ||||
LDFLAGS="$LDFLAGS" \ | LDFLAGS="$LDFLAGS" \ | ||||
--prefix=${INSTALL_DIR} \ | --prefix=${INSTALL_DIR} \ | ||||
--enable-shared=no \ | --enable-shared=no \ | ||||
&& make clean \ | && make clean \ | ||||
&& CFLAGS=$CFLAGS LDFLAGS=$LDFLAGS make ${JOBS} \ | && CFLAGS=$CFLAGS LDFLAGS=$LDFLAGS make ${JOBS} \ | ||||
&& make check \ | && make check \ | ||||
&& INSTALLPREFIX="$INSTALL_DIR" make install \ | && INSTALLPREFIX="$INSTALL_DIR" make install \ | ||||
) || 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 | ||||
ln -sf $(pwd)/lib/pkgconfig/* $PC_PATH | |||||
popd > /dev/null | popd > /dev/null | ||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
echo -e "Building fmt..." | echo -e "Building fmt..." | ||||
LIB_DIRECTORY="fmt-$FMT_VERSION" | LIB_DIRECTORY="fmt-$FMT_VERSION" | ||||
LIB_ARCHIVE="$FMT_VERSION.tar.gz" | LIB_ARCHIVE="$FMT_VERSION.tar.gz" | ||||
LIB_URL="https://github.com/fmtlib/fmt/archive/" | LIB_URL="https://github.com/fmtlib/fmt/archive/" | ||||
mkdir -p fmt | mkdir -p fmt | ||||
pushd fmt > /dev/null | pushd fmt > /dev/null | ||||
if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$FMT_VERSION" ]] | if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ "$(<.already-built)" != "$FMT_VERSION" ]] | ||||
then | then | ||||
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 include lib | rm -rf $LIB_DIRECTORY include lib | ||||
tar -xf $LIB_ARCHIVE | tar -xf $LIB_ARCHIVE | ||||
pushd $LIB_DIRECTORY | pushd $LIB_DIRECTORY | ||||
# It appears that older versions of Clang require constexpr statements to have a user-set constructor. | # It appears that older versions of Clang require constexpr statements to have a user-set constructor. | ||||
patch -Np1 -i ../../patches/fmt_constexpr.diff | patch -Np1 -i ../../patches/fmt_constexpr.diff | ||||
mkdir -p build | mkdir -p build | ||||
pushd build | pushd build | ||||
(cmake .. \ | (cmake .. \ | ||||
-DFMT_TEST=False \ | -DFMT_TEST=False \ | ||||
-DFMT_DOC=False \ | -DFMT_DOC=False \ | ||||
&& make fmt ${JOBS}) || die "fmt build failed" | -DCMAKE_INSTALL_PREFIX="$INSTALL_DIR" \ | ||||
popd | && make fmt ${JOBS} && make install) || die "fmt build failed" | ||||
mkdir -p ../lib | |||||
cp build/libfmt.a ../lib/ | |||||
cp -r include ../include | |||||
popd | popd | ||||
popd | |||||
echo "$FMT_VERSION" > .already-built | echo "$FMT_VERSION" > .already-built | ||||
else | else | ||||
already_built | already_built | ||||
fi | fi | ||||
ln -sf $(pwd)/lib/pkgconfig/* $PC_PATH | |||||
popd > /dev/null | 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 | ||||
Show All 27 Lines | |||||
if [[ "$force_rebuild" = "true" ]] | if [[ "$force_rebuild" = "true" ]] | ||||
then | then | ||||
rm -f .already-built | rm -f .already-built | ||||
fi | fi | ||||
CXXFLAGS="$CXXFLAGS" CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" JOBS="$JOBS" ./build.sh || die "Error building FCollada" | CXXFLAGS="$CXXFLAGS" CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" JOBS="$JOBS" ./build.sh || die "Error building FCollada" | ||||
popd > /dev/null | popd > /dev/null | ||||
Not Done Inline Actionsassuming this id debug wraitii: assuming this id debug |
Wildfire Games · Phabricator
commented out