commit:     0edf9640d46a24289e5b10405a6b1396e5594ea7
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Thu Apr  3 20:52:56 2025 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Thu Apr  3 21:00:38 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0edf9640

sci-astronomy/kstars: Fix data install paths

Closes: https://bugs.gentoo.org/953100
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../files/kstars-3.7.5-cmake-install-paths.patch   |  37 +++++++
 sci-astronomy/kstars/kstars-3.7.5-r1.ebuild        | 112 +++++++++++++++++++++
 2 files changed, 149 insertions(+)

diff --git a/sci-astronomy/kstars/files/kstars-3.7.5-cmake-install-paths.patch 
b/sci-astronomy/kstars/files/kstars-3.7.5-cmake-install-paths.patch
new file mode 100644
index 000000000000..3afd10f0cecc
--- /dev/null
+++ b/sci-astronomy/kstars/files/kstars-3.7.5-cmake-install-paths.patch
@@ -0,0 +1,37 @@
+From 5eb98b999a8427ea3c827edd12b3e11e5207ca47 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <[email protected]>
+Date: Thu, 3 Apr 2025 22:49:27 +0200
+Subject: [PATCH] CMake: s/DATA_INSTALL_DIR/KDE_INSTALL_DATADIR/
+
+Gentoo-bug: https://bugs.gentoo.org/953100
+Signed-off-by: Andreas Sturmlechner <[email protected]>
+---
+ kstars/data/fr/CMakeLists.txt  | 3 +--
+ kstars/data/nds/CMakeLists.txt | 3 +--
+ 2 files changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/kstars/data/fr/CMakeLists.txt b/kstars/data/fr/CMakeLists.txt
+index 070297450..d0f33cc5b 100644
+--- a/kstars/data/fr/CMakeLists.txt
++++ b/kstars/data/fr/CMakeLists.txt
+@@ -1,5 +1,4 @@
+ ########### install files ###############
+ 
+-install( FILES info_url.dat DESTINATION  ${DATA_INSTALL_DIR}/kstars/fr
+-)
++install(FILES info_url.dat DESTINATION ${KDE_INSTALL_DATADIR}/kstars/fr)
+ 
+diff --git a/kstars/data/nds/CMakeLists.txt b/kstars/data/nds/CMakeLists.txt
+index ba15f6cf8..09629dab8 100644
+--- a/kstars/data/nds/CMakeLists.txt
++++ b/kstars/data/nds/CMakeLists.txt
+@@ -1,5 +1,4 @@
+ ########### install files ###############
+ 
+-install( FILES info_url.dat DESTINATION  ${DATA_INSTALL_DIR}/kstars/nds
+-)
++install(FILES info_url.dat DESTINATION ${KDE_INSTALL_DATADIR}/kstars/nds)
+ 
+-- 
+2.49.0
+

