commit:     a8f0d811562960f3ee424c04d81f8902c3794dfb
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Sat May  3 15:53:20 2025 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Sat May  3 16:37:37 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a8f0d811

games-util/slade: Version bump to 3.2.7

Closes: https://bugs.gentoo.org/949102
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 games-util/slade/Manifest                          |  1 +
 .../slade/files/slade-3.2.7-pkg-config.patch       | 25 +++++++
 games-util/slade/files/slade-3.2.7-wayland.patch   | 41 +++++++++++
 games-util/slade/slade-3.2.7.ebuild                | 79 ++++++++++++++++++++++
 4 files changed, 146 insertions(+)

diff --git a/games-util/slade/Manifest b/games-util/slade/Manifest
index 244f6242c017..6e3536d91ed6 100644
--- a/games-util/slade/Manifest
+++ b/games-util/slade/Manifest
@@ -1,2 +1,3 @@
 DIST slade-3.2.4.tar.gz 7000370 BLAKE2B 
251c79b1f90dea7971120a7b55d89d5112857f04a5609a26ce3970116d616c7361b1bea98da05a5e3fde0d433e62a34e9610a1d32ca9e72ee4f140ae7ac22ec6
 SHA512 
e3dda37aebc9c4bab3fb0d1179cbe726be2cdf55d9d7d95cfa47c8f817a1cf2b01863cce09da17da85af1e4077f1f9b7841abdaa8f114e3a6db1fe2b48292ffd
 DIST slade-3.2.6.tar.gz 7027328 BLAKE2B 
ba0db4926f5706166ec2439cbb539a9d5330e2d3ea3dbd8e29b586cf57a23b7b254823d84b7ba79b604a86ed0e5753b4e7c4fcf825ba7d3217c52824f36c5be4
 SHA512 
d09631b24c83769482480c24dfc1f6992ae293bdfe4c8661d967d6ac0fcbba6f0e1bf58c58afc84a82fb5f900d9e0e99413800a42edc353a4f7f1f52781db54f
+DIST slade-3.2.7.tar.gz 6419781 BLAKE2B 
484e70406a5185166ea6b73d68565d9bb43e7558e6269abe4710e3f1437b8421383a5f40e136dd86ca84f0bb2fa38d61fd6e3e8925db293b436ba044ad88418c
 SHA512 
026bba57a85a64e695d1c96344726f5f82cd89e5e403c686e72a569d9272383347190b6804fa4623b5836967db0541b80e418457df1614c76da466bbc8c61b5e

