|
Last change
on this file since 25745 was 25745, checked in by jdquinn, 5 years ago |
|
CHG: Configuration changes to support static linking under macOS Catalina (Gatekeeper is more restrictive)
|
-
Property svn:executable
set to
*
|
|
File size:
1.1 KB
|
| Rev | Line | |
|---|
| [25745] | 1 | #!/bin/bash
|
|---|
| 2 | set -eu
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 | ## Constants
|
|---|
| 6 | #
|
|---|
| 7 | VER="6.0.0"
|
|---|
| 8 |
|
|---|
| 9 | CURL_ROOT="${ISSM_DIR}/externalpackages/curl/install"
|
|---|
| 10 |
|
|---|
| 11 | # Environment
|
|---|
| 12 | #
|
|---|
| 13 | export CC=mpicc
|
|---|
| 14 |
|
|---|
| 15 | # Download source
|
|---|
| 16 | $ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/gmt-${VER}.tar.gz" "gmt-${VER}.tar.gz"
|
|---|
| 17 |
|
|---|
| 18 | # Unpack source
|
|---|
| 19 | tar -zxvf gmt-${VER}.tar.gz
|
|---|
| 20 |
|
|---|
| 21 | # Cleanup
|
|---|
| 22 | rm -rf install src
|
|---|
| 23 | mkdir install src
|
|---|
| 24 |
|
|---|
| 25 | # Move source to 'src' directory
|
|---|
| 26 | mv gmt-${VER}/* src
|
|---|
| 27 | rm -rf gmt-${VER}
|
|---|
| 28 |
|
|---|
| 29 | # Copy custom configuration files
|
|---|
| 30 | cp ./configs/6/cmake/ConfigUser.cmake ./src/cmake
|
|---|
| 31 |
|
|---|
| 32 | # Configure
|
|---|
| 33 | cd src
|
|---|
| 34 | mkdir build
|
|---|
| 35 | cd build
|
|---|
| 36 |
|
|---|
| 37 | # NOTE:
|
|---|
| 38 | # - There is a CMake variable named CURL_ROOT in src/cmake/ConfigUser.cmake
|
|---|
| 39 | # that, ostensibly, allows for supplying the path to curl when it is in a
|
|---|
| 40 | # non-standard location. That said, newer versions of CMake will ignore said
|
|---|
| 41 | # variable and instead try to find curl itself. Passing in the two options
|
|---|
| 42 | # below overrides this behavior.
|
|---|
| 43 | #
|
|---|
| 44 | cmake \
|
|---|
| 45 | -DCURL_LIBRARY="${CURL_ROOT}/lib" \
|
|---|
| 46 | -DCURL_INCLUDE_DIR="${CURL_ROOT}/include" \
|
|---|
| 47 | ..
|
|---|
| 48 |
|
|---|
| 49 | # Compile and install
|
|---|
| 50 | if [ $# -eq 0 ]; then
|
|---|
| 51 | make
|
|---|
| 52 | make install
|
|---|
| 53 | else
|
|---|
| 54 | make -j $1
|
|---|
| 55 | make -j $1 install
|
|---|
| 56 | fi
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.