-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #738 from mapbox/proj7
Add libproj-7.2.1 + sqlite-3.34.0
- Loading branch information
Showing
4 changed files
with
171 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
language: generic | ||
|
||
matrix: | ||
include: | ||
- os: osx | ||
osx_image: xcode9.4 | ||
compiler: clang | ||
- os: linux | ||
sudo: false | ||
addons: | ||
apt: | ||
sources: | ||
- ubuntu-toolchain-r-test | ||
packages: | ||
- libstdc++-4.9-dev | ||
- xutils-dev | ||
|
||
script: | ||
- ./mason build ${MASON_NAME} ${MASON_VERSION} | ||
- ./mason publish ${MASON_NAME} ${MASON_VERSION} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
#!/usr/bin/env bash | ||
|
||
MASON_NAME=proj | ||
MASON_VERSION=7.2.1 | ||
MASON_LIB_FILE=lib/libproj.a | ||
PROJ_DATA_VERSION="1.4" | ||
SQLITE_VERSION=3.34.0 | ||
LIBTIFF_VERSION=4.0.7 | ||
JPEG_TURBO_VERSION=1.5.1 | ||
|
||
. ${MASON_DIR}/mason.sh | ||
|
||
function mason_load_source { | ||
mason_download \ | ||
https://download.osgeo.org/proj/proj-${MASON_VERSION}.tar.gz \ | ||
92b57d23bf86fc985bf33f5bf82b3ada0820cab0 | ||
|
||
mason_extract_tar_gz | ||
|
||
export MASON_BUILD_PATH=${MASON_ROOT}/.build/${MASON_NAME}-${MASON_VERSION} | ||
} | ||
|
||
function mason_prepare_compile { | ||
${MASON_DIR}/mason install sqlite ${SQLITE_VERSION} | ||
${MASON_DIR}/mason link sqlite ${SQLITE_VERSION} | ||
MASON_SQLITE=$(${MASON_DIR}/mason prefix sqlite ${SQLITE_VERSION}) | ||
${MASON_DIR}/mason install libtiff ${LIBTIFF_VERSION} | ||
MASON_LIBTIFF=$(${MASON_DIR}/mason prefix libtiff ${LIBTIFF_VERSION}) | ||
${MASON_DIR}/mason install jpeg_turbo ${JPEG_TURBO_VERSION} | ||
} | ||
|
||
function mason_compile { | ||
#curl --retry 3 -f -# -L https://download.osgeo.org/proj/proj-data-${PROJ_DATA_VERSION}.tar.gz -o proj-data-${PROJ_DATA_VERSION}.tar.gz | ||
export PATH="${MASON_ROOT}/.link/bin:${PATH}" | ||
export PKG_CONFIG_PATH="${MASON_SQLITE}/lib/pkgconfig:${MASON_LIBTIFF}/lib/pkgconfig" | ||
export CXXFLAGS="${CXXFLAGS} -O3 -DNDEBUG" | ||
./configure --prefix=${MASON_PREFIX} \ | ||
${MASON_HOST_ARG} \ | ||
--enable-static \ | ||
--disable-shared \ | ||
--disable-dependency-tracking \ | ||
--without-curl | ||
echo `sqlite3 --version` | ||
make -j${MASON_CONCURRENCY} | ||
make install | ||
#cd ${MASON_PREFIX}/share/proj | ||
#tar xvfz proj-data-${PROJ_DATA_VERSION}.tar.gz | ||
} | ||
|
||
function mason_cflags { | ||
echo -I${MASON_PREFIX}/include | ||
} | ||
|
||
function mason_ldflags { | ||
echo "-lproj" | ||
} | ||
|
||
function mason_clean { | ||
make clean | ||
} | ||
|
||
mason_run "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
language: generic | ||
|
||
matrix: | ||
include: | ||
- os: osx | ||
osx_image: xcode9.4 | ||
- os: linux | ||
sudo: false | ||
env: MASON_PLATFORM_VERSION=cortex_a9 | ||
- os: linux | ||
sudo: false | ||
env: MASON_PLATFORM_VERSION=i686 | ||
- os: linux | ||
sudo: false | ||
- os: linux | ||
sudo: false | ||
env: MASON_PLATFORM=android MASON_ANDROID_ABI=arm-v5 | ||
- os: linux | ||
sudo: false | ||
env: MASON_PLATFORM=android MASON_ANDROID_ABI=arm-v7 | ||
- os: linux | ||
sudo: false | ||
env: MASON_PLATFORM=android MASON_ANDROID_ABI=arm-v8 | ||
- os: linux | ||
sudo: false | ||
env: MASON_PLATFORM=android MASON_ANDROID_ABI=x86 | ||
- os: linux | ||
sudo: false | ||
env: MASON_PLATFORM=android MASON_ANDROID_ABI=x86-64 | ||
- os: linux | ||
sudo: false | ||
env: MASON_PLATFORM=android MASON_ANDROID_ABI=mips | ||
- os: linux | ||
sudo: false | ||
env: MASON_PLATFORM=android MASON_ANDROID_ABI=mips-64 | ||
|
||
script: | ||
- ./mason build ${MASON_NAME} ${MASON_VERSION} | ||
- ./mason publish ${MASON_NAME} ${MASON_VERSION} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#!/usr/bin/env bash | ||
|
||
MASON_NAME=sqlite | ||
MASON_VERSION=3.34.0 | ||
MASON_LIB_FILE=lib/libsqlite3.a | ||
MASON_PKGCONFIG_FILE=lib/pkgconfig/sqlite3.pc | ||
|
||
SQLITE_FILE_VERSION=3340000 | ||
|
||
. ${MASON_DIR}/mason.sh | ||
|
||
function mason_load_source { | ||
mason_download \ | ||
https://www.sqlite.org/2020/sqlite-autoconf-${SQLITE_FILE_VERSION}.tar.gz \ | ||
4ddcb8924ca93836dc5d590929e715083027212a | ||
mason_extract_tar_gz | ||
|
||
export MASON_BUILD_PATH=${MASON_ROOT}/.build/sqlite-autoconf-${SQLITE_FILE_VERSION} | ||
} | ||
|
||
function mason_compile { | ||
# Note: setting CFLAGS overrides the default in sqlite of `-g -O2` | ||
# hence we add back the preferred optimization | ||
CFLAGS="-O3 ${CFLAGS} -DNDEBUG" ./configure \ | ||
--prefix=${MASON_PREFIX} \ | ||
${MASON_HOST_ARG} \ | ||
--enable-static \ | ||
--with-pic \ | ||
--disable-shared \ | ||
--disable-readline \ | ||
--disable-dependency-tracking | ||
|
||
make install -j${MASON_CONCURRENCY} | ||
} | ||
|
||
function mason_strip_ldflags { | ||
shift # -L... | ||
shift # -lsqlite3 | ||
echo "$@" | ||
} | ||
|
||
function mason_ldflags { | ||
mason_strip_ldflags $(`mason_pkgconfig` --static --libs) | ||
} | ||
|
||
function mason_clean { | ||
make clean | ||
} | ||
|
||
mason_run "$@" |