1
0
forked from 0ad/0ad

Updates OS X libs build script to use miniupnpc 1.9.20151008

This was SVN commit r17120.
This commit is contained in:
historic_bruno 2015-10-10 23:53:54 +00:00
parent 1ac5ccff0b
commit fd5f9c547b
2 changed files with 2 additions and 30 deletions

View File

@ -42,7 +42,7 @@ NSPR_VERSION="4.10.3"
# OS X only includes part of ICU, and only the dylib
ICU_VERSION="icu4c-52_1"
ENET_VERSION="enet-1.3.12"
MINIUPNPC_VERSION="miniupnpc-1.9"
MINIUPNPC_VERSION="miniupnpc-1.9.20151008"
# --------------------------------------------------------------
# Bundled with the game:
# * SpiderMonkey 31
@ -645,8 +645,7 @@ then
tar -xf $LIB_ARCHIVE
pushd $LIB_DIRECTORY
# patch miniupnpc to fix symbol visibility (fixed upstream, see https://github.com/miniupnp/miniupnp/issues/63 )
(patch -p0 -i../../patches/miniupnpc-clang-fix.patch && make clean && CFLAGS=$CFLAGS LDFLAGS=$LDFLAGS make ${JOBS} && INSTALLPREFIX="$INSTALL_DIR" make install) || die "MiniUPnPc build failed"
(make clean && CFLAGS=$CFLAGS LDFLAGS=$LDFLAGS make ${JOBS} && INSTALLPREFIX="$INSTALL_DIR" make install) || die "MiniUPnPc build failed"
popd
# TODO: how can we not build the dylibs?
rm -f lib/*.dylib

View File

@ -1,27 +0,0 @@
Index: declspec.h
===================================================================
--- declspec.h
+++ declspec.h
@@ -5,11 +5,15 @@
#ifdef MINIUPNP_EXPORTS
#define LIBSPEC __declspec(dllexport)
#else
- #define LIBSPEC __declspec(dllimport)
- #endif
-#else
- #define LIBSPEC
-#endif
+ #define LIBSPEC __declspec(dllimport)
+ #endif
+#else
+ #if defined(__GNUC__) && __GNUC__ >= 4
+ #define LIBSPEC __attribute__ ((visibility ("default")))
+ #else
+ #define LIBSPEC
+ #endif
+#endif
+
+#endif
-#endif
-