1 # Maintainer: Dražen Odobašić < dodobasic at gmail >
6 pkgdesc='Geographic Information System (GIS) used for geospatial data management and analysis, image processing, graphics/maps production, spatial modeling, and visualization with GEOS support'
8 url='http://grass.itc.it/index.php'
10 depends=('gdal' 'tk' 'sqlite3' 'python2' 'mesa' 'swig' 'proj' 'libjpeg' 'libpng' 'libtiff' 'cfitsio')
11 makedepends=('mysql' 'postgresql' 'r' 'fftw' 'freetype2' 'xorg-server' 'geos')
12 optdepends=('fftw: required for i.fft and i.ifft modules'
13 'postgresql: PostgreSQL database interface'
14 'r: R language interface'
15 'lapack: required for GMATH library'
16 'blas: required for GMATH library'
17 'wxpython: to enable the GUI')
19 options=('!libtool' '!makeflags')
20 install='grass.install'
21 source=("http://grass.itc.it/grass64/source/grass-${pkgver}.tar.gz"
24 md5sums=('d8ca83d416b5b0cf2aa9d36c81a77b23'
25 'a0e0ac6275e09a272f8ec38d3c0b4b3a'
26 '6103480c2a1adc19a50b9e925e5e6d4c')
34 sed -i 's_python $< $(GISBASE) > $@_python2 $< $(GISBASE) > $@_' gui/wxpython/Makefile
35 for file in $(find . -name '*.py' -print); do
36 sed -i 's_^#!.*/usr/bin/python_#!/usr/bin/python2_' $file
37 sed -i 's_^#!.*/usr/bin/env.*python_#!/usr/bin/env python2_' $file
40 # the following exports are probably not needed
42 export DOXNAME=python2
43 export GRASS_python=python2
46 sed -i 's/python/&2/' ./include/Make/Platform.make.in
48 # see ${srcdir}/grass-6.4.0/REQUIREMENTS.html for options
51 --with-mysql-includes=/usr/include/mysql \
56 --with-gdal=/usr/bin/gdal-config \
57 --with-geos=/usr/bin/geos-config \
60 --with-proj-libs=/usr/lib \
61 --with-proj-includes=/usr/include \
62 --with-proj-share=/usr/share/proj \
63 --with-fftw-includes=/usr/include \
64 --with-fftw-libs=/usr/lib \
65 --with-python=/usr/bin/python2-config
67 #--with-freetype-includes=/usr/include
71 # some more potential problems nvm, works without, but save for future use if problems arrise
72 #cd ${pkgdir}/opt/grass-${pkgver}
73 #sed -i 's/PYTHON = python/PYTHON = python2/' include/Make/Python.make
74 #sed -i 's/GRASS_PYTHON=python/GRASS_PYTHON=python2/' etc/Init.sh
81 INST_DIR=${pkgdir}/opt/grass-${pkgver} \
82 BINDIR=${pkgdir}/usr/bin \
86 sed -i "s|GISBASE=${pkgdir}/opt/grass-${pkgver}|GISBASE=/opt/grass-${pkgver}|g" \
87 ${pkgdir}/usr/bin/grass64
89 # install profile.d file
90 install -D ${srcdir}/grass.sh \
91 ${pkgdir}/etc/profile.d/grass.sh
93 # install some freedesktop.org compatibility
94 install -D -m644 gui/icons/grass.desktop \
95 ${pkgdir}/usr/share/applications/grass.desktop
97 sed -i -e 's/grass65/grass64/' -e 's_/usr/share/icons_/usr/share/pixmaps_' \
98 ${pkgdir}/usr/share/applications/grass.desktop
100 install -D -m644 gui/icons/grass-48x48.png \
101 ${pkgdir}/usr/share/pixmaps/grass-48x48.png
103 # create a symlink for version work around
104 ln -sf /opt/grass-${pkgver} ${pkgdir}/opt/grass
106 install -D -m644 ${srcdir}/grass.conf \
107 ${pkgdir}/etc/ld.so.conf.d/grass.conf