summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sci-geosciences/grass
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sci-geosciences/grass')
-rw-r--r--sci-geosciences/grass/Manifest1
-rw-r--r--sci-geosciences/grass/files/grass-6.4.0-html-nonviz.patch33
-rw-r--r--sci-geosciences/grass/files/grass-6.4.1-libav-0.8.patch60
-rw-r--r--sci-geosciences/grass/files/grass-6.4.1-libpng15.patch28
-rw-r--r--sci-geosciences/grass/files/grass-6.4.1-nopycompile.patch12
-rw-r--r--sci-geosciences/grass/files/grass-6.4.1-timer_flags.patch13
-rw-r--r--sci-geosciences/grass/files/grass-6.4.2-configure.patch26
-rw-r--r--sci-geosciences/grass/files/grass-6.4.2-ffmpeg-1.patch79
-rw-r--r--sci-geosciences/grass/files/grass-6.4.2-libav-9.patch11
-rw-r--r--sci-geosciences/grass/files/grass-pkgconf.patch22
-rw-r--r--sci-geosciences/grass/grass-6.4.2.ebuild327
-rw-r--r--sci-geosciences/grass/metadata.xml11
12 files changed, 623 insertions, 0 deletions
diff --git a/sci-geosciences/grass/Manifest b/sci-geosciences/grass/Manifest
new file mode 100644
index 000000000000..0f92912ac74b
--- /dev/null
+++ b/sci-geosciences/grass/Manifest
@@ -0,0 +1 @@
+DIST grass-6.4.2.tar.gz 24097202 SHA256 670bb74d3000ea0932b7e988d3080d0c629f9eb22a8479bb2987ded473f7b4ca SHA512 537905942965ca949ce241c9e147bb340837f1815d36a1d0170cf18482f66936cb24bda540345d8287a98e4a9275fc129bbc4decf7c3053d123e0f90819b2e5b WHIRLPOOL 65e71c9846f59226bf2ccb3cf224628ac4065dfb2385454083e1db21361e1872192e05763c8a28154f1b536d9b276084efdeb58d730a40f99402ff3e5bf13eb4
diff --git a/sci-geosciences/grass/files/grass-6.4.0-html-nonviz.patch b/sci-geosciences/grass/files/grass-6.4.0-html-nonviz.patch
new file mode 100644
index 000000000000..a5afd0dfafb6
--- /dev/null
+++ b/sci-geosciences/grass/files/grass-6.4.0-html-nonviz.patch
@@ -0,0 +1,33 @@
+--- tools/build_html_index.sh.old 2010-06-16 23:07:37.000000000 +0200
++++ tools/build_html_index.sh 2010-06-16 23:10:00.000000000 +0200
+@@ -135,7 +135,6 @@
+ </ul>
+
+ <ul>
+- <li><a href=\"nviz.html\">nviz</a> 3D visualization and animation tool</li>
+ <li><a href=\"xganim.html\">xganim</a> tool for animating a raster map series</li>
+ </ul></td>
+ </tr>
+@@ -245,11 +244,11 @@
+ #copy over CSS:
+ cp -f grassdocs.css $HTMLDIR/
+ mkdir -p $HTMLDIR/nviz/
+-cp -f grassdocs.css $HTMLDIR/nviz/
++#cp -f grassdocs.css $HTMLDIR/nviz/
+ chmod a+r $HTMLDIR/grassdocs.css $HTMLDIR/nviz/grassdocs.css
+ #copy over GRASS logo:
+ cp -f grass_logo.png $HTMLDIR/
+-cp -f grass_logo.png $HTMLDIR/nviz/
++#cp -f grass_logo.png $HTMLDIR/nviz/
+ chmod a+r $HTMLDIR/grass_logo.png $HTMLDIR/nviz/grass_logo.png
+ if [ "$MACOSX" ] ; then
+ cp -f grass_icon.png $HTMLDIR/
+@@ -302,7 +301,7 @@
+ echo "<tr><td>&nbsp;&nbsp;<a href=\"full_index.html#r3\">r3.*</a> </td><td>raster3D commands</td></tr>" >> "$FULLINDEX"
+ echo "<tr><td>&nbsp;&nbsp;<a href=\"full_index.html#v\">v.*</a> </td><td>vector commands</td></tr>" >> "$FULLINDEX"
+ echo "<tr><td>&nbsp;&nbsp;<a href=\"gis.m.html\">gis.m</a> </td><td>GUI frontend to GIS menus and display</td></tr>" >> "$FULLINDEX"
+-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"
+ echo "<tr><td>&nbsp;&nbsp;<a href=\"wxGUI.html\">wxGUI</a> </td><td>wxPython-based GUI frontend</td></tr>" >> "$FULLINDEX"
+ echo "<tr><td>&nbsp;&nbsp;<a href=\"xganim.html\">xganim</a> </td><td>raster map slideshow</td></tr>" >> "$FULLINDEX"
+ echo "</table>" >> "$FULLINDEX"
diff --git a/sci-geosciences/grass/files/grass-6.4.1-libav-0.8.patch b/sci-geosciences/grass/files/grass-6.4.1-libav-0.8.patch
new file mode 100644
index 000000000000..4864d88da7c8
--- /dev/null
+++ b/sci-geosciences/grass/files/grass-6.4.1-libav-0.8.patch
@@ -0,0 +1,60 @@
+Adjust Grass 6.4.1 to work with ffmpeg 8.
+
+2011-11-17 Fabio Erculiani
+2011-12-08 Martin von Gagern
+
+References:
+https://bugs.gentoo.org/390827
+https://bugs.gentoo.org/392371
+
+--- grass-6.4.1.orig/lib/ogsf/gsd_img_mpeg.c
++++ grass-6.4.1/lib/ogsf/gsd_img_mpeg.c
+@@ -66,7 +66,7 @@ static AVStream *add_video_stream(AVForm
+
+ c = st->codec;
+ c->codec_id = codec_id;
+- c->codec_type = CODEC_TYPE_VIDEO;
++ c->codec_type = AVMEDIA_TYPE_VIDEO;
+
+ /* put sample parameters */
+ c->bit_rate = 400000;
+@@ -215,7 +215,7 @@ static void write_video_frame(AVFormatCo
+
+ av_init_packet(&pkt);
+
+- pkt.flags |= PKT_FLAG_KEY;
++ pkt.flags |= AV_PKT_FLAG_KEY;
+ pkt.stream_index = st->index;
+ pkt.data = (uint8_t *) picture;
+ pkt.size = sizeof(AVPicture);
+@@ -236,7 +236,7 @@ static void write_video_frame(AVFormatCo
+ av_rescale_q(c->coded_frame->pts, c->time_base,
+ st->time_base);
+ if (c->coded_frame->key_frame)
+- pkt.flags |= PKT_FLAG_KEY;
++ pkt.flags |= AV_PKT_FLAG_KEY;
+ pkt.stream_index = st->index;
+ pkt.data = video_outbuf;
+ pkt.size = out_size;
+@@ -301,10 +301,10 @@ int gsd_init_mpeg(const char *filename)
+ av_register_all();
+
+ /* auto detect the output format from the name. default is mpeg. */
+- fmt = guess_format(NULL, filename, NULL);
++ fmt = av_guess_format(NULL, filename, NULL);
+ if (!fmt) {
+ G_warning(_("Unable to deduce output format from file extension: using MPEG"));
+- fmt = guess_format("mpeg", NULL, NULL);
++ fmt = av_guess_format("mpeg", NULL, NULL);
+ }
+ if (!fmt) {
+ G_warning(_("Unable to find suitable output format"));
+@@ -312,7 +312,7 @@ int gsd_init_mpeg(const char *filename)
+ }
+
+ /* allocate the output media context */
+- oc = av_alloc_format_context();
++ oc = av_malloc(sizeof(AVFormatContext));
+ if (!oc) {
+ G_warning(_("Out of memory"));
+ return (-1);
diff --git a/sci-geosciences/grass/files/grass-6.4.1-libpng15.patch b/sci-geosciences/grass/files/grass-6.4.1-libpng15.patch
new file mode 100644
index 000000000000..3c040e70755c
--- /dev/null
+++ b/sci-geosciences/grass/files/grass-6.4.1-libpng15.patch
@@ -0,0 +1,28 @@
+--- raster/r.out.png/r.out.png.c
++++ raster/r.out.png/r.out.png.c
+@@ -261,9 +261,6 @@
+ png_info_init(info_ptr);
+ #endif
+ png_init_io(png_ptr, fp);
+- info_ptr->width = win.cols;
+- info_ptr->height = win.rows;
+- info_ptr->bit_depth = depth;
+
+ /* explicit filter-type (or none) required */
+ if ((filter >= 0) && (filter <= 4)) {
+@@ -302,10 +299,13 @@
+ /*if(!gscale->answer){ *//* 24BIT COLOR IMAGE */
+
+ if (TRUE) {
++ int color_type;
+ if (do_alpha)
+- info_ptr->color_type = PNG_COLOR_TYPE_RGB_ALPHA;
++ color_type = PNG_COLOR_TYPE_RGB_ALPHA;
+ else
+- info_ptr->color_type = PNG_COLOR_TYPE_RGB;
++ color_type = PNG_COLOR_TYPE_RGB;
++
++ png_set_IHDR(png_ptr, info_ptr, win.cols, win.rows, depth, color_type, PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT);
+
+ /* write the png-info struct */
+ png_write_info(png_ptr, info_ptr);
diff --git a/sci-geosciences/grass/files/grass-6.4.1-nopycompile.patch b/sci-geosciences/grass/files/grass-6.4.1-nopycompile.patch
new file mode 100644
index 000000000000..75f173aded0c
--- /dev/null
+++ b/sci-geosciences/grass/files/grass-6.4.1-nopycompile.patch
@@ -0,0 +1,12 @@
+diff -ur grass-6.4.1.orig/gui/wxpython/Makefile grass-6.4.1/gui/wxpython/Makefile
+--- grass-6.4.1.orig/gui/wxpython/Makefile
++++ grass-6.4.1/gui/wxpython/Makefile
+@@ -11,7 +11,7 @@
+ ETCDIR = $(ETC)/wxpython
+
+ SRCFILES := $(wildcard compat/* gui_modules/* icons/*.* icons/silk/* images/* xml/*) gis_set.py wxgui.py README
+-DSTFILES := $(patsubst %,$(ETCDIR)/%,$(SRCFILES)) $(patsubst %.py,$(ETCDIR)/%.pyc,$(filter %.py,$(SRCFILES)))
++DSTFILES := $(patsubst %,$(ETCDIR)/%,$(SRCFILES))
+
+ default: install_scripts
+ $(MAKE) parsubdirs
diff --git a/sci-geosciences/grass/files/grass-6.4.1-timer_flags.patch b/sci-geosciences/grass/files/grass-6.4.1-timer_flags.patch
new file mode 100644
index 000000000000..7c25094728da
--- /dev/null
+++ b/sci-geosciences/grass/files/grass-6.4.1-timer_flags.patch
@@ -0,0 +1,13 @@
+--- tools/timer/Makefile.orig 2011-11-14 18:58:13.000000000 -0800
++++ tools/timer/Makefile 2011-11-14 19:00:41.000000000 -0800
+@@ -8,8 +8,8 @@
+ default: $(ETC)/$(PGM)
+
+ $(ETC)/$(PGM): main.c
+- $(CC) -c $<
+- $(CC) -o $(ETC)/$(PGM) $<
++ $(CC) $(CFLAGS) -c $<
++ $(CC) $(LDFLAGS) -o $(ETC)/$(PGM) $<
+
+ clean:
+ \rm -f $(ETC)/$(PGM) main.o
diff --git a/sci-geosciences/grass/files/grass-6.4.2-configure.patch b/sci-geosciences/grass/files/grass-6.4.2-configure.patch
new file mode 100644
index 000000000000..37b75163c625
--- /dev/null
+++ b/sci-geosciences/grass/files/grass-6.4.2-configure.patch
@@ -0,0 +1,26 @@
+--- grass-6.4.2.orig/configure.in 2012-02-06 11:16:07.000000000 +0100
++++ grass-6.4.2/configure.in 2013-01-17 23:25:41.126387684 +0100
+@@ -1110,9 +1110,9 @@
+
+ LOC_CHECK_INC_PATH(ffmpeg, FFMPEG, FFMPEGINCPATH)
+
+-LOC_CHECK_INCLUDES(avcodec.h,FFMPEG,$FFMPEGINCPATH)
+-LOC_CHECK_INCLUDES(avformat.h,FFMPEG,$FFMPEGINCPATH)
+-LOC_CHECK_INCLUDES(swscale.h,FFMPEG,$FFMPEGINCPATH)
++LOC_CHECK_INCLUDES(libavcodec/avcodec.h,FFMPEG,$FFMPEGINCPATH)
++LOC_CHECK_INCLUDES(libavformat/avformat.h,FFMPEG,$FFMPEGINCPATH)
++LOC_CHECK_INCLUDES(libswscale/swscale.h,FFMPEG,$FFMPEGINCPATH)
+
+ AC_DEFINE(HAVE_FFMPEG)
+
+@@ -1125,8 +1125,8 @@
+ LOC_CHECK_LIB_PATH(ffmpeg, FFMPEG, FFMPEGLIBPATH)
+
+ LOC_CHECK_LIBS(avutil, av_free, FFMPEG, $FFMPEGLIBPATH, FFMPEGLIB,,,,$MATHLIB)
+-LOC_CHECK_LIBS(avcodec, avcodec_init, FFMPEG, $FFMPEGLIBPATH, FFMPEGLIB, $FFMPEGLIB,,,$MATHLIB)
+-LOC_CHECK_LIBS(avformat, av_set_parameters, FFMPEG, $FFMPEGLIBPATH, FFMPEGLIB, $FFMPEGLIB,,,$MATHLIB)
++LOC_CHECK_LIBS(avcodec, avcodec_open2, FFMPEG, $FFMPEGLIBPATH, FFMPEGLIB, $FFMPEGLIB,,,$MATHLIB)
++LOC_CHECK_LIBS(avformat, av_write_frame, FFMPEG, $FFMPEGLIBPATH, FFMPEGLIB, $FFMPEGLIB,,,$MATHLIB)
+
+ fi # $USE_FFMPEG
+
diff --git a/sci-geosciences/grass/files/grass-6.4.2-ffmpeg-1.patch b/sci-geosciences/grass/files/grass-6.4.2-ffmpeg-1.patch
new file mode 100644
index 000000000000..ec26ae251529
--- /dev/null
+++ b/sci-geosciences/grass/files/grass-6.4.2-ffmpeg-1.patch
@@ -0,0 +1,79 @@
+Fix build with ffmpeg-1.
+Part of https://bugs.gentoo.org/show_bug.cgi?id=443264
+
+Index: grass-6.4.2/lib/ogsf/gsd_img_mpeg.c
+===================================================================
+--- grass-6.4.2.orig/lib/ogsf/gsd_img_mpeg.c
++++ grass-6.4.2/lib/ogsf/gsd_img_mpeg.c
+@@ -26,7 +26,8 @@
+
+ /* FFMPEG stuff */
+ #ifdef HAVE_FFMPEG
+-#include <avformat.h>
++#include <libavformat/avformat.h>
++#include <libavformat/avio.h>
+
+ /* 5 seconds stream duration */
+ #define STREAM_DURATION 5.0
+@@ -58,7 +59,7 @@ static AVStream *add_video_stream(AVForm
+ AVCodecContext *c;
+ AVStream *st;
+
+- st = av_new_stream(oc, 0);
++ st = avformat_new_stream(oc, 0);
+ if (!st) {
+ G_warning(_("Unable to allocate stream"));
+ return NULL;
+@@ -97,7 +98,7 @@ static AVStream *add_video_stream(AVForm
+ c->flags |= CODEC_FLAG_GLOBAL_HEADER;
+
+ c->flags |= CODEC_FLAG_QSCALE;
+- c->global_quality = st->quality = FF_QP2LAMBDA * 10;
++ c->global_quality = FF_QP2LAMBDA * 10;
+
+ return st;
+ }
+@@ -332,13 +333,7 @@ int gsd_init_mpeg(const char *filename)
+ add_video_stream(oc, fmt->video_codec, (r - l + 1), (t - b + 1));
+ }
+
+- /* set the output parameters (must be done even if no parameters). */
+- if (av_set_parameters(oc, NULL) < 0) {
+- G_warning(_("Invalid output format parameters"));
+- return (-1);
+- }
+-
+- dump_format(oc, 0, filename, 1);
++ av_dump_format(oc, 0, filename, 1);
+
+ /* now that all the parameters are set, we can open the audio and
+ video codecs and allocate the necessary encode buffers */
+@@ -347,14 +342,17 @@ int gsd_init_mpeg(const char *filename)
+
+ /* open the output file, if needed */
+ if (!(fmt->flags & AVFMT_NOFILE)) {
+- if (url_fopen(&oc->pb, filename, URL_WRONLY) < 0) {
++ if (avio_open(&oc->pb, filename, AVIO_FLAG_WRITE) < 0) {
+ G_warning(_("Unable to open <%s>"), filename);
+ return (-1);
+ }
+ }
+
+ /* write the stream header, if any */
+- av_write_header(oc);
++ if (avformat_write_header(oc, NULL) < 0) {
++ G_warning(_("Failed to write header"));
++ return (-1);
++ }
+
+
+ #else
+@@ -439,7 +437,7 @@ int gsd_close_mpeg(void)
+ #if (LIBAVFORMAT_VERSION_INT>>16) < 52
+ url_fclose(&oc->pb);
+ #else
+- url_fclose(oc->pb);
++ avio_close(oc->pb);
+ #endif
+ }
+
diff --git a/sci-geosciences/grass/files/grass-6.4.2-libav-9.patch b/sci-geosciences/grass/files/grass-6.4.2-libav-9.patch
new file mode 100644
index 000000000000..7fbe3254f4fd
--- /dev/null
+++ b/sci-geosciences/grass/files/grass-6.4.2-libav-9.patch
@@ -0,0 +1,11 @@
+--- grass-6.4.2.orig/lib/ogsf/gsd_img_mpeg.c 2013-01-18 02:11:37.570025278 +0100
++++ grass-6.4.2/lib/ogsf/gsd_img_mpeg.c 2013-01-18 02:13:01.663022218 +0100
+@@ -159,7 +159,7 @@
+ }
+
+ /* open the codec */
+- if (avcodec_open(c, codec) < 0) {
++ if (avcodec_open2(c, codec, NULL) < 0) {
+ G_warning(_("Unable to open codec"));
+ return;
+ }
diff --git a/sci-geosciences/grass/files/grass-pkgconf.patch b/sci-geosciences/grass/files/grass-pkgconf.patch
new file mode 100644
index 000000000000..5c00b9dbdb28
--- /dev/null
+++ b/sci-geosciences/grass/files/grass-pkgconf.patch
@@ -0,0 +1,22 @@
+--- grass.pc.in.old 2010-06-13 10:53:46.747474687 +0200
++++ grass.pc.in 2010-06-13 10:54:45.957349463 +0200
+@@ -1,12 +1,13 @@
+ # Package Information for pkg-config
+
+-prefix=@prefix@/grass-@GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@
+-exec_prefix=@prefix@/grass-@GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@
+-libdir=@prefix@/grass-@GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@/lib
+-includedir=@prefix@/grass-@GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@/include
++prefix=@prefix@
++exec_prefix=@prefix@
++libdir=@libdir@
++includedir=@includedir@
++grassdir=@libdir@/grass@GRASS_VERSION_MAJOR@@GRASS_VERSION_MINOR@
+
+ Name: GRASS
+ Description: GRASS GIS
+ Version: @GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@
+-Libs: -L@prefix@/grass-@GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@/lib -lgrass_I -lgrass_vask -lgrass_gmath -lgrass_gis -lgrass_datetime -lgrass_gproj -lgrass_vect -lgrass_dbmibase -lgrass_dbmiclient
+-Cflags: -I@prefix@/grass-@GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@/include
++Libs: -L${libdir} -lgrass_I -lgrass_vask -lgrass_gmath -lgrass_gis -lgrass_datetime -lgrass_gproj -lgrass_vect -lgrass_dbmibase -lgrass_dbmiclient
++Cflags: -I${includedir}/grass
diff --git a/sci-geosciences/grass/grass-6.4.2.ebuild b/sci-geosciences/grass/grass-6.4.2.ebuild
new file mode 100644
index 000000000000..d76e8bfe1abb
--- /dev/null
+++ b/sci-geosciences/grass/grass-6.4.2.ebuild
@@ -0,0 +1,327 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+PYTHON_DEPEND="python? 2"
+WANT_AUTOCONF="2.1"
+
+inherit eutils gnome2 multilib python versionator wxwidgets autotools
+
+MY_PM=${PN}$(get_version_component_range 1-2 ${PV})
+MY_PM=${MY_PM/.}
+MY_P=${P/_rc/RC}
+
+DESCRIPTION="A free GIS with raster and vector functionality, as well as 3D vizualization"
+HOMEPAGE="http://grass.osgeo.org/"
+SRC_URI="http://grass.osgeo.org/${MY_PM}/source/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="6"
+KEYWORDS="amd64 ppc ~ppc64 x86"
+IUSE="X cairo cxx ffmpeg fftw gmath jpeg motif mysql nls odbc opengl png postgres python readline sqlite tiff truetype wxwidgets"
+
+TCL_DEPS="
+ >=dev-lang/tcl-8.5:0
+ >=dev-lang/tk-8.5:0
+ "
+
+RDEPEND="
+ >=app-admin/eselect-1.2
+ sci-libs/gdal
+ sci-libs/proj
+ sys-libs/gdbm
+ sys-libs/ncurses
+ sys-libs/zlib
+ cairo? ( x11-libs/cairo[X?,opengl?] )
+ ffmpeg? ( >=virtual/ffmpeg-0.10 )
+ fftw? ( sci-libs/fftw:3.0 )
+ gmath? (
+ virtual/blas
+ virtual/lapack
+ )
+ jpeg? ( virtual/jpeg:0 )
+ mysql? ( virtual/mysql )
+ odbc? ( dev-db/unixODBC )
+ opengl? (
+ virtual/opengl
+ ${TCL_DEPS}
+ )
+ png? ( media-libs/libpng:0 )
+ postgres? ( >=dev-db/postgresql-8.4 )
+ readline? ( sys-libs/readline:0 )
+ sqlite? ( dev-db/sqlite:3 )
+ tiff? ( media-libs/tiff:0 )
+ truetype? ( media-libs/freetype:2 )
+ wxwidgets? ( >=dev-python/wxpython-2.8.10.1[cairo,opengl?] )
+ X? (
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libX11
+ x11-libs/libXaw
+ x11-libs/libXext
+ x11-libs/libXmu
+ x11-libs/libXp
+ x11-libs/libXpm
+ x11-libs/libXt
+ motif? (
+ >=x11-libs/motif-2.3:0
+ opengl? (
+ || (
+ media-libs/mesa[motif]
+ ( media-libs/mesa x11-libs/libGLw )
+ )
+ )
+ )
+ !python? ( ${TCL_DEPS} )
+ !wxwidgets? ( ${TCL_DEPS} )
+ )"
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ sys-devel/flex
+ sys-devel/gettext
+ sys-devel/bison
+ wxwidgets? ( dev-lang/swig )
+ X? (
+ x11-proto/xextproto
+ x11-proto/xproto
+ )"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-pkgconf.patch
+ "${FILESDIR}"/${PN}-6.4.1-libav-0.8.patch
+ "${FILESDIR}"/${PN}-6.4.2-ffmpeg-1.patch
+ "${FILESDIR}"/${PN}-6.4.2-configure.patch
+ "${FILESDIR}"/${PN}-6.4.2-libav-9.patch
+)
+
+REQUIRED_USE="
+ motif? ( X )
+ opengl? ( X )
+ wxwidgets? ( X python )
+"
+
+pkg_setup() {
+ local myblas
+
+ # check correct gmath profiles (this must sadly die)
+ 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 python; then
+ # only py2 is supported
+ python_set_active_version 2
+ fi
+}
+
+src_prepare() {
+ use opengl || epatch "${FILESDIR}"/${PN}-6.4.0-html-nonviz.patch
+ epatch ${PATCHES[@]}
+ epatch_user
+ eautoconf
+}
+
+src_configure() {
+ local myconf TCL_LIBDIR
+
+ if use X; then
+ TCL_LIBDIR="/usr/$(get_libdir)/tcl8.5"
+ myconf+="
+ --with-tcltk-libs=${TCL_LIBDIR}
+ $(use_with motif)
+ $(use_with opengl)
+ --with-x
+ "
+
+ use opengl && myconf+=" --with-tcltk"
+ use motif && use opengl && myconf+=" --with-glw"
+ use motif || myconf+=" --without-glw"
+
+ if use wxwidgets; then
+ WX_BUILD=yes
+ WX_GTK_VER=2.8
+ need-wxwidgets unicode
+ myconf+="
+ --without-tcltk
+ --with-wxwidgets=${WX_CONFIG}
+ "
+ else
+ WX_BUILD=no
+ # use tcl gui if wxwidgets are disabled
+ myconf+="
+ --with-tcltk
+ --without-wxwidgets
+ "
+ fi
+ else
+ myconf+="
+ --without-glw
+ --without-opengl
+ --without-tcltk
+ --without-wxwidgets
+ --without-x
+ "
+ fi
+
+ econf \
+ --with-gdal=$(type -P gdal-config) \
+ --with-curses \
+ --with-proj \
+ --with-proj-share="/usr/share/proj/" \
+ --without-glw \
+ --enable-shared \
+ $(use_enable amd64 64bit) \
+ $(use_enable ppc64 64bit) \
+ $(use_with cairo) \
+ $(use_with cxx) \
+ $(use_with fftw) \
+ $(use_with ffmpeg) \
+ $(use_with gmath blas) \
+ $(use_with gmath lapack) \
+ $(use_with jpeg) \
+ $(use_with mysql) \
+ --with-mysql-includes=/usr/include/mysql \
+ --with-mysql-libs=/usr/$(get_libdir)/mysql \
+ $(use_with nls) \
+ $(use_with odbc) \
+ $(use_with png) \
+ $(use_with postgres) \
+ $(use_with python) \
+ $(use_with readline) \
+ $(use_with sqlite) \
+ $(use_with tiff) \
+ $(use_with truetype freetype) \
+ --with-freetype-includes="/usr/include/freetype2/" \
+ --enable-largefile \
+ ${myconf}
+}
+
+src_compile() {
+ # we don't want to link against embeded mysql lib
+ emake MYSQLDLIB=""
+}
+
+src_install() {
+ emake DESTDIR="${D}" \
+ INST_DIR="${D}"/usr/${MY_PM} \
+ prefix="${D}"/usr BINDIR="${D}"/usr/bin \
+ PREFIX="${D}"/usr/ \
+ install
+
+ pushd "${ED}"/usr/${MY_PM} &> /dev/null
+
+ # fix docs
+ dodoc AUTHORS CHANGES
+ dohtml -r docs/html/*
+ rm -rf docs/ || die
+ rm -rf {AUTHORS,CHANGES,COPYING,GPL.TXT,REQUIREMENTS.html} || die
+
+ # manuals
+ dodir /usr/share/man/man1
+ mv man/man1/* "${ED}"/usr/share/man/man1/ || die
+ rm -rf man/ || die
+ mv -vf "${ED}"/usr/share/man/man1/sql.1{,grass} || die #381599
+
+ # translations
+ if use nls; then
+ dodir /usr/share/locale/
+ mv locale/* "${ED}"/usr/share/locale/ || die
+ rm -rf locale/ || die
+ # pt_BR is broken
+ mv "${ED}"/usr/share/locale/pt_br "${ED}"/usr/share/locale/pt_BR || die
+ fi
+
+ popd &> /dev/null
+
+ # place libraries where they belong
+ mv "${ED}"/usr/${MY_PM}/lib/ "${ED}"/usr/$(get_libdir)/ || die
+
+ # place header files where they belong
+ mv "${ED}"/usr/${MY_PM}/include/ "${ED}"/usr/include/ || die
+ # make rules are not required on installed system
+ rm -rf "${ED}"/usr/include/Make || die
+
+ # mv remaining gisbase stuff to libdir
+ mv "${ED}"/usr/${MY_PM} "${ED}"/usr/$(get_libdir) || die
+
+ # set proper default window renderer
+ if [[ ${WX_BUILD} == yes ]]; then
+ sed -i \
+ -e "1,\$s:^DEFAULT_GUI.*:DEFAULT_GUI=\"wxpython\":" \
+ "${ED}"/usr/$(get_libdir)/${MY_PM}/etc/Init.sh || die
+ fi
+
+ # get proper folder for grass path in script
+ sed -i \
+ -e "1,\$s:^GISBASE.*:GISBASE=/usr/$(get_libdir)/${MY_PM}:" \
+ "${ED}"usr/bin/${MY_PM} || die
+
+ # get proper fonts path for fontcap
+ sed -i \
+ -e "s|${ED}/usr/${MY_PM}|${EPREFIX}usr/$(get_libdir)/${MY_PM}|" \
+ "${ED}"/usr/$(get_libdir)/${MY_PM}/etc/fontcap || die
+
+ if use X; then
+ generate_files
+ doicon gui/icons/${PN}-48x48.png
+ domenu ${MY_PM}-grass.desktop
+ fi
+
+ # install .pc file so other apps know where to look for grass
+ insinto /usr/$(get_libdir)/pkgconfig/
+ doins grass.pc
+
+ # fix weird +x on tcl scripts
+ find "${D}" -name "*.tcl" -exec chmod +r-x '{}' \;
+}
+
+pkg_postinst() {
+ if use X; then
+ fdo-mime_desktop_database_update
+ gnome2_icon_cache_update
+ fi
+}
+
+pkg_postrm() {
+ if use X; then
+ fdo-mime_desktop_database_update
+ gnome2_icon_cache_update
+ fi
+}
+
+generate_files() {
+ local GUI="-gui"
+ [[ ${WX_BUILD} == yes ]] && GUI="-wxpython"
+
+ cat <<-EOF > ${MY_PM}-grass.desktop
+ [Desktop Entry]
+ Encoding=UTF-8
+ Version=1.0
+ Name=Grass ${PV}
+ Type=Application
+ Comment=GRASS (Geographic Resources Analysis Support System), the original GIS.
+ Exec=${TERM} -T Grass -e /usr/bin/${MY_PM} ${GUI}
+ Path=
+ Icon=${PN}-48x48.png
+ Categories=Science;Education;
+ Terminal=false
+EOF
+}
diff --git a/sci-geosciences/grass/metadata.xml b/sci-geosciences/grass/metadata.xml
new file mode 100644
index 000000000000..4d20223c9a1f
--- /dev/null
+++ b/sci-geosciences/grass/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci-geosciences</herd>
+ <longdescription>The original GIS, yes the first one, developed by the US Army Corp of Engineers, now an active open source GIS.
+See the GRASS Documentation Project for more info http://grass.itc.it/gdp/index.php
+</longdescription>
+ <use>
+ <flag name="gmath">Enable gmath wrapper for BLAS/Lapack (<pkg>virtual/blas</pkg>, <pkg>virtual/lapack</pkg>)</flag>
+ </use>
+</pkgmetadata>