From 796077588ad7a4ed73760806bbaacca9c4f96381 Mon Sep 17 00:00:00 2001 From: Matt Jolly Date: Thu, 12 Mar 2026 15:45:31 +1000 Subject: [PATCH 1/2] games-engines/solarus: drop editor USE The editor depends on the package at build-time - since it's already packaged separately we'll just use that with the same source tarball. Bug: https://bugs.gentoo.org/953383 Signed-off-by: Matt Jolly --- .../solarus-2.0.3-system-qlementine.patch | 105 ------------------ games-engines/solarus/metadata.xml | 1 - ...s-2.0.3.ebuild => solarus-2.0.3-r1.ebuild} | 21 +--- games-engines/solarus/solarus-9999.ebuild | 17 +-- profiles/arch/x86/package.use.mask | 4 - 5 files changed, 12 insertions(+), 136 deletions(-) delete mode 100644 games-engines/solarus/files/solarus-2.0.3-system-qlementine.patch rename games-engines/solarus/{solarus-2.0.3.ebuild => solarus-2.0.3-r1.ebuild} (79%) diff --git a/games-engines/solarus/files/solarus-2.0.3-system-qlementine.patch b/games-engines/solarus/files/solarus-2.0.3-system-qlementine.patch deleted file mode 100644 index b3a769bfbc642..0000000000000 --- a/games-engines/solarus/files/solarus-2.0.3-system-qlementine.patch +++ /dev/null @@ -1,105 +0,0 @@ -https://gitlab.com/solarus-games/solarus/-/merge_requests/1679 -From: Matt Jolly -Date: Wed, 27 Aug 2025 15:44:38 +1000 -Subject: [PATCH] editor: build: use system qlementine; missing svg dep - -This commit enables finding and using a system copy of `Qlementine`. -Distributions that wish to package the software often frown upon -vendored software and build in sandboxed environments, particularly -restricting build-time network access. - -This enables downstreams to choose how they want to use Qlementine, -while still providing build-time control over how Qlementine is found. - -Qlementine will be found as follows: - -1. If SOLARUS_USE_LOCAL_QLEMENTINE is set use the provided path via - existing logic -2. If SOLARUS_USE_SYSTEM_QLEMENTINE is set (now default), attempt to use - pkgconfig then CMake to find the system package -3. Fetch from Git via FetchContent. - -We also add a missing dependency on Ot6Svg as a result of linking issues -encountered when running the editor against a system copy of Qlementine. - -Signed-off-by: Matt Jolly ---- a/editor/cmake/AddDependencies.cmake -+++ b/editor/cmake/AddDependencies.cmake -@@ -8,6 +8,7 @@ find_package(Qt6Core "6.8" REQUIRED) - find_package(Qt6Widgets REQUIRED) - find_package(Qt6OpenGL REQUIRED) - find_package(Qt6OpenGLWidgets REQUIRED) -+find_package(Qt6Svg REQUIRED) - - # Find Qt6LinguistTools within the host path when set. - # This is required for cross compilation with Qt6 as the module is -@@ -44,29 +45,46 @@ if("${DL_LIBRARY}" MATCHES DL_LIBRARY-NOTFOUND) - set(DL_LIBRARY "") - endif() - --# Control whether to use a local Qlementine build. -+# Control Qlementine acquisition method. - include(FetchContent) --option(SOLARUS_USE_LOCAL_QLEMENTINE "Use a local build of Qlementine instead of FetchContent download" OFF) -+option(SOLARUS_USE_LOCAL_QLEMENTINE "Use a local build of Qlementine (highest priority)" OFF) -+option(SOLARUS_USE_SYSTEM_QLEMENTINE "Use system-installed Qlementine via pkgconfig" ON) -+ -+set(qlementine_FOUND FALSE) -+ -+# Priority 1: Local Qlementine build - if(SOLARUS_USE_LOCAL_QLEMENTINE) - set(SOLARUS_QLEMENTINE_LOCAL_PATH "" CACHE PATH "Path to the local Qlementine source directory") - # Check if the provided path is valid. - if(NOT IS_DIRECTORY "${SOLARUS_QLEMENTINE_LOCAL_PATH}") -- message(FATAL_ERROR "SOLARUS_QLEMENTINE_LOCAL_PATH is set to '${SOLARUS_QLEMENTINE_LOCAL_PATH}' but it's not a valid directory. Please provide the correct path to your local qlementine clone.") -+ message(FATAL_ERROR "SOLARUS_QLEMENTINE_LOCAL_PATH is set to '${SOLARUS_QLEMENTINE_LOCAL_PATH}' but it's not a valid directory. Please provide the correct path to your local Qlementine clone.") - else() -- set(Qlementine_SOURCE_DIR ${QSOLARUS_LEMENTINE_LOCAL_PATH}) -+ set(Qlementine_SOURCE_DIR ${SOLARUS_QLEMENTINE_LOCAL_PATH}) - message(STATUS "Using local Qlementine source from: ${SOLARUS_QLEMENTINE_LOCAL_PATH}") -+ FetchContent_Declare( -+ qlementine -+ SOURCE_DIR "${SOLARUS_QLEMENTINE_LOCAL_PATH}" -+ EXCLUDE_FROM_ALL -+ ) -+ FetchContent_MakeAvailable(qlementine) -+ set(qlementine_FOUND TRUE) - endif() -- FetchContent_Declare( -- qlementine -- SOURCE_DIR "${SOLARUS_QLEMENTINE_LOCAL_PATH}" -- EXCLUDE_FROM_ALL -- ) --else() -+endif() -+ -+# Priority 2: System-installed Qlementine -+if(NOT qlementine_FOUND AND SOLARUS_USE_SYSTEM_QLEMENTINE) -+ find_package(qlementine REQUIRED) -+endif() -+ -+# Priority 3: Fetch from Git (fallback) -+if(NOT qlementine_FOUND) -+ message(STATUS "Using Qlementine from Git repository (FetchContent)") - FetchContent_Declare( - qlementine - GIT_REPOSITORY https://github.com/oclero/qlementine.git - GIT_TAG v1.4.0 - EXCLUDE_FROM_ALL - ) -+ FetchContent_MakeAvailable(qlementine) -+ set(qlementine_FOUND TRUE) - endif() --FetchContent_MakeAvailable(qlementine) ---- a/editor/cmake/AddEditorExecutable.cmake -+++ b/editor/cmake/AddEditorExecutable.cmake -@@ -10,6 +10,7 @@ target_link_libraries(solarus-editor - Qt6::Widgets - Qt6::OpenGL - Qt6::OpenGLWidgets -+ Qt6::Svg - "${SOLARUS_LIBRARIES}" - "${SDL2_LIBRARY}" - "${SDL2_IMAGE_LIBRARY}" --- -2.52.0 diff --git a/games-engines/solarus/metadata.xml b/games-engines/solarus/metadata.xml index 7aea88fc492f1..16d609b36b2da 100644 --- a/games-engines/solarus/metadata.xml +++ b/games-engines/solarus/metadata.xml @@ -7,7 +7,6 @@ Install doxygen developer documentation. - Install the Solarus Quest Editor. solarus-games/solarus diff --git a/games-engines/solarus/solarus-2.0.3.ebuild b/games-engines/solarus/solarus-2.0.3-r1.ebuild similarity index 79% rename from games-engines/solarus/solarus-2.0.3.ebuild rename to games-engines/solarus/solarus-2.0.3-r1.ebuild index 1b66744655263..4fa05e474c416 100644 --- a/games-engines/solarus/solarus-2.0.3.ebuild +++ b/games-engines/solarus/solarus-2.0.3-r1.ebuild @@ -5,7 +5,7 @@ EAPI=8 LUA_COMPAT=( lua5-1 luajit ) -inherit cmake lua-single virtualx +inherit cmake lua-single optfeature virtualx DESCRIPTION="An open-source Zelda-like 2D game engine" HOMEPAGE="https://www.solarus-games.org/" @@ -21,7 +21,7 @@ fi LICENSE="GPL-3+" SLOT="0" -IUSE="doc +editor" +IUSE="doc" REQUIRED_USE="${LUA_REQUIRED_USE}" @@ -35,7 +35,6 @@ RDEPEND=" media-libs/openal media-libs/sdl2-image[png] >=media-libs/sdl2-ttf-2.0.12 - editor? ( >=dev-qt/qlementine-1.4.0 ) " DEPEND=" @@ -50,10 +49,6 @@ if ! [[ ${PV} == 9999 ]]; then S="${WORKDIR}/solarus-v${PV}" fi -PATCHES=( - "${FILESDIR}/solarus-2.0.3-system-qlementine.patch" -) - src_configure() { local mycmakeargs=( -DSOLARUS_USE_LUAJIT="$(usex lua_single_target_luajit)" ) cmake_src_configure @@ -64,13 +59,6 @@ src_compile() { if use doc ; then cd doc && doxygen || die fi - if use editor ; then - mycmakeargs+=( - -DSOLARUS_USE_SYSTEM_QLEMENTINE=ON - -DSOLARUS_USE_LOCAL_QLEMENTINE=OFF - ) - cd editor && cmake_src_compile - fi } src_test() { @@ -82,5 +70,8 @@ src_test() { src_install() { cmake_src_install use doc && dodoc -r doc/${PV%.*}/html/* - use editor && cmake_src_install +} + +pkg_postinst() { + optfeature "the Solarus Quest Editor" games-misc/solarus-quest-editor } diff --git a/games-engines/solarus/solarus-9999.ebuild b/games-engines/solarus/solarus-9999.ebuild index 2257cbd5ce09d..4fa05e474c416 100644 --- a/games-engines/solarus/solarus-9999.ebuild +++ b/games-engines/solarus/solarus-9999.ebuild @@ -5,7 +5,7 @@ EAPI=8 LUA_COMPAT=( lua5-1 luajit ) -inherit cmake lua-single virtualx +inherit cmake lua-single optfeature virtualx DESCRIPTION="An open-source Zelda-like 2D game engine" HOMEPAGE="https://www.solarus-games.org/" @@ -21,7 +21,7 @@ fi LICENSE="GPL-3+" SLOT="0" -IUSE="doc +editor" +IUSE="doc" REQUIRED_USE="${LUA_REQUIRED_USE}" @@ -35,7 +35,6 @@ RDEPEND=" media-libs/openal media-libs/sdl2-image[png] >=media-libs/sdl2-ttf-2.0.12 - editor? ( >=dev-qt/qlementine-1.4.0 ) " DEPEND=" @@ -60,13 +59,6 @@ src_compile() { if use doc ; then cd doc && doxygen || die fi - if use editor ; then - mycmakeargs+=( - -DSOLARUS_USE_SYSTEM_QLEMENTINE=ON - -DSOLARUS_USE_LOCAL_QLEMENTINE=OFF - ) - cd editor && cmake_src_compile - fi } src_test() { @@ -78,5 +70,8 @@ src_test() { src_install() { cmake_src_install use doc && dodoc -r doc/${PV%.*}/html/* - use editor && cmake_src_install +} + +pkg_postinst() { + optfeature "the Solarus Quest Editor" games-misc/solarus-quest-editor } diff --git a/profiles/arch/x86/package.use.mask b/profiles/arch/x86/package.use.mask index 7cb701386fcde..4e0ca50ea8c2f 100644 --- a/profiles/arch/x86/package.use.mask +++ b/profiles/arch/x86/package.use.mask @@ -1,10 +1,6 @@ # Copyright 1999-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -# Matt Jolly (2026-03-12) -# Dependency is not keyworded for x86 -games-engines/solarus editor - # Mike Gilbert (2025-12-15) # arch-specific platform values sys-boot/grub -grub_platforms_pc From 686ed9a56d66ceaacceaf12256e6628872519d8d Mon Sep 17 00:00:00 2001 From: Matt Jolly Date: Thu, 12 Mar 2026 15:48:42 +1000 Subject: [PATCH 2/2] games-misc/solarus-quest-editor: add 2.0.3, sync live Bug: https://bugs.gentoo.org/953383 Signed-off-by: Matt Jolly --- games-misc/solarus-quest-editor/Manifest | 1 + .../solarus-2.0.3-system-qlementine.patch | 105 ++++++++++++++++++ .../solarus-quest-editor-2.0.3.ebuild | 68 ++++++++++++ .../solarus-quest-editor-9999.ebuild | 41 ++++--- 4 files changed, 199 insertions(+), 16 deletions(-) create mode 100644 games-misc/solarus-quest-editor/files/solarus-2.0.3-system-qlementine.patch create mode 100644 games-misc/solarus-quest-editor/solarus-quest-editor-2.0.3.ebuild diff --git a/games-misc/solarus-quest-editor/Manifest b/games-misc/solarus-quest-editor/Manifest index 5a059540ae6fb..14f4eebd3ddd3 100644 --- a/games-misc/solarus-quest-editor/Manifest +++ b/games-misc/solarus-quest-editor/Manifest @@ -1 +1,2 @@ DIST solarus-quest-editor-v1.6.5.tar.gz 58066380 BLAKE2B faf6d5a0512e7a3d462326461d400d272534fd7b671318b4fefdf4f4eac05860228542b6e0738cdb2c6a4faf43e5de404f5815ac44ad877340caf015e0673749 SHA512 1c38ce284ebc87289e137fa9703a9fa093b38bc74bc1f89b3e1e53caacac57ffa35e598e8705171c3e5204342d58eacacf28550b4b8834c5ba7a8b5eec052393 +DIST solarus-v2.0.3.tar.bz2 70803222 BLAKE2B 9181d117989ba0cbe55b3247bc15ca5c4697a3e1f347fe10df9e233957eec2c076aef1d695e5fd1e8bea53c0711bf3f84099b88ce93226ecc430b06efb295662 SHA512 e761c37fd1cf668f73158f2676e101d2182c6dbd0009d119bd2d453d917bcb8d6255c8054219585a3b8393e3721eaeab997aa832d3aaa3a65e47c394aee486cc diff --git a/games-misc/solarus-quest-editor/files/solarus-2.0.3-system-qlementine.patch b/games-misc/solarus-quest-editor/files/solarus-2.0.3-system-qlementine.patch new file mode 100644 index 0000000000000..b3a769bfbc642 --- /dev/null +++ b/games-misc/solarus-quest-editor/files/solarus-2.0.3-system-qlementine.patch @@ -0,0 +1,105 @@ +https://gitlab.com/solarus-games/solarus/-/merge_requests/1679 +From: Matt Jolly +Date: Wed, 27 Aug 2025 15:44:38 +1000 +Subject: [PATCH] editor: build: use system qlementine; missing svg dep + +This commit enables finding and using a system copy of `Qlementine`. +Distributions that wish to package the software often frown upon +vendored software and build in sandboxed environments, particularly +restricting build-time network access. + +This enables downstreams to choose how they want to use Qlementine, +while still providing build-time control over how Qlementine is found. + +Qlementine will be found as follows: + +1. If SOLARUS_USE_LOCAL_QLEMENTINE is set use the provided path via + existing logic +2. If SOLARUS_USE_SYSTEM_QLEMENTINE is set (now default), attempt to use + pkgconfig then CMake to find the system package +3. Fetch from Git via FetchContent. + +We also add a missing dependency on Ot6Svg as a result of linking issues +encountered when running the editor against a system copy of Qlementine. + +Signed-off-by: Matt Jolly +--- a/editor/cmake/AddDependencies.cmake ++++ b/editor/cmake/AddDependencies.cmake +@@ -8,6 +8,7 @@ find_package(Qt6Core "6.8" REQUIRED) + find_package(Qt6Widgets REQUIRED) + find_package(Qt6OpenGL REQUIRED) + find_package(Qt6OpenGLWidgets REQUIRED) ++find_package(Qt6Svg REQUIRED) + + # Find Qt6LinguistTools within the host path when set. + # This is required for cross compilation with Qt6 as the module is +@@ -44,29 +45,46 @@ if("${DL_LIBRARY}" MATCHES DL_LIBRARY-NOTFOUND) + set(DL_LIBRARY "") + endif() + +-# Control whether to use a local Qlementine build. ++# Control Qlementine acquisition method. + include(FetchContent) +-option(SOLARUS_USE_LOCAL_QLEMENTINE "Use a local build of Qlementine instead of FetchContent download" OFF) ++option(SOLARUS_USE_LOCAL_QLEMENTINE "Use a local build of Qlementine (highest priority)" OFF) ++option(SOLARUS_USE_SYSTEM_QLEMENTINE "Use system-installed Qlementine via pkgconfig" ON) ++ ++set(qlementine_FOUND FALSE) ++ ++# Priority 1: Local Qlementine build + if(SOLARUS_USE_LOCAL_QLEMENTINE) + set(SOLARUS_QLEMENTINE_LOCAL_PATH "" CACHE PATH "Path to the local Qlementine source directory") + # Check if the provided path is valid. + if(NOT IS_DIRECTORY "${SOLARUS_QLEMENTINE_LOCAL_PATH}") +- message(FATAL_ERROR "SOLARUS_QLEMENTINE_LOCAL_PATH is set to '${SOLARUS_QLEMENTINE_LOCAL_PATH}' but it's not a valid directory. Please provide the correct path to your local qlementine clone.") ++ message(FATAL_ERROR "SOLARUS_QLEMENTINE_LOCAL_PATH is set to '${SOLARUS_QLEMENTINE_LOCAL_PATH}' but it's not a valid directory. Please provide the correct path to your local Qlementine clone.") + else() +- set(Qlementine_SOURCE_DIR ${QSOLARUS_LEMENTINE_LOCAL_PATH}) ++ set(Qlementine_SOURCE_DIR ${SOLARUS_QLEMENTINE_LOCAL_PATH}) + message(STATUS "Using local Qlementine source from: ${SOLARUS_QLEMENTINE_LOCAL_PATH}") ++ FetchContent_Declare( ++ qlementine ++ SOURCE_DIR "${SOLARUS_QLEMENTINE_LOCAL_PATH}" ++ EXCLUDE_FROM_ALL ++ ) ++ FetchContent_MakeAvailable(qlementine) ++ set(qlementine_FOUND TRUE) + endif() +- FetchContent_Declare( +- qlementine +- SOURCE_DIR "${SOLARUS_QLEMENTINE_LOCAL_PATH}" +- EXCLUDE_FROM_ALL +- ) +-else() ++endif() ++ ++# Priority 2: System-installed Qlementine ++if(NOT qlementine_FOUND AND SOLARUS_USE_SYSTEM_QLEMENTINE) ++ find_package(qlementine REQUIRED) ++endif() ++ ++# Priority 3: Fetch from Git (fallback) ++if(NOT qlementine_FOUND) ++ message(STATUS "Using Qlementine from Git repository (FetchContent)") + FetchContent_Declare( + qlementine + GIT_REPOSITORY https://github.com/oclero/qlementine.git + GIT_TAG v1.4.0 + EXCLUDE_FROM_ALL + ) ++ FetchContent_MakeAvailable(qlementine) ++ set(qlementine_FOUND TRUE) + endif() +-FetchContent_MakeAvailable(qlementine) +--- a/editor/cmake/AddEditorExecutable.cmake ++++ b/editor/cmake/AddEditorExecutable.cmake +@@ -10,6 +10,7 @@ target_link_libraries(solarus-editor + Qt6::Widgets + Qt6::OpenGL + Qt6::OpenGLWidgets ++ Qt6::Svg + "${SOLARUS_LIBRARIES}" + "${SDL2_LIBRARY}" + "${SDL2_IMAGE_LIBRARY}" +-- +2.52.0 diff --git a/games-misc/solarus-quest-editor/solarus-quest-editor-2.0.3.ebuild b/games-misc/solarus-quest-editor/solarus-quest-editor-2.0.3.ebuild new file mode 100644 index 0000000000000..089180aba5162 --- /dev/null +++ b/games-misc/solarus-quest-editor/solarus-quest-editor-2.0.3.ebuild @@ -0,0 +1,68 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LUA_COMPAT=( lua5-1 luajit ) + +inherit cmake lua-single + +DESCRIPTION="Quest editor for Solarus game engine" +HOMEPAGE="https://www.solarus-games.org/" + +if [[ ${PV} == 9999 ]]; then + EGIT_REPO_URI="https://gitlab.com/solarus-games/solarus.git" + EGIT_BRANCH="dev" + inherit git-r3 +else + SRC_URI="https://gitlab.com/solarus-games/solarus/-/archive/v${PV}/solarus-v${PV}.tar.bz2" + KEYWORDS="~amd64" +fi + +LICENSE="GPL-3+" +SLOT="0" + +REQUIRED_USE="${LUA_REQUIRED_USE}" + +RDEPEND=" + ${LUA_DEPS} + dev-games/physfs + dev-qt/qtbase[gui,widgets] + media-libs/libmodplug + >=media-libs/libsdl2-2.0.1[X,joystick,video] + media-libs/libvorbis + media-libs/openal + media-libs/sdl2-image[png] + >=dev-qt/qlementine-1.4.0 + ~games-engines/solarus-${PV} +" + +DEPEND=" + ${RDEPEND} +" + +if ! [[ ${PV} == 9999 ]]; then + S="${WORKDIR}/solarus-v${PV}" +fi + +PATCHES=( + "${FILESDIR}/solarus-2.0.3-system-qlementine.patch" +) + +CMAKE_USE_DIR=${S}/editor + +src_configure() { + local mycmakeargs=( + -DSOLARUS_USE_SYSTEM_QLEMENTINE=ON + -DSOLARUS_USE_LOCAL_QLEMENTINE=OFF + ) + cmake_src_configure +} + +src_compile() { + cmake_src_compile +} + +src_install() { + cmake_src_install +} diff --git a/games-misc/solarus-quest-editor/solarus-quest-editor-9999.ebuild b/games-misc/solarus-quest-editor/solarus-quest-editor-9999.ebuild index ed25f0c094386..12c02541e133c 100644 --- a/games-misc/solarus-quest-editor/solarus-quest-editor-9999.ebuild +++ b/games-misc/solarus-quest-editor/solarus-quest-editor-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 2022 Gentoo Authors +# Copyright 1999-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -7,17 +7,16 @@ LUA_COMPAT=( lua5-1 luajit ) inherit cmake lua-single -DESCRIPTION="A graphical user interface to create and modify quests for the Solarus engine" -HOMEPAGE="https://www.solarus-games.org" +DESCRIPTION="Quest editor for Solarus game engine" +HOMEPAGE="https://www.solarus-games.org/" if [[ ${PV} == 9999 ]]; then - EGIT_REPO_URI="https://gitlab.com/solarus-games/solarus-quest-editor.git" + EGIT_REPO_URI="https://gitlab.com/solarus-games/solarus.git" EGIT_BRANCH="dev" inherit git-r3 else - SRC_URI="https://gitlab.com/solarus-games/solarus-quest-editor/-/archive/v${PV}/solarus-quest-editor-v${PV}.tar.gz" + SRC_URI="https://gitlab.com/solarus-games/solarus/-/archive/v${PV}/solarus-v${PV}.tar.bz2" KEYWORDS="~amd64" - S="${WORKDIR}/solarus-quest-editor-v${PV}" fi LICENSE="GPL-3+" @@ -25,31 +24,41 @@ SLOT="0" REQUIRED_USE="${LUA_REQUIRED_USE}" -# Upstream (and their CMake) claim that all of these are required deps RDEPEND=" ${LUA_DEPS} dev-games/physfs - dev-qt/qtcore:5 - dev-qt/qtgui:5 - dev-qt/qtwidgets:5 + dev-qt/qtbase[gui,widgets] media-libs/libmodplug >=media-libs/libsdl2-2.0.1[X,joystick,video] media-libs/libvorbis media-libs/openal media-libs/sdl2-image[png] - >=media-libs/sdl2-ttf-2.0.12 + >=dev-qt/qlementine-1.4.0 + ~games-engines/solarus-${PV} " DEPEND=" ${RDEPEND} - ~games-engines/solarus-${PV} " -PATCHES=( - "${FILESDIR}/${P}-fix-segfault.patch" -) +if ! [[ ${PV} == 9999 ]]; then + S="${WORKDIR}/solarus-v${PV}" +fi + +CMAKE_USE_DIR=${S}/editor src_configure() { - local mycmakeargs=( -DSOLARUS_USE_LUAJIT="$(usex lua_single_target_luajit)" ) + local mycmakeargs=( + -DSOLARUS_USE_SYSTEM_QLEMENTINE=ON + -DSOLARUS_USE_LOCAL_QLEMENTINE=OFF + ) cmake_src_configure } + +src_compile() { + cmake_src_compile +} + +src_install() { + cmake_src_install +}