1 # Maintainer: Thomas Dziedzic < gostrc at gmail >
2 # Contributor: dibblethewrecker dibblethewrecker.at.jiwe.dot.org
7 pkgdesc='Geographic Information System (GIS) used for geospatial data management and analysis, image processing, graphics/maps production, spatial modeling, and visualization.'
9 url='http://grass.itc.it/index.php'
11 depends=('gdal' 'tk' 'sqlite3' 'python2' 'mesa' 'swig' 'proj' 'libjpeg' 'libpng' 'libtiff' 'cfitsio')
12 makedepends=('mysql' 'postgresql' 'r' 'fftw' 'freetype2' 'xorg-server')
13 optdepends=('fftw: required for i.fft and i.ifft modules'
14 'postgresql: PostgreSQL database interface'
15 'r: R language interface'
16 'lapack: required for GMATH library'
17 'blas: required for GMATH library'
18 'xorg-server: required for the graphical interface'
19 'wxpython: to enable the GUI')
20 options=('!libtool' '!makeflags')
21 install='grass.install'
22 source=("http://grass.itc.it/grass64/source/grass-${pkgver}.tar.gz"
25 md5sums=('d8ca83d416b5b0cf2aa9d36c81a77b23'
26 'a0e0ac6275e09a272f8ec38d3c0b4b3a'
27 '6103480c2a1adc19a50b9e925e5e6d4c')
33 sed -i 's_python $< $(GISBASE) > $@_python2 $< $(GISBASE) > $@_' gui/wxpython/Makefile
34 for file in $(find . -name '*.py' -print); do
35 sed -i 's_^#!.*/usr/bin/python_#!/usr/bin/python2_' $file
36 sed -i 's_^#!.*/usr/bin/env.*python_#!/usr/bin/env python2_' $file
39 # the following exports are probably not needed
41 export DOXNAME=python2
42 export GRASS_python=python2
45 sed -i 's/python/&2/' ./include/Make/Platform.make.in
47 # see ${srcdir}/grass-6.4.0/REQUIREMENTS.html for options
50 --with-mysql-includes=/usr/include/mysql \
55 --with-gdal=/usr/bin/gdal-config \
58 --with-proj-libs=/usr/lib \
59 --with-proj-includes=/usr/include \
60 --with-proj-share=/usr/share/proj \
61 --with-fftw-includes=/usr/include \
62 --with-fftw-libs=/usr/lib \
63 --with-python=/usr/bin/python2-config
65 #--with-freetype-includes=/usr/include
69 # some more potential problems nvm, works without, but save for future use if problems arrise
70 #cd ${pkgdir}/opt/grass-${pkgver}
71 #sed -i 's/PYTHON = python/PYTHON = python2/' include/Make/Python.make
72 #sed -i 's/GRASS_PYTHON=python/GRASS_PYTHON=python2/' etc/Init.sh
79 INST_DIR=${pkgdir}/opt/grass-${pkgver} \
80 BINDIR=${pkgdir}/usr/bin \
84 sed -i "s|GISBASE=${pkgdir}/opt/grass-${pkgver}|GISBASE=/opt/grass-${pkgver}|g" \
85 ${pkgdir}/usr/bin/grass64
87 # install profile.d file
88 install -D ${srcdir}/grass.sh \
89 ${pkgdir}/etc/profile.d/grass.sh
91 # install some freedesktop.org compatibility
92 install -D -m644 gui/icons/grass.desktop \
93 ${pkgdir}/usr/share/applications/grass.desktop
95 sed -i -e 's/grass65/grass64/' -e 's_/usr/share/icons_/usr/share/pixmaps_' \
96 ${pkgdir}/usr/share/applications/grass.desktop
98 install -D -m644 gui/icons/grass-48x48.png \
99 ${pkgdir}/usr/share/pixmaps/grass-48x48.png
101 # create a symlink for version work around
102 ln -sf /opt/grass-${pkgver} ${pkgdir}/opt/grass
104 install -D -m644 ${srcdir}/grass.conf \
105 ${pkgdir}/etc/ld.so.conf.d/grass.conf
107 # install g.html2man which is needed for some extensions
108 # FS#25705 - [grass] g.html2man is not installed into package directory
109 # https://bugs.archlinux.org/task/25705
110 # most likely upstream problem which will be fixed in a version later than 6.4.1
111 cp -r ./tools/g.html2man ${pkgdir}/opt/grass-${pkgver}/tools