summaryrefslogtreecommitdiff
path: root/gis/grass
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-05-31 16:24:59 +0000
committerroot <root@rshg054.dnsready.net>2012-05-31 16:24:59 +0000
commitf5a8de28b86c2c838a28e79aa54f8b4c3fbd869e (patch)
tree26873b23c15ea28962e55ab4dc7ae94b468089cf /gis/grass
parentf1ae949e08a764ac063703dc9bb7f0afd7c16e96 (diff)
Thu May 31 16:24:59 UTC 2012
Diffstat (limited to 'gis/grass')
-rw-r--r--gis/grass/PKGBUILD119
-rw-r--r--gis/grass/grass.conf1
-rw-r--r--gis/grass/grass.install26
-rw-r--r--gis/grass/grass.sh4
4 files changed, 150 insertions, 0 deletions
diff --git a/gis/grass/PKGBUILD b/gis/grass/PKGBUILD
new file mode 100644
index 000000000..eaf1dfc5c
--- /dev/null
+++ b/gis/grass/PKGBUILD
@@ -0,0 +1,119 @@
+# Maintainer: Thomas Dziedzic < gostrc at gmail >
+# Contributor: dibblethewrecker dibblethewrecker.at.jiwe.dot.org
+# Contributor: Emiliano Vavassori <syntaxerrormmm(at)gmail.com>
+
+pkgname=grass
+pkgver=6.4.2
+pkgrel=2
+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.fbk.eu/'
+license=('GPL')
+depends=('cfitsio' 'fftw' 'gdal' 'libjpeg' 'libpng' 'libtiff' 'libxmu' 'mesa' 'python2' 'postgresql' 'proj' 'tcl' 'tk' 'wxpython' 'xorg-server')
+makedepends=('freetype2')
+optdepends=('sqlite3: sqlite3 database interface'
+ 'mysql: mysql database interface'
+ 'r: R language interface'
+ 'blas: required for GMATH library'
+ 'lapack: required for GMATH library'
+ 'cairo: cairo support'
+ 'ffmpeg: ffmpeg support'
+ 'lesstif: motif support')
+options=('!libtool' '!makeflags')
+install='grass.install'
+source=("http://grass.fbk.eu/grass64/source/${pkgname}-${pkgver}.tar.gz"
+ "grass.sh"
+ "grass.conf")
+md5sums=('d3398d6b1e3a2ef19cfb6e39a5ae9919'
+ 'a0e0ac6275e09a272f8ec38d3c0b4b3a'
+ '6103480c2a1adc19a50b9e925e5e6d4c')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ # python2 fix
+ sed -i 's_python $< $(GISBASE) > $@_python2 $< $(GISBASE) > $@_' gui/wxpython/Makefile
+ for file in $(find . -name '*.py' -print); do
+ sed -i 's_^#!.*/usr/bin/python_#!/usr/bin/python2_' $file
+ sed -i 's_^#!.*/usr/bin/env.*python_#!/usr/bin/env python2_' $file
+ done
+
+ # the following exports are probably not needed
+ export PYTHON=python2
+ export DOXNAME=python2
+ export GRASS_python=python2
+
+ # fix wxpython error
+ sed -i 's/python/&2/' ./include/Make/Platform.make.in
+
+ # see ${srcdir}/grass-6.4.0/REQUIREMENTS.html for options
+ ./configure \
+ --prefix=/opt \
+ --with-fftw \
+ --with-postgres \
+ --with-freetype \
+ --with-freetype-includes=/usr/include/freetype2 \
+ --with-nls \
+ --with-gdal \
+ --with-geos \
+ --with-proj \
+ --with-proj-share=/usr/share/proj \
+ --with-python=/usr/bin/python2-config \
+ --with-wxwidgets=/usr/bin/wx-config
+
+ # sqlite3 support
+ # --with-sqlite \
+
+ # mysql support
+ # --with-mysql \
+ # --with-mysql-includes=/usr/include/mysql \
+
+ # blas support
+ # --with-blas \
+
+ # lapack support
+ # --with-lapack \
+
+ make
+
+ # some more potential problems nvm, works without, but save for future use if problems arrise
+ #cd ${pkgdir}/opt/grass-${pkgver}
+ #sed -i 's/PYTHON = python/PYTHON = python2/' include/Make/Python.make
+ #sed -i 's/GRASS_PYTHON=python/GRASS_PYTHON=python2/' etc/Init.sh
+}
+
+package() {
+ cd "${srcdir}/${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
+
+ # install profile.d file
+ install -D ${srcdir}/grass.sh \
+ ${pkgdir}/etc/profile.d/grass.sh
+
+ # install some freedesktop.org compatibility
+ install -D -m644 gui/icons/grass.desktop \
+ ${pkgdir}/usr/share/applications/grass.desktop
+
+ sed -i -e 's/grass65/grass64/' -e 's_/usr/share/icons_/usr/share/pixmaps_' \
+ ${pkgdir}/usr/share/applications/grass.desktop
+
+ install -D -m644 gui/icons/grass-48x48.png \
+ ${pkgdir}/usr/share/pixmaps/grass-48x48.png
+
+ install -D -m644 ${srcdir}/grass.conf \
+ ${pkgdir}/etc/ld.so.conf.d/grass.conf
+
+ # install g.html2man which is needed for some extensions
+ # FS#25705 - [grass] g.html2man is not installed into package directory
+ # https://bugs.archlinux.org/task/25705
+ # most likely upstream problem which will be fixed in a version later than 6.4.1
+ cp -r ./tools/g.html2man ${pkgdir}/opt/${pkgname}-${pkgver}/tools
+}
diff --git a/gis/grass/grass.conf b/gis/grass/grass.conf
new file mode 100644
index 000000000..bb4964d93
--- /dev/null
+++ b/gis/grass/grass.conf
@@ -0,0 +1 @@
+/opt/grass/lib
diff --git a/gis/grass/grass.install b/gis/grass/grass.install
new file mode 100644
index 000000000..878ea0186
--- /dev/null
+++ b/gis/grass/grass.install
@@ -0,0 +1,26 @@
+## arg 1: the new package version
+post_install() {
+ pkgver=${1%-*}
+
+ # Create symlink for version workaround.
+ ln -sf /opt/grass-${pkgver} /opt/grass
+
+ echo 'Please relogin for required variables to be set from /etc/profile.d/grass.sh'
+}
+
+## arg 1: the new package version
+## arg 2: the old package version
+post_upgrade() {
+ pkgver=${1%-*}
+
+ # Updating symlink for new version
+ ln -sf /opt/grass-${pkgver} /opt/grass
+}
+
+## arg 1: the old package version
+pre_remove() {
+ # Removing cruft symlink
+ rm -f /opt/grass
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/gis/grass/grass.sh b/gis/grass/grass.sh
new file mode 100644
index 000000000..ccc2fcd7e
--- /dev/null
+++ b/gis/grass/grass.sh
@@ -0,0 +1,4 @@
+export GISBASE=/opt/grass
+export PATH=$PATH:$GISBASE/bin
+export MANPATH=$MANPATH:$GISBASE/man
+export GRASS_PYTHON=python2