commit: d09acaaae562e49a57806d2386833356c8aa855f Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> AuthorDate: Wed Jan 7 18:21:21 2026 +0000 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> CommitDate: Wed Jan 7 19:15:52 2026 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d09acaaa
sci-astronomy/celestia: Fix missing dependencies, USEdeps, CMake warnings Bug: https://bugs.gentoo.org/945763 Closes: https://bugs.gentoo.org/964763 Closes: https://bugs.gentoo.org/968494 Closes: https://bugs.gentoo.org/957796 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> .../celestia/celestia-1.7.0_pre20241231-r1.ebuild | 119 +++++++++++++++++++++ ...ia-1.7.0_pre20241231-cmake-minreq-warning.patch | 42 ++++++++ ..._pre20241231-content-cmake-minreqver-3.10.patch | 40 +++++++ 3 files changed, 201 insertions(+) diff --git a/sci-astronomy/celestia/celestia-1.7.0_pre20241231-r1.ebuild b/sci-astronomy/celestia/celestia-1.7.0_pre20241231-r1.ebuild new file mode 100644 index 000000000000..f69dde149a79 --- /dev/null +++ b/sci-astronomy/celestia/celestia-1.7.0_pre20241231-r1.ebuild @@ -0,0 +1,119 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +CMAKE_IN_SOURCE_BUILD="yes" +LUA_COMPAT=( lua5-{1..3} luajit ) + +inherit desktop lua-single xdg cmake + +if [[ ${PV} == *9999* ]] ; then + EGIT_REPO_URI="https://github.com/CelestiaProject/Celestia.git" + inherit git-r3 +else + if [[ ${PV} == *_p* ]] ; then + COMMIT_ID="9292455b420aa865482078c3149ae974367270e5" + COMMIT_ID_DATA="d20a4500410af19bd508eba567c9220890e9e316" + SRC_URI=" + https://github.com/${PN^}Project/${PN^}/archive/${COMMIT_ID}.tar.gz -> ${P}.tar.gz + https://github.com/${PN^}Project/${PN^}Content/archive/${COMMIT_ID_DATA}.tar.gz -> ${P}-data.tar.gz + " + S="${WORKDIR}/${PN^}-${COMMIT_ID}" + KEYWORDS="~amd64 ~x86" + else + SRC_URI="https://github.com/${PN^}Project/${PN^}/archive/${PV/_/-}.tar.gz -> ${P}.tar.gz" + fi +fi + +DESCRIPTION="OpenGL 3D space simulator" +HOMEPAGE="https://celestiaproject.space/ https://github.com/CelestiaProject/Celestia" + +LICENSE="GPL-2+" +SLOT="0" +IUSE="ffmpeg gtk lto lua nls +qt6 sdl test" +RESTRICT="!test? ( test )" +REQUIRED_USE="|| ( gtk qt6 sdl ) + lua? ( ${LUA_REQUIRED_USE} )" + +BDEPEND=" + virtual/pkgconfig + nls? ( sys-devel/gettext ) +" +DEPEND=" + dev-cpp/eigen:= + dev-libs/boost:= + dev-libs/libfmt:= + media-libs/freetype + media-libs/libepoxy + media-libs/libjpeg-turbo:0= + media-libs/libpng:0= + virtual/zlib:= + virtual/glu + virtual/opengl + ffmpeg? ( media-video/ffmpeg:0= ) + gtk? ( x11-libs/gtk+:3[wayland,X] ) + lua? ( ${LUA_DEPS} ) + qt6? ( dev-qt/qtbase:6[gui,opengl,widgets] ) + sdl? ( media-libs/libsdl2[X] ) +" +RDEPEND="${DEPEND}" + +PATCHES=( + # allow forcing CMake to look for a specific Lua version instead of the newest branch installed + "${FILESDIR}"/${PN}-1.7.0-cmake_lua_version-r1.patch + # Pending upstream: + "${FILESDIR}"/${P}-cmake-minreq-warning.patch # bug 964763 + "${FILESDIR}"/${P}-content-cmake-minreqver-3.10.patch # bug 964763 +) + +src_prepare() { + mv "${WORKDIR}"/CelestiaContent-${COMMIT_ID_DATA} content || die + cmake_src_prepare +} + +src_configure() { + CMAKE_USE_DIR="${CMAKE_USE_DIR}/content" BUILD_DIR="${BUILD_DIR}/content" \ + cmake_src_configure + + local mycmakeargs=( + -DCELCFG_EXTRAS_DIRS='"~/.celestia"' + -DENABLE_CELX="$(usex lua)" + -DENABLE_NLS="$(usex nls)" + -DENABLE_FFMPEG="$(usex ffmpeg)" + -DENABLE_GTK="$(usex gtk)" + -DUSE_GTK3="$(usex gtk)" + -DENABLE_LTO="$(usex lto)" + -DENABLE_QT5=OFF + -DENABLE_QT6="$(usex qt6)" + -DENABLE_WIN=OFF + -DENABLE_SDL="$(usex sdl)" + -DENABLE_TESTS="$(usex test)" + ) + # Upstream always looks for LuaJIT first unless stopped, and we only need + # the version specification when linking against PUC Lua + if use lua && ! use lua_single_target_luajit; then + mycmakeargs+=( + -DCMAKE_DISABLE_FIND_PACKAGE_LuaJIT=ON + -DLUA_VERSION=$(lua_get_version) + ) + fi + cmake_src_configure +} + +src_compile() { + cmake_src_compile + CMAKE_USE_DIR="${CMAKE_USE_DIR}/content" BUILD_DIR="${BUILD_DIR}/content" cmake_src_compile +} + +src_install() { + cmake_src_install + + # Icons with more resolutions + doicon -s 48 "${S}"/src/celestia/gtk/data/${PN}.png + newicon -s 128 "${S}"/src/celestia/gtk/data/${PN}-logo.png ${PN}.png + doicon -s scalable "${S}"/src/celestia/gtk/data/${PN}.svg + + dodoc AUTHORS README TRANSLATORS *.txt + + CMAKE_USE_DIR="${CMAKE_USE_DIR}/content" BUILD_DIR="${BUILD_DIR}/content" cmake_src_install +} diff --git a/sci-astronomy/celestia/files/celestia-1.7.0_pre20241231-cmake-minreq-warning.patch b/sci-astronomy/celestia/files/celestia-1.7.0_pre20241231-cmake-minreq-warning.patch new file mode 100644 index 000000000000..4f93fceccb8c --- /dev/null +++ b/sci-astronomy/celestia/files/celestia-1.7.0_pre20241231-cmake-minreq-warning.patch @@ -0,0 +1,42 @@ +Source: https://github.com/CelestiaProject/Celestia/pull/2437 + +From 129e9254d7a50f453d98951a5b8db12b9ca7e0f7 Mon Sep 17 00:00:00 2001 +From: Andreas Sturmlechner <[email protected]> +Date: Wed, 7 Jan 2026 18:47:09 +0100 +Subject: [PATCH] CMake: Set CMake to 3.10...3.19 range for !WIN32 + +Raise !WIN32 minimum mildly from 3.9 to 3.10, which was released in 2017. +If Windows build can deal with 3.19, so should others. This enables policy +level up to 3.19 when using modern versions of CMake. + +Fixes CMake 3.31 warning: + +> CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required): +> Compatibility with CMake < 3.10 will be removed from a future version of +> CMake. +> +> Update the VERSION argument <min> value. Or, use the <min>...<max> syntax +> to tell CMake that the project requires at least <min> but has been updated +> to work with policies introduced by <max> or earlier. + +Signed-off-by: Andreas Sturmlechner <[email protected]> +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 033747df..adf2ce7e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -2,7 +2,7 @@ if(WIN32) + # Require more recent CMake on Windows because DLLs are a pain + cmake_minimum_required(VERSION 3.19) + else() +- cmake_minimum_required(VERSION 3.9) ++ cmake_minimum_required(VERSION 3.10...3.19) + endif() + + # Plain and keyword target_link_libraries() signatures cannot be mixed +-- +2.52.0 + diff --git a/sci-astronomy/celestia/files/celestia-1.7.0_pre20241231-content-cmake-minreqver-3.10.patch b/sci-astronomy/celestia/files/celestia-1.7.0_pre20241231-content-cmake-minreqver-3.10.patch new file mode 100644 index 000000000000..c18cafffe7ac --- /dev/null +++ b/sci-astronomy/celestia/files/celestia-1.7.0_pre20241231-content-cmake-minreqver-3.10.patch @@ -0,0 +1,40 @@ +Source: https://github.com/CelestiaProject/CelestiaContent/pull/294 + +From ca0fe5ab2be77c7ad641548b7e5769ad6b4cee0e Mon Sep 17 00:00:00 2001 +From: Andreas Sturmlechner <[email protected]> +Date: Wed, 7 Jan 2026 19:09:47 +0100 +Subject: [PATCH] CMake: Set CMake minimum to 3.10 + +Raise minimum version from 3.8 to 3.10, which was released in 2017. + +Fixes CMake 3.31 warning: + +> CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required): +> Compatibility with CMake < 3.10 will be removed from a future version of +> CMake. +> +> Update the VERSION argument <min> value. Or, use the <min>...<max> syntax +> to tell CMake that the project requires at least <min> but has been updated +> to work with policies introduced by <max> or earlier. + +Signed-off-by: Andreas Sturmlechner <[email protected]> +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f15eec4..e44a08d 100644 +--- a/content/CMakeLists.txt ++++ b/content/CMakeLists.txt +@@ -1,7 +1,7 @@ + # SPDX-FileCopyrightText: Celestia Development Team + # SPDX-License-Identifier: GPL-2.0-or-later + +-cmake_minimum_required(VERSION 3.8) ++cmake_minimum_required(VERSION 3.10) + + # Normalize install(DESTINATION) paths + if(POLICY CMP0177) +-- +2.52.0 +
