commit:     99d6e1f030642c03a3d25603c0edd4dff2abc26c
Author:     Kacper Słomiński <kacper.slominski72 <AT> gmail <DOT> com>
AuthorDate: Sat Nov 23 21:44:09 2024 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Sat Nov 23 22:23:00 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=99d6e1f0

games-util/slade: add 3.2.6

Fixes build issues caused by newer wxGTK.

Also add wxGTK[curl(+)] USE dependency since that's needed for
>=3.2.2.1-r5. Also inherit from xdg eclass for pkg_postinst and
pkg_postrm since the .desktop file registers handling for .wad
(application/x-doom-wad) files. Also add a patch to fix a build issue in
the bundled sol2 with newer GCC/Clang.

Bug: https://github.com/sirjuddington/SLADE/issues/1750
Bug: https://bugs.gentoo.org/938887
Signed-off-by: Kacper Słomiński <kacper.slominski72 <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/39438
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 games-util/slade/Manifest                        |  1 +
 games-util/slade/files/slade-3.2.6-fix-sol.patch | 14 ++++
 games-util/slade/slade-3.2.6.ebuild              | 82 ++++++++++++++++++++++++
 3 files changed, 97 insertions(+)

diff --git a/games-util/slade/Manifest b/games-util/slade/Manifest
index 22d22f12f254..244f6242c017 100644
--- a/games-util/slade/Manifest
+++ b/games-util/slade/Manifest
@@ -1 +1,2 @@
 DIST slade-3.2.4.tar.gz 7000370 BLAKE2B 
251c79b1f90dea7971120a7b55d89d5112857f04a5609a26ce3970116d616c7361b1bea98da05a5e3fde0d433e62a34e9610a1d32ca9e72ee4f140ae7ac22ec6
 SHA512 
e3dda37aebc9c4bab3fb0d1179cbe726be2cdf55d9d7d95cfa47c8f817a1cf2b01863cce09da17da85af1e4077f1f9b7841abdaa8f114e3a6db1fe2b48292ffd
+DIST slade-3.2.6.tar.gz 7027328 BLAKE2B 
ba0db4926f5706166ec2439cbb539a9d5330e2d3ea3dbd8e29b586cf57a23b7b254823d84b7ba79b604a86ed0e5753b4e7c4fcf825ba7d3217c52824f36c5be4
 SHA512 
d09631b24c83769482480c24dfc1f6992ae293bdfe4c8661d967d6ac0fcbba6f0e1bf58c58afc84a82fb5f900d9e0e99413800a42edc353a4f7f1f52781db54f

diff --git a/games-util/slade/files/slade-3.2.6-fix-sol.patch 
b/games-util/slade/files/slade-3.2.6-fix-sol.patch
new file mode 100644
index 000000000000..d0aa3b993f7d
--- /dev/null
+++ b/games-util/slade/files/slade-3.2.6-fix-sol.patch
@@ -0,0 +1,14 @@
+diff --git a/thirdparty/sol/sol.hpp b/thirdparty/sol/sol.hpp
+index 3ff9ad1c..eb73973b 100644
+--- a/thirdparty/sol/sol.hpp
++++ b/thirdparty/sol/sol.hpp
+@@ -5968,7 +5968,8 @@ namespace sol {
+                       static_assert(std::is_constructible<T, 
Args&&...>::value, "T must be constructible with Args");
+ 
+                       *this = nullopt;
+-                      this->construct(std::forward<Args>(args)...);
++                      new (static_cast<void*>(this)) optional(std::in_place, 
std::forward<Args>(args)...);
++                      return **this;
+               }
+ 
+               /// Swaps this optional with the other.

diff --git a/games-util/slade/slade-3.2.6.ebuild 
b/games-util/slade/slade-3.2.6.ebuild
new file mode 100644
index 000000000000..22f6c0975984
--- /dev/null
+++ b/games-util/slade/slade-3.2.6.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2024 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"
+LICENSE="GPL-2 MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="fluidsynth timidity webkit"
+REQUIRED_USE="${LUA_REQUIRED_USE}"
+
+# <libfmt-11 https://github.com/sirjuddington/SLADE/issues/1746
+DEPEND="
+       ${LUA_DEPS}
+       app-arch/bzip2:=
+       <dev-libs/libfmt-11:=
+       >=media-libs/dumb-2:=
+       media-libs/freeimage[jpeg,png,tiff]
+       media-libs/glew:0=
+       media-libs/libsfml:=
+       media-sound/mpg123
+       net-misc/curl
+       sys-libs/zlib
+       x11-libs/wxGTK:${WX_GTK_VER}[curl(+),opengl,webkit?,X]
+       fluidsynth? ( media-sound/fluidsynth:= )
+"
+
+RDEPEND="
+       ${DEPEND}
+       timidity? ( media-sound/timidity++ )
+"
+
+BDEPEND="
+       app-arch/p7zip
+       virtual/pkgconfig
+"
+
+S="${WORKDIR}/${PN^^}-${MY_PV}"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-3.2.0_beta2-fluidsynth-driver.patch
+       "${FILESDIR}"/${PN}-3.2.2-wayland.patch
+       "${FILESDIR}"/${PN}-3.2.6-fix-sol.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_COTIRE=ON
+               -DNO_FLUIDSYNTH=$(usex fluidsynth OFF ON)
+               -DNO_WEBVIEW=$(usex webkit OFF ON)
+               -DUSE_SFML_RENDERWINDOW=ON
+               -DUSE_SYSTEM_DUMB=ON
+               -DUSE_SYSTEM_FMT=ON
+               -DWX_GTK3=ON
+       )
+
+       setup-wxwidgets
+       cmake_src_configure
+}

Reply via email to