commit:     35c6154f29bf195c123fa5918658bd79be1b38c0
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 20 19:50:55 2021 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Feb 23 19:52:32 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=35c6154f

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 <AT> gentoo.org>

 .../files/qmapshack-1.15.2-no-hacks-kthxbye.patch  | 28 +++++++++++
 .../qmapshack/qmapshack-1.15.2-r2.ebuild           | 56 ++++++++++++++++++++++
 2 files changed, 84 insertions(+)

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 00000000000..99a55d694fb
--- /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 00000000000..b940212b752
--- /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"
+}

Reply via email to