summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2014-10-21 11:41:30 +0200
committerKonstantin Käfer <mail@kkaefer.com>2014-10-21 11:41:30 +0200
commit9103d84acebdc8bc3065d09f786881cd3f1ead15 (patch)
tree3680d237f54ec0cb1cfcb6c243273617c04d6b67
parent1da471abba1a64b691b8c90ac13bae81daa1c698 (diff)
downloadqtlocation-mapboxgl-9103d84acebdc8bc3065d09f786881cd3f1ead15.tar.gz
ios build system fixes
[skip ci]
-rw-r--r--Makefile7
-rwxr-xr-xconfigure75
-rw-r--r--src/util/uv-messenger.c5
3 files changed, 63 insertions, 24 deletions
diff --git a/Makefile b/Makefile
index a29e30cab6..a9c24ffdb3 100644
--- a/Makefile
+++ b/Makefile
@@ -6,14 +6,11 @@ all: setup
setup: config.gypi
-config.gypi:
- ./setup-libraries.sh
-
xlibs:
@./mapnik-packaging/osx/darwin_configure.sh osx
ilibs:
- @./mapnik-packaging/osx/darwin_configure.sh ios
+ MASON_PLATFORM=ios ./configure
# Builds the regular library
mbgl: config.gypi mapboxgl.gyp node
@@ -84,7 +81,7 @@ xproj: xproj-cli
open ./build/macosx/mapboxgl-app.xcodeproj
# build iOS project for Xcode
-iproj-cli: config.gypi ilibs ios/mapbox-gl-cocoa/app/mapboxgl-app.gyp clear_xcode_cache node
+iproj-cli: ilibs config.gypi ios/mapbox-gl-cocoa/app/mapboxgl-app.gyp clear_xcode_cache node
deps/run_gyp ios/mapbox-gl-cocoa/app/mapboxgl-app.gyp --depth=. --generator-output=./build -f xcode
iproj: iproj-cli
diff --git a/configure b/configure
index d8a5e08ed8..d02972d0a4 100755
--- a/configure
+++ b/configure
@@ -12,11 +12,21 @@ LIBPNG_VERSION=1.6.13
SQLITE_VERSION=system
LIBUV_VERSION=0.10.28
-mason install libcurl ${LIBCURL_VERSION}
-mason install glfw ${GLFW_VERSION}
-mason install libpng ${LIBPNG_VERSION}
-mason install sqlite ${SQLITE_VERSION}
-mason install libuv ${LIBUV_VERSION}
+case $MASON_PLATFORM in
+ 'ios')
+ SQLITE_VERSION=system
+ LIBPNG_VERSION=1.6.13
+ LIBUV_VERSION=0.10.28
+ ;;
+ *)
+ GLFW_VERSION=a21f2377
+ SQLITE_VERSION=system
+ LIBPNG_VERSION=system
+ LIBCURL_VERSION=system
+ LIBUV_VERSION=0.10.28
+ ;;
+esac
+
BOOST_ROOT=/usr
if [ -d '/usr/local/boost' ]; then BOOST_ROOT='/usr/local' ; fi
@@ -25,7 +35,9 @@ function quote_flags {
python -c "import sys, re; print re.split('(?<!-framework)\s+', ' '.join(sys.argv[1:]))" "$@"
}
-echo "# Do not edit. Generated by the configure script.
+LN=$'\n'
+
+CONFIG="# Do not edit. Generated by the configure script.
{
'target_defaults': {
'cflags': [],
@@ -38,18 +50,43 @@ echo "# Do not edit. Generated by the configure script.
'node': '$(which node)',
'npm': '$(which npm)',
'python': '$(which python)',
- 'boost_root': '/usr/local',
- 'curl_cflags': $(quote_flags $(mason cflags libcurl ${LIBCURL_VERSION})),
- 'curl_libraries': $(quote_flags $(mason ldflags libcurl ${LIBCURL_VERSION})),
- 'glfw3_cflags': $(quote_flags $(mason cflags glfw ${GLFW_VERSION})),
- 'glfw3_libraries': $(quote_flags $(mason ldflags glfw ${GLFW_VERSION})),
- 'png_cflags': $(quote_flags $(mason cflags libpng ${LIBPNG_VERSION})),
- 'png_libraries': $(quote_flags $(mason ldflags libpng ${LIBPNG_VERSION})),
- 'sqlite3_cflags': $(quote_flags $(mason cflags sqlite ${SQLITE_VERSION})),
- 'sqlite3_libraries': $(quote_flags $(mason ldflags sqlite ${SQLITE_VERSION})),
- 'uv_cflags': $(quote_flags $(mason cflags libuv ${LIBUV_VERSION})),
- 'uv_libraries': $(quote_flags $(mason ldflags libuv ${LIBUV_VERSION})),
- }
-}" > config.gypi
+ 'boost_root': '${BOOST_ROOT}',
+"
+
+if [ ! -z ${LIBCURL_VERSION} ]; then
+ mason install libcurl ${LIBCURL_VERSION}
+ CONFIG+=$" 'curl_cflags': $(quote_flags $(mason cflags libcurl ${LIBCURL_VERSION})),"$LN
+ CONFIG+=$" 'curl_libraries': $(quote_flags $(mason ldflags libcurl ${LIBCURL_VERSION})),"$LN
+fi
+
+if [ ! -z ${GLFW_VERSION} ]; then
+ mason install glfw ${GLFW_VERSION}
+ CONFIG+=$" 'glfw3_cflags': $(quote_flags $(mason cflags glfw ${GLFW_VERSION})),"$LN
+ CONFIG+=$" 'glfw3_libraries': $(quote_flags $(mason ldflags glfw ${GLFW_VERSION})),"$LN
+fi
+
+if [ ! -z ${LIBPNG_VERSION} ]; then
+ mason install libpng ${LIBPNG_VERSION}
+ CONFIG+=$" 'png_cflags': $(quote_flags $(mason cflags libpng ${LIBPNG_VERSION})),"$LN
+ CONFIG+=$" 'png_libraries': $(quote_flags $(mason ldflags libpng ${LIBPNG_VERSION})),"$LN
+fi
+
+if [ ! -z ${SQLITE_VERSION} ]; then
+ mason install sqlite ${SQLITE_VERSION}
+ CONFIG+=$" 'sqlite3_cflags': $(quote_flags $(mason cflags sqlite ${SQLITE_VERSION})),"$LN
+ CONFIG+=$" 'sqlite3_libraries': $(quote_flags $(mason ldflags sqlite ${SQLITE_VERSION})),"$LN
+fi
+
+if [ ! -z ${LIBUV_VERSION} ]; then
+ mason install libuv ${LIBUV_VERSION}
+ CONFIG+=$" 'uv_cflags': $(quote_flags $(mason cflags libuv ${LIBUV_VERSION})),"$LN
+ CONFIG+=$" 'uv_libraries': $(quote_flags $(mason ldflags libuv ${LIBUV_VERSION})),"$LN
+fi
+
+CONFIG+=" }
+}
+"
+
+echo "${CONFIG}" > config.gypi
cat config.gypi
diff --git a/src/util/uv-messenger.c b/src/util/uv-messenger.c
index a25c84dc59..9457cc378b 100644
--- a/src/util/uv-messenger.c
+++ b/src/util/uv-messenger.c
@@ -8,7 +8,12 @@ typedef struct {
void *queue[2];
} uv__messenger_item_t;
+
+#if UV_VERSION_MAJOR == 0 && UV_VERSION_MINOR <= 10
+void uv__messenger_callback(uv_async_t *async, int) {
+#else
void uv__messenger_callback(uv_async_t *async) {
+#endif
uv_messenger_t *msgr = (uv_messenger_t *)async->data;
uv__messenger_item_t *item;