diff options
author | Andrew Ammerlaan <andrewammerlaan@gentoo.org> | 2023-01-30 09:12:52 +0100 |
---|---|---|
committer | Andrew Ammerlaan <andrewammerlaan@gentoo.org> | 2023-01-30 09:19:39 +0100 |
commit | 612ad41ff7c2e1766aa2e9e807f142fe256b1ce6 (patch) | |
tree | 18fcbd9e0cfbdf4d8f98c0792338fbf1e1676218 /sci-geosciences/gpsbabel/gpsbabel-1.8.0-r1.ebuild | |
parent | dev-ruby/tzinfo: add github, rubygems upstream metadata (diff) | |
download | gentoo-612ad41ff7c2e1766aa2e9e807f142fe256b1ce6.tar.gz gentoo-612ad41ff7c2e1766aa2e9e807f142fe256b1ce6.tar.bz2 gentoo-612ad41ff7c2e1766aa2e9e807f142fe256b1ce6.zip |
sci-geosciences/gpsbabel: drop use gui, add use qt6
Though the build system provides separate targets for
the gui and cli tools, the cmake configure files do not
reflect this and they will search for qt unconditionally.
Patching is non-trivial because the source files for the
gui and for the cli are not completely separated.
The package does support qt6 but the upstream cmake files
do not provide a means of selecting which to use and will
choose a version automagically. A simple patch is enough
to fix this.
Closes: https://bugs.gentoo.org/852836
Closes: https://bugs.gentoo.org/892559
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
Diffstat (limited to 'sci-geosciences/gpsbabel/gpsbabel-1.8.0-r1.ebuild')
-rw-r--r-- | sci-geosciences/gpsbabel/gpsbabel-1.8.0-r1.ebuild | 108 |
1 files changed, 108 insertions, 0 deletions
diff --git a/sci-geosciences/gpsbabel/gpsbabel-1.8.0-r1.ebuild b/sci-geosciences/gpsbabel/gpsbabel-1.8.0-r1.ebuild new file mode 100644 index 000000000000..cfe639e603e8 --- /dev/null +++ b/sci-geosciences/gpsbabel/gpsbabel-1.8.0-r1.ebuild @@ -0,0 +1,108 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +CMAKE_IN_SOURCE_BUILD=1 +inherit cmake desktop xdg + +MY_PV="${PV//./_}" +MY_P="${PN}_${MY_PV}" + +DESCRIPTION="GPS waypoints, tracks and routes converter" +HOMEPAGE="https://www.gpsbabel.org/ https://github.com/gpsbabel/gpsbabel" + +if [[ ${PV} == 9999 ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/gpsbabel/gpsbabel.git" +else + SRC_URI="https://github.com/gpsbabel/gpsbabel/archive/gpsbabel_${MY_PV}.tar.gz" + KEYWORDS="~amd64 ~arm ~arm64 ~x86" + S="${WORKDIR}/gpsbabel-gpsbabel_${MY_PV}" +fi + +LICENSE="GPL-2" +SLOT="0" +IUSE="doc qt6" + +BDEPEND=" + virtual/pkgconfig + doc? ( + app-text/docbook-xml-dtd:4.1.2 + dev-lang/perl + dev-libs/libxslt + ) + !qt6? ( dev-qt/linguist-tools:5 ) + qt6? ( dev-qt/qttools:6[linguist] ) +" + +RDEPEND=" + dev-libs/expat + sci-libs/shapelib:= + sys-libs/zlib:=[minizip] + virtual/libusb:1 + !qt6? ( + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtnetwork:5 + dev-qt/qtserialport:5 + dev-qt/qtwebchannel:5 + dev-qt/qtwebengine:5[widgets] + dev-qt/qtwidgets:5 + dev-qt/qtxml:5 + ) + qt6? ( + dev-qt/qtbase:6[gui,network,widgets,xml] + dev-qt/qtserialport:6 + dev-qt/qtwebchannel:6 + dev-qt/qtwebengine:6[widgets] + dev-qt/qt5compat:6 + ) +" + +DEPEND="${RDEPEND}" + +DOCS=( AUTHORS NEWS README.{contrib,igc,mapconverter,md} gui/README.{contrib,gui} ) + +PATCHES=( + "${FILESDIR}/${PN}-1.8.0-no-automagic-qt5-qt6.patch" +) + +src_prepare() { + cmake_src_prepare + + # ensure bundled libs are not used + rm -r shapelib zlib || die +} + +src_configure() { + local mycmakeargs=( + -DGPSBABEL_WITH_LIBUSB=pkgconfig + -DGPSBABEL_WITH_SHAPELIB=pkgconfig + -DGPSBABEL_WITH_ZLIB=pkgconfig + -DGPSBABEL_MAPPREVIEW=ON + -DGPSBABEL_EMBED_MAP=ON + -DGPSBABEL_EMBED_TRANSLATIONS=ON + -DUSE_QT6="$(usex qt6)" + ) + + cmake_src_configure +} + +cmake_src_compile() { + cmake_build gpsbabel + cmake_build gpsbabelfe + use doc && cmake_build gpsbabel.html +} + +src_install() { + use doc && dodoc gpsbabel.html + einstalldocs + + dobin gpsbabel + dobin gui/GPSBabelFE/gpsbabelfe + insinto /usr/share/${PN}/translations/ + doins gui/gpsbabel*_*.qm + newicon gui/images/appicon.png ${PN}.png + domenu gui/gpsbabel.desktop +} |