Last change
on this file since 27565 was 27565, checked in by jdquinn, 2 years ago |
CHG: Various fixes for static and shared versions of ext pkg install scripts; fixing EsaGRACE example
|
-
Property svn:executable
set to
*
|
File size:
1.6 KB
|
Rev | Line | |
---|
[25745] | 1 | #!/bin/bash
|
---|
| 2 | set -eu
|
---|
| 3 |
|
---|
| 4 |
|
---|
[25860] | 5 | ## TODO
|
---|
| 6 | # - May want to supply path to Python instead of, effectively, using result of `which python`
|
---|
[25745] | 7 | #
|
---|
| 8 |
|
---|
| 9 | ## Constants
|
---|
| 10 | #
|
---|
[27541] | 11 | VER="3.5.3"
|
---|
[25745] | 12 |
|
---|
| 13 | ## Environment
|
---|
| 14 | #
|
---|
| 15 | export CC=mpicc
|
---|
[27541] | 16 | export CXXFLAGS="-std=c++11"
|
---|
[25745] | 17 | export CXX=mpicxx
|
---|
| 18 | export LDFLAGS="-L${HDF5_ROOT}/lib" # Need to do this so HDF5 symbols referenced in NETCDF library are found at link time
|
---|
[27565] | 19 | export LIBS="-lsqlite3 -lhdf5_hl -lhdf5" # Need to do this so HDF5 symbols referenced in NETCDF library are found at link time
|
---|
[25860] | 20 | export PREFIX="${ISSM_DIR}/externalpackages/gdal/install" # NOTE: Need to export this to properly set destination root for Python libraries on macOS (should not affect Linux build). Set to location where external package should be installed.
|
---|
[25745] | 21 |
|
---|
| 22 | # Cleanup
|
---|
[25860] | 23 | rm -rf ${PREFIX} src
|
---|
| 24 | mkdir -p ${PREFIX} src
|
---|
[25745] | 25 |
|
---|
| 26 | # Download source
|
---|
[25967] | 27 | $ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/gdal-${VER}.tar.gz" "gdal-${VER}.tar.gz"
|
---|
[25745] | 28 |
|
---|
| 29 | # Unpack source
|
---|
[25860] | 30 | tar -zxvf gdal-${VER}.tar.gz
|
---|
[25745] | 31 |
|
---|
| 32 | # Move source into 'src' directory
|
---|
[25860] | 33 | mv gdal-${VER}/* src
|
---|
| 34 | rm -rf gdal-${VER}
|
---|
[25745] | 35 |
|
---|
| 36 | # Configure
|
---|
| 37 | cd src
|
---|
| 38 | ./configure \
|
---|
| 39 | --prefix="${PREFIX}" \
|
---|
| 40 | --enable-fast-install \
|
---|
| 41 | --disable-shared \
|
---|
| 42 | --without-ld-shared \
|
---|
| 43 | --enable-static \
|
---|
| 44 | --with-pic \
|
---|
[27149] | 45 | --with-curl="${CURL_ROOT}/bin/curl-config" \
|
---|
| 46 | --with-hdf5="${HDF5_ROOT}" \
|
---|
[27152] | 47 | --with-jpeg=internal \
|
---|
[25745] | 48 | --with-libz="${ZLIB_ROOT}" \
|
---|
| 49 | --with-netcdf="${NETCDF_ROOT}" \
|
---|
[27152] | 50 | --with-pcre=no \
|
---|
[27149] | 51 | --with-pg=no \
|
---|
[27152] | 52 | --with-png=internal \
|
---|
| 53 | --with-proj="${PROJ_ROOT}" \
|
---|
| 54 | --with-zstd=no
|
---|
[25745] | 55 |
|
---|
| 56 | # Compile and install
|
---|
| 57 | if [ $# -eq 0 ]; then
|
---|
| 58 | make
|
---|
| 59 | make install
|
---|
| 60 | else
|
---|
| 61 | make -j $1
|
---|
| 62 | make -j $1 install
|
---|
| 63 | fi
|
---|
Note:
See
TracBrowser
for help on using the repository browser.