2010-10-21 23:36:12 +08:00
#
# Apps Packages for Chakra, part of chakra-project.org
#
# maintainer (x86_64): Giuseppe Calà <jiveaxe@gmail.com>
# include global config
source ../_buildscripts/${ current_repo } -${ _arch } -cfg.conf
pkgname = grass
2011-04-16 23:57:20 +08:00
pkgver = 6.4.1
pkgrel = 1
2010-10-21 23:36:12 +08:00
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' 'python' 'mesa' 'swig' 'proj' 'libjpeg>=8' 'libpng>=1.4.0' 'libtiff' )
makedepends = ( 'mysql' 'postgresql>=8.4.1' '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' )
2012-03-16 22:51:37 +08:00
categories = ( 'education' )
2010-10-21 23:36:12 +08:00
options = ( '!libtool' '!makeflags' )
install = grass.install
source = ( " http://grass.itc.it/grass64/source/ ${ pkgname } - ${ pkgver } .tar.gz "
" ${ pkgname } .desktop "
" ${ pkgname } .sh "
" ${ pkgname } .png " )
2011-04-16 19:38:07 +08:00
2011-04-16 23:57:20 +08:00
md5sums = ( 'd8ca83d416b5b0cf2aa9d36c81a77b23'
2011-04-16 19:38:07 +08:00
'0323f2533f47cf75f1a0340bef546a11'
2010-10-21 23:36:12 +08:00
'db93730dd330f1539bd31b4373e1c00e'
'ae778ed261a40b078a8465994a0eb25e' )
build( ) {
cd ${ pkgname } -${ pkgver }
# python2 fix
2011-04-16 23:57:20 +08:00
#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
2010-10-21 23:36:12 +08:00
# 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 \
--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
}