source: issm/trunk-jpl/externalpackages/gmt/install-6-linux.sh@ 25745

Last change on this file since 25745 was 25745, checked in by jdquinn, 4 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
Line 
1#!/bin/bash
2set -eu
3
4
5## Constants
6#
7VER="6.0.0"
8
9CURL_ROOT="${ISSM_DIR}/externalpackages/curl/install"
10
11# Environment
12#
13export 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
19tar -zxvf gmt-${VER}.tar.gz
20
21# Cleanup
22rm -rf install src
23mkdir install src
24
25# Move source to 'src' directory
26mv gmt-${VER}/* src
27rm -rf gmt-${VER}
28
29# Copy custom configuration files
30cp ./configs/6/cmake/ConfigUser.cmake ./src/cmake
31
32# Configure
33cd src
34mkdir build
35cd 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#
44cmake \
45 -DCURL_LIBRARY="${CURL_ROOT}/lib" \
46 -DCURL_INCLUDE_DIR="${CURL_ROOT}/include" \
47 ..
48
49# Compile and install
50if [ $# -eq 0 ]; then
51 make
52 make install
53else
54 make -j $1
55 make -j $1 install
56fi
Note: See TracBrowser for help on using the repository browser.