diff --git a/games-util/slade/files/slade-3.2.7-pkg-config.patch 
b/games-util/slade/files/slade-3.2.7-pkg-config.patch
new file mode 100644
index 000000000000..b421c3c68028
--- /dev/null
+++ b/games-util/slade/files/slade-3.2.7-pkg-config.patch
@@ -0,0 +1,25 @@
+From 49e5aa0b0a4481a335936b623b7725a1bc8863d1 Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <[email protected]>
+Date: Wed, 30 Apr 2025 23:28:59 +0100
+Subject: [PATCH] Fix CMake USE_SYSTEM_DUMB option
+
+This stopped working since pkg-config stopped being used elsewhere.
+---
+ thirdparty/CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt
+index 56506035..67c3dab5 100644
+--- a/thirdparty/CMakeLists.txt
++++ b/thirdparty/CMakeLists.txt
+@@ -8,6 +8,7 @@ set(BZIP2_LIBRARIES ${BZIP2_LIBRARIES} PARENT_SCOPE)
+ 
+ option(USE_SYSTEM_DUMB "Use system DUMB library" OFF)
+ if(USE_SYSTEM_DUMB)
++      find_package(PkgConfig REQUIRED)
+       pkg_check_modules(DUMB REQUIRED IMPORTED_TARGET dumb>=1.0)
+ else()
+       file(GLOB_RECURSE DUMB_SOURCES dumb/*.c)
+-- 
+2.49.0
+

diff --git a/games-util/slade/files/slade-3.2.7-wayland.patch 
b/games-util/slade/files/slade-3.2.7-wayland.patch
new file mode 100644
index 000000000000..2fc47e414fb7
--- /dev/null
+++ b/games-util/slade/files/slade-3.2.7-wayland.patch
@@ -0,0 +1,41 @@
+SFML's render window only supports X11 under Linux, so SLADE crashes if GDK
+chooses the Wayland backend. This patch tells GDK to prefer the X11 backend.
+SLADE 3.3.0 will apparently not use the render window.
+
+diff --git a/src/Application/SLADEWxApp.cpp b/src/Application/SLADEWxApp.cpp
+index 3dadf241..de01e340 100644
+--- a/src/Application/SLADEWxApp.cpp
++++ b/src/Application/SLADEWxApp.cpp
+@@ -52,6 +52,16 @@
+ using namespace slade;
+
+
++#ifdef __WXGTK__
++#include <gdk/gdk.h>
++
++struct PreferX11 {
++      PreferX11() { gdk_set_allowed_backends("x11,*"); }
++};
++static PreferX11 preferx11;
++#endif
++
++
+ // 
-----------------------------------------------------------------------------
+ //
+ // Variables
+diff --git a/cmake/unix.cmake b/cmake/unix.cmake
+index a5d62c0d..18059156 100644
+--- a/cmake/unix.cmake
++++ b/cmake/unix.cmake
+@@ -158,7 +158,11 @@ add_executable(slade WIN32 MACOSX_BUNDLE
+       ${SLADE_HEADERS}
+ )
+ 
++find_package(PkgConfig REQUIRED)
++pkg_check_modules(GDK REQUIRED IMPORTED_TARGET gdk-3.0)
++
+ target_link_libraries(slade
++      PkgConfig::GDK
+       ${ZLIB_LIBRARY}
+       ${BZIP2_LIBRARIES}
+       ${EXTERNAL_LIBRARIES}

diff --git a/games-util/slade/slade-3.2.7.ebuild 
b/games-util/slade/slade-3.2.7.ebuild
new file mode 100644
index 000000000000..542fcf989245
--- /dev/null
+++ b/games-util/slade/slade-3.2.7.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LUA_COMPAT=( lua5-{1..3} )
+WX_GTK_VER="3.2-gtk3"
+
+inherit cmake lua-single wxwidgets xdg
+
+MY_PV="${PV/beta/b}"
+DESCRIPTION="Modern editor for Doom-engine based games and source ports"
+HOMEPAGE="https://slade.mancubus.net/";
+SRC_URI="https://github.com/sirjuddington/${PN^^}/archive/${MY_PV}.tar.gz -> 
${P}.tar.gz"
+S="${WORKDIR}/${PN^^}-${MY_PV}"
+LICENSE="GPL-2 MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="fluidsynth timidity webkit"
+REQUIRED_USE="${LUA_REQUIRED_USE}"
+
+DEPEND="
+       ${LUA_DEPS}
+       app-arch/bzip2:=
+       dev-libs/libfmt:=
+       >=media-libs/dumb-2:=
+       media-libs/freeimage[jpeg,png,tiff]
+       media-libs/freetype:2
+       media-libs/ftgl
+       media-libs/libsfml:=
+       media-sound/mpg123
+       sys-libs/zlib
+       x11-libs/wxGTK:${WX_GTK_VER}[curl(+),opengl,webkit?,X]
+       virtual/glu
+       fluidsynth? ( media-sound/fluidsynth:= )
+"
+
+RDEPEND="
+       ${DEPEND}
+       timidity? ( media-sound/timidity++ )
+"
+
+BDEPEND="
+       app-arch/p7zip
+       virtual/pkgconfig
+"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-3.2.0_beta2-fluidsynth-driver.patch
+       "${FILESDIR}"/${PN}-3.2.7-wayland.patch
+       "${FILESDIR}"/${PN}-3.2.7-pkg-config.patch
+)
+
+src_prepare() {
+       cmake_src_prepare
+
+       # Delete bundled libraries just in case.
+       rm -r thirdparty/dumb/ thirdparty/fmt/ || die
+
+}
+
+src_configure() {
+       local luav=$(lua_get_version)
+
+       local mycmakeargs=(
+               -DLua_FIND_VERSION_MAJOR=$(ver_cut 1 "${luav}")
+               -DLua_FIND_VERSION_MINOR=$(ver_cut 2 "${luav}")
+               -DLua_FIND_VERSION_COUNT=2
+               -DLua_FIND_VERSION_EXACT=ON
+               -DNO_FLUIDSYNTH=$(usex fluidsynth OFF ON)
+               -DNO_WEBVIEW=$(usex webkit OFF ON)
+               -DUSE_SYSTEM_DUMB=ON
+               -DUSE_SYSTEM_FMT=ON
+               -DWX_GTK3=ON
+       )
+
+       setup-wxwidgets
+       cmake_src_configure
+}

Reply via email to