Last change
on this file since 27149 was 27149, checked in by jdquinn, 3 years ago |
BUG: Correcting some static linking in distributables; syntax of sed call under Linux in packaging scripts
|
-
Property svn:executable
set to
*
|
File size:
1.4 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 | #
|
---|
| 11 | VER="3.1.1"
|
---|
| 12 |
|
---|
| 13 | ## Environment
|
---|
| 14 | #
|
---|
| 15 | export CC=mpicc
|
---|
| 16 | export CXX=mpicxx
|
---|
| 17 | export LDFLAGS="-L${HDF5_ROOT}/lib" # Need to do this so HDF5 symbols referenced in NETCDF library are found at link time
|
---|
| 18 | export LIBS="-lhdf5_hl -lhdf5" # Need to do this so HDF5 symbols referenced in NETCDF library are found at link time
|
---|
[25860] | 19 | 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] | 20 |
|
---|
| 21 | # Cleanup
|
---|
[25860] | 22 | rm -rf ${PREFIX} src
|
---|
| 23 | mkdir -p ${PREFIX} src
|
---|
[25745] | 24 |
|
---|
| 25 | # Download source
|
---|
[25967] | 26 | $ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/gdal-${VER}.tar.gz" "gdal-${VER}.tar.gz"
|
---|
[25745] | 27 |
|
---|
| 28 | # Unpack source
|
---|
[25860] | 29 | tar -zxvf gdal-${VER}.tar.gz
|
---|
[25745] | 30 |
|
---|
| 31 | # Move source into 'src' directory
|
---|
[25860] | 32 | mv gdal-${VER}/* src
|
---|
| 33 | rm -rf gdal-${VER}
|
---|
[25745] | 34 |
|
---|
| 35 | # Configure
|
---|
| 36 | cd src
|
---|
| 37 | ./configure \
|
---|
| 38 | --prefix="${PREFIX}" \
|
---|
| 39 | --enable-fast-install \
|
---|
| 40 | --disable-shared \
|
---|
| 41 | --without-ld-shared \
|
---|
| 42 | --enable-static \
|
---|
| 43 | --with-pic \
|
---|
[27149] | 44 | --with-curl="${CURL_ROOT}/bin/curl-config" \
|
---|
| 45 | --with-hdf5="${HDF5_ROOT}" \
|
---|
[25745] | 46 | --with-libz="${ZLIB_ROOT}" \
|
---|
| 47 | --with-netcdf="${NETCDF_ROOT}" \
|
---|
[27149] | 48 | --with-pg=no \
|
---|
| 49 | --with-proj="${PROJ_ROOT}"
|
---|
[25745] | 50 |
|
---|
| 51 | # Compile and install
|
---|
| 52 | if [ $# -eq 0 ]; then
|
---|
| 53 | make
|
---|
| 54 | make install
|
---|
| 55 | else
|
---|
| 56 | make -j $1
|
---|
| 57 | make -j $1 install
|
---|
| 58 | fi
|
---|
Note:
See
TracBrowser
for help on using the repository browser.