Last change
on this file since 25836 was 25836, checked in by Mathieu Morlighem, 4 years ago |
merged trunk-jpl and trunk for revision 25834
|
-
Property svn:executable
set to
*
|
File size:
1.2 KB
|
Line | |
---|
1 | #!/bin/bash
|
---|
2 | set -eu
|
---|
3 |
|
---|
4 |
|
---|
5 | ## TODO
|
---|
6 | # - May want to supply path to Python instead of, effectively, using result of `which python`
|
---|
7 | #
|
---|
8 |
|
---|
9 | ## Constants
|
---|
10 | #
|
---|
11 | VER="3.1.1"
|
---|
12 |
|
---|
13 | HDF5_ROOT="${ISSM_DIR}/externalpackages/petsc/install"
|
---|
14 | NETCDF_ROOT="${ISSM_DIR}/externalpackages/netcdf/install"
|
---|
15 | PROJ_ROOT="${ISSM_DIR}/externalpackages/proj/install"
|
---|
16 | ZLIB_ROOT="${ISSM_DIR}/externalpackages/petsc/install"
|
---|
17 |
|
---|
18 | ## Environment
|
---|
19 | #
|
---|
20 | export PREFIX="${ISSM_DIR}/externalpackages/gdal/install" # Need this to properly set destination root for Python libraries on macOS (should not affect Linux build)
|
---|
21 |
|
---|
22 | # Cleanup
|
---|
23 | rm -rf install src
|
---|
24 | mkdir install src
|
---|
25 |
|
---|
26 | # Download source
|
---|
27 | $ISSM_DIR/scripts/DownloadExternalPackage.sh "http://issm.jpl.nasa.gov/files/externalpackages/gdal-${VER}.tar.gz" "gdal-${VER}.tar.gz"
|
---|
28 |
|
---|
29 | # Unpack source
|
---|
30 | tar -zxvf gdal-$VER.tar.gz
|
---|
31 |
|
---|
32 | # Move source into 'src' directory
|
---|
33 | mv gdal-$VER/* src
|
---|
34 | rm -rf gdal-$VER
|
---|
35 |
|
---|
36 | # Configure
|
---|
37 | cd src
|
---|
38 | ./configure \
|
---|
39 | --prefix="${PREFIX}" \
|
---|
40 | --enable-fast-install \
|
---|
41 | --with-python \
|
---|
42 | --with-libz="${ZLIB_ROOT}" \
|
---|
43 | --with-hdf5="${HDF5_ROOT}" \
|
---|
44 | --with-netcdf="${NETCDF_ROOT}" \
|
---|
45 | --with-proj="${PROJ_ROOT}"
|
---|
46 |
|
---|
47 | # Compile and install
|
---|
48 | if [ $# -eq 0 ]; then
|
---|
49 | make
|
---|
50 | make install
|
---|
51 | else
|
---|
52 | make -j $1
|
---|
53 | make -j $1 install
|
---|
54 | fi
|
---|
Note:
See
TracBrowser
for help on using the repository browser.