summaryrefslogtreecommitdiff
path: root/pcr/grass
diff options
context:
space:
mode:
Diffstat (limited to 'pcr/grass')
-rw-r--r--pcr/grass/PKGBUILD138
-rw-r--r--pcr/grass/grass-python2.patch327
-rw-r--r--pcr/grass/grass-tk86-fix.patch11
-rw-r--r--pcr/grass/grass.conf1
-rw-r--r--pcr/grass/grass.install26
-rw-r--r--pcr/grass/grass.sh4
6 files changed, 507 insertions, 0 deletions
diff --git a/pcr/grass/PKGBUILD b/pcr/grass/PKGBUILD
new file mode 100644
index 000000000..aa32f8ca8
--- /dev/null
+++ b/pcr/grass/PKGBUILD
@@ -0,0 +1,138 @@
+# 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=5
+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.osgeo.org/'
+license=('GPL')
+depends=('cfitsio' 'fftw' 'gdal' 'glu' '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.osgeo.org/grass64/source/${pkgname}-${pkgver}.tar.gz"
+ "grass.sh"
+ "grass.conf"
+ "grass-python2.patch"
+ "grass-tk86-fix.patch")
+md5sums=('d3398d6b1e3a2ef19cfb6e39a5ae9919'
+ '23da2e9399b3c5504851dec37821abe1'
+ '6103480c2a1adc19a50b9e925e5e6d4c'
+ '8717c73e7d262b1cff44d35ce80c50bb'
+ 'b7cb69248a387f70dabd5ce20b8297dc')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ # Replacing previous python2 fixes with a patch.
+ # Thanks to Gunther Schulz to have reported a possible bug in the patching.
+ patch -p1 -i "${srcdir}/grass-python2.patch"
+
+ # Solves build issue reported here:
+ # http://trac.osgeo.org/grass/ticket/1843
+ patch -p1 -i "${srcdir}/grass-tk86-fix.patch"
+
+ # the following exports are probably not needed
+ export PYTHON=python2
+ export DOXNAME=python2
+ export GRASS_python=python2
+
+ # Enabling 64bit support - EGV
+ if [ "$CARCH" = "x86_64" ]; then
+ ENABLE64BIT="--enable-64bit"
+ else
+ ENABLE64BIT="--disable-64bit"
+ fi
+
+ # see ${srcdir}/grass-6.4.0/REQUIREMENTS.html for options
+ # GLw is hard disabled, since no package in Archlinux can provide it - EGV
+ ./configure ${ENABLE64BIT} \
+ --prefix=/opt \
+ --enable-64bit \
+ --enable-W11 \
+ --with-jpeg \
+ --with-tiff \
+ --with-png \
+ --with-tcltk \
+ --with-opengl \
+ --with-fftw \
+ --with-postgres \
+ --with-freetype \
+ --with-freetype-includes=/usr/include/freetype2 \
+ --without-glw \
+ --with-nls \
+ --with-gdal \
+ --with-geos \
+ --with-proj-includes=/usr/include \
+ --with-proj-libs=/usr/lib \
+ --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/pcr/grass/grass-python2.patch b/pcr/grass/grass-python2.patch
new file mode 100644
index 000000000..ee35949b5
--- /dev/null
+++ b/pcr/grass/grass-python2.patch
@@ -0,0 +1,327 @@
+diff -ur grass-6.4.2/doc/python/example_ctypes.py grass-6.4.2-new/doc/python/example_ctypes.py
+--- grass-6.4.2/doc/python/example_ctypes.py 2010-04-17 14:15:26.000000000 +0200
++++ grass-6.4.2-new/doc/python/example_ctypes.py 2012-08-16 09:33:01.480497320 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ import os, sys, subprocess
+ from ctypes import *
+ grass = CDLL("libgrass_gis.so")
+diff -ur grass-6.4.2/general/g.parser/test.py grass-6.4.2-new/general/g.parser/test.py
+--- grass-6.4.2/general/g.parser/test.py 2009-07-23 23:08:41.000000000 +0200
++++ grass-6.4.2-new/general/g.parser/test.py 2012-08-16 09:33:01.513831191 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+
+ # g.parser demo script for python programing
+
+diff -ur grass-6.4.2/gui/scripts/g.change.gui.py grass-6.4.2-new/gui/scripts/g.change.gui.py
+--- grass-6.4.2/gui/scripts/g.change.gui.py 2009-05-30 07:36:32.000000000 +0200
++++ grass-6.4.2-new/gui/scripts/g.change.gui.py 2012-08-16 09:33:04.353875090 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+
+ ############################################################################
+ #
+diff -ur grass-6.4.2/gui/scripts/g.extension.py grass-6.4.2-new/gui/scripts/g.extension.py
+--- grass-6.4.2/gui/scripts/g.extension.py 2012-02-18 18:28:29.000000000 +0100
++++ grass-6.4.2-new/gui/scripts/g.extension.py 2012-08-16 09:33:04.393875703 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+
+ ############################################################################
+ #
+diff -ur grass-6.4.2/gui/scripts/g.extension.rebuild.all.py grass-6.4.2-new/gui/scripts/g.extension.rebuild.all.py
+--- grass-6.4.2/gui/scripts/g.extension.rebuild.all.py 2012-02-01 10:26:11.000000000 +0100
++++ grass-6.4.2-new/gui/scripts/g.extension.rebuild.all.py 2012-08-16 09:33:04.320541242 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+
+ ############################################################################
+ #
+diff -ur grass-6.4.2/gui/scripts/v.type_wrapper.py grass-6.4.2-new/gui/scripts/v.type_wrapper.py
+--- grass-6.4.2/gui/scripts/v.type_wrapper.py 2009-05-30 07:36:32.000000000 +0200
++++ grass-6.4.2-new/gui/scripts/v.type_wrapper.py 2012-08-16 09:33:04.287207393 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ ############################################################################
+ #
+ # MODULE: v.type_wrapper.py (v.type wrapper script)
+diff -ur grass-6.4.2/gui/wxpython/gui_modules/menuform.py grass-6.4.2-new/gui/wxpython/gui_modules/menuform.py
+--- grass-6.4.2/gui/wxpython/gui_modules/menuform.py 2012-01-04 10:55:50.000000000 +0100
++++ grass-6.4.2-new/gui/wxpython/gui_modules/menuform.py 2012-08-16 09:33:03.000520822 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ """
+ @brief Construct simple wx.Python GUI from a GRASS command interface
+ description.
+diff -ur grass-6.4.2/gui/wxpython/scripts/d.rast3d.py grass-6.4.2-new/gui/wxpython/scripts/d.rast3d.py
+--- grass-6.4.2/gui/wxpython/scripts/d.rast3d.py 2010-10-17 19:15:32.000000000 +0200
++++ grass-6.4.2-new/gui/wxpython/scripts/d.rast3d.py 2012-08-16 09:33:04.083870925 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ #
+ ############################################################################
+ #
+diff -ur grass-6.4.2/gui/wxpython/scripts/p.cmd.py grass-6.4.2-new/gui/wxpython/scripts/p.cmd.py
+--- grass-6.4.2/gui/wxpython/scripts/p.cmd.py 2010-10-17 19:15:32.000000000 +0200
++++ grass-6.4.2-new/gui/wxpython/scripts/p.cmd.py 2012-08-16 09:33:03.870534267 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ ############################################################################
+ #
+ # MODULE: p.cmd
+diff -ur grass-6.4.2/gui/wxpython/scripts/p.db.py grass-6.4.2-new/gui/wxpython/scripts/p.db.py
+--- grass-6.4.2/gui/wxpython/scripts/p.db.py 2010-10-17 19:15:32.000000000 +0200
++++ grass-6.4.2-new/gui/wxpython/scripts/p.db.py 2012-08-16 09:33:04.047203667 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ ############################################################################
+ #
+ # MODULE: p.db
+diff -ur grass-6.4.2/gui/wxpython/scripts/p.mon.py grass-6.4.2-new/gui/wxpython/scripts/p.mon.py
+--- grass-6.4.2/gui/wxpython/scripts/p.mon.py 2010-10-17 19:15:32.000000000 +0200
++++ grass-6.4.2-new/gui/wxpython/scripts/p.mon.py 2012-08-16 09:33:03.940535364 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ ############################################################################
+ #
+ # MODULE: p.mon
+diff -ur grass-6.4.2/gui/wxpython/scripts/p.rast.py grass-6.4.2-new/gui/wxpython/scripts/p.rast.py
+--- grass-6.4.2/gui/wxpython/scripts/p.rast.py 2010-10-17 19:15:32.000000000 +0200
++++ grass-6.4.2-new/gui/wxpython/scripts/p.rast.py 2012-08-16 09:33:04.013869835 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ ############################################################################
+ #
+ # MODULE: p.rast
+diff -ur grass-6.4.2/gui/wxpython/scripts/p.vect.py grass-6.4.2-new/gui/wxpython/scripts/p.vect.py
+--- grass-6.4.2/gui/wxpython/scripts/p.vect.py 2010-10-17 19:15:32.000000000 +0200
++++ grass-6.4.2-new/gui/wxpython/scripts/p.vect.py 2012-08-16 09:33:03.980535999 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ ############################################################################
+ #
+ # MODULE: p.vect
+diff -ur grass-6.4.2/imagery/i.atcorr/create_iwave.py grass-6.4.2-new/imagery/i.atcorr/create_iwave.py
+--- grass-6.4.2/imagery/i.atcorr/create_iwave.py 2010-12-22 12:09:24.000000000 +0100
++++ grass-6.4.2-new/imagery/i.atcorr/create_iwave.py 2012-08-16 09:33:04.430542943 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ """
+ Created on Sat Mar 27 11:35:32 2010
+
+diff -ur grass-6.4.2/include/Make/Platform.make.in grass-6.4.2-new/include/Make/Platform.make.in
+--- grass-6.4.2/include/Make/Platform.make.in 2010-11-08 08:23:48.000000000 +0100
++++ grass-6.4.2-new/include/Make/Platform.make.in 2012-08-16 09:33:35.484354613 +0200
+@@ -217,7 +217,7 @@
+ USE_CAIRO = @USE_CAIRO@
+
+ #Python
+-PYTHON = python
++PYTHON = python2
+ PYTHONINC = @PYTHONINC@
+ PYTHONCFLAGS = @PYTHONCFLAGS@
+ PYTHONLDFLAGS = @PYTHONLDFLAGS@
+diff -ur grass-6.4.2/lib/python/ctypes/ctypesgencore/ctypedescs.py grass-6.4.2-new/lib/python/ctypes/ctypesgencore/ctypedescs.py
+--- grass-6.4.2/lib/python/ctypes/ctypesgencore/ctypedescs.py 2011-04-13 14:57:46.000000000 +0200
++++ grass-6.4.2-new/lib/python/ctypes/ctypesgencore/ctypedescs.py 2012-08-16 09:33:04.987218247 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+
+ '''
+ ctypesgencore.ctypedescs contains classes to represent a C type. All of them
+diff -ur grass-6.4.2/lib/python/ctypes/ctypesgencore/descriptions.py grass-6.4.2-new/lib/python/ctypes/ctypesgencore/descriptions.py
+--- grass-6.4.2/lib/python/ctypes/ctypesgencore/descriptions.py 2011-04-13 14:57:46.000000000 +0200
++++ grass-6.4.2-new/lib/python/ctypes/ctypesgencore/descriptions.py 2012-08-16 09:33:04.883883291 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+
+ """
+ ctypesgencore.descriptions contains classes to represent a description of a
+diff -ur grass-6.4.2/lib/python/ctypes/ctypesgencore/expressions.py grass-6.4.2-new/lib/python/ctypes/ctypesgencore/expressions.py
+--- grass-6.4.2/lib/python/ctypes/ctypesgencore/expressions.py 2011-04-13 14:57:46.000000000 +0200
++++ grass-6.4.2-new/lib/python/ctypes/ctypesgencore/expressions.py 2012-08-16 09:33:05.023885450 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+
+ '''
+ The expressions module contains classes to represent an expression. The main
+diff -ur grass-6.4.2/lib/python/ctypes/ctypesgencore/__init__.py grass-6.4.2-new/lib/python/ctypes/ctypesgencore/__init__.py
+--- grass-6.4.2/lib/python/ctypes/ctypesgencore/__init__.py 2011-04-13 14:57:46.000000000 +0200
++++ grass-6.4.2-new/lib/python/ctypes/ctypesgencore/__init__.py 2012-08-16 09:33:04.920550527 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+
+ """
+ Ctypesgencore is the module that contains the main body of ctypesgen - in fact,
+diff -ur grass-6.4.2/lib/python/ctypes/ctypesgencore/messages.py grass-6.4.2-new/lib/python/ctypes/ctypesgencore/messages.py
+--- grass-6.4.2/lib/python/ctypes/ctypesgencore/messages.py 2011-04-13 14:57:46.000000000 +0200
++++ grass-6.4.2-new/lib/python/ctypes/ctypesgencore/messages.py 2012-08-16 09:33:04.503877428 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+
+ """
+ ctypesgencore.messages contains functions to display status, error, or warning
+diff -ur grass-6.4.2/lib/python/ctypes/ctypesgencore/options.py grass-6.4.2-new/lib/python/ctypes/ctypesgencore/options.py
+--- grass-6.4.2/lib/python/ctypes/ctypesgencore/options.py 2011-04-13 14:57:46.000000000 +0200
++++ grass-6.4.2-new/lib/python/ctypes/ctypesgencore/options.py 2012-08-16 09:33:04.707213885 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+
+ """
+ All of the components of ctypegencore require an argument called "options".
+diff -ur grass-6.4.2/lib/python/ctypes/ctypesgencore/parser/cdeclarations.py grass-6.4.2-new/lib/python/ctypes/ctypesgencore/parser/cdeclarations.py
+--- grass-6.4.2/lib/python/ctypes/ctypesgencore/parser/cdeclarations.py 2011-04-13 14:57:46.000000000 +0200
++++ grass-6.4.2-new/lib/python/ctypes/ctypesgencore/parser/cdeclarations.py 2012-08-16 09:33:05.393891162 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+
+ '''
+ This file contains classes that represent C declarations. cparser produces
+diff -ur grass-6.4.2/lib/python/ctypes/ctypesgencore/parser/cgrammar.py grass-6.4.2-new/lib/python/ctypes/ctypesgencore/parser/cgrammar.py
+--- grass-6.4.2/lib/python/ctypes/ctypesgencore/parser/cgrammar.py 2011-04-13 14:57:46.000000000 +0200
++++ grass-6.4.2-new/lib/python/ctypes/ctypesgencore/parser/cgrammar.py 2012-08-16 09:33:05.433891816 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+
+ '''This is a yacc grammar for C.
+
+diff -ur grass-6.4.2/lib/python/ctypes/ctypesgencore/parser/cparser.py grass-6.4.2-new/lib/python/ctypes/ctypesgencore/parser/cparser.py
+--- grass-6.4.2/lib/python/ctypes/ctypesgencore/parser/cparser.py 2011-04-13 14:57:46.000000000 +0200
++++ grass-6.4.2-new/lib/python/ctypes/ctypesgencore/parser/cparser.py 2012-08-16 09:33:05.213888390 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+
+ '''
+ Parse a C source file.
+diff -ur grass-6.4.2/lib/python/ctypes/ctypesgencore/parser/ctypesparser.py grass-6.4.2-new/lib/python/ctypes/ctypesgencore/parser/ctypesparser.py
+--- grass-6.4.2/lib/python/ctypes/ctypesgencore/parser/ctypesparser.py 2011-04-13 14:57:46.000000000 +0200
++++ grass-6.4.2-new/lib/python/ctypes/ctypesgencore/parser/ctypesparser.py 2012-08-16 09:33:05.093886533 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+
+ '''
+ ctypesgencore.parser.ctypesparser contains a class, CtypesParser, which is a
+diff -ur grass-6.4.2/lib/python/ctypes/ctypesgencore/parser/datacollectingparser.py grass-6.4.2-new/lib/python/ctypes/ctypesgencore/parser/datacollectingparser.py
+--- grass-6.4.2/lib/python/ctypes/ctypesgencore/parser/datacollectingparser.py 2011-04-13 14:57:46.000000000 +0200
++++ grass-6.4.2-new/lib/python/ctypes/ctypesgencore/parser/datacollectingparser.py 2012-08-16 09:33:05.473892425 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+
+ """
+ DataCollectingParser subclasses ctypesparser.CtypesParser and builds Description
+diff -ur grass-6.4.2/lib/python/ctypes/ctypesgencore/parser/__init__.py grass-6.4.2-new/lib/python/ctypes/ctypesgencore/parser/__init__.py
+--- grass-6.4.2/lib/python/ctypes/ctypesgencore/parser/__init__.py 2011-04-13 14:57:46.000000000 +0200
++++ grass-6.4.2-new/lib/python/ctypes/ctypesgencore/parser/__init__.py 2012-08-16 09:33:05.283889499 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+
+ """
+ This package parses C header files and generates lists of functions, typedefs,
+diff -ur grass-6.4.2/lib/python/ctypes/ctypesgencore/parser/pplexer.py grass-6.4.2-new/lib/python/ctypes/ctypesgencore/parser/pplexer.py
+--- grass-6.4.2/lib/python/ctypes/ctypesgencore/parser/pplexer.py 2011-04-13 14:57:46.000000000 +0200
++++ grass-6.4.2-new/lib/python/ctypes/ctypesgencore/parser/pplexer.py 2012-08-16 09:33:05.180554533 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+
+ '''Preprocess a C source file using gcc and convert the result into
+ a token stream
+diff -ur grass-6.4.2/lib/python/ctypes/ctypesgencore/parser/preprocessor.py grass-6.4.2-new/lib/python/ctypes/ctypesgencore/parser/preprocessor.py
+--- grass-6.4.2/lib/python/ctypes/ctypesgencore/parser/preprocessor.py 2011-04-13 14:57:46.000000000 +0200
++++ grass-6.4.2-new/lib/python/ctypes/ctypesgencore/parser/preprocessor.py 2012-08-16 09:33:05.250555640 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+
+ '''Preprocess a C source file using gcc and convert the result into
+ a token stream
+diff -ur grass-6.4.2/lib/python/ctypes/ctypesgencore/printer/__init__.py grass-6.4.2-new/lib/python/ctypes/ctypesgencore/printer/__init__.py
+--- grass-6.4.2/lib/python/ctypes/ctypesgencore/printer/__init__.py 2011-04-13 14:57:45.000000000 +0200
++++ grass-6.4.2-new/lib/python/ctypes/ctypesgencore/printer/__init__.py 2012-08-16 09:33:04.640546189 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+
+ """
+ This module is the backend to ctypesgen; it contains classes to
+diff -ur grass-6.4.2/lib/python/ctypes/ctypesgencore/printer/printer.py grass-6.4.2-new/lib/python/ctypes/ctypesgencore/printer/printer.py
+--- grass-6.4.2/lib/python/ctypes/ctypesgencore/printer/printer.py 2011-04-13 14:57:45.000000000 +0200
++++ grass-6.4.2-new/lib/python/ctypes/ctypesgencore/printer/printer.py 2012-08-16 09:33:04.537211279 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+
+ import os, sys, time
+ from ctypesgencore.descriptions import *
+diff -ur grass-6.4.2/lib/python/ctypes/ctypesgencore/processor/dependencies.py grass-6.4.2-new/lib/python/ctypes/ctypesgencore/processor/dependencies.py
+--- grass-6.4.2/lib/python/ctypes/ctypesgencore/processor/dependencies.py 2011-04-13 14:57:45.000000000 +0200
++++ grass-6.4.2-new/lib/python/ctypes/ctypesgencore/processor/dependencies.py 2012-08-16 09:33:04.743881125 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+
+ """
+ The dependencies module determines which descriptions depend on which other
+diff -ur grass-6.4.2/lib/python/ctypes/ctypesgencore/processor/__init__.py grass-6.4.2-new/lib/python/ctypes/ctypesgencore/processor/__init__.py
+--- grass-6.4.2/lib/python/ctypes/ctypesgencore/processor/__init__.py 2011-04-13 14:57:45.000000000 +0200
++++ grass-6.4.2-new/lib/python/ctypes/ctypesgencore/processor/__init__.py 2012-08-16 09:33:04.810548840 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+
+ """
+ This module contains functions to operate on the DeclarationCollection produced
+diff -ur grass-6.4.2/lib/python/ctypes/ctypesgencore/processor/operations.py grass-6.4.2-new/lib/python/ctypes/ctypesgencore/processor/operations.py
+--- grass-6.4.2/lib/python/ctypes/ctypesgencore/processor/operations.py 2011-04-13 14:57:45.000000000 +0200
++++ grass-6.4.2-new/lib/python/ctypes/ctypesgencore/processor/operations.py 2012-08-16 09:33:04.847216053 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+
+ """
+ The operations module contains various functions to process the
+diff -ur grass-6.4.2/lib/python/ctypes/ctypesgencore/processor/pipeline.py grass-6.4.2-new/lib/python/ctypes/ctypesgencore/processor/pipeline.py
+--- grass-6.4.2/lib/python/ctypes/ctypesgencore/processor/pipeline.py 2011-04-13 14:57:45.000000000 +0200
++++ grass-6.4.2-new/lib/python/ctypes/ctypesgencore/processor/pipeline.py 2012-08-16 09:33:04.777214964 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+
+ import ctypes, re, os
+ from ctypesgencore.processor.operations import *
+diff -ur grass-6.4.2/lib/python/ctypes/ctypesgen.py grass-6.4.2-new/lib/python/ctypes/ctypesgen.py
+--- grass-6.4.2/lib/python/ctypes/ctypesgen.py 2011-04-13 14:57:46.000000000 +0200
++++ grass-6.4.2-new/lib/python/ctypes/ctypesgen.py 2012-08-16 09:33:05.573893972 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+
+ def find_names_in_modules(modules):
+ names = set()
diff --git a/pcr/grass/grass-tk86-fix.patch b/pcr/grass/grass-tk86-fix.patch
new file mode 100644
index 000000000..f0dbb7c2b
--- /dev/null
+++ b/pcr/grass/grass-tk86-fix.patch
@@ -0,0 +1,11 @@
+--- grass-6.4.2/visualization/nviz/src/draw.c 2008-12-19 21:29:59.000000000 +0100
++++ grass-6.4.2/visualization/nviz/src/draw_new.c 2013-01-21 22:22:09.819456565 +0100
+@@ -32,7 +32,7 @@
+ void CancelFunc_Hook(void)
+ {
+ if (cancel_script != NULL) {
+- TkCopyAndGlobalEval(cancel_interp, cancel_script);
++ Tcl_EvalEx(cancel_interp, cancel_script, -1, TCL_EVAL_GLOBAL);
+ }
+ }
+
diff --git a/pcr/grass/grass.conf b/pcr/grass/grass.conf
new file mode 100644
index 000000000..bb4964d93
--- /dev/null
+++ b/pcr/grass/grass.conf
@@ -0,0 +1 @@
+/opt/grass/lib
diff --git a/pcr/grass/grass.install b/pcr/grass/grass.install
new file mode 100644
index 000000000..878ea0186
--- /dev/null
+++ b/pcr/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/pcr/grass/grass.sh b/pcr/grass/grass.sh
new file mode 100644
index 000000000..e36980c16
--- /dev/null
+++ b/pcr/grass/grass.sh
@@ -0,0 +1,4 @@
+export GISBASE=/opt/grass
+export PATH=$PATH:$GISBASE/bin:$GISBASE/scripts
+export MANPATH=$MANPATH:$GISBASE/man
+export GRASS_PYTHON=python2