commit:     90667a5fb6a16f62a02855c4afb5886853f36b1a
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 12 04:32:57 2026 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Thu Mar 12 04:56:42 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=90667a5f

games-engines/solarus: add 2.0.3; update live

Bug: https://bugs.gentoo.org/953383
Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 games-engines/solarus/Manifest                     |   1 +
 .../files/solarus-2.0.3-system-qlementine.patch    | 105 +++++++++++++++++++++
 games-engines/solarus/metadata.xml                 |   1 +
 .../{solarus-9999.ebuild => solarus-2.0.3.ebuild}  |  29 +++---
 games-engines/solarus/solarus-9999.ebuild          |  25 ++---
 profiles/arch/x86/package.use.mask                 |   4 +
 6 files changed, 143 insertions(+), 22 deletions(-)

diff --git a/games-engines/solarus/Manifest b/games-engines/solarus/Manifest
index 1e80834dfb69..a575f8e8cc1e 100644
--- a/games-engines/solarus/Manifest
+++ b/games-engines/solarus/Manifest
@@ -1 +1,2 @@
 DIST solarus-v1.6.5.tar.gz 15010899 BLAKE2B 
96a67c7210c70d23d3fa08e24ee2c4cfbeb6e95dce7236ab860695bf4fc57aaa5d54b02e25ad2f10dfc498cc836bf83753d99cbeca1ff7bf496f7d589accbbf5
 SHA512 
3fc7473f1b7dd80cbcb0a7a639701f8b12bd40ee918a7853805bd54f877e752b4c31c26828e62248ca4594b3aed41a8c61a16be3b14b293f08d9ba938a723e91
+DIST solarus-v2.0.3.tar.bz2 70803222 BLAKE2B 
9181d117989ba0cbe55b3247bc15ca5c4697a3e1f347fe10df9e233957eec2c076aef1d695e5fd1e8bea53c0711bf3f84099b88ce93226ecc430b06efb295662
 SHA512 
e761c37fd1cf668f73158f2676e101d2182c6dbd0009d119bd2d453d917bcb8d6255c8054219585a3b8393e3721eaeab997aa832d3aaa3a65e47c394aee486cc

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
new file mode 100644
index 000000000000..b3a769bfbc64
--- /dev/null
+++ b/games-engines/solarus/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-engines/solarus/metadata.xml 
b/games-engines/solarus/metadata.xml
index 16d609b36b2d..7aea88fc492f 100644
--- a/games-engines/solarus/metadata.xml
+++ b/games-engines/solarus/metadata.xml
@@ -7,6 +7,7 @@
        </maintainer>
        <use>
                <flag name="doc">Install doxygen developer documentation.</flag>
+               <flag name="editor">Install the Solarus Quest Editor.</flag>
        </use>
        <upstream>
                <remote-id type="gitlab">solarus-games/solarus</remote-id>

diff --git a/games-engines/solarus/solarus-9999.ebuild 
b/games-engines/solarus/solarus-2.0.3.ebuild
similarity index 74%
copy from games-engines/solarus/solarus-9999.ebuild
copy to games-engines/solarus/solarus-2.0.3.ebuild
index 28ba18e83b78..1b6674465526 100644
--- a/games-engines/solarus/solarus-9999.ebuild
+++ b/games-engines/solarus/solarus-2.0.3.ebuild
@@ -1,11 +1,11 @@
-# Copyright 1999-2024 Gentoo Authors
+# 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 optfeature virtualx
+inherit cmake lua-single virtualx
 
 DESCRIPTION="An open-source Zelda-like 2D game engine"
 HOMEPAGE="https://www.solarus-games.org/";
@@ -15,28 +15,27 @@ if [[ ${PV} == 9999 ]]; then
        EGIT_BRANCH="dev"
        inherit git-r3
 else
-       
SRC_URI="https://gitlab.com/solarus-games/solarus/-/archive/v${PV}/solarus-v${PV}.tar.gz";
+       
SRC_URI="https://gitlab.com/solarus-games/solarus/-/archive/v${PV}/solarus-v${PV}.tar.bz2";
        KEYWORDS="~amd64 ~x86"
 fi
 
 LICENSE="GPL-3+"
 SLOT="0"
-IUSE="doc"
+IUSE="doc +editor"
 
 REQUIRED_USE="${LUA_REQUIRED_USE}"
 
 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
+       editor? ( >=dev-qt/qlementine-1.4.0 )
 "
 
 DEPEND="
@@ -51,6 +50,10 @@ 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
@@ -61,6 +64,13 @@ 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() {
@@ -72,8 +82,5 @@ src_test() {
 src_install() {
        cmake_src_install
        use doc && dodoc -r doc/${PV%.*}/html/*
-}
-
-pkg_postinst() {
-        optfeature "the Solarus Quest Editor" games-misc/solarus-quest-editor
+       use editor && cmake_src_install
 }

diff --git a/games-engines/solarus/solarus-9999.ebuild 
b/games-engines/solarus/solarus-9999.ebuild
index 28ba18e83b78..2257cbd5ce09 100644
--- a/games-engines/solarus/solarus-9999.ebuild
+++ b/games-engines/solarus/solarus-9999.ebuild
@@ -1,11 +1,11 @@
-# Copyright 1999-2024 Gentoo Authors
+# 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 optfeature virtualx
+inherit cmake lua-single virtualx
 
 DESCRIPTION="An open-source Zelda-like 2D game engine"
 HOMEPAGE="https://www.solarus-games.org/";
@@ -15,28 +15,27 @@ if [[ ${PV} == 9999 ]]; then
        EGIT_BRANCH="dev"
        inherit git-r3
 else
-       
SRC_URI="https://gitlab.com/solarus-games/solarus/-/archive/v${PV}/solarus-v${PV}.tar.gz";
+       
SRC_URI="https://gitlab.com/solarus-games/solarus/-/archive/v${PV}/solarus-v${PV}.tar.bz2";
        KEYWORDS="~amd64 ~x86"
 fi
 
 LICENSE="GPL-3+"
 SLOT="0"
-IUSE="doc"
+IUSE="doc +editor"
 
 REQUIRED_USE="${LUA_REQUIRED_USE}"
 
 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
+       editor? ( >=dev-qt/qlementine-1.4.0 )
 "
 
 DEPEND="
@@ -61,6 +60,13 @@ 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() {
@@ -72,8 +78,5 @@ src_test() {
 src_install() {
        cmake_src_install
        use doc && dodoc -r doc/${PV%.*}/html/*
-}
-
-pkg_postinst() {
-        optfeature "the Solarus Quest Editor" games-misc/solarus-quest-editor
+       use editor && cmake_src_install
 }

diff --git a/profiles/arch/x86/package.use.mask 
b/profiles/arch/x86/package.use.mask
index 4e0ca50ea8c2..7cb701386fcd 100644
--- a/profiles/arch/x86/package.use.mask
+++ b/profiles/arch/x86/package.use.mask
@@ -1,6 +1,10 @@
 # Copyright 1999-2026 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
+# Matt Jolly <[email protected]> (2026-03-12)
+# Dependency is not keyworded for x86
+games-engines/solarus editor
+
 # Mike Gilbert <[email protected]> (2025-12-15)
 # arch-specific platform values
 sys-boot/grub -grub_platforms_pc

Reply via email to