Index: /issm/trunk-jpl/externalpackages/m1qn3/install-macos64-snowleopard.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/m1qn3/install-macos64-snowleopard.sh	(revision 19690)
+++ /issm/trunk-jpl/externalpackages/m1qn3/install-macos64-snowleopard.sh	(revision 19690)
@@ -0,0 +1,55 @@
+#!/bin/bash
+set -eu
+
+#Some cleanup 
+rm -rf install src m1qn3-3.3-distrib
+mkdir install
+
+#Download from ISSM server
+$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/m1qn3-3.3-distrib.tgz' 'm1qn3-3.3-distrib.tgz'
+
+#Untar 
+tar -xzf m1qn3-3.3-distrib.tgz
+mv m1qn3-3.3-distrib src
+
+FC="gfortran"
+
+#Compile m1qn3
+cd src/src/
+(
+cat << EOF
+LIB_EXT=a
+FC=$FC
+install: libm1qn3.\$(LIB_EXT)
+	cp libm1qn3.\$(LIB_EXT) ../../install/
+OBJECTS= m1qn3.o
+libm1qn3.\$(LIB_EXT): \$(OBJECTS)
+	ar -r libm1qn3.\$(LIB_EXT) \$(OBJECTS) 
+	ranlib libm1qn3.\$(LIB_EXT) 
+%.o: %.f
+	\$(FC) \$(FFLAGS) -fPIC -c $< -o \$@
+clean: 
+	rm -rf *.o *.\$(LIB_EXT)
+EOF
+) > Makefile
+make
+
+#compile ddot
+cd ../blas
+(
+cat << EOF
+LIB_EXT=a
+FC=$FC
+install: libddot.\$(LIB_EXT)
+	cp libddot.\$(LIB_EXT) ../../install/
+OBJECTS= ddot.o
+libddot.\$(LIB_EXT): \$(OBJECTS)
+	ar -r libddot.\$(LIB_EXT) \$(OBJECTS) 
+	ranlib libddot.\$(LIB_EXT) 
+%.o: %.f
+	\$(FC) \$(FFLAGS) -fPIC -c $< -o \$@
+clean: 
+	rm -rf *.o *.\$(LIB_EXT)
+EOF
+) > Makefile
+make
Index: /issm/trunk-jpl/externalpackages/matplotlib/install-macosx64-snowleopard.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/matplotlib/install-macosx64-snowleopard.sh	(revision 19690)
+++ /issm/trunk-jpl/externalpackages/matplotlib/install-macosx64-snowleopard.sh	(revision 19690)
@@ -0,0 +1,32 @@
+#/bin/bash
+set -eu
+
+rm -rf src deps 
+
+#export C_INCLUDE_PATH="$C_INCLUDE_PATH:/usr/include/c++/4.2.1"
+export GIT_SSL_NO_VERIFY=true 
+export CC="gcc -fPIC -std=c99 -I/usr/local/gfortran/include/c++/4.6.2 -I/usr/local/gfortran/include/c++/4.6.2/x86_64-apple-darwin11/"
+export CXX="g++ -fPIC -std=c99 -I/usr/local/gfortran/include/c++/4.6.2 -I/usr/local/gfortran/include/c++/4.6.2/x86_64-apple-darwin11/"
+export F77="gfortran -fPIC -I/usr/local/gfortran/include/c++/4.6.2 -I/usr/local/gfortran/include/c++/4.6.2/x86_64-apple-darwin11/"
+export FC="gfortran -fPIC -I/usr/local/gfortran/include/c++/4.6.2 -I/usr/local/gfortran/include/c++/4.6.2/x86_64-apple-darwin11/"
+export FFLAGS="-ff2c -I/usr/local/gfortran/include/c++/4.6.2 -I/usr/local/gfortran/include/c++/4.6.2/x86_64-apple-darwin11/"
+export ARCHFLAGS="-I/usr/local/gfortran/include/c++/4.6.2 -I/usr/local/gfortran/include/c++/4.6.2/x86_64-apple-darwin11/"
+
+git clone https://github.com/matplotlib/matplotlib
+mv matplotlib src
+mkdir deps
+cd src
+
+#only try this if the classic python setup.py build approach does not work. The approach in the next 3 lines can 
+#trigger issues of permissions with freetype. Sometimes it is better to independently install freetype2 (from the 
+#issm externalpackages) as sudo (or root), so that the python script can detect its existence automatically.
+#sudo make -f make.osx PREFIX=$ISSM_DIR/externalpackages/matplotlib/deps PYVERSION=$pythonversion fetch deps mpl_install_std
+#sudo make -f make.osx PREFIX=$ISSM_DIR/externalpackages/matplotlib/deps PYVERSION=$pythonversion mpl_install_std
+#python -c "import matplotlib; print 'Installed matplotlib', matplotlib.__version__, matplotlib.__file__"
+
+#comments: try exporting this first before calling python setup.py build
+CFLAGS=-mmacosx-version-min=10.6
+
+#to be tried:  first get freetype and zlib and libpng installed in sudo mode
+python setup.py build
+python setup.py install
Index: /issm/trunk-jpl/externalpackages/triangle/configs/macosx64/configure.snowleopard.make
===================================================================
--- /issm/trunk-jpl/externalpackages/triangle/configs/macosx64/configure.snowleopard.make	(revision 19690)
+++ /issm/trunk-jpl/externalpackages/triangle/configs/macosx64/configure.snowleopard.make	(revision 19690)
@@ -0,0 +1,5 @@
+CC=gcc 
+CSWITCHES = $(CFLAGS) -DNO_TIMER -fPIC
+TRILIBDEFS = -DTRILIBRARY
+OBJ_EXT=o
+LIB_EXT=a
Index: /issm/trunk-jpl/externalpackages/triangle/install-macosx64-snowleopard.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/triangle/install-macosx64-snowleopard.sh	(revision 19690)
+++ /issm/trunk-jpl/externalpackages/triangle/install-macosx64-snowleopard.sh	(revision 19690)
@@ -0,0 +1,24 @@
+#!/bin/bash
+set -eu
+
+#Some cleanup 
+rm -rf install triangle
+mkdir install
+
+#Download from ISSM server
+$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/triangle.zip' 'triangle.zip'
+
+#Untar 
+cd install
+cp ../triangle.zip ./
+unzip triangle.zip
+
+#copy new makefile
+cp ../configs/macosx64/configure.snowleopard.make ./
+cp ../makefile ./
+
+#Compile triangle
+make
+
+#Patch triangle.h
+patch triangle.h ../triangle.h.patch
