commit:     292bc1f8826a7e9c6d569b9f0a52937dbd10177f
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun May 18 08:05:28 2025 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Sep  9 18:00:28 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=292bc1f8

sci-astronomy/kstars: add 3.7.8

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 sci-astronomy/kstars/Manifest                      |   1 +
 .../kstars/files/kstars-3.7.4-cmake.patch          |  29 ++++--
 .../kstars/files/kstars-3.7.8-unused-dep.patch     |  55 ++++++++++
 sci-astronomy/kstars/kstars-3.7.8.ebuild           | 112 +++++++++++++++++++++
 4 files changed, 187 insertions(+), 10 deletions(-)

diff --git a/sci-astronomy/kstars/Manifest b/sci-astronomy/kstars/Manifest
index c775dc7b3096..f913c4f46428 100644
--- a/sci-astronomy/kstars/Manifest
+++ b/sci-astronomy/kstars/Manifest
@@ -1 +1,2 @@
 DIST kstars-3.7.5.tar.xz 163498784 BLAKE2B 
f8b8c0246ab3c6dccec4a6af2039f4ef80e71d4ac43eebad869123494f6418dc36a5e1a8044c49e8e58a07267d58daaee589850b0800b9843bfdd3411bedb286
 SHA512 
988a5e0221b283bb9d0bb0c24d8e7fa91f9618e1cb9a764cec823217349c17bb0c7bc70213e16d2d021bb2bf6d21488c1daacb30f26e4f6f60b012fa05afd257
+DIST kstars-3.7.8.tar.xz 50942300 BLAKE2B 
c41132a7b7bcc093bad630ff2787e821ecabab0c1e6b6202a976e8cd0affc7a12996738fdd042aa5fec38d31575717abc2d7ebef9b6c64f5940166054ad3f8b6
 SHA512 
1ae1ae02572b832a8b3a45785c353147333baa811c280b132c0597a3ad8dec8a7cfa26458587a4fc7c81847b29c93f2375cc9ce35c4b613583bfdee70727c460

diff --git a/sci-astronomy/kstars/files/kstars-3.7.4-cmake.patch 
b/sci-astronomy/kstars/files/kstars-3.7.4-cmake.patch
index 8306f1150f7b..d055ae6e07e0 100644
--- a/sci-astronomy/kstars/files/kstars-3.7.4-cmake.patch
+++ b/sci-astronomy/kstars/files/kstars-3.7.4-cmake.patch
@@ -1,18 +1,18 @@
-From 5c66594069b836e0fe806653e344f4e36d1e9c1e Mon Sep 17 00:00:00 2001
+From 7e5a75da29016e533d59971ba84931b33e072a81 Mon Sep 17 00:00:00 2001
 From: Andreas Sturmlechner <[email protected]>
 Date: Tue, 3 Dec 2024 19:46:01 +0100
 Subject: [PATCH] Thanks, but no thanks
 
 Signed-off-by: Andreas Sturmlechner <[email protected]>
 ---
- CMakeLists.txt | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
+ CMakeLists.txt | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
 
 diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 091078e4c..af6ec66f4 100644
+index a3b591512..31071aeef 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -343,7 +343,7 @@ add_definitions(-DQT_NO_CAST_TO_ASCII)
+@@ -345,7 +345,7 @@ add_definitions(-DQT_NO_CAST_TO_ASCII)
  # Needed for htmesh, and libraw
  kde_enable_exceptions()
  
@@ -21,7 +21,16 @@ index 091078e4c..af6ec66f4 100644
  
    # TEMPORARY: To disable QCustomPlot warning until 2.0.0 is released which 
fixes these warnings
    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-non-virtual-dtor")
-@@ -362,7 +362,7 @@ if (ANDROID)
+@@ -355,7 +355,7 @@ if (UNIX)
+     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdata-sections 
-ffunction-sections")
+     set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections")
+   endif()
+-endif(UNIX)
++endif()
+ 
+ # Optimize binary size by dropping unneeded symbols at linking stage
+ if (ANDROID)
+@@ -364,7 +364,7 @@ if (ANDROID)
  endif ()
  
  # Add security (hardening flags)
