Skip to content

Instantly share code, notes, and snippets.

@rnix
Last active December 10, 2015 07:18
Show Gist options
  • Save rnix/4399853 to your computer and use it in GitHub Desktop.
Save rnix/4399853 to your computer and use it in GitHub Desktop.
Build Grass from source on Mac OS X 10.8 w/ Homebrew
curl -ks https://gist.github.com/raw/4399853/grass64-setup.sh | bash -il
#!/bin/bash
export PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig:${PKG_CONFIG_PATH}
export LD_LIBRARY_PATH=/usr/local/lib:${LD_LIBRARY_PATH}
export CPATH=/usr/local/includes:${CPATH}
./configure \
--with-freetype=yes \
--with-freetype-includes=/usr/local/include/freetype2 \
--with-geos=$(which geos-config) \
--with-postgres=yes \
--with-readline=yes \
--with-sqlite=yes \
--with-wxwidgets=$(which wx-config) \
--with-tcl-config=/Library/Frameworks/Tcl.framework/tclConfig.sh \
--with-tk-config=/Library/Frameworks/Tk.framework/tkConfig.sh \
--x-includes=/usr/X11/include \
--x-libraries=/usr/X11/lib \
--with-opengl=aqua
#!/bin/bash
[ -d .svn ] || {
[ -d grass64 ] || {
svn checkout https://svn.osgeo.org/grass/grass/branches/releasebranch_6_4 grass64 || exit ${LINENO}
}
cd grass64
}
svn update
# Requires Tcl/Tk
[ -f /Library/Frameworks/Tcl.framework/tclConfig.sh ] || {
TCLTK=ActiveTcl8.5.13.0.296436-macosx10.5-i386-x86_64-threaded.dmg
curl -sLO http://downloads.activestate.com/ActiveTcl/releases/8.5.13.0/${TCLTK} || exit ${LINENO}
open ${TCLTK}
sleep 5
open /Volumes/ActiveTcl-8.5/ActiveTcl-8.5.pkg
}
while ! [ -f /Library/Frameworks/Tcl.framework/tclConfig.sh -a -f /Library/Frameworks/Tk.framework/tkConfig.sh ]; do
sleep 1
printf "\e[80D\e[2J%s " "$(date)"
done
printf "\e[80D\e[2J%s" "\n"
# Requires Proj.4
which proj || brew install proj &
# Requires GDAL
which gdalinfo || brew install gdal &
# Requires FFTW
which fftw-wisdom || brew install fftw &
# Requires Cairo
which cairo-trace || brew install cairo &
# Requires FreeType
which freetype-config || brew install freetype &
# GUI requires wxPython
which wxPython || brew install wxwidgets &
wait || exit ${LINENO}
curl -ks https://gist.github.com/raw/4399853/grass64-configure.sh | bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment