Index: /issm/trunk-jpl/externalpackages/gmsh/install-4-linux-static.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/gmsh/install-4-linux-static.sh	(revision 27159)
+++ /issm/trunk-jpl/externalpackages/gmsh/install-4-linux-static.sh	(revision 27159)
@@ -0,0 +1,86 @@
+#!/bin/bash
+set -eu
+
+
+# TODO:
+# - Add support for,
+#	- BLAS_LAPACK
+#	- MUMPS
+#	- PETSC
+# (see configs/4/static/CMakeLists.txt)
+#
+
+## Constants
+#
+VER="4.5.6"
+
+# Find libgfortran and libgcc so we do not have to hardcode them
+#
+# NOTE: For now, paths are hardcoded.
+#
+# TODO:
+# - Move this to etc/environment.sh
+# - Figure out how to find and grep for single result like we do with mdfind 
+#	under macOS.
+#
+LIBGFORTRAN="/usr/lib/gcc/x86_64-linux-gnu/8/libgfortran.a"
+LIBGFORTRAN_ROOT=${LIBGFORTRAN%/*}
+LIBGCC="/usr/lib/gcc/x86_64-linux-gnu/8/libgcc.a"
+
+PREFIX="${ISSM_DIR}/externalpackages/gmsh/install" # Set to location where external package should be installed
+
+# Cleanup
+rm -rf ${PREFIX} src
+mkdir -p ${PREFIX} src
+
+# Download source
+$ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/gmsh-${VER}-source.tgz" "gmsh-${VER}-source.tgz"
+
+# Unpack source
+tar -xvzf gmsh-${VER}-source.tgz
+
+# Move source to 'src' directory
+mv gmsh-${VER}-source/* src
+rm -rf gmsh-${VER}-source
+
+# Copy customized source and config files to 'src' directory
+cp configs/${VER}/static/CMakeLists.txt src
+
+# Configure
+#
+# NOTE:
+# - Option -DENABLE_FLTK=0 is used because we do not need GUI.
+# - Option -DENABLE_MPEG_ENCODE=0 is used because we do not need to record MPEG 
+#	movies.
+# - Option -DENABLE_OCC=0 is used because we do not need CAD kernel and are not 
+#	importing STEP/IGES files.
+# - Option -DENABLE_TOUCHBAR=0 is used because we do not have GUI, therefore we 
+#	do not need to support Apple Touch bar (does not affect compilation on 
+#	Linux).
+#
+cd src
+cmake \
+	-DCMAKE_INSTALL_PREFIX="${PREFIX}" \
+	-DENABLE_BUILD_LIB=1 \
+	-DENABLE_FLTK=0 \
+	-DENABLE_MPEG_ENCODE=0 \
+	-DENABLE_MPI=1 \
+	-DENABLE_OCC=0 \
+	-DENABLE_TOUCHBAR=0 \
+	-DBLAS_LAPACK_LIBRARIES="-L${LAPACK_ROOT}/lib -lflapack -L${BLAS_ROOT}/lib -lfblas ${LIBGFORTRAN_ROOT}/libgfortran.a ${LIBGFORTRAN_ROOT}/libquadmath.a ${LIBGCC}" \
+	-DMETIS_ROOT="${METIS_ROOT}"
+
+# Compile and install
+if [ $# -eq 0 ]; then
+	make
+	make install
+else
+	make -j $1
+	make -j $1 install
+fi
+
+# Make necessary link on RHEL
+if [[ -d ${PREFIX}/lib64 && ! -d ${PREFIX}/lib ]]; then
+	cd ${PREFIX}
+	ln -s ./lib64 ./lib
+fi
Index: /issm/trunk-jpl/externalpackages/gmsh/install-4-mac-static.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/gmsh/install-4-mac-static.sh	(revision 27159)
+++ /issm/trunk-jpl/externalpackages/gmsh/install-4-mac-static.sh	(revision 27159)
@@ -0,0 +1,86 @@
+#!/bin/bash
+set -eu
+
+
+# TODO:
+# - Add support for,
+#	- BLAS_LAPACK
+#	- MUMPS
+#	- PETSC
+# (see configs/4/static/CMakeLists.txt)
+#
+
+## Constants
+#
+VER="4.5.6"
+
+# Find libgfortran and libgcc so we do not have to hardcode them
+#
+# Should retrieve a copy of gfortran that is compiled from source before returning one that is installed via package manager
+#
+# TODO:
+# - Move this to etc/environment.sh
+# - Test if -static-libgfortran flag will avoid all of this.
+# - Otherwise, refactor this to work with other gfortran installations.
+#
+LIBGFORTRAN=$(mdfind -onlyin /usr -name libgfortran | grep -n libgfortran.a | grep -v i386 | sed "s/[0-9]*://g" | head -1)
+LIBGFORTRAN_ROOT=${LIBGFORTRAN%/*}
+LIBGCC=$(mdfind -onlyin ${LIBGFORTRAN_ROOT} -name libgcc | grep -n libgcc.a | grep -v i386 | sed "s/[0-9]*://g" | head -1)
+
+PREFIX="${ISSM_DIR}/externalpackages/gmsh/install" # Set to location where external package should be installed
+
+# Cleanup
+rm -rf ${PREFIX} src
+mkdir -p ${PREFIX} src
+
+# Download source
+$ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/gmsh-${VER}-source.tgz" "gmsh-${VER}-source.tgz"
+
+# Unpack source
+tar -xvzf gmsh-${VER}-source.tgz
+
+# Move source to 'src' directory
+mv gmsh-${VER}-source/* src
+rm -rf gmsh-${VER}-source
+
+# Copy customized source and config files to 'src' directory
+cp configs/${VER}/static/CMakeLists.txt src
+
+# Configure
+#
+# NOTE:
+# - Option -DENABLE_FLTK=0 is used because we do not need GUI.
+# - Option -DENABLE_MPEG_ENCODE=0 is used because we do not need to record MPEG 
+#	movies.
+# - Option -DENABLE_OCC=0 is used because we do not need CAD kernel and are not 
+#	importing STEP/IGES files.
+# - Option -DENABLE_TOUCHBAR=0 is used because we do not have GUI, therefore we 
+#	do not need to support Apple Touch bar (does not affect compilation on 
+#	Linux).
+#
+cd src
+cmake \
+	-DCMAKE_INSTALL_PREFIX="${PREFIX}" \
+	-DENABLE_BUILD_LIB=1 \
+	-DENABLE_FLTK=0 \
+	-DENABLE_MPEG_ENCODE=0 \
+	-DENABLE_MPI=1 \
+	-DENABLE_OCC=0 \
+	-DENABLE_TOUCHBAR=0 \
+	-DBLAS_LAPACK_LIBRARIES="-L${LAPACK_ROOT}/lib -lflapack -L${BLAS_ROOT}/lib -lfblas ${LIBGFORTRAN_ROOT}/libgfortran.a ${LIBGFORTRAN_ROOT}/libquadmath.a ${LIBGCC}" \
+	-DMETIS_ROOT="${METIS_ROOT}"
+
+# Compile and install
+if [ $# -eq 0 ]; then
+	make
+	make install
+else
+	make -j $1
+	make -j $1 install
+fi
+
+# Make necessary link on RHEL
+if [[ -d ${PREFIX}/lib64 && ! -d ${PREFIX}/lib ]]; then
+	cd ${PREFIX}
+	ln -s ./lib64 ./lib
+fi
Index: sm/trunk-jpl/externalpackages/gmsh/install-4-static.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/gmsh/install-4-static.sh	(revision 27158)
+++ 	(revision )
@@ -1,73 +1,0 @@
-#!/bin/bash
-set -eu
-
-
-# TODO:
-# - Add support for,
-#	- BLAS_LAPACK
-#	- MUMPS
-#	- PETSC
-# (see configs/4/static/CMakeLists.txt)
-#
-
-## Constants
-#
-VER="4.5.6"
-
-PREFIX="${ISSM_DIR}/externalpackages/gmsh/install" # Set to location where external package should be installed
-
-# Cleanup
-rm -rf ${PREFIX} src
-mkdir -p ${PREFIX} src
-
-# Download source
-$ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/gmsh-${VER}-source.tgz" "gmsh-${VER}-source.tgz"
-
-# Unpack source
-tar -xvzf gmsh-${VER}-source.tgz
-
-# Move source to 'src' directory
-mv gmsh-${VER}-source/* src
-rm -rf gmsh-${VER}-source
-
-# Copy customized source and config files to 'src' directory
-cp configs/${VER}/static/CMakeLists.txt src
-
-# Configure
-#
-# NOTE:
-# - Option -DENABLE_FLTK=0 is used because we do not need GUI.
-# - Option -DENABLE_MPEG_ENCODE=0 is used because we do not need to record MPEG 
-#	movies.
-# - Option -DENABLE_OCC=0 is used because we do not need CAD kernel and are not 
-#	importing STEP/IGES files.
-# - Option -DENABLE_TOUCHBAR=0 is used because we do not have GUI, therefore we 
-#	do not need to support Apple Touch bar (does not affect compilation on 
-#	Linux).
-#
-cd src
-cmake \
-	-DCMAKE_INSTALL_PREFIX="${PREFIX}" \
-	-DENABLE_BUILD_LIB=1 \
-	-DENABLE_FLTK=0 \
-	-DENABLE_MPEG_ENCODE=0 \
-	-DENABLE_MPI=1 \
-	-DENABLE_OCC=0 \
-	-DENABLE_TOUCHBAR=0 \
-	-DBLAS_LAPACK_LIBRARIES="-L${LAPACK_ROOT}/lib -lflapack -L${BLAS_ROOT}/lib -lfblas /usr/local/Cellar/gcc/11.3.0/lib/gcc/11/libgfortran.a /usr/local/Cellar/gcc/11.3.0/lib/gcc/11/libquadmath.a /usr/local/Cellar/gcc/11.3.0/lib/gcc/11/gcc/x86_64-apple-darwin15/11/libgcc.a" \
-	-DMETIS_ROOT="${METIS_ROOT}"
-
-# Compile and install
-if [ $# -eq 0 ]; then
-	make
-	make install
-else
-	make -j $1
-	make -j $1 install
-fi
-
-# Make necessary link on RHEL
-if [[ -d ${PREFIX}/lib64 && ! -d ${PREFIX}/lib ]]; then
-	cd ${PREFIX}
-	ln -s ./lib64 ./lib
-fi
Index: /issm/trunk-jpl/jenkins/pine_island-mac-binaries-matlab
===================================================================
--- /issm/trunk-jpl/jenkins/pine_island-mac-binaries-matlab	(revision 27158)
+++ /issm/trunk-jpl/jenkins/pine_island-mac-binaries-matlab	(revision 27159)
@@ -56,5 +56,5 @@
 	gshhg		install.sh
 	gmt			install-6-mac-static.sh
-	gmsh		install-4-static.sh
+	gmsh		install-4-mac-static.sh
 	triangle	install-mac-static.sh
 	chaco		install.sh
Index: /issm/trunk-jpl/jenkins/pine_island-mac-binaries-python-2
===================================================================
--- /issm/trunk-jpl/jenkins/pine_island-mac-binaries-python-2	(revision 27158)
+++ /issm/trunk-jpl/jenkins/pine_island-mac-binaries-python-2	(revision 27159)
@@ -54,5 +54,5 @@
 	gshhg		install.sh
 	gmt			install-6-mac-static.sh
-	gmsh		install-4-static.sh
+	gmsh		install-4-mac-static.sh
 	triangle	install-mac-static.sh
 	chaco		install.sh
Index: /issm/trunk-jpl/jenkins/pine_island-mac-binaries-python-3
===================================================================
--- /issm/trunk-jpl/jenkins/pine_island-mac-binaries-python-3	(revision 27158)
+++ /issm/trunk-jpl/jenkins/pine_island-mac-binaries-python-3	(revision 27159)
@@ -55,5 +55,5 @@
 	gshhg		install.sh
 	gmt			install-6-mac-static.sh
-	gmsh		install-4-static.sh
+	gmsh		install-4-mac-static.sh
 	triangle	install-mac-static.sh
 	chaco		install.sh
Index: /issm/trunk-jpl/jenkins/ross-debian_linux-binaries-matlab
===================================================================
--- /issm/trunk-jpl/jenkins/ross-debian_linux-binaries-matlab	(revision 27158)
+++ /issm/trunk-jpl/jenkins/ross-debian_linux-binaries-matlab	(revision 27159)
@@ -54,5 +54,5 @@
 	gshhg		install.sh
 	gmt			install-6-linux-static.sh
-	gmsh		install-4-static.sh
+	gmsh		install-4-linux-static.sh
 	triangle	install-linux-static.sh
 	chaco		install.sh
Index: /issm/trunk-jpl/jenkins/ross-debian_linux-binaries-python-2
===================================================================
--- /issm/trunk-jpl/jenkins/ross-debian_linux-binaries-python-2	(revision 27158)
+++ /issm/trunk-jpl/jenkins/ross-debian_linux-binaries-python-2	(revision 27159)
@@ -54,5 +54,5 @@
 	gshhg		install.sh
 	gmt			install-6-linux-static.sh
-	gmsh		install-4-static.sh
+	gmsh		install-4-linux-static.sh
 	triangle	install-linux-static.sh
 	chaco		install.sh
Index: /issm/trunk-jpl/jenkins/ross-debian_linux-binaries-python-3
===================================================================
--- /issm/trunk-jpl/jenkins/ross-debian_linux-binaries-python-3	(revision 27158)
+++ /issm/trunk-jpl/jenkins/ross-debian_linux-binaries-python-3	(revision 27159)
@@ -55,5 +55,5 @@
 	gshhg		install.sh
 	gmt			install-6-linux-static.sh
-	gmsh		install-4-static.sh
+	gmsh		install-4-linux-static.sh
 	triangle	install-linux-static.sh
 	chaco		install.sh
