aboutsummaryrefslogtreecommitdiffstats
path: root/astro
diff options
context:
space:
mode:
authorpgollucci <pgollucci@FreeBSD.org>2015-08-19 03:58:06 +0800
committerpgollucci <pgollucci@FreeBSD.org>2015-08-19 03:58:06 +0800
commit6633f434c01af96cfcd69c77f44a60839cbe6a99 (patch)
treedb88d8bb398e33578909cb0ad7889fc80d8bf6b6 /astro
parent7fcdcc0d88b7519448017920872d6a04e6a285bf (diff)
downloadfreebsd-ports-gnome-6633f434c01af96cfcd69c77f44a60839cbe6a99.tar.gz
freebsd-ports-gnome-6633f434c01af96cfcd69c77f44a60839cbe6a99.tar.zst
freebsd-ports-gnome-6633f434c01af96cfcd69c77f44a60839cbe6a99.zip
astro/gpsbabel: add GUI option, clean up dependencies
- Add GUI option (requires qt4-gui,qt4-xml,qt4-network and qt4-webkit at runtime). - Remove autoconf/pcre/glib20/gettext dependencies (unused). - USE_QT4=linguist_build -> USE_QT4=linguisttools_build (GUI option only). - Use system zlib. - Regenerate patch. PR: 201680 Submitted by: s3erios@gmail.com Approved by: dev2@heesakkers.info
Diffstat (limited to 'astro')
-rw-r--r--astro/gpsbabel/Makefile48
-rw-r--r--astro/gpsbabel/files/patch-jeeps-gpslibusb.cc4
-rw-r--r--astro/gpsbabel/pkg-plist12
3 files changed, 49 insertions, 15 deletions
diff --git a/astro/gpsbabel/Makefile b/astro/gpsbabel/Makefile
index 1b9e89860194..9d81294d9711 100644
--- a/astro/gpsbabel/Makefile
+++ b/astro/gpsbabel/Makefile
@@ -3,6 +3,7 @@
PORTNAME= gpsbabel
PORTVERSION= 1.5.2
+PORTREVISION= 1
CATEGORIES= astro geography
MASTER_SITES= https://secure.ohos.nl/downloads/ \
LOCAL/glebius
@@ -13,20 +14,41 @@ COMMENT= GPS file translating tool
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING
-LIB_DEPENDS= libpcre.so:${PORTSDIR}/devel/pcre
-
-USE_AUTOTOOLS= autoconf
-GNU_CONFIGURE= yes
-
-USES= gettext
-USE_QT4= corelib linguist_build qmake_build
-USE_GNOME= glib20
-
-PLIST_FILES= bin/gpsbabel
-
CONFLICTS= gpsbabel14-[0-9]*
-post-install:
- ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/gpsbabel
+USE_QT4= corelib qmake_build
+GNU_CONFIGURE= yes
+CONFIGURE_ARGS= --with-zlib=system
+
+OPTIONS_DEFINE= GUI
+OPTIONS_SUB= GUI
+
+GUI_ALL_TARGET= gui
+GUI_USE= QT4=gui,xml,network,webkit
+GUI_USE+= QT4=linguisttools_build,moc_build,rcc_build,uic_build
+
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MGUI}
+MAKE_JOBS_UNSAFE= yes
+.endif
+
+post-patch:
+ @${REINPLACE_CMD} '/langPath_ = / \
+ s|QApplication::applicationDirPath()|"${DATADIR}"|' \
+ ${WRKSRC}/gui/mainwindow.cc
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/gpsbabel ${STAGEDIR}${PREFIX}/bin/
+.if ${PORT_OPTIONS:MGUI}
+ ${INSTALL_PROGRAM} ${WRKSRC}/gui/objects/gpsbabelfe-bin \
+ ${STAGEDIR}${PREFIX}/bin/
+ ${INSTALL_DATA} ${WRKSRC}/gui/gpsbabel.desktop \
+ ${STAGEDIR}${PREFIX}/share/applications/
+ ${MKDIR} ${STAGEDIR}${DATADIR}/translations
+ ${INSTALL_DATA} ${WRKSRC}/gui/*.qm ${STAGEDIR}${DATADIR}/translations/
+ ${INSTALL_DATA} ${WRKSRC}/gui/images/appicon.png \
+ ${STAGEDIR}${PREFIX}/share/pixmaps/gpsbabel.png
+.endif
.include <bsd.port.mk>
diff --git a/astro/gpsbabel/files/patch-jeeps-gpslibusb.cc b/astro/gpsbabel/files/patch-jeeps-gpslibusb.cc
index 3de10b4cf7dc..74929c33aa48 100644
--- a/astro/gpsbabel/files/patch-jeeps-gpslibusb.cc
+++ b/astro/gpsbabel/files/patch-jeeps-gpslibusb.cc
@@ -1,5 +1,5 @@
---- jeeps/gpslibusb.cc.orig 2014-09-16 05:49:59.000000000 +0200
-+++ jeeps/gpslibusb.cc 2015-03-14 19:33:11.690407708 +0100
+--- jeeps/gpslibusb.cc.orig 2014-09-16 03:49:59 UTC
++++ jeeps/gpslibusb.cc
@@ -20,7 +20,8 @@
*/
diff --git a/astro/gpsbabel/pkg-plist b/astro/gpsbabel/pkg-plist
new file mode 100644
index 000000000000..0301fdec4a25
--- /dev/null
+++ b/astro/gpsbabel/pkg-plist
@@ -0,0 +1,12 @@
+bin/gpsbabel
+%%GUI%%bin/gpsbabelfe-bin
+%%GUI%%share/applications/gpsbabel.desktop
+%%GUI%%%%DATADIR%%/translations/gpsbabel.qm
+%%GUI%%%%DATADIR%%/translations/gpsbabelfe.qm
+%%GUI%%%%DATADIR%%/translations/gpsbabelfe_de.qm
+%%GUI%%%%DATADIR%%/translations/gpsbabelfe_es.qm
+%%GUI%%%%DATADIR%%/translations/gpsbabelfe_fr.qm
+%%GUI%%%%DATADIR%%/translations/gpsbabelfe_hu.qm
+%%GUI%%%%DATADIR%%/translations/gpsbabelfe_it.qm
+%%GUI%%%%DATADIR%%/translations/gpsbabelfe_ru.qm
+%%GUI%%share/pixmaps/gpsbabel.png