Skip to content

Commit

Permalink
games-util/slade: add 3.2.6
Browse files Browse the repository at this point in the history
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: sirjuddington/SLADE#1750
Bug: https://bugs.gentoo.org/938887
Signed-off-by: Kacper Słomiński <kacper.slominski72@gmail.com>
  • Loading branch information
qookei committed Nov 23, 2024
1 parent fcaf378 commit ea3d9ff
Show file tree
Hide file tree
Showing 3 changed files with 97 additions and 0 deletions.
1 change: 1 addition & 0 deletions games-util/slade/Manifest
Original file line number Diff line number Diff line change
@@ -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
14 changes: 14 additions & 0 deletions games-util/slade/files/slade-3.2.6-fix-sol.patch
Original file line number Diff line number Diff line change
@@ -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.
82 changes: 82 additions & 0 deletions games-util/slade/slade-3.2.6.ebuild
Original file line number Diff line number Diff line change
@@ -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
}

0 comments on commit ea3d9ff

Please sign in to comment.