forked from 0ad/0ad
Upgrade Mac OS libraries
All are updated except: - WxWidgets (not sure about compatibility) - libogg (doesn't compile) - zlib/libsodimum which have no update. This drops supports for 10.11 and earlier, meaning we can now assume SSE4.1 is present. Updates the build system to account for this. Closes #5777 (by virtue of upgrading to SDL 2.12) Refs #4362 Differential Revision: https://code.wildfiregames.com/D3111 This was SVN commit r24257.
This commit is contained in:
parent
646ff183ae
commit
9a1c7cb8d2
@ -208,7 +208,7 @@ extern_lib_defs = {
|
||||
-- are included for compatibility with different versions of Boost
|
||||
android_names = { "boost_filesystem-gcc-mt", "boost_system-gcc-mt" },
|
||||
unix_names = { os.findlib("boost_filesystem-mt") and "boost_filesystem-mt" or "boost_filesystem", os.findlib("boost_system-mt") and "boost_system-mt" or "boost_system" },
|
||||
osx_names = { "boost_filesystem-mt", "boost_system-mt" },
|
||||
osx_names = { "boost_filesystem", "boost_system" },
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
@ -313,10 +313,9 @@ function project_set_build_flags()
|
||||
links { "gcov" }
|
||||
end
|
||||
|
||||
-- MacOS always provides SSE3 so enable that.
|
||||
-- TODO: after <10.12 support is dropped, we can assume SSE4.1 is present.
|
||||
-- MacOS 10.12 only supports processors with SSE 4.1, so enable that.
|
||||
if os.istarget("macosx") then
|
||||
buildoptions { "-msse3" }
|
||||
buildoptions { "-msse4.1" }
|
||||
end
|
||||
|
||||
-- Check if SDK path should be used
|
||||
|
@ -68,7 +68,7 @@ cd "$(dirname $0)"
|
||||
|
||||
if [ "`uname -s`" = "Darwin" ]; then
|
||||
# Set minimal SDK version
|
||||
export MIN_OSX_VERSION=${MIN_OSX_VERSION:="10.9"}
|
||||
export MIN_OSX_VERSION=${MIN_OSX_VERSION:="10.12"}
|
||||
|
||||
# Set *_CONFIG variables on OS X, to override the path to e.g. sdl2-config
|
||||
export GLOOX_CONFIG=${GLOOX_CONFIG:="$(pwd)/../../libraries/osx/gloox/bin/gloox-config"}
|
||||
|
@ -21,30 +21,30 @@
|
||||
# --------------------------------------------------------------
|
||||
# Library versions for ease of updating:
|
||||
ZLIB_VERSION="zlib-1.2.11"
|
||||
CURL_VERSION="curl-7.59.0"
|
||||
ICONV_VERSION="libiconv-1.15"
|
||||
XML2_VERSION="libxml2-2.9.8"
|
||||
SDL2_VERSION="SDL2-2.0.5"
|
||||
CURL_VERSION="curl-7.71.0"
|
||||
ICONV_VERSION="libiconv-1.16"
|
||||
XML2_VERSION="libxml2-2.9.10"
|
||||
SDL2_VERSION="SDL2-2.0.12"
|
||||
# NOTE: remember to also update LIB_URL below when changing version
|
||||
BOOST_VERSION="boost_1_64_0"
|
||||
BOOST_VERSION="boost_1_74_0"
|
||||
# NOTE: remember to also update LIB_URL below when changing version
|
||||
WXWIDGETS_VERSION="wxWidgets-3.0.3.1"
|
||||
# libpng was included as part of X11 but that's removed from Mountain Lion
|
||||
# (also the Snow Leopard version was ancient 1.2)
|
||||
PNG_VERSION="libpng-1.6.34"
|
||||
PNG_VERSION="libpng-1.6.36"
|
||||
OGG_VERSION="libogg-1.3.3"
|
||||
VORBIS_VERSION="libvorbis-1.3.6"
|
||||
VORBIS_VERSION="libvorbis-1.3.7"
|
||||
# gloox requires GnuTLS, GnuTLS requires Nettle and GMP
|
||||
GMP_VERSION="gmp-6.1.2"
|
||||
NETTLE_VERSION="nettle-3.5.1"
|
||||
GMP_VERSION="gmp-6.2.0"
|
||||
NETTLE_VERSION="nettle-3.6"
|
||||
# NOTE: remember to also update LIB_URL below when changing version
|
||||
GNUTLS_VERSION="gnutls-3.6.13"
|
||||
GLOOX_VERSION="gloox-1.0.22"
|
||||
GLOOX_VERSION="gloox-1.0.24"
|
||||
GNUTLS_VERSION="gnutls-3.6.15"
|
||||
# OS X only includes part of ICU, and only the dylib
|
||||
# NOTE: remember to also update LIB_URL below when changing version
|
||||
ICU_VERSION="icu4c-59_2"
|
||||
ENET_VERSION="enet-1.3.13"
|
||||
MINIUPNPC_VERSION="miniupnpc-2.0.20180222"
|
||||
ICU_VERSION="icu4c-67_1"
|
||||
ENET_VERSION="enet-1.3.17"
|
||||
MINIUPNPC_VERSION="miniupnpc-2.1"
|
||||
SODIUM_VERSION="libsodium-1.0.18"
|
||||
# --------------------------------------------------------------
|
||||
# Bundled with the game:
|
||||
@ -61,12 +61,8 @@ FCOLLADA_VERSION="fcollada-3.05+wildfiregames.2"
|
||||
# * OpenGL
|
||||
# --------------------------------------------------------------
|
||||
|
||||
# Define compiler as "clang", this is all Mavericks supports.
|
||||
# gcc symlinks may still exist, but they are simply clang with
|
||||
# slightly different config, which confuses build scripts.
|
||||
# llvm-gcc and gcc 4.2 are no longer supported by SpiderMonkey.
|
||||
export CC=${CC:="clang"} CXX=${CXX:="clang++"}
|
||||
export MIN_OSX_VERSION=${MIN_OSX_VERSION:="10.9"}
|
||||
export MIN_OSX_VERSION=${MIN_OSX_VERSION:="10.12"}
|
||||
|
||||
# The various libs offer inconsistent configure options, some allow
|
||||
# setting sysroot and OS X-specific options, others don't. Adding to
|
||||
@ -89,7 +85,7 @@ if [[ $MIN_OSX_VERSION && ${MIN_OSX_VERSION-_} ]]; then
|
||||
fi
|
||||
|
||||
CFLAGS="$CFLAGS $C_FLAGS -fvisibility=hidden"
|
||||
CXXFLAGS="$CXXFLAGS $C_FLAGS -stdlib=libc++ -std=c++14 -msse3"
|
||||
CXXFLAGS="$CXXFLAGS $C_FLAGS -stdlib=libc++ -std=c++14 -msse4.1"
|
||||
OBJCFLAGS="$OBJCFLAGS $C_FLAGS"
|
||||
OBJCXXFLAGS="$OBJCXXFLAGS $C_FLAGS"
|
||||
|
||||
@ -355,7 +351,7 @@ echo -e "Building Boost..."
|
||||
LIB_VERSION="${BOOST_VERSION}"
|
||||
LIB_ARCHIVE="$LIB_VERSION.tar.bz2"
|
||||
LIB_DIRECTORY="$LIB_VERSION"
|
||||
LIB_URL="https://dl.bintray.com/boostorg/release/1.64.0/source/"
|
||||
LIB_URL="https://dl.bintray.com/boostorg/release/1.74.0/source/"
|
||||
|
||||
mkdir -p boost
|
||||
pushd boost > /dev/null
|
||||
@ -379,11 +375,11 @@ then
|
||||
cxxflags="$CXXFLAGS" \
|
||||
linkflags="$LDFLAGS" ${JOBS} \
|
||||
-d2 \
|
||||
--layout=tagged \
|
||||
--layout=system \
|
||||
--debug-configuration \
|
||||
link=static \
|
||||
threading=multi \
|
||||
variant=release,debug install \
|
||||
variant=release install \
|
||||
) || die "Boost build failed"
|
||||
|
||||
popd
|
||||
@ -668,10 +664,9 @@ then
|
||||
tar -xf $LIB_ARCHIVE
|
||||
pushd $LIB_DIRECTORY
|
||||
|
||||
# GnuTLS 3.6.8 added the TCP Fast Open feature, which requires connectx
|
||||
# but that's only available on OS X 10.11+ (GnuTLS doesn't support SDK based builds yet)
|
||||
# So we disable that functionality
|
||||
(patch -Np0 -i ../../patches/gnutls-disable-tcpfastopen.diff \
|
||||
# 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 \
|
||||
&& ./configure CFLAGS="$CFLAGS" \
|
||||
CXXFLAGS="$CXXFLAGS" \
|
||||
LDFLAGS="$LDFLAGS" \
|
||||
@ -690,6 +685,7 @@ then
|
||||
--without-p11-kit \
|
||||
--disable-tests \
|
||||
--disable-guile \
|
||||
--disable-doc \
|
||||
--disable-nls \
|
||||
&& make ${JOBS} LDFLAGS= install) || die "GnuTLS build failed"
|
||||
popd
|
||||
@ -750,7 +746,7 @@ echo -e "Building ICU..."
|
||||
LIB_VERSION="${ICU_VERSION}"
|
||||
LIB_ARCHIVE="$LIB_VERSION-src.tgz"
|
||||
LIB_DIRECTORY="icu"
|
||||
LIB_URL="https://github.com/unicode-org/icu/releases/download/release-59-2/"
|
||||
LIB_URL="https://github.com/unicode-org/icu/releases/download/release-67-1/"
|
||||
|
||||
mkdir -p $LIB_DIRECTORY
|
||||
pushd icu > /dev/null
|
||||
|
8
source/tools/dist/build-osx-bundle.sh
vendored
8
source/tools/dist/build-osx-bundle.sh
vendored
@ -8,16 +8,12 @@
|
||||
# the chosen target and compatible systems.
|
||||
#
|
||||
|
||||
# Force build architecture, as sometimes environment is broken.
|
||||
# For a universal fat binary, the approach would be to build every
|
||||
# library with both archs and combine them with lipo, then do the
|
||||
# same thing with the game itself.
|
||||
# Choices are "x86_64" or "i386" (ppc and ppc64 not supported)
|
||||
# TODO: is there anything to do for ARM support?
|
||||
export ARCH=${ARCH:="x86_64"}
|
||||
|
||||
# Set mimimum required OS X version, SDK location and tools
|
||||
# Old SDKs can be found at https://github.com/phracker/MacOSX-SDKs
|
||||
export MIN_OSX_VERSION=${MIN_OSX_VERSION:="10.9"}
|
||||
export MIN_OSX_VERSION=${MIN_OSX_VERSION:="10.12"}
|
||||
export SYSROOT=${SYSROOT:="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX${MIN_OSX_VERSION}.sdk"}
|
||||
export CC=${CC:="clang"} CXX=${CXX:="clang++"}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user