summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Arnold <nerdboy@gentoo.org>2008-06-24 07:45:51 +0000
committerSteve Arnold <nerdboy@gentoo.org>2008-06-24 07:45:51 +0000
commitda3c13da7c69105feed927fbb3a8ddfba24dcd82 (patch)
treedeb0208a23d664b35a7cf15e00a421fc583ea1ec /sci-geosciences/grass
parentstable x86, bug 228827 (diff)
downloadgentoo-2-da3c13da7c69105feed927fbb3a8ddfba24dcd82.tar.gz
gentoo-2-da3c13da7c69105feed927fbb3a8ddfba24dcd82.tar.bz2
gentoo-2-da3c13da7c69105feed927fbb3a8ddfba24dcd82.zip
added latest release with wxpython gui support, QA fixes, etc
(Portage version: 2.1.5.5)
Diffstat (limited to 'sci-geosciences/grass')
-rw-r--r--sci-geosciences/grass/ChangeLog16
-rw-r--r--sci-geosciences/grass/files/grass-6.3.0-html-nonviz.patch14
-rw-r--r--sci-geosciences/grass/grass-5.4.0.ebuild12
-rw-r--r--sci-geosciences/grass/grass-6.0.1.ebuild12
-rw-r--r--sci-geosciences/grass/grass-6.2.0-r1.ebuild14
-rw-r--r--sci-geosciences/grass/grass-6.2.1.ebuild14
-rw-r--r--sci-geosciences/grass/grass-6.2.3.ebuild6
-rw-r--r--sci-geosciences/grass/grass-6.3.0.ebuild296
8 files changed, 352 insertions, 32 deletions
diff --git a/sci-geosciences/grass/ChangeLog b/sci-geosciences/grass/ChangeLog
index 7c8ded134a43..8edfbd84d1b6 100644
--- a/sci-geosciences/grass/ChangeLog
+++ b/sci-geosciences/grass/ChangeLog
@@ -1,6 +1,18 @@
# ChangeLog for sci-geosciences/grass
# Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/grass/ChangeLog,v 1.57 2008/05/21 19:01:32 dev-zero Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/grass/ChangeLog,v 1.58 2008/06/24 07:45:51 nerdboy Exp $
+
+*grass-6.3.0 (24 Jun 2008)
+
+ 24 Jun 2008; Steve Arnold <nerdboy@gentoo.org>
+ +files/grass-6.3.0-html-nonviz.patch, grass-5.4.0.ebuild,
+ grass-6.0.1.ebuild, grass-6.2.0-r1.ebuild, grass-6.2.1.ebuild,
+ grass-6.2.3.ebuild, +grass-6.3.0.ebuild:
+ Added latest release with wxpython gui support and tested with gcc 4.3.1
+ (see bugs #223639 and #217917). Now includes multiple ffmpeg dirctories
+ so sing out if you know of a better way... Also fixed more QA warnings
+ in older versions.
+
21 May 2008; Tiziano Müller <dev-zero@gentoo.org> grass-5.4.0.ebuild,
grass-6.0.1.ebuild, grass-6.2.0-r1.ebuild, grass-6.2.1.ebuild,
@@ -24,7 +36,7 @@
04 May 2008; Steve Arnold <nerdboy@gentoo.org> grass-6.2.3.ebuild:
Updated for changed include path in latest ffmpeg. Still needs testing,
but it builds and runs; so far I've only found avcodec included in the
- source.
+ source for Grass 6.2.3.
*grass-6.2.3 (01 May 2008)
diff --git a/sci-geosciences/grass/files/grass-6.3.0-html-nonviz.patch b/sci-geosciences/grass/files/grass-6.3.0-html-nonviz.patch
new file mode 100644
index 000000000000..47c2633a657e
--- /dev/null
+++ b/sci-geosciences/grass/files/grass-6.3.0-html-nonviz.patch
@@ -0,0 +1,14 @@
+--- tools/build_html_index.sh.orig 2008-04-16 10:21:15.000000000 +0200
++++ tools/build_html_index.sh 2008-04-16 10:23:52.000000000 +0200
+@@ -141 +141 @@
+-cp -f grassdocs.css $HTMLDIR/nviz/
++#cp -f grassdocs.css $HTMLDIR/nviz/
+@@ -145 +145 @@
+-cp -f grass_logo.png $HTMLDIR/nviz/
++#cp -f grass_logo.png $HTMLDIR/nviz/
+@@ -182 +182 @@
+-echo "<tr><td>&nbsp;&nbsp;<a href=\"nviz.html\">nviz</a> </td><td>visualization suite</td></tr>" >> $FULLINDEX
++#echo "<tr><td>&nbsp;&nbsp;<a href=\"nviz.html\">nviz</a> </td><td>visualization suite</td></tr>" >> $FULLINDEX
+@@ -262 +262 @@
+-echo "<li><a href=\"nviz.html\">nviz</a> visualization and animation tool</li>" >> $FILENAME
++#echo "<li><a href=\"nviz.html\">nviz</a> visualization and animation tool</li>" >> $FILENAME
diff --git a/sci-geosciences/grass/grass-5.4.0.ebuild b/sci-geosciences/grass/grass-5.4.0.ebuild
index 5fb0d35fb63f..fcba86174e20 100644
--- a/sci-geosciences/grass/grass-5.4.0.ebuild
+++ b/sci-geosciences/grass/grass-5.4.0.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/grass/grass-5.4.0.ebuild,v 1.14 2008/05/21 19:01:32 dev-zero Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/grass/grass-5.4.0.ebuild,v 1.15 2008/06/24 07:45:51 nerdboy Exp $
inherit eutils toolchain-funcs
@@ -15,13 +15,9 @@ SLOT="0"
KEYWORDS="amd64 sparc x86"
IUSE="tk png jpeg tiff postgres odbc motif gdal mysql blas lapack X fftw truetype nls opengl"
-RDEPEND=">=sys-devel/make-3.80
- >=sys-libs/zlib-1.1.4
- >=sys-devel/flex-2.5.4a
- >=sys-devel/bison-1.35
+RDEPEND=">=sys-libs/zlib-1.1.4
>=sys-libs/ncurses-5.3
>=sys-libs/gdbm-1.8.0
- >=sys-devel/gcc-3.2.2
virtual/man
>=sci-libs/proj-4.4.7
blas? ( virtual/blas )
@@ -51,6 +47,10 @@ RDEPEND=">=sys-devel/make-3.80
)"
DEPEND="${RDEPEND}
+ >=sys-devel/make-3.80
+ >=sys-devel/flex-2.5.4a
+ >=sys-devel/bison-1.35
+ >=sys-devel/gcc-3.2.2
X? (
x11-proto/xproto
x11-proto/xextproto
diff --git a/sci-geosciences/grass/grass-6.0.1.ebuild b/sci-geosciences/grass/grass-6.0.1.ebuild
index 9894a8c39622..0807f7b2dc28 100644
--- a/sci-geosciences/grass/grass-6.0.1.ebuild
+++ b/sci-geosciences/grass/grass-6.0.1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/grass/grass-6.0.1.ebuild,v 1.17 2008/05/21 19:01:32 dev-zero Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/grass/grass-6.0.1.ebuild,v 1.18 2008/06/24 07:45:51 nerdboy Exp $
inherit eutils
@@ -20,13 +20,9 @@ IUSE="fftw jpeg motif mysql nls odbc opengl png postgres readline tk tiff truety
RESTRICT="strip"
-RDEPEND=">=sys-devel/make-3.80
- >=sys-libs/zlib-1.1.4
- >=sys-devel/flex-2.5.4a
- >=sys-devel/bison-1.35
+RDEPEND=">=sys-libs/zlib-1.1.4
>=sys-libs/ncurses-5.3
>=sys-libs/gdbm-1.8.0
- >=sys-devel/gcc-3.2.2
virtual/man
>=sci-libs/proj-4.4.7
sci-libs/gdal
@@ -54,6 +50,10 @@ RDEPEND=">=sys-devel/make-3.80
x11-libs/libXaw"
DEPEND="${RDEPEND}
+ >=sys-devel/make-3.80
+ >=sys-devel/flex-2.5.4a
+ >=sys-devel/bison-1.35
+ >=sys-devel/gcc-3.2.2
x11-proto/xproto
x11-proto/xextproto"
diff --git a/sci-geosciences/grass/grass-6.2.0-r1.ebuild b/sci-geosciences/grass/grass-6.2.0-r1.ebuild
index 12699e65802b..0ddf1871ee2a 100644
--- a/sci-geosciences/grass/grass-6.2.0-r1.ebuild
+++ b/sci-geosciences/grass/grass-6.2.0-r1.ebuild
@@ -1,8 +1,8 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/grass/grass-6.2.0-r1.ebuild,v 1.11 2008/05/21 19:01:32 dev-zero Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/grass/grass-6.2.0-r1.ebuild,v 1.12 2008/06/24 07:45:51 nerdboy Exp $
-inherit eutils autotools
+inherit eutils libtool
DESCRIPTION="An open-source GIS with raster and vector functionality"
HOMEPAGE="http://grass.itc.it/"
@@ -18,13 +18,9 @@ postgres python readline sqlite tcl tk tiff truetype"
RESTRICT="strip"
-RDEPEND=">=sys-devel/make-3.80
- >=sys-libs/zlib-1.1.4
- >=sys-devel/flex-2.5.4a
- >=sys-devel/bison-1.35
+RDEPEND=">=sys-libs/zlib-1.1.4
>=sys-libs/ncurses-5.3
>=sys-libs/gdbm-1.8.0
- >=sys-devel/gcc-3.2.2
|| (
sys-apps/man
sys-apps/man-db )
@@ -60,6 +56,10 @@ RDEPEND=">=sys-devel/make-3.80
x11-libs/libXaw"
DEPEND="${RDEPEND}
+ >=sys-devel/make-3.80
+ >=sys-devel/flex-2.5.4a
+ >=sys-devel/bison-1.35
+ >=sys-devel/gcc-3.2.2
x11-proto/xproto
x11-proto/xextproto"
diff --git a/sci-geosciences/grass/grass-6.2.1.ebuild b/sci-geosciences/grass/grass-6.2.1.ebuild
index fa0c34ff1704..0bfd518099f5 100644
--- a/sci-geosciences/grass/grass-6.2.1.ebuild
+++ b/sci-geosciences/grass/grass-6.2.1.ebuild
@@ -1,8 +1,8 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/grass/grass-6.2.1.ebuild,v 1.11 2008/05/21 19:01:32 dev-zero Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/grass/grass-6.2.1.ebuild,v 1.12 2008/06/24 07:45:50 nerdboy Exp $
-inherit eutils autotools
+inherit eutils libtool
DESCRIPTION="An open-source GIS with raster and vector functionality, as well as 3D vizualization."
HOMEPAGE="http://grass.itc.it/"
@@ -18,13 +18,9 @@ postgres python readline sqlite tcl tk tiff truetype X"
RESTRICT="strip"
-RDEPEND=">=sys-devel/make-3.80
- >=sys-libs/zlib-1.1.4
- >=sys-devel/flex-2.5.4a
- >=sys-devel/bison-1.35
+RDEPEND=">=sys-libs/zlib-1.1.4
>=sys-libs/ncurses-5.3
>=sys-libs/gdbm-1.8.0
- >=sys-devel/gcc-3.2.2
|| (
sys-apps/man
sys-apps/man-db )
@@ -62,6 +58,10 @@ RDEPEND=">=sys-devel/make-3.80
)"
DEPEND="${RDEPEND}
+ >=sys-devel/make-3.80
+ >=sys-devel/flex-2.5.4a
+ >=sys-devel/bison-1.35
+ >=sys-devel/gcc-3.2.2
X? (
x11-proto/xproto
x11-proto/xextproto
diff --git a/sci-geosciences/grass/grass-6.2.3.ebuild b/sci-geosciences/grass/grass-6.2.3.ebuild
index 33dce87a5d7d..90f34aca7b90 100644
--- a/sci-geosciences/grass/grass-6.2.3.ebuild
+++ b/sci-geosciences/grass/grass-6.2.3.ebuild
@@ -1,8 +1,8 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/grass/grass-6.2.3.ebuild,v 1.7 2008/05/21 19:01:32 dev-zero Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/grass/grass-6.2.3.ebuild,v 1.8 2008/06/24 07:45:51 nerdboy Exp $
-inherit eutils autotools fdo-mime versionator
+inherit eutils fdo-mime versionator
MY_PV=$(get_version_component_range 1-2 ${PV})
MY_PVM=$(delete_all_version_separators ${MY_PV})
@@ -61,10 +61,8 @@ RDEPEND=">=sys-libs/zlib-1.1.4
)"
DEPEND="${RDEPEND}
- >=sys-devel/make-3.80
>=sys-devel/flex-2.5.4a
>=sys-devel/bison-1.35
- >=sys-devel/gcc-3.2.2
X? (
x11-proto/xproto
x11-proto/xextproto
diff --git a/sci-geosciences/grass/grass-6.3.0.ebuild b/sci-geosciences/grass/grass-6.3.0.ebuild
new file mode 100644
index 000000000000..d073cb9fd910
--- /dev/null
+++ b/sci-geosciences/grass/grass-6.3.0.ebuild
@@ -0,0 +1,296 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/grass/grass-6.3.0.ebuild,v 1.1 2008/06/24 07:45:51 nerdboy Exp $
+
+inherit eutils distutils fdo-mime versionator wxwidgets
+
+MY_PV=$(get_version_component_range 1-2 ${PV})
+MY_PVM=$(delete_all_version_separators ${MY_PV})
+MY_PM=${PN}${MY_PVM}
+
+DESCRIPTION="An open-source GIS with raster and vector functionality, as well as 3D vizualization."
+HOMEPAGE="http://grass.itc.it/"
+SRC_URI="http://grass.itc.it/${MY_PM}/source/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
+
+IUSE="ffmpeg fftw glw gmath jpeg largefile mysql nls odbc opengl png \
+postgres python readline sqlite tiff truetype wxwindows X"
+
+RESTRICT="strip"
+
+RDEPEND=">=sys-libs/zlib-1.1.4
+ >=sys-libs/ncurses-5.3
+ >=sys-libs/gdbm-1.8.0
+ || (
+ sys-apps/man
+ sys-apps/man-db )
+ sci-libs/gdal
+ >=sci-libs/proj-4.4.7
+ ffmpeg? ( media-video/ffmpeg )
+ fftw? ( sci-libs/fftw )
+ gmath? ( virtual/blas
+ virtual/lapack )
+ jpeg? ( media-libs/jpeg )
+ mysql? ( dev-db/mysql )
+ odbc? ( >=dev-db/unixODBC-2.0.6 )
+ opengl? ( ( virtual/opengl )
+ ( x11-libs/openmotif )
+ glw? ( media-libs/mesa ) )
+ png? ( >=media-libs/libpng-1.2.2 )
+ postgres? ( >=dev-db/postgresql-7.3 )
+ python? ( dev-lang/python )
+ readline? ( sys-libs/readline )
+ sqlite? ( dev-db/sqlite )
+ tiff? ( >=media-libs/tiff-3.5.7 )
+ truetype? ( >=media-libs/freetype-2.0 )
+ wxwindows? (
+ >=dev-python/wxpython-2.8.1.1
+ >=dev-lang/python-2.4
+ )
+ X? (
+ x11-libs/libXmu
+ x11-libs/libXext
+ x11-libs/libXp
+ x11-libs/libX11
+ x11-libs/libXt
+ x11-libs/libSM
+ x11-libs/libICE
+ x11-libs/libXpm
+ x11-libs/libXaw
+ >=dev-lang/tcl-8.4
+ >=dev-lang/tk-8.4
+ )"
+
+DEPEND="${RDEPEND}
+ >=sys-devel/flex-2.5.4a
+ >=sys-devel/bison-1.35
+ wxwindows? ( >=dev-lang/swig-1.3.31 )
+ X? (
+ x11-proto/xproto
+ x11-proto/xextproto
+ )"
+
+pkg_setup() {
+ local myblas
+ elog ""
+ elog "This version enables the experimental wxpython interface, which"
+ elog "you may want to try, since the legacy GUI seems a little wonky"
+ elog "in this version; just enable the wxwindows USE flag and build."
+ elog ""
+ if use gmath; then
+ for d in $(eselect lapack show); do myblas=${d}; done
+ if [[ -z "${myblas/reference/}" ]] && [[ -z "${myblas/atlas/}" ]]; then
+ ewarn "You need to set lapack to atlas or reference. Do:"
+ ewarn " eselect lapack set <impl>"
+ ewarn "where <impl> is atlas, threaded-atlas or reference"
+ die "setup failed"
+ fi
+ for d in $(eselect blas show); do myblas=${d}; done
+ if [[ -z "${myblas/reference/}" ]] && [[ -z "${myblas/atlas/}" ]]; then
+ ewarn "You need to set blas to atlas or reference. Do:"
+ ewarn " eselect blas set <impl>"
+ ewarn "where <impl> is atlas, threaded-atlas or reference"
+ die "setup failed"
+ fi
+ fi
+
+ if use glw && ! use opengl; then
+ ewarn "You set USE='glw -opengl'. GLw support needs OpenGL."
+ ewarn "OpenGL support also requires X."
+ die "Set opengl and X useflags."
+ fi
+
+ if use glw && ! built_with_use media-libs/mesa motif; then
+ ewarn "GRASS GLw/OpenGL support needs mesa with motif headers."
+ ewarn "Please rebuild mesa with motif support."
+ die "Re-emerge mesa with motif."
+ fi
+
+ if use opengl && ! use X; then
+ ewarn "GRASS OpenGL support needs X (will also pull in Tcl/Tk)."
+ die "Please set the X useflag."
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch rpm/fedora/grass-readline.patch
+
+ if use opengl; then
+ epatch "${FILESDIR}"/${P}-html-nonviz.patch
+ fi
+
+ # patch missing math functions (yes, this is still needed)
+ sed -i -e "s:\$(EXTRA_LIBS):\$(EXTRA_LIBS) \$(MATHLIB):g" include/Make/Shlib.make
+ echo "MATHLIB=-lm" >> include/Make/Rules.make
+}
+
+src_compile() {
+ local myconf
+ use python || use wxindows && distutils_python_version
+
+ myconf="--prefix=/usr --with-cxx --enable-shared \
+ --with-gdal=$(type -P gdal-config) --with-curses --with-proj \
+ --with-includes=/usr/include --with-libs=/usr/$(get_libdir) \
+ --with-proj-includes=/usr/include \
+ --with-proj-libs=/usr/$(get_libdir) \
+ --with-proj-share=/usr/share/proj"
+
+ if use X; then
+ if has_version ">=dev-lang/tcl-8.5"; then
+ TCL_LIBDIR="/usr/$(get_libdir)/tcl8.5"
+ else
+ TCL_LIBDIR="/usr/$(get_libdir)/tcl8.4"
+ fi
+ myconf="${myconf} --with-tcltk --with-x \
+ --with-tcltk-includes=/usr/include \
+ --with-tcltk-libs=${TCL_LIBDIR}"
+ if use wxwindows; then
+ WX_GTK_VER=2.8
+ need-wxwidgets gtk2
+ LIBGDI="/usr/$(get_libdir)/python${PYVER}/site-packages/wx-2.8-gtk2-unicode/wx/_gdi_.so"
+ myconf="${myconf} --with-python --with-wxwidgets=${WX_CONFIG}"
+ fi
+ else
+ myconf="${myconf} --without-tcltk --without-x"
+ fi
+
+ if use opengl; then
+ myconf="${myconf} --with-opengl --with-opengl-libs=/usr/$(get_libdir)/opengl/xorg-x11/lib"
+ if use glw; then
+ myconf="${myconf} --with-glw"
+ fi
+ else
+ myconf="${myconf} --without-opengl --without-glw"
+ fi
+
+ # Should handle either older or latest without intervention;
+ # this won't work forever, but it should be okay for a while...
+ if use ffmpeg; then
+ myconf="${myconf} --with-ffmpeg \
+ --with-ffmpeg-libs=/usr/$(get_libdir)"
+ if has_version ">=media-video/ffmpeg-0.4.9_p20080326" ; then
+ # must pass multiple include dirs now; if you have a better
+ # way to do this, please speak up and file a bug :)
+ myconf="${myconf} --with-ffmpeg-includes=/usr/include/libav*"
+ else
+ myconf="${myconf} --with-ffmpeg-includes=/usr/include/ffmpeg"
+ fi
+ else
+ myconf="${myconf} --without-ffmpeg"
+ fi
+
+ if use truetype; then
+ myconf="${myconf} --with-freetype \
+ --with-freetype-includes=/usr/include/freetype2"
+ fi
+
+ if use mysql; then
+ myconf="${myconf} --with-mysql --with-mysql-includes=/usr/include/mysql \
+ --with-mysql-libs=/usr/$(get_libdir)/mysql"
+ else
+ myconf="${myconf} --without-mysql"
+ fi
+
+ if use sqlite; then
+ myconf="${myconf} --with-sqlite --with-sqlite-includes=/usr/include \
+ --with-sqlite-libs=/usr/$(get_libdir)"
+ else
+ myconf="${myconf} --without-sqlite"
+ fi
+
+ econf ${myconf} --with-libs=/usr/$(get_libdir) \
+ $(use_enable amd64 64bit) \
+ $(use_with fftw) \
+ $(use_with gmath blas) \
+ $(use_with gmath lapack) \
+ $(use_with jpeg) \
+ $(use_enable largefile) \
+ $(use_with opengl motif) \
+ $(use_with nls) \
+ $(use_with odbc) \
+ $(use_with png) \
+ $(use_with postgres) \
+ $(use_with python) \
+ $(use_with readline) \
+ $(use_with tiff) || die "configure failed!"
+
+ if use wxwindows; then
+ emake -j1
+ ln -sf "${LIBGDI}" dist.x86_64-pc-linux-gnu/lib/libgdi.so \
+ || die "making libgdi link failed"
+ cd gui/wxpython/vdigit
+ make default -j1 || die "make vdigit failed!"
+ else
+ emake -j1 || die "make failed!"
+ fi
+}
+
+src_install() {
+ elog "Grass Home is ${MY_PM}"
+ make install UNIX_BIN="${D}"usr/bin BINDIR="${D}"usr/bin \
+ PREFIX="${D}"usr INST_DIR="${D}"usr/${MY_PM} \
+ || die "make install failed!"
+
+ if use wxwindows; then
+ ln -sf "${LIBGDI}" "${D}"usr/${MY_PM}/lib/libgdi.so \
+ || die "failed to find wx library"
+ fi
+
+ # get rid of DESTDIR in script path
+ sed -i -e "s@${D}@/@" "${D}"usr/bin/${MY_PM}
+
+ # Grass Extension Manager conflicts with ruby gems
+ mv "${D}"usr/bin/gem "${D}"usr/${MY_PM}/bin/
+
+ ebegin "Adding env.d and desktop entry for Grass6..."
+ generate_files
+ doenvd 99grass-6
+ if use X; then
+ doicon "${FILESDIR}"/grass_icon.png
+ domenu ${MY_PM}-grass.desktop
+ fi
+ eend ${?}
+}
+
+pkg_postinst() {
+ use X && fdo-mime_desktop_database_update
+
+ elog "Note this version re-enables support for threads in Tcl and Tk."
+ elog "Enable the threads USE flag and rebuild to try it."
+}
+
+pkg_postrm() {
+ use X && fdo-mime_desktop_database_update
+}
+
+generate_files() {
+ local GUI="-gui"
+ use wxwindows && GUI="-wxpython"
+
+ cat <<-EOF > 99grass-6
+ GRASS_LD_LIBRARY_PATH="/usr/${MY_PM}/lib"
+ LDPATH="/usr/${MY_PM}/lib"
+ MANPATH="/usr/${MY_PM}/man"
+ GRASS_HOME="/usr/${MY_PM}"
+ EOF
+
+ cat <<-EOF > ${MY_PM}-grass.desktop
+ [Desktop Entry]
+ Encoding=UTF-8
+ Version=1.0
+ Name=Grass ${PV}
+ Type=Application
+ Comment=GRASS Open Source GIS, derived from the original US Army Corps of Engineers project.
+ Exec=${TERM} -T Grass -e /usr/bin/${MY_PM} ${GUI}
+ Path=
+ Icon=grass_icon.png
+ Categories=Science;Education;
+ Terminal=true
+ EOF
+}