diff --git a/sci-astronomy/kstars/kstars-3.7.5-r1.ebuild 
b/sci-astronomy/kstars/kstars-3.7.5-r1.ebuild
new file mode 100644
index 000000000000..a7c834fa73fb
--- /dev/null
+++ b/sci-astronomy/kstars/kstars-3.7.5-r1.ebuild
@@ -0,0 +1,112 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ECM_HANDBOOK="forceoptional"
+ECM_TEST="true"
+KFMIN=6.5.0
+QTMIN=6.7.2
+inherit ecm kde.org optfeature
+
+DESCRIPTION="Desktop Planetarium"
+HOMEPAGE="https://apps.kde.org/kstars/ https://kstars.kde.org/";
+
+if [[ ${KDE_BUILD_TYPE} = release ]]; then
+       SRC_URI="mirror://kde/stable/${PN}/${PV}/${P}.tar.xz"
+       KEYWORDS="amd64 ~x86"
+fi
+
+LICENSE="GPL-2+ GPL-3+"
+SLOT="0"
+IUSE="opencv +password raw"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+# https://wiki.gentoo.org/wiki/Project:Qt/Qt6_migration_notes#Still_unpackaged
+# >=dev-qt/qtdatavis3d-${QTMIN}:6
+COMMON_DEPEND="
+       >=dev-qt/qtbase-${QTMIN}:6[dbus,gui,network,sql,widgets]
+       >=dev-qt/qtdeclarative-${QTMIN}:6
+       >=dev-qt/qtsvg-${QTMIN}:6
+       >=dev-qt/qtwebsockets-${QTMIN}:6
+       >=kde-frameworks/kconfig-${KFMIN}:6
+       >=kde-frameworks/kconfigwidgets-${KFMIN}:6
+       >=kde-frameworks/kcoreaddons-${KFMIN}:6
+       >=kde-frameworks/kcrash-${KFMIN}:6
+       >=kde-frameworks/ki18n-${KFMIN}:6
+       >=kde-frameworks/kio-${KFMIN}:6
+       >=kde-frameworks/knewstuff-${KFMIN}:6
+       >=kde-frameworks/knotifications-${KFMIN}:6
+       >=kde-frameworks/knotifyconfig-${KFMIN}:6
+       >=kde-frameworks/kplotting-${KFMIN}:6
+       >=kde-frameworks/kwidgetsaddons-${KFMIN}:6
+       >=kde-frameworks/kxmlgui-${KFMIN}:6
+       sci-astronomy/wcslib:=
+       sci-libs/cfitsio:=
+       sci-libs/gsl:=
+       >=sci-libs/indilib-2.0.2
+       sci-libs/libnova:=
+       >=sci-libs/stellarsolver-2.6-r10
+       sys-libs/zlib
+       opencv? (
+               media-libs/opencv:=[ffmpeg]
+               || (
+                       media-libs/opencv[qt6(-)]
+                       media-libs/opencv[gtk3(-)]
+               )
+       )
+       password? ( >=dev-libs/qtkeychain-0.14.2:=[qt6(+)] )
+       raw? ( media-libs/libraw:= )
+"
+# TODO: what about virtual/opengl?
+DEPEND="${COMMON_DEPEND}
+       dev-cpp/eigen:3
+       >=dev-qt/qtbase-${QTMIN}:6[concurrent]
+       test? ( sci-astronomy/erfa )
+"
+RDEPEND="${COMMON_DEPEND}
+       !${CATEGORY}/${PN}:5
+       >=dev-qt/qt5compat-${QTMIN}:6[qml]
+       >=dev-qt/qtpositioning-${QTMIN}:6
+"
+
+CMAKE_SKIP_TESTS=(
+       # bug 842768, test declared unstable by upstream
+       TestKSPaths
+       # bugs 923871, 939788
+       TestPlaceholderPath # ki18n (KLocalizedString) failure
+       # all fail with offscreen plugin
+       TestEkos{Capture,FilterWheel,Focus,Mount,Scheduler{,Ops},Simulator}
+)
+
+PATCHES=(
+       # downstream patches
+       "${FILESDIR}"/${PN}-3.7.{4,5}-cmake.patch # bug 895892
+       "${FILESDIR}"/${P}-cmake-install-paths.patch # bug 953100
+)
+
+src_configure() {
+       local mycmakeargs=(
+               -DBUILD_PYKSTARS=OFF
+               -DCMAKE_DISABLE_FIND_PACKAGE_LibXISF=ON # not packaged
+               -DBUILD_QT5=OFF # KF6 please
+               -DBUILD_DOC=$(usex handbook)
+               $(cmake_use_find_package opencv OpenCV)
+               $(cmake_use_find_package password Qt6Keychain)
+               $(cmake_use_find_package raw LibRaw)
+       )
+
+       ecm_src_configure
+}
+
+src_test() {
+       LC_NUMERIC="C" LC_TIME="C" TZ=UTC ecm_src_test
+}
+
+pkg_postinst() {
+       if [[ -z "${REPLACING_VERSIONS}" ]]; then
+               optfeature "Display 'current' pictures of planets" 
x11-misc/xplanet
+       fi
+       ecm_pkg_postinst
+}

Reply via email to