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 /media-radio/xastir
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 'media-radio/xastir')
-rw-r--r--media-radio/xastir/Manifest2
-rw-r--r--media-radio/xastir/files/xastir-2.0.0-dont-filter-flags.diff11
-rw-r--r--media-radio/xastir/files/xastir-2.0.4-fortify.diff144
-rw-r--r--media-radio/xastir/files/xastir-2.0.4-no-builtin-shapelib.diff58
-rw-r--r--media-radio/xastir/files/xastir-2.0.4-scripts.diff101
-rw-r--r--media-radio/xastir/metadata.xml19
-rw-r--r--media-radio/xastir/xastir-2.0.4.ebuild88
-rw-r--r--media-radio/xastir/xastir-2.0.6.ebuild85
8 files changed, 508 insertions, 0 deletions
diff --git a/media-radio/xastir/Manifest b/media-radio/xastir/Manifest
new file mode 100644
index 000000000000..6458a9553e96
--- /dev/null
+++ b/media-radio/xastir/Manifest
@@ -0,0 +1,2 @@
+DIST xastir-2.0.4.tar.gz 2655250 SHA256 975f1cbe1ee32334e579588dcf2e19bcc607ad7b5f9d0848075f6d283d65af86 SHA512 766124ae717742e93bef24cd4c84946e146c3ba8a61775afada25a1c60f225edf91fc8eb4f59881564b14187e523c98a07d515adea74d73e03e2ab10dbae92b3 WHIRLPOOL 640616e698e2e3cfe2bdd6619ac601017c37d4d18cd1fa3ab5391ade170b6108a845a4fe2860b618a5cd2281e884399874b554c3960e1f5ad6420f016c88260c
+DIST xastir-2.0.6.tar.gz 2662042 SHA256 e46debd3f67ea5c08e2f85f03e26653871a9cdd6d692c8eeee436c3bc8a8dd43 SHA512 422bfd5c243ce2761279908b2294f94598df4e51e8dc9eea1eede12c460934c97392e8d99d40d67d92b4e31fe09806e9c33190e146696a49d968df6562e858f3 WHIRLPOOL 39a097dba585d5bcdcdb880ddb5e530eb118bd1645abf911948ed2c0b562a4b12cf4b453b0295db1f37d00380873440e251466f7b12440cd41f50578ae90f170
diff --git a/media-radio/xastir/files/xastir-2.0.0-dont-filter-flags.diff b/media-radio/xastir/files/xastir-2.0.0-dont-filter-flags.diff
new file mode 100644
index 000000000000..1fbea1d61a57
--- /dev/null
+++ b/media-radio/xastir/files/xastir-2.0.0-dont-filter-flags.diff
@@ -0,0 +1,11 @@
+# Do not filter duplicate CFLAGS (bug 411095)
+--- configure.ac.orig 2012-12-07 15:12:43.000000000 +0100
++++ configure.ac 2012-12-07 15:13:08.000000000 +0100
+@@ -709,7 +709,6 @@
+ # "-llibrary" that needs it.
+ #
+ changequote(,)
+-CFLAGS=`echo "$CFLAGS" | awk '{for(i=1;i<=NF;++i) {if (arg[$i]++ == 0) s = s " " $i} print s}'`
+ CPPFLAGS=`echo "$CPPFLAGS" | awk '{for(i=1;i<=NF;++i) {if (arg[$i]++ == 0) s = s " " $i} print s}'`
+ LDFLAGS=`echo "$LDFLAGS" | awk '{for(i=1;i<=NF;++i) {if (arg[$i]++ == 0) s = s " " $i} print s}'`
+ #LIBS=`echo "$LIBS" | awk '{for(i=1;i<=NF;++i) {if (arg[$i]++ == 0) s = s " " $i} print s}'`
diff --git a/media-radio/xastir/files/xastir-2.0.4-fortify.diff b/media-radio/xastir/files/xastir-2.0.4-fortify.diff
new file mode 100644
index 000000000000..e2c34b007475
--- /dev/null
+++ b/media-radio/xastir/files/xastir-2.0.4-fortify.diff
@@ -0,0 +1,144 @@
+--- src/rac_data.c.orig 2012-09-23 18:19:22.000000000 +0200
++++ src/rac_data.c 2012-11-29 21:00:53.000000000 +0100
+@@ -212,7 +212,8 @@
+ char char_offset[16];
+ char index[32];
+ int found = 0;
+- rac_record racdata;
++ char buffer[sizeof(rac_record)];
++ rac_record *racdata = (rac_record *)buffer;
+ /*char filler[8];*/
+ char amacall_path[MAX_VALUE];
+
+@@ -220,7 +221,7 @@
+
+
+ xastir_snprintf(index, sizeof(index)," ");
+- xastir_snprintf(racdata.callsign, sizeof(racdata.callsign)," ");
++ xastir_snprintf(racdata->callsign, sizeof(racdata->callsign)," ");
+
+ /* ==================================================================== */
+ /* Search thru the index, get the RBA */
+@@ -257,19 +258,19 @@
+ if (callsign[5] == '-')
+ (void)chomp(callsign,5);
+
+- while (!feof(fdb) && strncmp((char *)&racdata, callsign, 6) < 0)
++ while (!feof(fdb) && strncmp(buffer, callsign, 6) < 0)
+
+ //WE7U
+ // Problem here: We're sticking 8 bytes too many into racdata!
+- rc = fgets((char *)&racdata, sizeof(racdata), fdb);
++ rc = fgets(buffer, sizeof(buffer), fdb);
+
+ } else
+ fprintf(stderr,"Search:Could not open RAC data base: %s\n", get_data_base_dir("fcc/AMACALL.LST") );
+
+ /* || (callsign[5] == '-' && strncmp((char *)&racdata,callsign,5) < 0)) */
+- (void)chomp(racdata.callsign, 6);
++ (void)chomp(racdata->callsign, 6);
+
+- if (!strncmp((char *)racdata.callsign, callsign, 6)) {
++ if (!strncmp(racdata->callsign, callsign, 6)) {
+ found = 1;
+
+ // Some of these cause problems on 64-bit processors, so commented
+@@ -293,82 +294,82 @@
+ xastir_snprintf(data->callsign,
+ sizeof(data->callsign),
+ "%s",
+- racdata.callsign);
++ racdata->callsign);
+
+ xastir_snprintf(data->first_name,
+ sizeof(data->first_name),
+ "%s",
+- racdata.first_name);
++ racdata->first_name);
+
+ xastir_snprintf(data->last_name,
+ sizeof(data->last_name),
+ "%s",
+- racdata.last_name);
++ racdata->last_name);
+
+ xastir_snprintf(data->address,
+ sizeof(data->address),
+ "%s",
+- racdata.address);
++ racdata->address);
+
+ xastir_snprintf(data->city,
+ sizeof(data->city),
+ "%s",
+- racdata.city);
++ racdata->city);
+
+ xastir_snprintf(data->province,
+ sizeof(data->province),
+ "%s",
+- racdata.province);
++ racdata->province);
+
+ xastir_snprintf(data->postal_code,
+ sizeof(data->postal_code),
+ "%s",
+- racdata.postal_code);
++ racdata->postal_code);
+
+ xastir_snprintf(data->qual_a,
+ sizeof(data->qual_a),
+ "%s",
+- racdata.qual_a);
++ racdata->qual_a);
+
+ xastir_snprintf(data->qual_b,
+ sizeof(data->qual_b),
+ "%s",
+- racdata.qual_b);
++ racdata->qual_b);
+
+ xastir_snprintf(data->qual_c,
+ sizeof(data->qual_c),
+ "%s",
+- racdata.qual_c);
++ racdata->qual_c);
+
+ xastir_snprintf(data->qual_d,
+ sizeof(data->qual_d),
+ "%s",
+- racdata.qual_d);
++ racdata->qual_d);
+
+ xastir_snprintf(data->club_name,
+ sizeof(data->club_name),
+ "%s",
+- racdata.club_name);
++ racdata->club_name);
+
+ xastir_snprintf(data->club_address,
+ sizeof(data->club_address),
+ "%s",
+- racdata.club_address);
++ racdata->club_address);
+
+ xastir_snprintf(data->club_city,
+ sizeof(data->club_city),
+ "%s",
+- racdata.club_city);
++ racdata->club_city);
+
+ xastir_snprintf(data->club_province,
+ sizeof(data->club_province),
+ "%s",
+- racdata.club_province);
++ racdata->club_province);
+
+ xastir_snprintf(data->club_postal_code,
+ sizeof(data->club_postal_code),
+ "%s",
+- racdata.club_postal_code);
++ racdata->club_postal_code);
+
+ }
+ (void)fclose(fdb);
diff --git a/media-radio/xastir/files/xastir-2.0.4-no-builtin-shapelib.diff b/media-radio/xastir/files/xastir-2.0.4-no-builtin-shapelib.diff
new file mode 100644
index 000000000000..7aef072a5c39
--- /dev/null
+++ b/media-radio/xastir/files/xastir-2.0.4-no-builtin-shapelib.diff
@@ -0,0 +1,58 @@
+--- configure.ac.orig 2012-11-30 08:29:51.000000000 +0100
++++ configure.ac 2012-11-30 08:29:56.000000000 +0100
+@@ -368,27 +368,17 @@
+
+ # Check for Shapelib
+ use_shapelib=yes
+-force_internal_shapelib=no
+ shapelib_desired=yes
+ LIBSHP=""
+ SUBSHP=""
+ # This symbol will be blank if the proj library hasn't been found, and will
+ # have the three programs that need proj if it has
+ CONTSHP=""
+-AC_ARG_WITH(internal-shapelib,[ --with-internal-shapelib Force use of internal shapelib library.],force_internal_shapelib=$withval)
+ AC_ARG_WITH(shapelib,[ --without-shapelib Disable shapelib features.],shapelib_desired=$withval)
+ if test "${shapelib_desired}" = "no"; then
+ use_shapelib=no
+- force_internal_shapelib=no
+ fi
+-if test "${force_internal_shapelib}" = "yes"; then
+- AC_MSG_WARN([***************************************************************** ])
+- AC_MSG_WARN([Internal Shapelib library has been forced. ])
+- AC_MSG_WARN([***************************************************************** ])
+- # Temporary setting to get into if block below
+- use_shapelib=no
+-fi
+-if test "${shapelib_desired}" = "yes" -a "${force_internal_shapelib}" = "no"; then
++if test "${shapelib_desired}" = "yes" ; then
+ use_shapelib=no
+ AC_CHECK_HEADERS(shapefil.h libshp/shapefil.h, [AC_CHECK_LIB(shp, DBFOpen, use_shapelib=yes
+ LIBS="$LIBS -lshp"
+@@ -397,26 +387,6 @@
+ AC_DEFINE(HAVE_LIBSHP, , Define to 1 if you have the `shp' library (-lshp). )
+ break)])
+ fi
+-if test "${shapelib_desired}" = "yes" -a "${use_shapelib}" = "no"; then
+- AC_MSG_WARN([**************************************************************** ])
+- AC_MSG_WARN([Your system does not have shapelib installed. Using an internal ])
+- AC_MSG_WARN([version. This may lead to a larger filesize for the executable. ])
+- AC_MSG_WARN([Install shapelib on your system to eliminate this warning. ])
+- AC_MSG_WARN([**************************************************************** ])
+- LIBSHP="-Lshapelib -lshape"
+- CPPFLAGS="-I\$(top_srcdir)/src/shapelib $CPPFLAGS"
+- SUBSHP="shapelib"
+- use_shapelib=yes
+- force_internal_shapelib=yes
+- AC_DEFINE(HAVE_DBFGETFIELDINDEX, , Define to 1 if your `shp' library has DBFGetFieldIndex. )
+- AC_DEFINE(HAVE_LIBSHP, , Define to 1 if you have the `shp' library (-lshp). )
+- AC_DEFINE(HAVE_SHAPEFIL_H, , Define to 1 if you have the `shapefil.h' header. )
+-
+- if test $use_proj = "yes"
+- then
+- CONTSHP="shpcentrd shpproj shpdata shpwkb"
+- fi
+-fi
+ AC_SUBST(SUBSHP)
+ AC_SUBST(CONTSHP)
+ AC_SUBST(LIBSHP)
diff --git a/media-radio/xastir/files/xastir-2.0.4-scripts.diff b/media-radio/xastir/files/xastir-2.0.4-scripts.diff
new file mode 100644
index 000000000000..369295b07f8c
--- /dev/null
+++ b/media-radio/xastir/files/xastir-2.0.4-scripts.diff
@@ -0,0 +1,101 @@
+# patch scripts location (bug #407185). partially backported from upstream.
+--- xastir-2.0.0-orig/scripts/Makefile.am.orig 2012-11-27 05:41:23.000000000 +0100
++++ xastir-2.0.0/scripts/Makefile.am 2012-12-05 06:21:59.000000000 +0100
+@@ -12,9 +12,7 @@
+ get-fcc-rac.pl \
+ get-gnis \
+ get-pop \
+- get-maptools.sh \
+ get-NWSdata \
+- get_shapelib.sh \
+ gpx2shape \
+ icontable.pl \
+ inf2geo.pl \
+@@ -43,10 +41,8 @@
+ values \
+ values.pl \
+ waypoint-get.pl \
+- xastir-fixcfg.sh \
+- xastir-migrate.sh \
+ Xastir_tigerpoly.py
+
+ install-data-hook:
+ cd $(DESTDIR)$(scriptsdir) && \
+- chmod a+x *.sh *.pl *.py get-* gpx2* *.bash
++ chmod a+x *.pl *.py get-* gpx2* *.bash
+diff -Nur -u xastir-2.0.0.orig/scripts/coord-convert.pl xastir-2.0.0/scripts/coord-convert.pl
+--- xastir-2.0.0.orig/scripts/coord-convert.pl 2010-07-03 22:09:48.000000000 +0000
++++ xastir-2.0.0/scripts/coord-convert.pl 2012-03-07 15:46:01.000000000 +0000
+@@ -26,7 +26,7 @@
+ #
+
+
+-use lib "${prefix}/lib";
++use lib /usr/share/xastir/scripts;
+ use Coordinate; # WE7U's Coordinate.pm module
+
+
+diff -Nur -u xastir-2.0.0.orig/scripts/permutations.pl xastir-2.0.0/scripts/permutations.pl
+--- xastir-2.0.0.orig/scripts/permutations.pl 2010-07-03 22:09:48.000000000 +0000
++++ xastir-2.0.0/scripts/permutations.pl 2012-03-07 15:42:34.000000000 +0000
+@@ -34,7 +34,7 @@
+ #
+
+
+-use lib "/usr/local/lib";
++use lib "/usr/share/xastir/scripts";
+ use Coordinate; # WE7U's Coordinate.pm module
+
+
+diff -Nur -u xastir-2.0.0.orig/scripts/test_coord.pl xastir-2.0.0/scripts/test_coord.pl
+--- xastir-2.0.0.orig/scripts/test_coord.pl 2010-01-31 02:12:23.000000000 +0000
++++ xastir-2.0.0/scripts/test_coord.pl 2012-03-07 15:42:34.000000000 +0000
+@@ -33,7 +33,7 @@
+
+ #------------------------------------------------------------------------------------------------
+
+-use lib "/usr/local/lib";
++use lib "/usr/share/xastir/scripts";
+ use Coordinate; # Snag WE7U's Coordinate module
+
+
+diff -Nur -u xastir-2.0.0.orig/scripts/toporama250k.pl xastir-2.0.0/scripts/toporama250k.pl
+--- xastir-2.0.0.orig/scripts/toporama250k.pl 2010-01-31 02:12:23.000000000 +0000
++++ xastir-2.0.0/scripts/toporama250k.pl 2012-03-07 15:46:49.000000000 +0000
+@@ -28,14 +28,14 @@
+ # map files for the whole of Canada!
+ #
+ #
+-# - "cd /usr/local/share/xastir/maps"
++# - "cd /usr/share/xastir/maps"
+ #
+ # - Assure you have write privileges in the directory above either
+ # by becoming root using the "su" command, using "sudo", or
+ # temporarily changing ownership and/or privileges on the
+ # "maps" directory.
+ #
+-# - "/usr/local/lib/xastir/toporama250k.pl"
++# - "/usr/share/xastir/scripts/toporama250k.pl"
+ #
+ # - The script will create/populate this directory heirarchy:
+ # .../maps/toporama/images/
+diff -Nur -u xastir-2.0.0.orig/scripts/toporama50k.pl xastir-2.0.0/scripts/toporama50k.pl
+--- xastir-2.0.0.orig/scripts/toporama50k.pl 2010-01-31 02:12:23.000000000 +0000
++++ xastir-2.0.0/scripts/toporama50k.pl 2012-03-07 15:47:01.000000000 +0000
+@@ -27,14 +27,14 @@
+ # map files for the whole of Canada!
+ #
+ #
+-# - "cd /usr/local/share/xastir/maps"
++# - "cd /usr/share/xastir/maps"
+ #
+ # - Assure you have write privileges in the directory above either
+ # by becoming root using the "su" command, using "sudo", or
+ # temporarily changing ownership and/or privileges on the
+ # "maps" directory.
+ #
+-# - "/usr/local/lib/xastir/toporama50k.pl"
++# - "/usr/share/xastir/scripts/toporama50k.pl"
+ #
+ # - The script will create/populate this directory heirarchy:
+ # .../maps/toporama/images/
diff --git a/media-radio/xastir/metadata.xml b/media-radio/xastir/metadata.xml
new file mode 100644
index 000000000000..78cb139b449e
--- /dev/null
+++ b/media-radio/xastir/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>tomjbe@gentoo.org</email>
+ <name>Thomas Beierlein</name>
+ </maintainer>
+ <use>
+ <flag name="festival">Enable text to speech synthesizer</flag>
+ <flag name="gdal">Support for some further map formats</flag>
+ <flag name="geotiff">Install geotiff support. Allows using USGS DRG topo
+ maps or other types of geotiff mapes/images</flag>
+ <flag name="graphicsmagick">Use graphicsmagick instead imagemagick for
+ rendering</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">xastir</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-radio/xastir/xastir-2.0.4.ebuild b/media-radio/xastir/xastir-2.0.4.ebuild
new file mode 100644
index 000000000000..c211549f0992
--- /dev/null
+++ b/media-radio/xastir/xastir-2.0.4.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit autotools eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="X Amateur Station Tracking and Information Reporting"
+HOMEPAGE="http://xastir.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="festival gdal geotiff graphicsmagick"
+
+DEPEND=">=x11-libs/motif-2.3:0
+ x11-libs/libXt
+ x11-libs/libX11
+ x11-libs/libXpm
+ x11-apps/xfontsel
+ dev-libs/libpcre
+ net-misc/curl
+ sys-libs/db
+ sci-libs/shapelib
+ !graphicsmagick? ( media-gfx/imagemagick[-hdri,-q32] )
+ graphicsmagick? ( media-gfx/graphicsmagick[-q32] )
+ geotiff? ( sci-libs/proj
+ sci-libs/libgeotiff
+ media-libs/tiff )
+ gdal? ( sci-libs/gdal )
+ festival? ( app-accessibility/festival )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ # fix script location (bug #407185)
+ epatch "${FILESDIR}"/${P}-scripts.diff
+
+ # fix __FORTIFY_SOURCE warning (bug #337365)
+ epatch "${FILESDIR}"/${P}-fortify.diff
+
+ # do not use builtin shapelib if sci-libs/shapelib is not installed
+ # instead build without shapelib support (bug #430704)
+ epatch "${FILESDIR}"/${P}-no-builtin-shapelib.diff
+
+ # do not filter duplicate flags (see bug 411095)
+ epatch "${FILESDIR}"/${PN}-2.0.0-dont-filter-flags.diff
+
+ # fix deprectated AM_CONFIG_HEADER macro
+ sed -i -e "s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/" configure.ac || die
+
+ eautoreconf
+}
+
+src_configure() {
+ # provide include path to GraphicsMagic for configure stage
+ use graphicsmagick && append-cflags -I/usr/include/GraphicsMagick
+ econf --with-pcre \
+ --with-shapelib \
+ --with-dbfawk \
+ --without-ax25 \
+ --without-gpsman \
+ $(use_with !graphicsmagick imagemagick) \
+ $(use_with graphicsmagick) \
+ $(use_with geotiff libproj) \
+ $(use_with geotiff) \
+ $(use_with gdal) \
+ $(use_with festival)
+}
+
+src_compile() {
+ emake AR="$(tc-getAR)"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ rm -rf "${D}"/usr/share/doc/${PN}
+ dodoc AUTHORS ChangeLog FAQ README README.Contributing \
+ README.Getting-Started README.MAPS
+}
+
+pkg_postinst() {
+ elog "Kernel mode AX.25 and GPSman library not supported."
+ elog
+ elog "Remember you have to be root to add addditional scripts,"
+ elog "maps and other configuration data under /usr/share/xastir."
+}
diff --git a/media-radio/xastir/xastir-2.0.6.ebuild b/media-radio/xastir/xastir-2.0.6.ebuild
new file mode 100644
index 000000000000..85fc86e658a2
--- /dev/null
+++ b/media-radio/xastir/xastir-2.0.6.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="X Amateur Station Tracking and Information Reporting"
+HOMEPAGE="http://xastir.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="festival gdal geotiff graphicsmagick"
+
+DEPEND=">=x11-libs/motif-2.3:0
+ x11-libs/libXt
+ x11-libs/libX11
+ x11-libs/libXpm
+ x11-apps/xfontsel
+ dev-libs/libpcre
+ net-misc/curl
+ sys-libs/db:4.8
+ sci-libs/shapelib
+ !graphicsmagick? ( media-gfx/imagemagick[-hdri,-q32] )
+ graphicsmagick? ( media-gfx/graphicsmagick[-q32] )
+ geotiff? ( sci-libs/proj
+ sci-libs/libgeotiff
+ media-libs/tiff:0 )
+ gdal? ( sci-libs/gdal )
+ festival? ( app-accessibility/festival )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ # fix script location (bug #407185)
+ epatch "${FILESDIR}"/${PN}-2.0.4-scripts.diff
+
+ # fix __FORTIFY_SOURCE warning (bug #337365)
+ epatch "${FILESDIR}"/${PN}-2.0.4-fortify.diff
+
+ # do not use builtin shapelib if sci-libs/shapelib is not installed
+ # instead build without shapelib support (bug #430704)
+ epatch "${FILESDIR}"/${PN}-2.0.4-no-builtin-shapelib.diff
+
+ # do not filter duplicate flags (see bug 411095)
+ epatch "${FILESDIR}"/${PN}-2.0.0-dont-filter-flags.diff
+
+ eautoreconf
+}
+
+src_configure() {
+ # provide include path to GraphicsMagic for configure stage
+ use graphicsmagick && append-cflags -I/usr/include/GraphicsMagick
+ econf --with-pcre \
+ --with-shapelib \
+ --with-dbfawk \
+ --without-ax25 \
+ --without-gpsman \
+ $(use_with !graphicsmagick imagemagick) \
+ $(use_with graphicsmagick) \
+ $(use_with geotiff libproj) \
+ $(use_with geotiff) \
+ $(use_with gdal) \
+ $(use_with festival)
+}
+
+src_compile() {
+ emake AR="$(tc-getAR)"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ rm -rf "${D}"/usr/share/doc/${PN}
+ dodoc AUTHORS ChangeLog FAQ README README.Contributing \
+ README.Getting-Started README.MAPS
+}
+
+pkg_postinst() {
+ elog "Kernel mode AX.25 and GPSman library not supported."
+ elog
+ elog "Remember you have to be root to add addditional scripts,"
+ elog "maps and other configuration data under /usr/share/xastir."
+}