commit: 686ed9a56d66ceaacceaf12256e6628872519d8d Author: Matt Jolly <kangie <AT> gentoo <DOT> org> AuthorDate: Thu Mar 12 05:48:42 2026 +0000 Commit: Matt Jolly <kangie <AT> gentoo <DOT> org> CommitDate: Thu Mar 12 05:48:42 2026 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=686ed9a5
games-misc/solarus-quest-editor: add 2.0.3, sync live Bug: https://bugs.gentoo.org/953383 Signed-off-by: Matt Jolly <kangie <AT> gentoo.org> games-misc/solarus-quest-editor/Manifest | 1 + .../files/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(-) diff --git a/games-misc/solarus-quest-editor/Manifest b/games-misc/solarus-quest-editor/Manifest index 5a059540ae6f..14f4eebd3ddd 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 000000000000..b3a769bfbc64 --- /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 <[email protected]> +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 <[email protected]> +--- 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 000000000000..089180aba516 --- /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 ed25f0c09438..12c02541e133 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 +}
