Last change
on this file was 28013, checked in by Mathieu Morlighem, 17 months ago |
merged trunk-jpl and trunk for revision 28011
|
-
Property svn:executable
set to
*
|
File size:
1.6 KB
|
Rev | Line | |
---|
[24923] | 1 | #!/bin/bash
|
---|
| 2 | set -eu
|
---|
| 3 |
|
---|
| 4 |
|
---|
| 5 | # Dependencies
|
---|
| 6 | # - MPI implementation (for parallel I/O support)
|
---|
| 7 | # - hdf5 (1.8.9 / 1.10.1 or later, for netCDF-4 support)
|
---|
| 8 | # - zlib (1.2.5 or later, for netCDF-4 compression)
|
---|
| 9 | # - curl (7.18.0 or later, for DAP remote access client support)
|
---|
| 10 | #
|
---|
| 11 | # Sources:
|
---|
| 12 | # - https://www.unidata.ucar.edu/software/netcdf/documentation/NUG/getting_and_building_netcdf.html#building
|
---|
| 13 | #
|
---|
| 14 | # NOTE:
|
---|
| 15 | # - Certain configuration tests fail if libraries are not supplied explicitly
|
---|
[26744] | 16 | #
|
---|
| 17 | # TODO:
|
---|
| 18 | # - Compile and link curl statically (issue with DAP and system libs on macOS
|
---|
[28013] | 19 | # with more restrictive Gatekeeper; see also --disable-dap option in
|
---|
[26744] | 20 | # configuration)
|
---|
| 21 | #
|
---|
[24923] | 22 |
|
---|
| 23 | # Constants
|
---|
| 24 | #
|
---|
| 25 | VER="4.7.2"
|
---|
[25243] | 26 |
|
---|
[26744] | 27 | PREFIX="${ISSM_DIR}/externalpackages/netcdf/install" # Set to location where external package should be installed
|
---|
[24923] | 28 |
|
---|
| 29 | # Environment
|
---|
| 30 | #
|
---|
| 31 | export CC=mpicc
|
---|
[25745] | 32 | export CPPFLAGS="-I${ZLIB_ROOT}/include"
|
---|
[24923] | 33 |
|
---|
[25745] | 34 | export ZLIB="${ZLIB_ROOT}/lib/libz.a"
|
---|
| 35 |
|
---|
[24923] | 36 | # Download source
|
---|
| 37 | $ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/netcdf-c-${VER}.tar.gz" "netcdf-c-${VER}.tar.gz"
|
---|
| 38 |
|
---|
| 39 | # Unpack source
|
---|
[26744] | 40 | tar -zxvf netcdf-c-${VER}.tar.gz
|
---|
[24923] | 41 |
|
---|
| 42 | # Cleanup
|
---|
[26744] | 43 | rm -rf ${PREFIX} src
|
---|
| 44 | mkdir -p ${PREFIX} src
|
---|
[24923] | 45 |
|
---|
| 46 | # Move source to 'src' directory
|
---|
[26744] | 47 | mv netcdf-c-${VER}/* src
|
---|
| 48 | rm -rf netcdf-c-${VER}
|
---|
[24923] | 49 |
|
---|
| 50 | # Configure
|
---|
| 51 | cd src
|
---|
| 52 | ./configure \
|
---|
[26744] | 53 | --prefix="${PREFIX}" \
|
---|
[25073] | 54 | --disable-shared \
|
---|
[24923] | 55 | --disable-dependency-tracking \
|
---|
| 56 | --enable-fast-install \
|
---|
[25073] | 57 | --disable-doxygen \
|
---|
[25125] | 58 | --enable-netcdf4 \
|
---|
[25745] | 59 | --disable-dap \
|
---|
[24923] | 60 | --disable-testsets \
|
---|
[25243] | 61 | --disable-examples \
|
---|
| 62 | --disable-filter-testing
|
---|
[24923] | 63 |
|
---|
| 64 | # Compile and install
|
---|
| 65 | if [ $# -eq 0 ]; then
|
---|
| 66 | make
|
---|
| 67 | make install
|
---|
| 68 | else
|
---|
| 69 | make -j $1
|
---|
| 70 | make -j $1 install
|
---|
| 71 | fi
|
---|
Note:
See
TracBrowser
for help on using the repository browser.