summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorLucas Wojciechowski <lucas@mapbox.com>2015-09-16 16:27:53 -0700
committerLucas Wojciechowski <lucas@mapbox.com>2015-09-16 16:27:53 -0700
commit311bf93abe9f815668e8e0a779c87c3eb5c1199d (patch)
tree7ee70bba8d27f085881f083cd5d41b3bb6259485 /scripts
parent8d322c65728ffe0d4f69fcd3b73b007a53eb505a (diff)
downloadqtlocation-mapboxgl-311bf93abe9f815668e8e0a779c87c3eb5c1199d.tar.gz
Revert "[node] Enable npm to build mapbox-gl-native package from source"
This reverts commit 4e1ead344bfb1f9ddb207924465fabae3d218d67.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/android/configure.sh2
-rwxr-xr-xscripts/build-version.py45
-rw-r--r--scripts/ios/configure.sh2
-rwxr-xr-xscripts/ios/package.sh6
-rw-r--r--scripts/linux/configure.sh2
-rw-r--r--scripts/main.mk10
-rw-r--r--scripts/osx/configure.sh2
-rwxr-xr-xscripts/osx/run.sh3
8 files changed, 23 insertions, 49 deletions
diff --git a/scripts/android/configure.sh b/scripts/android/configure.sh
index a849d48d18..70c8973a8b 100644
--- a/scripts/android/configure.sh
+++ b/scripts/android/configure.sh
@@ -8,7 +8,5 @@ LIBUV_VERSION=1.4.0
ZLIB_VERSION=system
NUNICODE_VERSION=1.5.1
LIBZIP_VERSION=0.11.2
-GEOJSONVT_VERSION=1.1.0
-VARIANT_VERSION=1.0
export MASON_ANDROID_ABI=${MASON_PLATFORM_VERSION}
diff --git a/scripts/build-version.py b/scripts/build-version.py
index 1d58998c9b..0110e6a2e1 100755
--- a/scripts/build-version.py
+++ b/scripts/build-version.py
@@ -1,22 +1,22 @@
#!/usr/bin/env python
-import sys, os, errno, re, subprocess
+import sys, os, errno, re
-DEFAULT_TAG = [0, 0, 0]
-DEFAULT_REV = 'unknown'
-def is_git_repo():
- try:
- subprocess.check_output("git rev-parse", shell=True)
- return True
- except subprocess.CalledProcessError as exc:
- return False
+output_dir = sys.argv[1]
-def parse_tag(raw_tag):
- return map(int, re.sub("[^0-9.]", "", raw_tag).split('.'))
+if len(sys.argv) <= 3:
+ tag = [0, 0, 0]
+ rev = sys.argv[2][0:8]
+else:
+ # When they're identical, the git describe can't find a tag and reports the rev instead.
+ if sys.argv[2] == sys.argv[3]:
+ tag = [0, 0, 0]
+ else:
+ ver = re.sub("[^0-9.]", "", sys.argv[2])
+ tag = map(int, ver.split('.'))
+ rev = sys.argv[3][0:8]
-def parse_rev(raw_rev):
- return raw_rev[0:8]
def mkdir_p(path):
try:
@@ -27,24 +27,6 @@ def mkdir_p(path):
else: raise
-output_dir = sys.argv[1]
-
-if is_git_repo():
- raw_tag = subprocess.check_output("git describe --tags --always --abbrev=0", shell=True)
- raw_rev = subprocess.check_output("git rev-parse HEAD", shell=True)
-
- # When they're identical, the "git describe" can't find a tag and reports the rev instead.
- if raw_tag == raw_rev:
- tag = DEFAULT_TAG
- rev = parse_rev(raw_rev)
- else:
- tag = parse_tag(raw_tag)
- rev = parse_rev(raw_rev)
-else:
- tag = DEFAULT_TAG
- rev = DEFAULT_REV
-
-
header = """// NOTE: DO NOT CHANGE THIS FILE. IT IS AUTOMATICALLY GENERATED.
#ifndef MBGL_UTIL_VERSION
#define MBGL_UTIL_VERSION
@@ -78,3 +60,4 @@ extern const unsigned int number;
header_path = os.path.join(output_dir, 'include/mbgl/util/version.hpp')
mkdir_p(os.path.dirname(header_path))
with open(header_path, 'w') as f: f.write(header)
+
diff --git a/scripts/ios/configure.sh b/scripts/ios/configure.sh
index 954ba34b1b..0562e0e39a 100644
--- a/scripts/ios/configure.sh
+++ b/scripts/ios/configure.sh
@@ -4,5 +4,3 @@ BOOST_VERSION=1.57.0
SQLITE_VERSION=system
LIBUV_VERSION=0.10.28
ZLIB_VERSION=system
-GEOJSONVT_VERSION=1.1.0
-VARIANT_VERSION=1.0
diff --git a/scripts/ios/package.sh b/scripts/ios/package.sh
index 3d21bacb5a..2b1e97c304 100755
--- a/scripts/ios/package.sh
+++ b/scripts/ios/package.sh
@@ -74,14 +74,12 @@ if [[ "${BUILD_FOR_DEVICE}" == true ]]; then
-o ${OUTPUT}/static/lib${NAME}.a \
${LIBS[@]/#/build/${BUILDTYPE}-iphoneos/libmbgl-} \
${LIBS[@]/#/build/${BUILDTYPE}-iphonesimulator/libmbgl-} \
- `find mason_packages/ios-${IOS_SDK_VERSION} -type f -name libuv.a` \
- `find mason_packages/ios-${IOS_SDK_VERSION} -type f -name libgeojsonvt.a`
+ `find mason_packages/ios-${IOS_SDK_VERSION} -type f -name libuv.a`
else
libtool -static -no_warning_for_no_symbols \
-o ${OUTPUT}/static/lib${NAME}.a \
${LIBS[@]/#/build/${BUILDTYPE}-iphonesimulator/libmbgl-} \
- `find mason_packages/ios-${IOS_SDK_VERSION} -type f -name libuv.a` \
- `find mason_packages/ios-${IOS_SDK_VERSION} -type f -name libgeojsonvt.a`
+ `find mason_packages/ios-${IOS_SDK_VERSION} -type f -name libuv.a`
fi
echo "Created ${OUTPUT}/static/lib${NAME}.a"
diff --git a/scripts/linux/configure.sh b/scripts/linux/configure.sh
index c4c307eb78..1099a65504 100644
--- a/scripts/linux/configure.sh
+++ b/scripts/linux/configure.sh
@@ -11,8 +11,6 @@ LIBUV_VERSION=0.10.28
ZLIB_VERSION=system
NUNICODE_VERSION=1.5.1
LIBZIP_VERSION=0.11.2
-GEOJSONVT_VERSION=1.1.0
-VARIANT_VERSION=1.0
function print_opengl_flags {
CONFIG+=" 'opengl_cflags%': $(quote_flags $(pkg-config gl x11 --cflags)),"$LN
diff --git a/scripts/main.mk b/scripts/main.mk
index dae3782a68..3639a780a7 100644
--- a/scripts/main.mk
+++ b/scripts/main.mk
@@ -16,10 +16,6 @@ HOST_VERSION ?= $(BUILD_VERSION)
export MASON_PLATFORM=$(HOST)
export MASON_PLATFORM_VERSION=$(HOST_VERSION)
-ifneq (,$(wildcard scripts/$(HOST)/$(HOST_VERSION)/configure.sh))
- CONFIGURE_FILES += scripts/$(HOST)/$(HOST_VERSION)/configure.sh
-endif
-
HOST_SLUG = $(HOST)-$(HOST_VERSION)
CONFIGURE_FILES = scripts/$(HOST)/configure.sh
ifneq (,$(wildcard scripts/$(HOST)/$(HOST_VERSION)/configure.sh))
@@ -38,7 +34,6 @@ default: ;
#### Dependencies ##############################################################
-ifneq (,$(wildcard .git/.))
SUBMODULES += .mason/mason.sh
.mason/mason.sh:
./scripts/flock.py .git/Submodule.lock git submodule update --init .mason
@@ -47,6 +42,10 @@ SUBMODULES += styles/styles
styles/styles:
./scripts/flock.py .git/Submodule.lock git submodule update --init styles
+SUBMODULES += src/mbgl/util/geojsonvt/geojsonvt.hpp
+src/mbgl/util/geojsonvt/geojsonvt.hpp:
+ ./scripts/flock.py .git/Submodule.lock git submodule update --init src/mbgl/util/geojsonvt
+
ifeq ($(HOST),ios)
SUBMODULES += platform/ios/vendor/SMCalloutView/SMCalloutView.h
platform/ios/vendor/SMCalloutView/SMCalloutView.h:
@@ -56,7 +55,6 @@ SUBMODULES += test/ios/KIF/KIF.xcodeproj
test/ios/KIF/KIF.xcodeproj:
./scripts/flock.py .git/Submodule.lock git submodule update --init test/ios/KIF
endif
-endif
# Wildcard targets get removed after build by default, but we want to preserve the config.
.PRECIOUS: config/%.gypi
diff --git a/scripts/osx/configure.sh b/scripts/osx/configure.sh
index 4280bdf0a1..fc3c5f464f 100644
--- a/scripts/osx/configure.sh
+++ b/scripts/osx/configure.sh
@@ -11,5 +11,3 @@ LIBUV_VERSION=0.10.28
ZLIB_VERSION=system
NUNICODE_VERSION=1.5.1
LIBZIP_VERSION=0.11.2
-GEOJSONVT_VERSION=1.1.0
-VARIANT_VERSION=1.0
diff --git a/scripts/osx/run.sh b/scripts/osx/run.sh
index 70d54c5ce9..86a7291522 100755
--- a/scripts/osx/run.sh
+++ b/scripts/osx/run.sh
@@ -14,6 +14,9 @@ BUILDTYPE=${BUILDTYPE:-Release}
mapbox_time "checkout_styles" \
git submodule update --init styles
+mapbox_time "checkout_geojsonvt" \
+git submodule update --init src/mbgl/util/geojsonvt
+
mapbox_time "compile_program" \
make xosx -j${JOBS} BUILDTYPE=${BUILDTYPE}