summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2021-02-20 20:50:55 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2021-02-23 20:52:32 +0100
commit35c6154f29bf195c123fa5918658bd79be1b38c0 (patch)
treeb9fe29e26de28052113e30e0f1f7cff38b56886f /sci-geosciences/qmapshack
parentsci-geosciences/routino: python3_9, python optional, tests pass, style (diff)
downloadgentoo-35c6154f29bf195c123fa5918658bd79be1b38c0.tar.gz
gentoo-35c6154f29bf195c123fa5918658bd79be1b38c0.tar.bz2
gentoo-35c6154f29bf195c123fa5918658bd79be1b38c0.zip
sci-geosciences/qmapshack: Support build with >=dev-libs/quazip-1.0
Closes: https://bugs.gentoo.org/770877 Package-Manager: Portage-3.0.14, Repoman-3.0.2 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'sci-geosciences/qmapshack')
-rw-r--r--sci-geosciences/qmapshack/files/qmapshack-1.15.2-no-hacks-kthxbye.patch28
-rw-r--r--sci-geosciences/qmapshack/qmapshack-1.15.2-r2.ebuild56
2 files changed, 84 insertions, 0 deletions
diff --git a/sci-geosciences/qmapshack/files/qmapshack-1.15.2-no-hacks-kthxbye.patch b/sci-geosciences/qmapshack/files/qmapshack-1.15.2-no-hacks-kthxbye.patch
new file mode 100644
index 000000000000..99a55d694fb5
--- /dev/null
+++ b/sci-geosciences/qmapshack/files/qmapshack-1.15.2-no-hacks-kthxbye.patch
@@ -0,0 +1,28 @@
+--- a/CMakeLists.txt 2020-12-07 17:13:38.000000000 +0100
++++ b/CMakeLists.txt 2021-02-20 20:01:41.706789439 +0100
+@@ -18,25 +18,6 @@
+ endif()
+
+ ###############################################################################################
+-# Do distribution dependent stuff
+-###############################################################################################
+-string(TIMESTAMP YEAR "%Y")
+-set(EXPIRE_YEAR "2021")
+-set(DEBIAN_RELEASE_INFO "/etc/debian_version")
+-
+-if(((EXISTS ${DEBIAN_RELEASE_INFO}) AND (${YEAR} LESS ${EXPIRE_YEAR})) OR APPLE)
+- message( STATUS "Apply patches to fix build system on Debian")
+- execute_process(COMMAND bash "-c" "patch --quiet -p1 < FindPROJ4.patch"
+- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+- OUTPUT_QUIET)
+- execute_process(COMMAND bash "-c" "patch --quiet -p1 < FindQuaZip5.patch"
+- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+- OUTPUT_QUIET)
+-endif(((EXISTS ${DEBIAN_RELEASE_INFO}) AND (${YEAR} LESS ${EXPIRE_YEAR})) OR APPLE)
+-
+-
+-
+-###############################################################################################
+ # Define project name and version tags
+ ###############################################################################################
+ # this is not only the QMS version it will be the package version, too.
diff --git a/sci-geosciences/qmapshack/qmapshack-1.15.2-r2.ebuild b/sci-geosciences/qmapshack/qmapshack-1.15.2-r2.ebuild
new file mode 100644
index 000000000000..b940212b7529
--- /dev/null
+++ b/sci-geosciences/qmapshack/qmapshack-1.15.2-r2.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake xdg
+
+DESCRIPTION="GPS mapping utility"
+HOMEPAGE="https://github.com/Maproom/qmapshack/wiki"
+SRC_URI="https://github.com/Maproom/${PN}/archive/V_${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="
+ dev-libs/quazip:0=
+ dev-qt/designer:5
+ dev-qt/qtdbus:5
+ dev-qt/qtdeclarative:5[widgets]
+ dev-qt/qthelp:5
+ dev-qt/qtnetwork:5[ssl]
+ dev-qt/qtprintsupport:5
+ dev-qt/qtsql:5
+ dev-qt/qtwebengine:5[widgets]
+ >=sci-geosciences/routino-3.1.1
+ sci-libs/alglib
+ sci-libs/gdal
+ >=sci-libs/proj-6.0.0:=
+"
+DEPEND="${RDEPEND}"
+BDEPEND="dev-qt/linguist-tools:5"
+
+S="${WORKDIR}"/${PN}-V_${PV}
+
+PATCHES=( "${S}"/FindPROJ4.patch )
+
+src_prepare() {
+ cmake_src_prepare
+
+ # TODO: upstream
+ if has_version ">=dev-libs/quazip-1.0"; then
+ sed -e "/^find_package(QuaZip5/s/5 /-Qt5 CONFIG/" \
+ -i CMakeLists.txt || die
+
+ sed -e "s/\${QUAZIP_LIBRARIES}/QuaZip::QuaZip/" \
+ -i src/qmapshack/CMakeLists.txt || die
+ fi
+}
+
+src_install() {
+ docompress -x /usr/share/doc/${PF}/html
+ cmake_src_install
+ mv "${D}"/usr/share/doc/HTML "${D}"/usr/share/doc/${PF}/html || die "mv Qt help failed"
+}