summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Chvatal <scarabeus@gentoo.org>2011-06-10 09:30:56 +0000
committerTomas Chvatal <scarabeus@gentoo.org>2011-06-10 09:30:56 +0000
commit72c70ab3f46660d7d7ce651307828704f2db5a24 (patch)
tree977dd89fb260c2327ce926875b1a1aa6b766955d /sci-geosciences/gpsbabel
parentVersion bump beta, and removed deprecated (diff)
downloadgentoo-2-72c70ab3f46660d7d7ce651307828704f2db5a24.tar.gz
gentoo-2-72c70ab3f46660d7d7ce651307828704f2db5a24.tar.bz2
gentoo-2-72c70ab3f46660d7d7ce651307828704f2db5a24.zip
Consolidate the gpsbabel ebuild so it actualy works. Stabilise the latest that works. Punt older.
(Portage version: 2.2.0_alpha38/cvs/Linux x86_64)
Diffstat (limited to 'sci-geosciences/gpsbabel')
-rw-r--r--sci-geosciences/gpsbabel/ChangeLog11
-rw-r--r--sci-geosciences/gpsbabel/files/gpsbabel-disable_statistic_uploading.patch12
-rw-r--r--sci-geosciences/gpsbabel/files/gpsbabel-disable_update_check.patch110
-rw-r--r--sci-geosciences/gpsbabel/files/gpsbabel-disable_version_check.patch47
-rw-r--r--sci-geosciences/gpsbabel/files/gpsbabel-fix_binary_name.patch12
-rw-r--r--sci-geosciences/gpsbabel/files/gpsbabel-freebsd.patch11
-rw-r--r--sci-geosciences/gpsbabel/files/gpsbabel-use_system_shapelib.patch76
-rw-r--r--sci-geosciences/gpsbabel/files/gpsbabel-xmldoc.patch14
-rw-r--r--sci-geosciences/gpsbabel/gpsbabel-1.3.6.ebuild51
-rw-r--r--sci-geosciences/gpsbabel/gpsbabel-1.4.2.ebuild92
10 files changed, 371 insertions, 65 deletions
diff --git a/sci-geosciences/gpsbabel/ChangeLog b/sci-geosciences/gpsbabel/ChangeLog
index 884178745277..354b35d53a1f 100644
--- a/sci-geosciences/gpsbabel/ChangeLog
+++ b/sci-geosciences/gpsbabel/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for sci-geosciences/gpsbabel
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/gpsbabel/ChangeLog,v 1.23 2011/03/02 20:30:51 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/gpsbabel/ChangeLog,v 1.24 2011/06/10 09:30:56 scarabeus Exp $
+
+ 10 Jun 2011; Tomáš Chvátal <scarabeus@gentoo.org> -gpsbabel-1.3.6.ebuild,
+ gpsbabel-1.4.2.ebuild, +files/gpsbabel-disable_statistic_uploading.patch,
+ +files/gpsbabel-disable_update_check.patch,
+ +files/gpsbabel-disable_version_check.patch,
+ +files/gpsbabel-fix_binary_name.patch, +files/gpsbabel-freebsd.patch,
+ +files/gpsbabel-use_system_shapelib.patch, +files/gpsbabel-xmldoc.patch:
+ Consolidate the gpsbabel ebuild so it actualy works. Stabilise the latest
+ that works. Punt older.
02 Mar 2011; Justin Lecher <jlec@gentoo.org> gpsbabel-1.3.6.ebuild:
Correct Slots for gtk 3 introduction to tree
diff --git a/sci-geosciences/gpsbabel/files/gpsbabel-disable_statistic_uploading.patch b/sci-geosciences/gpsbabel/files/gpsbabel-disable_statistic_uploading.patch
new file mode 100644
index 000000000000..2d26f64aa130
--- /dev/null
+++ b/sci-geosciences/gpsbabel/files/gpsbabel-disable_statistic_uploading.patch
@@ -0,0 +1,12 @@
+Make statistics reporting an opt-in option.
+--- a/gui/babeldata.h
++++ b/gui/babeldata.h
+@@ -64,7 +64,7 @@ public:
+ upgradeOffers(0),
+ runCount(0),
+ startupVersionCheck(true),
+- reportStatistics(true),
++ reportStatistics(false),
+ allowBetaUpgrades(false),
+ ignoreVersionMismatch(true),
+ disableDonateDialog(false),
diff --git a/sci-geosciences/gpsbabel/files/gpsbabel-disable_update_check.patch b/sci-geosciences/gpsbabel/files/gpsbabel-disable_update_check.patch
new file mode 100644
index 000000000000..a429fdf1fbab
--- /dev/null
+++ b/sci-geosciences/gpsbabel/files/gpsbabel-disable_update_check.patch
@@ -0,0 +1,110 @@
+Disable check for newer versions on start.
+
+--- a/gui/preferences.ui
++++ b/gui/preferences.ui
+@@ -40,13 +40,6 @@
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_4">
+ <item>
+- <widget class="QCheckBox" name="startupCheck">
+- <property name="text">
+- <string>Check for newer version on start.</string>
+- </property>
+- </widget>
+- </item>
+- <item>
+ <widget class="QCheckBox" name="reportStatisticsCheck">
+ <property name="text">
+ <string>Anonymously report usage data.</string>
+--- a/gui/preferences.cpp
++++ b/gui/preferences.cpp
+@@ -39,7 +39,6 @@ Preferences::Preferences(QWidget* parent
+ {
+ ui_.setupUi(this);
+
+- ui_.startupCheck->setChecked(bd_.startupVersionCheck);
+ ui_.reportStatisticsCheck->setChecked(bd_.reportStatistics);
+ // Because of an unfortunate bug in 1.4.0, we turn this off in 1.4.1.
+ if (VERSION == "1.4.1")
+@@ -81,7 +80,6 @@ void Preferences::acceptClicked()
+ formatList_[i].setHidden(item->checkState() == Qt::Unchecked);
+ }
+
+- bd_.startupVersionCheck = ui_.startupCheck->isChecked();
+ bd_.reportStatistics = ui_.reportStatisticsCheck->isChecked();
+ accept();
+ }
+--- a/gui/babeldata.h
++++ b/gui/babeldata.h
+@@ -63,7 +63,7 @@ public:
+ upgradeErrors(0),
+ upgradeOffers(0),
+ runCount(0),
+- startupVersionCheck(true),
++ startupVersionCheck(false),
+ reportStatistics(false),
+ allowBetaUpgrades(false),
+ ignoreVersionMismatch(true),
+--- a/gui/mainwinui.ui
++++ b/gui/mainwinui.ui
+@@ -641,7 +641,6 @@
+ <addaction name="actionHelp"/>
+ <addaction name="separator"/>
+ <addaction name="actionAbout"/>
+- <addaction name="actionUpgradeCheck"/>
+ <addaction name="separator"/>
+ <addaction name="actionVisit_Website"/>
+ <addaction name="actionMake_a_Donation"/>
+@@ -670,11 +669,6 @@
+ <string>Preferences...</string>
+ </property>
+ </action>
+- <action name="actionUpgradeCheck">
+- <property name="text">
+- <string>Check for Upgrade</string>
+- </property>
+- </action>
+ <action name="actionVisit_Website">
+ <property name="text">
+ <string>Visit Website...</string>
+--- a/gui/mainwindow.cpp
++++ b/gui/mainwindow.cpp
+@@ -153,7 +153,6 @@ MainWindow::MainWindow(QWidget* parent):
+ connect(ui.actionAbout, SIGNAL(triggered()), this, SLOT(aboutActionX()));
+ connect(ui.actionVisit_Website, SIGNAL(triggered()), this, SLOT(visitWebsiteActionX()));
+ connect(ui.actionMake_a_Donation, SIGNAL(triggered()), this, SLOT(donateActionX()));
+- connect(ui.actionUpgradeCheck, SIGNAL(triggered()), this, SLOT(upgradeCheckActionX()));
+ connect(ui.actionPreferences, SIGNAL(triggered()), this, SLOT(preferencesActionX()));
+
+ connect(ui.inputFormatCombo, SIGNAL(currentIndexChanged(int)),
+@@ -197,19 +196,8 @@ MainWindow::MainWindow(QWidget* parent):
+
+ //--- Restore from registry
+ restoreSettings();
+-
+ upgrade = new UpgradeCheck(parent, formatList, bd);
+- if (bd.startupVersionCheck) {
+- upgrade->checkForUpgrade(babelVersion, bd.upgradeCheckTime,
+- allowBetaUpgrades());
+- }
+-
+- if (!bd.ignoreVersionMismatch && babelVersion != VERSION) {
+- VersionMismatch vm(0, babelVersion, QString(VERSION));
+
+- vm.exec();
+- bd.ignoreVersionMismatch = vm.neverAgain();
+- }
+ }
+
+ //------------------------------------------------------------------------
+@@ -926,10 +914,6 @@ void MainWindow::applyActionX()
+ //------------------------------------------------------------------------
+ void MainWindow::closeActionX()
+ {
+- QDateTime wt= upgrade->getUpgradeWarningTime();
+- if (wt.isValid()) {
+- bd.upgradeCheckTime = wt;
+- }
+ bd.runCount++;
+
+ QDateTime now = QDateTime::currentDateTime();
diff --git a/sci-geosciences/gpsbabel/files/gpsbabel-disable_version_check.patch b/sci-geosciences/gpsbabel/files/gpsbabel-disable_version_check.patch
new file mode 100644
index 000000000000..b4bd1a9e2a7d
--- /dev/null
+++ b/sci-geosciences/gpsbabel/files/gpsbabel-disable_version_check.patch
@@ -0,0 +1,47 @@
+Disable version mismatch check.
+
+--- a/gui/preferences.ui
++++ b/gui/preferences.ui
+@@ -53,13 +53,6 @@
+ </property>
+ </widget>
+ </item>
+- <item>
+- <widget class="QCheckBox" name="ignoreVersionMismatchCheck">
+- <property name="text">
+- <string>Ignore mismatch between command line and GUI version.</string>
+- </property>
+- </widget>
+- </item>
+ </layout>
+ </widget>
+ </widget>
+--- a/gui/preferences.cpp
++++ b/gui/preferences.cpp
+@@ -41,7 +41,6 @@ Preferences::Preferences(QWidget* parent
+
+ ui_.startupCheck->setChecked(bd_.startupVersionCheck);
+ ui_.reportStatisticsCheck->setChecked(bd_.reportStatistics);
+- ui_.ignoreVersionMismatchCheck->setChecked(bd_.ignoreVersionMismatch);
+ // Because of an unfortunate bug in 1.4.0, we turn this off in 1.4.1.
+ if (VERSION == "1.4.1")
+ bd_.ignoreVersionMismatch = false;
+@@ -84,7 +83,6 @@ void Preferences::acceptClicked()
+
+ bd_.startupVersionCheck = ui_.startupCheck->isChecked();
+ bd_.reportStatistics = ui_.reportStatisticsCheck->isChecked();
+- bd_.ignoreVersionMismatch = ui_.ignoreVersionMismatchCheck->isChecked();
+ accept();
+ }
+
+--- a/gui/babeldata.h
++++ b/gui/babeldata.h
+@@ -66,7 +66,7 @@ public:
+ startupVersionCheck(true),
+ reportStatistics(true),
+ allowBetaUpgrades(false),
+- ignoreVersionMismatch(false),
++ ignoreVersionMismatch(true),
+ disableDonateDialog(false),
+ donateSplashed(QDateTime(QDate(2010, 1, 1), QTime(0, 0, 0)))
+ {
diff --git a/sci-geosciences/gpsbabel/files/gpsbabel-fix_binary_name.patch b/sci-geosciences/gpsbabel/files/gpsbabel-fix_binary_name.patch
new file mode 100644
index 000000000000..841bb093b225
--- /dev/null
+++ b/sci-geosciences/gpsbabel/files/gpsbabel-fix_binary_name.patch
@@ -0,0 +1,12 @@
+Rename gpsbabelfe binary.
+--- a/gui/app.pro
++++ b/gui/app.pro
+@@ -26,7 +26,7 @@ RESOURCES = app.qrc
+ RC_FILE = app.rc
+
+ win32:TARGET=GPSBabelFE
+-unix:TARGET=gpsbabelfe-bin
++unix:TARGET=gpsbabelfe
+ mac:TARGET=GPSBabelFE
+
+ FORMS += aboutui.ui
diff --git a/sci-geosciences/gpsbabel/files/gpsbabel-freebsd.patch b/sci-geosciences/gpsbabel/files/gpsbabel-freebsd.patch
new file mode 100644
index 000000000000..2467c2ee041c
--- /dev/null
+++ b/sci-geosciences/gpsbabel/files/gpsbabel-freebsd.patch
@@ -0,0 +1,11 @@
+--- configure.in.orig 2009-11-17 15:32:05.846189916 +0200
++++ configure.in 2009-11-17 15:33:11.111187610 +0200
+@@ -277,7 +276,7 @@
+ fi
+ ;;
+ *-gentoo-freebsd*)
+- EXPAT_LIB=-lexpa
++ EXPAT_LIB=-lexpat
+ ;;
+ *-*-freebsd*)
+ if test -f /usr/local/lib/libexpat.a ; then
diff --git a/sci-geosciences/gpsbabel/files/gpsbabel-use_system_shapelib.patch b/sci-geosciences/gpsbabel/files/gpsbabel-use_system_shapelib.patch
new file mode 100644
index 000000000000..68ea430e3681
--- /dev/null
+++ b/sci-geosciences/gpsbabel/files/gpsbabel-use_system_shapelib.patch
@@ -0,0 +1,76 @@
+diff -urN gpsbabel-1.4.2.old/configure.in gpsbabel-1.4.2/configure.in
+--- gpsbabel-1.4.2.old/configure.in 2011-06-10 10:30:54.888410566 +0200
++++ gpsbabel-1.4.2/configure.in 2011-06-10 10:42:08.800985499 +0200
+@@ -421,6 +421,6 @@
+ else
+ AC_MSG_RESULT(no)
+ fi
+-AC_CONFIG_FILES([Makefile gbversion.h gui/setup.iss gui/makelinuxdist.sh xmldoc/makedoc tools/mkcapabilities win32/gpsbabel.rc jeeps/Makefile shapelib/Makefile zlib/empty])
++AC_CONFIG_FILES([Makefile gbversion.h gui/setup.iss gui/makelinuxdist.sh xmldoc/makedoc tools/mkcapabilities win32/gpsbabel.rc jeeps/Makefile zlib/empty])
+ AC_OUTPUT
+
+diff -urN gpsbabel-1.4.2.old/Makefile.in gpsbabel-1.4.2/Makefile.in
+--- gpsbabel-1.4.2.old/Makefile.in 2011-06-10 10:30:54.899410428 +0200
++++ gpsbabel-1.4.2/Makefile.in 2011-06-10 10:43:13.973170735 +0200
+@@ -87,7 +87,7 @@
+
+ @PALM_DB_CMT@PALM_DB=pdbfile.o
+
+-SHAPE=shapelib/shpopen.o shapelib/dbfopen.o
++SHAPE=-lshp
+
+ ZLIB=zlib/adler32.o zlib/compress.o zlib/crc32.o zlib/deflate.o zlib/inffast.o \
+ zlib/inflate.o zlib/infback.o zlib/inftrees.o zlib/trees.o \
+@@ -98,7 +98,7 @@
+ uuid.o formspec.o xmltag.o cet.o cet_util.o fatal.o rgbcolors.o \
+ inifile.o garmin_fs.o gbsleep.o units.o @GBSER@ gbser.o \
+ gbfile.o parse.o avltree.o session.o \
+- $(PALM_DB) $(GARMIN) $(JEEPS) $(SHAPE) @ZLIB@ $(FMTS) $(FILTERS)
++ $(PALM_DB) $(GARMIN) $(JEEPS) @ZLIB@ $(FMTS) $(FILTERS)
+ OBJS = main.o globals.o $(LIBOBJS) @FILEINFO@
+
+ .c.o:
+@@ -113,10 +113,10 @@
+ all: gpsbabel$(EXEEXT)
+
+ gpsbabel$(EXEEXT): configure Makefile $(OBJS) @GPSBABEL_DEBUG@
+- $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) @LIBS@ @EXPAT_LIB@ @USB_LIBS@ $(OUTPUT_SWITCH)$@
++ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(SHAPE) @LIBS@ @EXPAT_LIB@ @USB_LIBS@ $(OUTPUT_SWITCH)$@
+
+ gpsbabel-debug: $(OBJS)
+- $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) @LIBS@ @EFENCE_LIB@ @EXPAT_LIB@ @USB_LIBS@ $(OUTPUT_SWITCH)$@
++ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(SHAPE) @LIBS@ @EFENCE_LIB@ @EXPAT_LIB@ @USB_LIBS@ $(OUTPUT_SWITCH)$@
+
+ Makefile gbversion.h: Makefile.in config.status xmldoc/makedoc.in \
+ gbversion.h.in gui/setup.iss.in
+@@ -818,8 +818,7 @@
+ session.o: session.c defs.h config.h queue.h gbtypes.h zlib/zlib.h \
+ zlib/zconf.h gbfile.h cet.h cet_util.h inifile.h session.h
+ shape.o: shape.c defs.h config.h queue.h gbtypes.h zlib/zlib.h \
+- zlib/zconf.h gbfile.h cet.h cet_util.h inifile.h session.h \
+- shapelib/shapefil.h
++ zlib/zconf.h gbfile.h cet.h cet_util.h inifile.h session.h
+ skyforce.o: skyforce.c defs.h config.h queue.h gbtypes.h zlib/zlib.h \
+ zlib/zconf.h gbfile.h cet.h cet_util.h inifile.h session.h strptime.h
+ skytraq.o: skytraq.c defs.h config.h queue.h gbtypes.h zlib/zlib.h \
+@@ -1092,8 +1091,6 @@
+ jeeps/gpsread.h jeeps/gpsutil.h jeeps/gpsapp.h jeeps/gpsprot.h \
+ jeeps/gpscom.h jeeps/gpsfmt.h jeeps/gpsmath.h jeeps/gpsmem.h \
+ jeeps/gpsrqst.h jeeps/gpsinput.h jeeps/gpsproj.h
+-shapelib/dbfopen.o: shapelib/dbfopen.c shapelib/shapefil.h config.h
+-shapelib/shpopen.o: shapelib/shpopen.c shapelib/shapefil.h config.h
+ zlib/adler32.o: zlib/adler32.c zlib/zlib.h zlib/zconf.h
+ zlib/compress.o: zlib/compress.c zlib/zlib.h zlib/zconf.h
+ zlib/crc32.o: zlib/crc32.c zlib/zutil.h zlib/zlib.h zlib/zconf.h \
+diff -urN gpsbabel-1.4.2.old/shape.c gpsbabel-1.4.2/shape.c
+--- gpsbabel-1.4.2.old/shape.c 2011-06-10 10:30:54.932410016 +0200
++++ gpsbabel-1.4.2/shape.c 2011-06-10 10:42:08.802985475 +0200
+@@ -20,7 +20,7 @@
+
+ */
+ #include "defs.h"
+-#include "shapelib/shapefil.h"
++#include <libshp/shapefil.h>
+
+ #if SHAPELIB_ENABLED
+ static SHPHandle ihandle;
diff --git a/sci-geosciences/gpsbabel/files/gpsbabel-xmldoc.patch b/sci-geosciences/gpsbabel/files/gpsbabel-xmldoc.patch
new file mode 100644
index 000000000000..2373fe125c83
--- /dev/null
+++ b/sci-geosciences/gpsbabel/files/gpsbabel-xmldoc.patch
@@ -0,0 +1,14 @@
+diff -ru gpsbabel-1.4.2/Makefile.in gpsbabel-1.4.2-xmldoc/Makefile.in
+--- gpsbabel-1.4.2/Makefile.in 2011-01-11 17:57:47.075777307 +0100
++++ gpsbabel-1.4.2-xmldoc/Makefile.in 2011-01-11 17:58:53.134094491 +0100
+@@ -234,8 +234,8 @@
+ xsltproc \
+ --output $@ \
+ --stringparam toc.section.depth "1" \
+- --stringparam html.stylesheet \
+- "http://www.gpsbabel.org/style3.css" \
++ --nonet \
++ --stringparam html.stylesheet "gpsbabel.org-style3.css" \
+ http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl \
+ xmldoc/readme.xml
+
diff --git a/sci-geosciences/gpsbabel/gpsbabel-1.3.6.ebuild b/sci-geosciences/gpsbabel/gpsbabel-1.3.6.ebuild
deleted file mode 100644
index b307ba3a74b1..000000000000
--- a/sci-geosciences/gpsbabel/gpsbabel-1.3.6.ebuild
+++ /dev/null
@@ -1,51 +0,0 @@
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/gpsbabel/gpsbabel-1.3.6.ebuild,v 1.6 2011/03/02 20:30:51 jlec Exp $
-
-EAPI=2
-
-DESCRIPTION="GPS waypoints, tracks and routes converter"
-HOMEPAGE="http://www.gpsbabel.org/"
-SRC_URI="http://www.gpsbabel.org/plan9.php?dl=${P}.tar.gz -> ${P}.tar.gz"
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 ~ppc ~sparc x86"
-IUSE="doc usb"
-
-RDEPEND="
- dev-libs/expat
- usb? ( dev-libs/libusb )"
-DEPEND="${RDEPEND}
- doc? ( dev-java/fop
- virtual/latex-base
- dev-libs/libxslt
- dev-libs/libxml2:2
- dev-lang/perl
- app-text/docbook-xml-dtd:4.1.2 )"
-
-src_configure() {
- econf \
- $(use_with doc doc "${S}"/doc/manual) \
- $(use_with usb libusb) \
- --with-zlib=system
-}
-
-src_compile() {
- emake || die
- if use doc; then
- emake doc || die
- cd "${S}/doc"
- emake || die
- fi
-}
-
-src_install() {
- emake DESTDIR="${D}" install || die
- dodoc README* || die
- if use doc; then
- cd "${S}"/doc/
- dohtml ./manual/htmldoc-development/* || die
- docinto manual
- dodoc doc.dvi babelfront2.eps ../gpsbabel.pdf || die
- fi
-}
diff --git a/sci-geosciences/gpsbabel/gpsbabel-1.4.2.ebuild b/sci-geosciences/gpsbabel/gpsbabel-1.4.2.ebuild
index 53d7c496682d..99e55da78fa8 100644
--- a/sci-geosciences/gpsbabel/gpsbabel-1.4.2.ebuild
+++ b/sci-geosciences/gpsbabel/gpsbabel-1.4.2.ebuild
@@ -1,31 +1,97 @@
-# Copyright 1999-2010 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/gpsbabel/gpsbabel-1.4.2.ebuild,v 1.1 2010/11/08 00:59:36 fauli Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/gpsbabel/gpsbabel-1.4.2.ebuild,v 1.2 2011/06/10 09:30:56 scarabeus Exp $
-EAPI=2
+EAPI=4
+
+inherit qt4-r2 base autotools
DESCRIPTION="GPS waypoints, tracks and routes converter"
HOMEPAGE="http://www.gpsbabel.org/"
-SRC_URI="mirror://gentoo/${P}.tar.gz"
+SRC_URI="mirror://gentoo/${P}.tar.gz
+ doc? ( http://www.gpsbabel.org/style3.css -> gpsbabel.org-style3.css )"
LICENSE="GPL-2"
+
SLOT="0"
-KEYWORDS="~amd64 ~ppc ~sparc ~x86"
-IUSE="usb"
+KEYWORDS="amd64 ~ppc x86"
+IUSE="doc qt4"
+
+RDEPEND="
+ dev-libs/expat
+ sci-libs/shapelib
+ virtual/libusb
+ qt4? (
+ x11-libs/qt-gui:4
+ x11-libs/qt-webkit:4
+ )
+"
+DEPEND="${RDEPEND}
+ doc? (
+ dev-lang/perl
+ dev-libs/libxslt
+ app-text/docbook-xml-dtd:4.1.2
+ )
+"
-RDEPEND="dev-libs/expat
- usb? ( dev-libs/libusb )"
-DEPEND="${RDEPEND}"
+PATCHES=(
+ "${FILESDIR}/${PN}-disable_statistic_uploading.patch"
+ "${FILESDIR}/${PN}-disable_update_check.patch"
+ "${FILESDIR}/${PN}-disable_version_check.patch"
+ "${FILESDIR}/${PN}-fix_binary_name.patch"
+ "${FILESDIR}/${PN}-freebsd.patch"
+ "${FILESDIR}/${PN}-use_system_shapelib.patch"
+ "${FILESDIR}/${PN}-xmldoc.patch"
+)
+
+src_prepare() {
+ base_src_prepare
+ rm -rf shapelib || die
+
+ use doc && cp "${DISTDIR}/gpsbabel.org-style3.css" "${S}"
+
+ eautoreconf
+}
src_configure() {
- econf $(use_with usb libusb) \
+ econf \
+ $(use_with doc doc "${S}"/doc/manual) \
--with-zlib=system
+
+ if use qt4; then
+ pushd "${S}/gui" > /dev/null
+ lrelease *.ts || die
+ eqmake4
+ popd > /dev/null
+ fi
}
src_compile() {
- emake || die
+ emake
+ if use qt4; then
+ pushd "${S}/gui" > /dev/null
+ emake
+ popd > /dev/null
+ fi
+
+ if use doc; then
+ perl xmldoc/makedoc
+ emake gpsbabel.html
+ fi
}
src_install() {
- emake DESTDIR="${D}" install || die
- dodoc README* || die
+ default
+ dodoc README*
+
+ if use qt4; then
+ dobin gui/objects/gpsbabelfe
+ insinto /usr/share/qt4/translations/
+ doins gui/gpsbabel*_*.qm
+ newicon gui/images/appicon.png ${PN}.png
+ make_desktop_entry gpsbabelfe ${PN} ${PN} "Science;Geoscience"
+ fi
+
+ if use doc; then
+ dohtml gpsbabel.*
+ fi
}