From 4079562374838d840b4fa814ca398bc3b2ace556 Mon Sep 17 00:00:00 2001 From: Casper Boon Date: Fri, 6 Sep 2024 12:26:30 +0800 Subject: [PATCH] a possible fix for apple silicon --- debian/control | 24 ------------------------ macos/macpkg.sh | 21 ++++++++++++++++++--- 2 files changed, 18 insertions(+), 27 deletions(-) delete mode 100644 debian/control diff --git a/debian/control b/debian/control deleted file mode 100644 index e78d0db..0000000 --- a/debian/control +++ /dev/null @@ -1,24 +0,0 @@ -Source: glm -Section: science -Priority: extra -Maintainer: Aquatic EcoDynamics Group -Standards-Version: 3.9.3 -Homepage: http://aquatic.science.uwa.edu.au/research/models/GLM/ - -Package: glm -Architecture: any -Depends: ${misc:Depends}, - libgfortran-8-dev, - libnetcdff-dev, - libgd-dev -Description: General Lake Model - Model the bio-geo-chemical processes in lakes. - -Package: glm+ -Architecture: any -Depends: ${misc:Depends}, - libgfortran-8-dev, - libnetcdff-dev, - libgd-dev -Description: General Lake Model Plus - Advanced modelling of the bio-geo-chemical processes in lakes. diff --git a/macos/macpkg.sh b/macos/macpkg.sh index 0c753ac..fb3a37a 100755 --- a/macos/macpkg.sh +++ b/macos/macpkg.sh @@ -8,8 +8,15 @@ MOSLINE=`grep 'SOFTWARE LICENSE AGREEMENT FOR ' '/System/Library/CoreServices/Se # pre Sierra : MOSNAME=`echo ${MOSLINE} | awk -F 'OS X ' '{print $NF}' | tr -d '\\' | tr ' ' '_'` MOSNAME=`echo ${MOSLINE} | awk -F 'macOS ' '{print $NF}' | tr -d '\\' | tr ' ' '_'` -if [ "$1" = "true" ] ; then - BASEDIR=usr +HOMEBREW=$1 + +if [ "$HOMEBREW" = "true" ] ; then + # It's HOMEBREW + if [ `uname -m` = "x86_64" ] ; then + BASEDIR=usr + else + BASEDIR=/opt/homebrew + fi else BASEDIR=opt fi @@ -106,7 +113,15 @@ if [ "$FC" = "ifort" ] ; then LIBS2="${LIBS2} libifport.dylib" fi else - PATH2=/${BASEDIR}/local/ + if [ "$HOMEBREW" = "true" ] ; then + if [ `uname -m` = "x86_64" ] ; then + PATH2=/${BASEDIR}/local/ + else + PATH2=/${BASEDIR}/opt/ + fi + else + PATH2=/${BASEDIR}/local/ + fi PATH3=/usr/local/ LIBS2="libgfortran.5.dylib" fi