From 0cb5674e3ead44175e4b69eab999c0f6b035a79d Mon Sep 17 00:00:00 2001 From: MintoDA1 <51412913+MintoDA1@users.noreply.github.com> Date: Thu, 17 Aug 2023 14:20:16 -0400 Subject: [PATCH] Fixed some issues related to getting the Mac OSX deployment target version correctly formatted --- buildscripts/_build_getopts.sh | 4 ++-- buildscripts/build_all.sh | 4 ++-- buildscripts/build_dependencies.sh | 2 +- buildscripts/build_hdf5.sh | 3 ++- buildscripts/build_netcdf-c.sh | 3 ++- buildscripts/build_netcdf-fortran.sh | 3 ++- buildscripts/build_swiftest.sh | 6 +++++- buildscripts/build_zlib.sh | 3 ++- 8 files changed, 18 insertions(+), 10 deletions(-) diff --git a/buildscripts/_build_getopts.sh b/buildscripts/_build_getopts.sh index 6b5b7fad9..6cf308925 100755 --- a/buildscripts/_build_getopts.sh +++ b/buildscripts/_build_getopts.sh @@ -14,10 +14,10 @@ SCRIPT_DIR=$(realpath $(dirname $0)) ROOT_DIR=$(realpath ${SCRIPT_DIR}/..) # Parse arguments -USTMT="Usage: ${0} <-d /path/to/dependency/source> [-p /prefix/path|{/usr/local}] [-m MACOSX_DEPLOYMENT_TARGET|{13}]" +USTMT="Usage: ${0} <-d /path/to/dependency/source> [-p /prefix/path|{/usr/local}] [-m MACOSX_DEPLOYMENT_TARGET|{10.9}]" PREFIX=/usr/local DEPENDENCY_DIR="${ROOT_DIR}/_dependencies" -MACOSX_DEPLOYMENT_TARGET=13 +MACOSX_DEPLOYMENT_TARGET="10.9" while getopts ":d:p:m:h" ARG; do case "${ARG}" in d) diff --git a/buildscripts/build_all.sh b/buildscripts/build_all.sh index 6efa24914..d93933abe 100755 --- a/buildscripts/build_all.sh +++ b/buildscripts/build_all.sh @@ -14,9 +14,9 @@ # Determine the platform and architecture set -a SCRIPT_DIR=$(realpath $(dirname $0)) -. ${SCRIPT_DIR}/_build_getopts.sh - ARGS=$@ +. ${SCRIPT_DIR}/_build_getopts.sh ${ARGS} + set -e ${SCRIPT_DIR}/build_dependencies.sh ${ARGS} ${SCRIPT_DIR}/build_swiftest.sh ${ARGS} \ No newline at end of file diff --git a/buildscripts/build_dependencies.sh b/buildscripts/build_dependencies.sh index ccdebd40b..9775f6502 100755 --- a/buildscripts/build_dependencies.sh +++ b/buildscripts/build_dependencies.sh @@ -14,8 +14,8 @@ # Determine the platform and architecture SCRIPT_DIR=$(realpath $(dirname $0)) set -a -. ${SCRIPT_DIR}/_build_getopts.sh ARGS=$@ +. ${SCRIPT_DIR}/_build_getopts.sh ${ARGS} ZLIB_VER="1.2.13" HDF5_VER="1.14.1-2" diff --git a/buildscripts/build_hdf5.sh b/buildscripts/build_hdf5.sh index 5963deb77..b022fd838 100755 --- a/buildscripts/build_hdf5.sh +++ b/buildscripts/build_hdf5.sh @@ -12,7 +12,8 @@ # If not, see: https://www.gnu.org/licenses. SCRIPT_DIR=$(realpath $(dirname $0)) set -a -. ${SCRIPT_DIR}/_build_getopts.sh +ARGS=$@ +. ${SCRIPT_DIR}/_build_getopts.sh ${ARGS} printf "\n" printf "*********************************************************\n" diff --git a/buildscripts/build_netcdf-c.sh b/buildscripts/build_netcdf-c.sh index aa5452270..ff9ce8b13 100755 --- a/buildscripts/build_netcdf-c.sh +++ b/buildscripts/build_netcdf-c.sh @@ -13,7 +13,8 @@ SCRIPT_DIR=$(realpath $(dirname $0)) set -a -. ${SCRIPT_DIR}/_build_getopts.sh +ARGS=$@ +. ${SCRIPT_DIR}/_build_getopts.sh ${ARGS} printf "\n" printf "*********************************************************\n" diff --git a/buildscripts/build_netcdf-fortran.sh b/buildscripts/build_netcdf-fortran.sh index 6f31cf6bf..4f098bb02 100755 --- a/buildscripts/build_netcdf-fortran.sh +++ b/buildscripts/build_netcdf-fortran.sh @@ -12,7 +12,8 @@ # If not, see: https://www.gnu.org/licenses. SCRIPT_DIR=$(realpath $(dirname $0)) set -a -. ${SCRIPT_DIR}/_build_getopts.sh +ARGS=$@ +. ${SCRIPT_DIR}/_build_getopts.sh ${ARGS} LIBS="$(${PREFIX}/bin/nc-config --libs --static)" diff --git a/buildscripts/build_swiftest.sh b/buildscripts/build_swiftest.sh index 011df8d8e..a87705728 100755 --- a/buildscripts/build_swiftest.sh +++ b/buildscripts/build_swiftest.sh @@ -11,7 +11,8 @@ # If not, see: https://www.gnu.org/licenses. set -a if [ -z ${SCRIPT_DIR+x} ]; then SCRIPT_DIR=$(realpath $(dirname $0)); fi -. ${SCRIPT_DIR}/_build_getopts.sh +ARGS=$@ +. ${SCRIPT_DIR}/_build_getopts.sh ${ARGS} # Determine if we are in the correct directory (the script can either be run from the Swiftest project root directory or the # buildscripts directory) @@ -60,6 +61,9 @@ printf "LD_LIBRARY_PATH: ${LD_LIBRARY_PATH}\n" printf "LDFLAGS: ${LDFLAGS}\n" printf "NETCDF_FORTRAN_HOME: ${NETCDF_FORTRAN_HOME}\n" printf "SKBUILD_CONFIGURE_OPTIONS: ${SKBUILD_CONFIGURE_OPTIONS}\n" +if [ $OS = "MacOSX" ]; then + printf "MACOSX_DEPLOYMENT_TARGET: ${MACOSX_DEPLOYMENT_TARGET}\n" +fi printf "*********************************************************\n" python3 -m pip install build pip diff --git a/buildscripts/build_zlib.sh b/buildscripts/build_zlib.sh index f03ef13db..11f17a081 100755 --- a/buildscripts/build_zlib.sh +++ b/buildscripts/build_zlib.sh @@ -12,7 +12,8 @@ # If not, see: https://www.gnu.org/licenses. SCRIPT_DIR=$(realpath $(dirname $0)) set -a -. ${SCRIPT_DIR}/_build_getopts.sh +ARGS=$@ +. ${SCRIPT_DIR}/_build_getopts.sh ${ARGS} printf "*********************************************************\n" printf "* BUILDING ZLIB STATIC LIBRARY *\n"