@@ -30,7 +39,7 @@ index 091078e4c..af6ec66f4 100644
      SET(SEC_COMP_FLAGS "${SEC_COMP_FLAGS} -fstack-protector-all -Wcast-align 
-fPIE")
      # This is ill-defined, but I searched for a solution for quite a long 
time to no avail
      # - FORTIFY_SOURCE generates a warning when there is no code 
optimization, and warnings will become errors at some point
-@@ -394,7 +394,7 @@ IF (UNIX OR APPLE OR ANDROID)
+@@ -396,7 +396,7 @@ IF (UNIX OR APPLE OR ANDROID)
  ENDIF ()
  
  # Clang Format support
@@ -39,7 +48,7 @@ index 091078e4c..af6ec66f4 100644
      SET(FORMAT_CODE OFF CACHE BOOL "Enable Clang Format")
      IF (FORMAT_CODE MATCHES ON)
          FILE(GLOB_RECURSE ALL_SOURCE_FILES *.c *.cpp *.h)
-@@ -415,7 +415,7 @@ ENDIF ()
+@@ -417,7 +417,7 @@ ENDIF ()
  
  SET(FIX_WARNINGS OFF CACHE BOOL "Enable strict compilation mode to turn 
compiler warnings to errors")
  # Warning, debug and linker flags
@@ -48,7 +57,7 @@ index 091078e4c..af6ec66f4 100644
      SET(COMP_FLAGS "")
      SET(LINKER_FLAGS "")
      # Verbose warnings and turns all to errors
-@@ -479,7 +479,7 @@ ENDIF ()
+@@ -481,7 +481,7 @@ ENDIF ()
  
  # Sanitizer support
  SET(SANITIZERS OFF CACHE BOOL "Sanitizer support for gcc and Clang")
@@ -58,5 +67,5 @@ index 091078e4c..af6ec66f4 100644
       (APPLE AND (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" OR 
CMAKE_COMPILER_IS_GNUCXX))))
      SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address,undefined 
-fno-omit-frame-pointer")
 -- 
-2.47.1
+2.51.0
 

diff --git a/sci-astronomy/kstars/files/kstars-3.7.8-unused-dep.patch 
b/sci-astronomy/kstars/files/kstars-3.7.8-unused-dep.patch
new file mode 100644
index 000000000000..043ecae0d737
--- /dev/null
+++ b/sci-astronomy/kstars/files/kstars-3.7.8-unused-dep.patch
@@ -0,0 +1,55 @@
+See also: https://invent.kde.org/education/kstars/-/merge_requests/1559
+
+From 08fe922629a92c62877586b42f38d79038b32382 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <[email protected]>
+Date: Tue, 9 Sep 2025 19:33:14 +0200
+Subject: [PATCH] Drop obsolete KDocTools dependency
+
+Amends fb9e10684d42202c30bf31e6387e69258527f9e8
+
+Signed-off-by: Andreas Sturmlechner <[email protected]>
+---
+ CMakeLists.txt | 12 ------------
+ 1 file changed, 12 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index fb0f62740..f65dae76f 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -147,7 +147,6 @@ else(BUILD_KSTARS_LITE)
+        find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
+          Config
+          Crash
+-         DocTools
+          WidgetsAddons
+          NewStuff
+          I18n
+@@ -165,7 +164,6 @@ else(BUILD_KSTARS_LITE)
+         find_package(KF6 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
+           Config
+           Crash
+-          DocTools
+           WidgetsAddons
+           NewStuff
+           I18n
+@@ -518,17 +516,7 @@ IF (NOT ANDROID)
+     enable_testing(true)
+     add_subdirectory(Tests)
+     ENDIF()
+-    # Make it possible to use the po files fetched by the fetch-translations 
step    
+     ki18n_install(po)
+-    if (BUILD_QT5)
+-        find_package(KF5DocTools CONFIG)
+-    else()
+-        find_package(KF6DocTools CONFIG)
+-    endif()
+-    if(KF5DocTools_FOUND OR KF6DocTools_FOUND)
+-        kdoctools_install(po)
+-    endif()
+-
+ ENDIF ()
+ 
+ if(NOT APPLE) #This is not used on MacOS
+-- 
+2.51.0
+

diff --git a/sci-astronomy/kstars/kstars-3.7.8.ebuild 
b/sci-astronomy/kstars/kstars-3.7.8.ebuild
new file mode 100644
index 000000000000..0329e3436fbe
--- /dev/null
+++ b/sci-astronomy/kstars/kstars-3.7.8.ebuild
@@ -0,0 +1,112 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ECM_TEST="true"
+KFMIN=6.9.0
+QTMIN=6.8.1
+inherit ecm kde.org optfeature xdg
+
+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.7
+       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-cmake.patch # bug 895892
+       "${FILESDIR}"/${PN}-3.7.5-cmake-install-paths.patch # bug 953100
+       "${FILESDIR}"/${P}-unused-dep.patch # pending MR upstream
+)
+
+src_configure() {
+       local mycmakeargs=(
+               -DBUILD_PYKSTARS=OFF
+               -DCMAKE_DISABLE_FIND_PACKAGE_LibXISF=ON # not packaged
+               -DBUILD_WITH_QT6=ON # KF6 please
+               -DBUILD_QT5=OFF # KF6 please
+               $(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
+       xdg_pkg_postinst
+}

Reply via email to