# Maintainer: Thomas Dziedzic < gostrc at gmail > # Contributor: dibblethewrecker dibblethewrecker.at.jiwe.dot.org pkgname=grass pkgver=6.4.0 pkgrel=6 pkgdesc='Geographic Information System (GIS) used for geospatial data management and analysis, image processing, graphics/maps production, spatial modeling, and visualization.' arch=('i686' 'x86_64') url='http://grass.itc.it/index.php' license=('GPL') depends=('gdal' 'tk' 'sqlite3' 'python2' 'mesa' 'swig' 'proj' 'libjpeg' 'libpng' 'libtiff' 'cfitsio') makedepends=('mysql' 'postgresql' 'r' 'fftw' 'freetype2' 'xorg-server') optdepends=('fftw: required for i.fft and i.ifft modules' 'postgresql: PostgreSQL database interface' 'r: R language interface' 'lapack: required for GMATH library' 'blas: required for GMATH library' 'xorg-server: required for the graphical interface') options=('!libtool' '!makeflags') install=grass.install source=("http://grass.itc.it/grass64/source/${pkgname}-${pkgver}.tar.gz" "${pkgname}.desktop" "${pkgname}.sh" "${pkgname}.png") md5sums=('ac3233aa3351f8e060ea48246aa01c7f' 'c0d669c77f60f8544a34a55c5e9e087c' 'a0e0ac6275e09a272f8ec38d3c0b4b3a' 'ae778ed261a40b078a8465994a0eb25e') build() { cd ${pkgname}-${pkgver} # python2 fix sed -i 's_python $< $(GISBASE) > $@_python2 $< $(GISBASE) > $@_' gui/wxpython/Makefile for file in $(find . -name '*.py' -print) gui/wxpython/scripts/d.rast3d; do sed -i 's_^#!.*/usr/bin/python_#!/usr/bin/python2_' $file sed -i 's_^#!.*/usr/bin/env.*python_#!/usr/bin/env python2_' $file done # see ${srcdir}/grass-6.4.0/REQUIREMENTS.html for options ./configure \ --prefix=/opt \ --with-mysql-includes=/usr/include/mysql \ --with-mysql \ --with-sqlite \ --with-postgres \ --with-fftw \ --with-gdal=/usr/bin/gdal-config \ --with-python=/usr/bin/python2-config \ --with-blas \ --with-lapack \ --with-proj-libs=/usr/lib \ --with-proj-includes=/usr/include \ --with-proj-share=/usr/share/proj \ --with-fftw-includes=/usr/include \ --with-fftw-libs=/usr/lib #--with-freetype-includes=/usr/include make } package() { cd ${pkgname}-${pkgver} make \ INST_DIR=${pkgdir}/opt/grass-${pkgver} \ BINDIR=${pkgdir}/usr/bin \ install # fix $GISBASE path sed -i "s|GISBASE=${pkgdir}/opt/grass-${pkgver}|GISBASE=/opt/grass-${pkgver}|g" \ ${pkgdir}/usr/bin/grass64 # strip html docs #rm -r ${pkgdir}/opt/grass-${pkgver}/docs/html # install profile.d file install -D ${srcdir}/grass.sh \ ${pkgdir}/etc/profile.d/grass.sh # install some freedesktop.org compatibility install -D -m644 ${srcdir}/${pkgname}.desktop \ ${pkgdir}/usr/share/applications/${pkgname}.desktop install -D -m644 ${srcdir}/${pkgname}.png \ ${pkgdir}/usr/share/pixmaps/${pkgname}.png # create a symlink for version work around ln -sf /opt/grass-${pkgver} ${pkgdir}/opt/grass install -d ${pkgdir}/etc/ld.so.conf.d/ echo '/opt/grass/lib' > ${pkgdir}/etc/ld.so.conf.d/grass.conf # some more potential problems nvm, works without, but save for future use if problems arrise #cd ${pkgdir}/opt/${pkgname}-${pkgver} #sed -i 's/PYTHON = python/PYTHON = python2/' include/Make/Python.make #sed -i 's/GRASS_PYTHON=python/GRASS_PYTHON=python2/' etc/Init.sh }