Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Fixed some issues related to getting the Mac OSX deployment target ve…
Browse files Browse the repository at this point in the history
…rsion correctly formatted
  • Loading branch information
MintoDA1 authored and MintoDA1 committed Aug 17, 2023
1 parent 8c99d27 commit 0cb5674
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 10 deletions.
4 changes: 2 additions & 2 deletions buildscripts/_build_getopts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions buildscripts/build_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}
2 changes: 1 addition & 1 deletion buildscripts/build_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion buildscripts/build_hdf5.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion buildscripts/build_netcdf-c.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion buildscripts/build_netcdf-fortran.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)"

Expand Down
6 changes: 5 additions & 1 deletion buildscripts/build_swiftest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion buildscripts/build_zlib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 0cb5674

Please sign in to comment.