From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A314515800F for ; Mon, 30 Jan 2023 08:19:54 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 96663E08F3; Mon, 30 Jan 2023 08:19:53 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7694CE08F3 for ; Mon, 30 Jan 2023 08:19:53 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5A0E0335D56 for ; Mon, 30 Jan 2023 08:19:52 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 917F4828 for ; Mon, 30 Jan 2023 08:19:50 +0000 (UTC) From: "Andrew Ammerlaan" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andrew Ammerlaan" Message-ID: <1675066779.612ad41ff7c2e1766aa2e9e807f142fe256b1ce6.andrewammerlaan@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sci-geosciences/gpsbabel/, sci-geosciences/gpsbabel/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: sci-geosciences/gpsbabel/files/gpsbabel-1.8.0-no-automagic-qt5-qt6.patch sci-geosciences/gpsbabel/gpsbabel-1.8.0-r1.ebuild sci-geosciences/gpsbabel/gpsbabel-1.8.0.ebuild X-VCS-Directories: sci-geosciences/gpsbabel/files/ sci-geosciences/gpsbabel/ X-VCS-Committer: andrewammerlaan X-VCS-Committer-Name: Andrew Ammerlaan X-VCS-Revision: 612ad41ff7c2e1766aa2e9e807f142fe256b1ce6 X-VCS-Branch: master Date: Mon, 30 Jan 2023 08:19:50 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 64839de9-5b71-4d0c-9dd8-12c33598f440 X-Archives-Hash: 7b6a062dbaa073f4dfca1097aaf71644 commit: 612ad41ff7c2e1766aa2e9e807f142fe256b1ce6 Author: Andrew Ammerlaan gentoo org> AuthorDate: Mon Jan 30 08:12:52 2023 +0000 Commit: Andrew Ammerlaan gentoo org> CommitDate: Mon Jan 30 08:19:39 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=612ad41f 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 gentoo.org> .../gpsbabel-1.8.0-no-automagic-qt5-qt6.patch | 34 +++++++++++++++ ...babel-1.8.0.ebuild => gpsbabel-1.8.0-r1.ebuild} | 48 ++++++++++++++-------- 2 files changed, 64 insertions(+), 18 deletions(-) diff --git a/sci-geosciences/gpsbabel/files/gpsbabel-1.8.0-no-automagic-qt5-qt6.patch b/sci-geosciences/gpsbabel/files/gpsbabel-1.8.0-no-automagic-qt5-qt6.patch new file mode 100644 index 000000000000..47a1a37e1ba3 --- /dev/null +++ b/sci-geosciences/gpsbabel/files/gpsbabel-1.8.0-no-automagic-qt5-qt6.patch @@ -0,0 +1,34 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2a7d805..65bd4db 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -26,7 +26,11 @@ set(CMAKE_AUTORCC ON) + add_executable(gpsbabel) + + # Find the QtCore library +-find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED) ++if(USE_QT6) ++ find_package(QT NAMES Qt6 COMPONENTS Core REQUIRED) ++else() ++ find_package(QT NAMES Qt5 COMPONENTS Core REQUIRED) ++endif() + find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core REQUIRED) + list(APPEND QT_LIBRARIES Qt${QT_VERSION_MAJOR}::Core) + if(${Qt${QT_VERSION_MAJOR}Core_VERSION} VERSION_LESS 5.12) +diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt +index 4c839c2..ac329dd 100644 +--- a/gui/CMakeLists.txt ++++ b/gui/CMakeLists.txt +@@ -23,7 +23,11 @@ endif() + add_executable(${TARGET} WIN32 MACOSX_BUNDLE) + + # Find the QtCore library +-find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED) ++if(USE_QT6) ++ find_package(QT NAMES Qt6 COMPONENTS Core REQUIRED) ++else() ++ find_package(QT NAMES Qt5 COMPONENTS Core REQUIRED) ++endif() + find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Gui Network SerialPort Widgets Xml REQUIRED) + list(APPEND QT_LIBRARIES Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Gui Qt${QT_VERSION_MAJOR}::Network Qt${QT_VERSION_MAJOR}::SerialPort Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Xml) + if(${Qt${QT_VERSION_MAJOR}Core_VERSION} VERSION_LESS 5.12) diff --git a/sci-geosciences/gpsbabel/gpsbabel-1.8.0.ebuild b/sci-geosciences/gpsbabel/gpsbabel-1.8.0-r1.ebuild similarity index 68% rename from sci-geosciences/gpsbabel/gpsbabel-1.8.0.ebuild rename to sci-geosciences/gpsbabel/gpsbabel-1.8.0-r1.ebuild index 47952f41dd2f..cfe639e603e8 100644 --- a/sci-geosciences/gpsbabel/gpsbabel-1.8.0.ebuild +++ b/sci-geosciences/gpsbabel/gpsbabel-1.8.0-r1.ebuild @@ -23,7 +23,7 @@ fi LICENSE="GPL-2" SLOT="0" -IUSE="doc gui" +IUSE="doc qt6" BDEPEND=" virtual/pkgconfig @@ -32,29 +32,42 @@ BDEPEND=" dev-lang/perl dev-libs/libxslt ) - gui? ( dev-qt/linguist-tools:5 ) + !qt6? ( dev-qt/linguist-tools:5 ) + qt6? ( dev-qt/qttools:6[linguist] ) " -# Even with gui disabled, still links with qtcore + RDEPEND=" dev-libs/expat sci-libs/shapelib:= sys-libs/zlib:=[minizip] virtual/libusb:1 - dev-qt/qtcore:5 - gui? ( + !qt6? ( + dev-qt/qtcore:5 dev-qt/qtgui:5 dev-qt/qtnetwork:5 - dev-qt/qttranslations: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 @@ -63,13 +76,14 @@ src_prepare() { } src_configure() { - mycmakeargs=( + local mycmakeargs=( -DGPSBABEL_WITH_LIBUSB=pkgconfig -DGPSBABEL_WITH_SHAPELIB=pkgconfig -DGPSBABEL_WITH_ZLIB=pkgconfig - -DGPSBABEL_MAPPREVIEW=$(usex gui) - -DGPSBABEL_EMBED_MAP=$(usex gui) - -DGPSBABEL_EMBED_TRANSLATIONS=$(usex gui) + -DGPSBABEL_MAPPREVIEW=ON + -DGPSBABEL_EMBED_MAP=ON + -DGPSBABEL_EMBED_TRANSLATIONS=ON + -DUSE_QT6="$(usex qt6)" ) cmake_src_configure @@ -77,7 +91,7 @@ src_configure() { cmake_src_compile() { cmake_build gpsbabel - use gui && cmake_build gpsbabelfe + cmake_build gpsbabelfe use doc && cmake_build gpsbabel.html } @@ -86,11 +100,9 @@ src_install() { einstalldocs dobin gpsbabel - if use gui; then - dobin gui/GPSBabelFE/gpsbabelfe - insinto /usr/share/${PN}/translations/ - doins gui/gpsbabel*_*.qm - newicon gui/images/appicon.png ${PN}.png - domenu gui/gpsbabel.desktop - fi + dobin gui/GPSBabelFE/gpsbabelfe + insinto /usr/share/${PN}/translations/ + doins gui/gpsbabel*_*.qm + newicon gui/images/appicon.png ${PN}.png + domenu gui/gpsbabel.desktop }