Last change
on this file since 24641 was 24641, checked in by jdquinn, 5 years ago |
CHG: Reconfiguration of Solid Earth build; updated archives; changed path to libgfortran for all Linux builds; cleanup
|
-
Property svn:executable
set to
*
|
File size:
1.2 KB
|
Rev | Line | |
---|
[24321] | 1 | #!/bin/bash
|
---|
| 2 | set -eu
|
---|
| 3 |
|
---|
| 4 |
|
---|
| 5 | # Dependencies
|
---|
| 6 | # - hdf5 (1.8.9 / 1.10.1 or later, for netCDF-4 support)
|
---|
| 7 | # - zlib (1.2.5 or later, for netCDF-4 compression)
|
---|
| 8 | # - curl (7.18.0 or later, for DAP remote access client support)
|
---|
| 9 | #
|
---|
| 10 | # For most ISSM installations, only hdf5 will be necessary
|
---|
| 11 | #
|
---|
| 12 |
|
---|
| 13 | # Constants
|
---|
| 14 | #
|
---|
| 15 | VER="4.7.2"
|
---|
[24454] | 16 | CURL_ROOT="${ISSM_DIR}/externalpackages/curl/install"
|
---|
[24641] | 17 | HDF5_ROOT="${ISSM_DIR}/externalpackages/petsc/install"
|
---|
| 18 | ZLIB_ROOT="${ISSM_DIR}/externalpackages/petsc/install"
|
---|
[24321] | 19 |
|
---|
| 20 | # Environment
|
---|
| 21 | #
|
---|
[24454] | 22 | export CPPFLAGS="-I${HDF5_ROOT}/include -I${ZLIB_ROOT}/include -I${CURL_ROOT}/include"
|
---|
| 23 | export LDFLAGS="-L${HDF5_ROOT}/lib -L${ZLIB_ROOT}/lib -L${CURL_ROOT}/lib"
|
---|
[24321] | 24 |
|
---|
| 25 | # Download source
|
---|
| 26 | $ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/netcdf-c-${VER}.tar.gz" "netcdf-c-${VER}.tar.gz"
|
---|
| 27 |
|
---|
| 28 | # Unpack source
|
---|
[24641] | 29 | tar -zxvf netcdf-c-${VER}.tar.gz
|
---|
[24321] | 30 |
|
---|
| 31 | # Cleanup
|
---|
| 32 | rm -rf install src
|
---|
| 33 | mkdir install src
|
---|
| 34 |
|
---|
| 35 | # Move source to 'src' directory
|
---|
[24641] | 36 | mv netcdf-c-${VER}/* src/
|
---|
| 37 | rm -rf netcdf-c-${VER}
|
---|
[24321] | 38 |
|
---|
| 39 | # Configure
|
---|
| 40 | cd src
|
---|
| 41 | ./configure \
|
---|
| 42 | --prefix="${ISSM_DIR}/externalpackages/netcdf/install" \
|
---|
| 43 | --disable-doxygen
|
---|
| 44 |
|
---|
| 45 | # Compile and install
|
---|
| 46 | if [ $# -eq 0 ]; then
|
---|
| 47 | make
|
---|
| 48 | make install
|
---|
| 49 | else
|
---|
| 50 | make -j $1
|
---|
| 51 | make -j $1 install
|
---|
| 52 | fi
|
---|
Note:
See
TracBrowser
for help on using the repository browser.