public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: games-util/slade/, games-util/slade/files/
@ 2020-05-31 21:12 James Le Cuirot
  0 siblings, 0 replies; 5+ messages in thread
From: James Le Cuirot @ 2020-05-31 21:12 UTC (permalink / raw
  To: gentoo-commits

commit:     0a09ba651e97e88364fc3d9c098af10635c99101
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Sun May 31 21:12:08 2020 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Sun May 31 21:12:08 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0a09ba65

games-util/slade: New package

Package-Manager: Portage-2.3.100, Repoman-2.3.22
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 games-util/slade/Manifest                          |   1 +
 .../slade/files/slade-3.1.12a-bundled-libs.patch   |  80 +++++++++++++++
 .../files/slade-3.1.12a-fluidsynth-driver.patch    |  14 +++
 .../slade/files/slade-3.1.12a-freetype-deps.patch  |  74 ++++++++++++++
 .../slade/files/slade-3.1.12a-sfml-gtk3.patch      |  88 ++++++++++++++++
 .../slade/files/slade-3.1.12a-wxGLCanvas.patch     | 112 +++++++++++++++++++++
 games-util/slade/metadata.xml                      |  14 +++
 games-util/slade/slade-3.1.12a.ebuild              |  67 ++++++++++++
 8 files changed, 450 insertions(+)

diff --git a/games-util/slade/Manifest b/games-util/slade/Manifest
new file mode 100644
index 00000000000..be9e5aaa542
--- /dev/null
+++ b/games-util/slade/Manifest
@@ -0,0 +1 @@
+DIST slade-3.1.12a.tar.gz 5883702 BLAKE2B 400cf032bf0b60555b45b450c524d85f145d593d74601461f33fa571360a0c66a1d5933a7d48e8cfad98981bcf446df213240f53da237be6d9a1ce09517c4566 SHA512 ecedec880b8ebed921e152d016a451164efd4de90ae69963be077d1ef39326670254ca8eb03e1045ca7ae5b02f7512dbbe712f83c845cbbd4ed787a90899ad13

diff --git a/games-util/slade/files/slade-3.1.12a-bundled-libs.patch b/games-util/slade/files/slade-3.1.12a-bundled-libs.patch
new file mode 100644
index 00000000000..6e8285d8105
--- /dev/null
+++ b/games-util/slade/files/slade-3.1.12a-bundled-libs.patch
@@ -0,0 +1,80 @@
+diff -Naur a/src/Application/App.cpp b/src/Application/App.cpp
+--- a/src/Application/App.cpp	2020-05-26 00:34:50.000000000 +0100
++++ b/src/Application/App.cpp	2020-05-31 17:11:08.365000293 +0100
+@@ -34,7 +34,7 @@
+ #include "App.h"
+ #include "Archive/ArchiveManager.h"
+ #include "Dialogs/SetupWizard/SetupWizardDialog.h"
+-#include "External/dumb/dumb.h"
++#include <dumb.h>
+ #include "Game/Configuration.h"
+ #include "General/ColourConfiguration.h"
+ #include "General/Console/Console.h"
+diff -Naur a/src/Audio/ModMusic.cpp b/src/Audio/ModMusic.cpp
+--- a/src/Audio/ModMusic.cpp	2020-05-26 00:34:50.000000000 +0100
++++ b/src/Audio/ModMusic.cpp	2020-05-31 17:11:08.365000293 +0100
+@@ -30,7 +30,7 @@
+  *******************************************************************/
+ #include "Main.h"
+ #include "ModMusic.h"
+-#include "External/dumb/dumb.h"
++#include <dumb.h>
+ 
+ 
+ /*******************************************************************
+diff -Naur a/src/CMakeLists.txt b/src/CMakeLists.txt
+--- a/src/CMakeLists.txt	2020-05-26 00:34:50.000000000 +0100
++++ b/src/CMakeLists.txt	2020-05-31 17:11:08.365000293 +0100
+@@ -105,6 +105,8 @@
+ find_package(GLEW REQUIRED)
+ find_package(Freetype REQUIRED)
+ find_package(CURL REQUIRED)
++find_package(Lua REQUIRED)
++pkg_check_modules(DUMB REQUIRED dumb>=1.0)
+ include_directories(
+ 	${FREEIMAGE_INCLUDE_DIR}
+ 	${SFML_INCLUDE_DIR}
+@@ -112,8 +114,9 @@
+ 	${FREETYPE_INCLUDE_DIRS}
+ 	${GLEW_INCLUDE_PATH}
+ 	${CURL_INCLUDE_DIR}
++	${LUA_INCLUDE_DIR}
++	${DUMB_INCLUDE_DIRS}
+ 	.
+-	./External/dumb
+ 	./Application
+ 	)
+ 
+@@ -182,6 +185,8 @@
+ 	${FREETYPE_LIBRARIES}
+ 	${GLEW_LIBRARY}
+ 	${CURL_LIBRARIES}
++	${LUA_LIBRARIES}
++	${DUMB_LIBRARIES}
+ )
+ 
+ if (WX_GTK3)
+diff -Naur a/src/External/CMakeLists.txt b/src/External/CMakeLists.txt
+--- a/src/External/CMakeLists.txt	2020-05-26 00:34:50.000000000 +0100
++++ b/src/External/CMakeLists.txt	2020-05-31 17:12:09.614333605 +0100
+@@ -24,8 +24,6 @@
+ file(GLOB_RECURSE EXTERNAL_SOURCES
+ 	*.cpp
+ 	*.cxx
+-	dumb/*.c
+-	lua/*.c
+ 	lzma/C/LzmaDec.c
+ 	${SLADE_HEADERS}
+ 	)
+diff -Naur a/src/External/sol/sol.hpp b/src/External/sol/sol.hpp
+--- a/src/External/sol/sol.hpp	2020-05-26 00:34:50.000000000 +0100
++++ b/src/External/sol/sol.hpp	2020-05-31 17:11:08.367000336 +0100
+@@ -798,7 +798,7 @@
+ #include <lualib.h>
+ #include <lauxlib.h>
+ #else
+-#include "External/lua/lua.hpp"
++#include <lua.hpp>
+ #endif // C++ Mangling for Lua
+ 
+ #if defined(_WIN32) || defined(_MSC_VER)

diff --git a/games-util/slade/files/slade-3.1.12a-fluidsynth-driver.patch b/games-util/slade/files/slade-3.1.12a-fluidsynth-driver.patch
new file mode 100644
index 00000000000..c0ef70d6dfc
--- /dev/null
+++ b/games-util/slade/files/slade-3.1.12a-fluidsynth-driver.patch
@@ -0,0 +1,14 @@
+https://github.com/sirjuddington/SLADE/issues/1147
+
+diff -Naur a/src/Audio/MIDIPlayer.cpp b/src/Audio/MIDIPlayer.cpp
+--- a/src/Audio/MIDIPlayer.cpp	2020-05-28 00:08:34.000000000 +0100
++++ b/src/Audio/MIDIPlayer.cpp	2020-05-31 21:40:03.480211253 +0100
+@@ -74,8 +74,6 @@
+ #ifndef NO_FLUIDSYNTH
+ 	// Set fluidsynth driver to alsa in linux (no idea why it defaults to jack)
+ #if !defined __WXMSW__ && !defined __WXOSX__
+-	if (fs_driver == "")
+-		fs_driver = "alsa";
+ #endif // !defined __WXMSW__ && !defined __WXOSX__
+ 
+ 	// Init soundfont path

diff --git a/games-util/slade/files/slade-3.1.12a-freetype-deps.patch b/games-util/slade/files/slade-3.1.12a-freetype-deps.patch
new file mode 100644
index 00000000000..33fdbfe8521
--- /dev/null
+++ b/games-util/slade/files/slade-3.1.12a-freetype-deps.patch
@@ -0,0 +1,74 @@
+From 115ae712d576deafaa95dc5227a7f83dce92a9cb Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <chewi@gentoo.org>
+Date: Sun, 31 May 2020 21:59:06 +0100
+Subject: [PATCH 1/2] Drop unused FreeType dependency
+
+It may be used by FTGL but it's not directly used by this
+project. pkg-config should handle this for static builds.
+---
+ src/CMakeLists.txt | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index f54b126f..8dab39fc 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -103,7 +103,6 @@ find_package(SFML COMPONENTS ${SFML_FIND_COMPONENTS} REQUIRED)
+ find_package(FTGL REQUIRED)
+ find_package(OpenGL REQUIRED)
+ find_package(GLEW REQUIRED)
+-find_package(Freetype REQUIRED)
+ find_package(CURL REQUIRED)
+ find_package(Lua REQUIRED)
+ find_package(fmt CONFIG REQUIRED)
+@@ -111,7 +110,6 @@ include_directories(
+ 	${FREEIMAGE_INCLUDE_DIR}
+ 	${SFML_INCLUDE_DIR}
+ 	${FTGL_INCLUDE_DIR}
+-	${FREETYPE_INCLUDE_DIRS}
+ 	${GLEW_INCLUDE_PATH}
+ 	${CURL_INCLUDE_DIR}
+ 	${LUA_INCLUDE_DIR}
+@@ -184,7 +182,6 @@ target_link_libraries(slade
+ 	${SFML_LIBRARY}
+ 	${FTGL_LIBRARIES}
+ 	${OPENGL_LIBRARIES}
+-	${FREETYPE_LIBRARIES}
+ 	${GLEW_LIBRARY}
+ 	${CURL_LIBRARIES}
+ 	${LUA_LIBRARIES}
+-- 
+2.26.2
+
+From 9116972a75b58ef32e229842f80cdc96fab04f1e Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <chewi@gentoo.org>
+Date: Sun, 31 May 2020 22:00:53 +0100
+Subject: [PATCH 2/2] Only require FTGL when USE_SFML_RENDERWINDOW is disabled
+
+---
+ src/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 8dab39fc..b0d4776d 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -72,6 +72,7 @@ set(SFML_FIND_COMPONENTS system audio window graphics network)
+ ADD_DEFINITIONS(-DUSE_SFML_RENDERWINDOW)
+ else (USE_SFML_RENDERWINDOW)
+ set(SFML_FIND_COMPONENTS system audio window network)
++find_package(FTGL REQUIRED)
+ endif(USE_SFML_RENDERWINDOW)
+ 
+ # Fluidsynth
+@@ -100,7 +101,6 @@ endif()
+ 
+ find_package(FreeImage REQUIRED)
+ find_package(SFML COMPONENTS ${SFML_FIND_COMPONENTS} REQUIRED)
+-find_package(FTGL REQUIRED)
+ find_package(OpenGL REQUIRED)
+ find_package(GLEW REQUIRED)
+ find_package(CURL REQUIRED)
+-- 
+2.26.2
+

diff --git a/games-util/slade/files/slade-3.1.12a-sfml-gtk3.patch b/games-util/slade/files/slade-3.1.12a-sfml-gtk3.patch
new file mode 100644
index 00000000000..745a41d64b8
--- /dev/null
+++ b/games-util/slade/files/slade-3.1.12a-sfml-gtk3.patch
@@ -0,0 +1,88 @@
+From 7e2aa2666701cc0db32d8b3185c3cd07ae733ab0 Mon Sep 17 00:00:00 2001
+From: Simon Judd <sirjuddington@gmail.com>
+Date: Fri, 6 Dec 2019 16:36:52 +1030
+Subject: [PATCH] Fix SFML RenderWindow embedding on GTK3
+
+It actually seems to work ok now so might be able to make it the default there
+
+It'd be nice if it worked on macos as well, then I'd be able to remove the wxGLCanvas/FTGL stuff completely...
+---
+
+diff --git a/src/UI/Canvas/OGLCanvas.cpp b/src/UI/Canvas/OGLCanvas.cpp
+index 92f86b29..4bba9f98 100644
+--- a/src/UI/Canvas/OGLCanvas.cpp
++++ b/src/UI/Canvas/OGLCanvas.cpp
+@@ -44,6 +44,8 @@
+ #endif
+ #endif
+ 
++EXTERN_CVAR(Int, gl_depth_buffer_size)
++
+ 
+ /*******************************************************************
+  * OGLCANVAS CLASS FUNCTIONS
+@@ -130,29 +132,29 @@ bool OGLCanvas::setContext()
+ #endif
+ }
+ 
+-void OGLCanvas::createSFML()
++bool OGLCanvas::createSFML()
+ {
+ #ifdef USE_SFML_RENDERWINDOW
+ 	// Code taken from SFML wxWidgets integration example
+ 	sf::WindowHandle handle;
+ #ifdef __WXGTK__
+-	// GTK implementation requires to go deeper to find the
+-	// low-level X11 identifier of the widget
+-	gtk_widget_realize(m_wxwindow);
+-	gtk_widget_set_double_buffered(m_wxwindow, false);
+-	GdkWindow* Win = gtk_widget_get_window(m_wxwindow);
+-	XFlush(GDK_WINDOW_XDISPLAY(Win));
+-	//sf::RenderWindow::Create(GDK_WINDOW_XWINDOW(Win));
+-	handle = GDK_WINDOW_XWINDOW(Win);
++	auto widget = GetHandle();
++	if (!widget)
++		return false;
++	auto window = gtk_widget_get_window(widget);
++	if (!window)
++		return false;
++	handle = gdk_x11_window_get_xid(window);
+ #else
+ 	handle = GetHandle();
+ #endif
+ 	// Context settings
+ 	sf::ContextSettings settings;
+-	settings.depthBits = 24;
+-	settings.stencilBits = 8;
++	settings.depthBits = gl_depth_buffer_size;
++	settings.stencilBits = sf::ContextSettings::Default;
+ 	sf::RenderWindow::create(handle, settings);
+ #endif
++	return true;
+ }
+ 
+ /* OGLCanvas::init
+@@ -308,7 +310,9 @@ void OGLCanvas::onPaint(wxPaintEvent& e)
+ 
+ 	if (recreate)
+ 	{
+-		createSFML();
++		if (!createSFML())
++			return;
++
+ 		recreate = false;
+ 	}
+ 
+diff --git a/src/UI/Canvas/OGLCanvas.h b/src/UI/Canvas/OGLCanvas.h
+index a1defbee..9b9b07db 100644
+--- a/src/UI/Canvas/OGLCanvas.h
++++ b/src/UI/Canvas/OGLCanvas.h
+@@ -28,7 +28,7 @@ public:
+ 	Palette*	getPalette() { return &palette; }
+ 	void			setPalette(Palette* pal) { palette.copyPalette(pal); }
+ 	bool			setContext();
+-	void			createSFML();
++	bool			createSFML();
+ 	void			init();
+ 	virtual void	draw() = 0;
+ 	virtual void	update(long frametime) {}

diff --git a/games-util/slade/files/slade-3.1.12a-wxGLCanvas.patch b/games-util/slade/files/slade-3.1.12a-wxGLCanvas.patch
new file mode 100644
index 00000000000..64698cc4591
--- /dev/null
+++ b/games-util/slade/files/slade-3.1.12a-wxGLCanvas.patch
@@ -0,0 +1,112 @@
+From a934d04b8c49c250e9be27581129c75bc058814a Mon Sep 17 00:00:00 2001
+From: Simon Judd <sirjuddington@gmail.com>
+Date: Mon, 9 Dec 2019 12:26:17 +1030
+Subject: [PATCH] Always use wxGLCanvas as a base for OGLCanvas
+
+Even if using SFML - this fixes the depth buffer not being created on linux
+---
+
+diff --git a/src/OpenGL/OpenGL.cpp b/src/OpenGL/OpenGL.cpp
+index 7e506550..0a8d4236 100644
+--- a/src/OpenGL/OpenGL.cpp
++++ b/src/OpenGL/OpenGL.cpp
+@@ -38,14 +38,14 @@ CVAR(Bool, gl_tex_enable_np2, true, CVAR_SAVE)
+ CVAR(Bool, gl_point_sprite, true, CVAR_SAVE)
+ CVAR(Bool, gl_tweak_accuracy, true, CVAR_SAVE)
+ CVAR(Bool, gl_vbo, true, CVAR_SAVE)
+-CVAR(Int, gl_depth_buffer_size, 16, CVAR_SAVE)
++CVAR(Int, gl_depth_buffer_size, 24, CVAR_SAVE)
+ 
+ namespace OpenGL
+ {
+ #ifndef USE_SFML_RENDERWINDOW
+ 	wxGLContext*	context = NULL;
+-	int				wx_gl_attrib[] = { WX_GL_RGBA, WX_GL_DOUBLEBUFFER, WX_GL_DEPTH_SIZE, 16, WX_GL_STENCIL_SIZE, 8, 0 };
+ #endif
++	int				wx_gl_attrib[] = { WX_GL_RGBA, WX_GL_DOUBLEBUFFER, WX_GL_DEPTH_SIZE, 16, WX_GL_STENCIL_SIZE, 8, 0 };
+ 	bool			initialised = false;
+ 	double			version = 0;
+ 	unsigned		max_tex_size = 128;
+@@ -224,7 +224,6 @@ bool OpenGL::accuracyTweak()
+ 	return gl_tweak_accuracy;
+ }
+ 
+-#ifndef USE_SFML_RENDERWINDOW
+ /* OpenGL::getWxGLAttribs
+  * Returns the GL attributes array for use with wxGLCanvas
+  *******************************************************************/
+@@ -235,7 +234,6 @@ int* OpenGL::getWxGLAttribs()
+ 
+ 	return wx_gl_attrib;
+ }
+-#endif
+ 
+ /* OpenGL::setColour
+  * Sets the colour to [col], and changes the colour blend mode if
+diff --git a/src/OpenGL/OpenGL.h b/src/OpenGL/OpenGL.h
+index 1d5c9b9a..9082687c 100644
+--- a/src/OpenGL/OpenGL.h
++++ b/src/OpenGL/OpenGL.h
+@@ -20,10 +20,8 @@
+ #include <GL/glu.h>
+ #endif
+ 
+-#ifndef USE_SFML_RENDERWINDOW
+ #include <wx/glcanvas.h>
+ #undef None // Why does <X11/X.h> #define this? Idiotic
+-#endif
+ 
+ #define BLEND_NORMAL	0
+ #define BLEND_ADDITIVE	1
+@@ -56,9 +54,7 @@ namespace OpenGL
+ 	unsigned		maxTextureSize();
+ 	bool			isInitialised();
+ 	bool			accuracyTweak();
+-#ifndef USE_SFML_RENDERWINDOW
+ 	int*			getWxGLAttribs();
+-#endif
+ 	void			setColour(rgba_t col, bool set_blend = true);
+ 	void			setColour(uint8_t r, uint8_t g, uint8_t b, uint8_t a = 255, int8_t blend = BLEND_IGNORE);
+ 	void			setBlend(int blend);
+diff --git a/src/UI/Canvas/OGLCanvas.cpp b/src/UI/Canvas/OGLCanvas.cpp
+index 4bba9f98..a48d9ac6 100644
+--- a/src/UI/Canvas/OGLCanvas.cpp
++++ b/src/UI/Canvas/OGLCanvas.cpp
+@@ -55,8 +55,9 @@ EXTERN_CVAR(Int, gl_depth_buffer_size)
+ /* OGLCanvas::OGLCanvas
+  * OGLCanvas class constructor, SFML implementation
+  *******************************************************************/
+-OGLCanvas::OGLCanvas(wxWindow* parent, int id, bool handle_timer, int timer_interval)
+-	: wxControl(parent, id, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE|wxWANTS_CHARS), timer(this)
++OGLCanvas::OGLCanvas(wxWindow* parent, int id, bool handle_timer, int timer_interval) :
++	wxGLCanvas(parent, id, OpenGL::getWxGLAttribs(), wxDefaultPosition, wxDefaultSize, wxBORDER_NONE | wxWANTS_CHARS),
++	timer(this)
+ {
+ 	init_done = false;
+ 	recreate = false;
+diff --git a/src/UI/Canvas/OGLCanvas.h b/src/UI/Canvas/OGLCanvas.h
+index 9b9b07db..128cb633 100644
+--- a/src/UI/Canvas/OGLCanvas.h
++++ b/src/UI/Canvas/OGLCanvas.h
+@@ -8,7 +8,7 @@
+ 
+ class wxWindow;
+ #ifdef USE_SFML_RENDERWINDOW
+-class OGLCanvas : public wxControl, public sf::RenderWindow
++class OGLCanvas : public wxGLCanvas, public sf::RenderWindow
+ {
+ #else
+ class OGLCanvas : public wxGLCanvas
+@@ -38,7 +38,11 @@ public:
+ 	void			setup2D();
+ 
+ #ifdef USE_SFML_RENDERWINDOW
+-	void	SwapBuffers() { display(); }
++	bool SwapBuffers() override
++	{
++		display();
++		return true;
++	}
+ #endif
+ 
+ 	void	onPaint(wxPaintEvent& e);

diff --git a/games-util/slade/metadata.xml b/games-util/slade/metadata.xml
new file mode 100644
index 00000000000..9312c313b00
--- /dev/null
+++ b/games-util/slade/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="project">
+		<email>games@gentoo.org</email>
+		<name>Gentoo Games Project</name>
+	</maintainer>
+	<upstream>
+		<remote-id type="github">sirjuddington/SLADE</remote-id>
+	</upstream>
+	<use>
+		<flag name="fluidsynth">Enable MIDI software synthesis using <pkg>media-sound/fluidsynth</pkg></flag>
+	</use>
+</pkgmetadata>

diff --git a/games-util/slade/slade-3.1.12a.ebuild b/games-util/slade/slade-3.1.12a.ebuild
new file mode 100644
index 00000000000..b204c6c7870
--- /dev/null
+++ b/games-util/slade/slade-3.1.12a.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+WX_GTK_VER="3.0-gtk3"
+inherit cmake wxwidgets
+
+DESCRIPTION="Modern editor for Doom-engine based games and source ports"
+HOMEPAGE="https://slade.mancubus.net/"
+SRC_URI="https://github.com/sirjuddington/${PN^^}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+LICENSE="GPL-2 MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="fluidsynth timidity webkit"
+
+DEPEND="
+	app-arch/bzip2:=
+	dev-lang/lua:0
+	>=media-libs/dumb-2:=
+	media-libs/freeimage[jpeg,png,tiff]
+	media-libs/glew:0=
+	media-libs/libsfml:=
+	net-misc/curl
+	sys-libs/zlib
+	x11-libs/wxGTK:${WX_GTK_VER}[webkit?]
+	fluidsynth? ( media-sound/fluidsynth:= )
+"
+
+RDEPEND="
+	${DEPEND}
+	timidity? ( media-sound/timidity++ )
+"
+
+BDEPEND="
+	app-arch/p7zip
+	virtual/pkgconfig
+"
+
+S="${WORKDIR}/${PN^^}-${PV}"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-bundled-libs.patch
+	"${FILESDIR}"/${P}-sfml-gtk3.patch
+	"${FILESDIR}"/${P}-wxGLCanvas.patch
+	"${FILESDIR}"/${P}-freetype-deps.patch
+	"${FILESDIR}"/${P}-fluidsynth-driver.patch
+)
+
+src_prepare() {
+	cmake_src_prepare
+
+	# Delete bundled libraries just in case.
+	rm -r src/External/{dumb,glew,lua}/ || die
+
+}
+
+src_configure() {
+	local mycmakeargs=(
+		-DNO_FLUIDSYNTH=$(usex fluidsynth OFF ON)
+		-DNO_WEBVIEW=$(usex webkit OFF ON)
+		-DUSE_SFML_RENDERWINDOW=ON
+		-DWX_GTK3=ON
+	)
+	setup-wxwidgets
+	cmake_src_configure
+}


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: games-util/slade/, games-util/slade/files/
@ 2021-02-24 20:47 James Le Cuirot
  0 siblings, 0 replies; 5+ messages in thread
From: James Le Cuirot @ 2021-02-24 20:47 UTC (permalink / raw
  To: gentoo-commits

commit:     3ffd5d80b86cd45c8ff06d57ea233262819be3db
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 24 20:29:08 2021 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Wed Feb 24 20:47:17 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3ffd5d80

games-util/slade: Drop old 3.1.12a as it is broken with newer GCC

Package-Manager: Portage-3.0.15, Repoman-3.0.2
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 games-util/slade/Manifest                          |   1 -
 .../slade/files/slade-3.1.12a-bundled-libs.patch   |  80 ---------------
 .../files/slade-3.1.12a-cmake-lua-version.patch    |  11 --
 .../files/slade-3.1.12a-fluidsynth-driver.patch    |  14 ---
 .../slade/files/slade-3.1.12a-freetype-deps.patch  |  74 --------------
 .../slade/files/slade-3.1.12a-sfml-gtk3.patch      |  88 ----------------
 .../slade/files/slade-3.1.12a-wxGLCanvas.patch     | 112 ---------------------
 games-util/slade/slade-3.1.12a-r100.ebuild         |  72 -------------
 games-util/slade/slade-3.1.12a.ebuild              |  67 ------------
 9 files changed, 519 deletions(-)

diff --git a/games-util/slade/Manifest b/games-util/slade/Manifest
index ae854cd594a..2ca180f1985 100644
--- a/games-util/slade/Manifest
+++ b/games-util/slade/Manifest
@@ -1,2 +1 @@
-DIST slade-3.1.12a.tar.gz 5883702 BLAKE2B 400cf032bf0b60555b45b450c524d85f145d593d74601461f33fa571360a0c66a1d5933a7d48e8cfad98981bcf446df213240f53da237be6d9a1ce09517c4566 SHA512 ecedec880b8ebed921e152d016a451164efd4de90ae69963be077d1ef39326670254ca8eb03e1045ca7ae5b02f7512dbbe712f83c845cbbd4ed787a90899ad13
 DIST slade-3.2.0_beta2.tar.gz 5999580 BLAKE2B 29cd515e4553fa1d74a43dc982b376b10d95ebbe2da4a25bc39329c15967466142c73ec134ada371b9aa65d8fc8d9f4a1820cece7fe8dca59fec039aaad32331 SHA512 e46d9664348233c7ee7fa8ed748d7e23914bb1bb6dd65d40aff7603b386e032e988e0990d4a435f597ba8a6416c7ec377c8334a66efacd55ebdd994d3fd11073

diff --git a/games-util/slade/files/slade-3.1.12a-bundled-libs.patch b/games-util/slade/files/slade-3.1.12a-bundled-libs.patch
deleted file mode 100644
index 6e8285d8105..00000000000
--- a/games-util/slade/files/slade-3.1.12a-bundled-libs.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-diff -Naur a/src/Application/App.cpp b/src/Application/App.cpp
---- a/src/Application/App.cpp	2020-05-26 00:34:50.000000000 +0100
-+++ b/src/Application/App.cpp	2020-05-31 17:11:08.365000293 +0100
-@@ -34,7 +34,7 @@
- #include "App.h"
- #include "Archive/ArchiveManager.h"
- #include "Dialogs/SetupWizard/SetupWizardDialog.h"
--#include "External/dumb/dumb.h"
-+#include <dumb.h>
- #include "Game/Configuration.h"
- #include "General/ColourConfiguration.h"
- #include "General/Console/Console.h"
-diff -Naur a/src/Audio/ModMusic.cpp b/src/Audio/ModMusic.cpp
---- a/src/Audio/ModMusic.cpp	2020-05-26 00:34:50.000000000 +0100
-+++ b/src/Audio/ModMusic.cpp	2020-05-31 17:11:08.365000293 +0100
-@@ -30,7 +30,7 @@
-  *******************************************************************/
- #include "Main.h"
- #include "ModMusic.h"
--#include "External/dumb/dumb.h"
-+#include <dumb.h>
- 
- 
- /*******************************************************************
-diff -Naur a/src/CMakeLists.txt b/src/CMakeLists.txt
---- a/src/CMakeLists.txt	2020-05-26 00:34:50.000000000 +0100
-+++ b/src/CMakeLists.txt	2020-05-31 17:11:08.365000293 +0100
-@@ -105,6 +105,8 @@
- find_package(GLEW REQUIRED)
- find_package(Freetype REQUIRED)
- find_package(CURL REQUIRED)
-+find_package(Lua REQUIRED)
-+pkg_check_modules(DUMB REQUIRED dumb>=1.0)
- include_directories(
- 	${FREEIMAGE_INCLUDE_DIR}
- 	${SFML_INCLUDE_DIR}
-@@ -112,8 +114,9 @@
- 	${FREETYPE_INCLUDE_DIRS}
- 	${GLEW_INCLUDE_PATH}
- 	${CURL_INCLUDE_DIR}
-+	${LUA_INCLUDE_DIR}
-+	${DUMB_INCLUDE_DIRS}
- 	.
--	./External/dumb
- 	./Application
- 	)
- 
-@@ -182,6 +185,8 @@
- 	${FREETYPE_LIBRARIES}
- 	${GLEW_LIBRARY}
- 	${CURL_LIBRARIES}
-+	${LUA_LIBRARIES}
-+	${DUMB_LIBRARIES}
- )
- 
- if (WX_GTK3)
-diff -Naur a/src/External/CMakeLists.txt b/src/External/CMakeLists.txt
---- a/src/External/CMakeLists.txt	2020-05-26 00:34:50.000000000 +0100
-+++ b/src/External/CMakeLists.txt	2020-05-31 17:12:09.614333605 +0100
-@@ -24,8 +24,6 @@
- file(GLOB_RECURSE EXTERNAL_SOURCES
- 	*.cpp
- 	*.cxx
--	dumb/*.c
--	lua/*.c
- 	lzma/C/LzmaDec.c
- 	${SLADE_HEADERS}
- 	)
-diff -Naur a/src/External/sol/sol.hpp b/src/External/sol/sol.hpp
---- a/src/External/sol/sol.hpp	2020-05-26 00:34:50.000000000 +0100
-+++ b/src/External/sol/sol.hpp	2020-05-31 17:11:08.367000336 +0100
-@@ -798,7 +798,7 @@
- #include <lualib.h>
- #include <lauxlib.h>
- #else
--#include "External/lua/lua.hpp"
-+#include <lua.hpp>
- #endif // C++ Mangling for Lua
- 
- #if defined(_WIN32) || defined(_MSC_VER)

diff --git a/games-util/slade/files/slade-3.1.12a-cmake-lua-version.patch b/games-util/slade/files/slade-3.1.12a-cmake-lua-version.patch
deleted file mode 100644
index ba7fba329c9..00000000000
--- a/games-util/slade/files/slade-3.1.12a-cmake-lua-version.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/src/CMakeLists.txt
-+++ b/src/CMakeLists.txt
-@@ -104,7 +104,7 @@
- find_package(OpenGL REQUIRED)
- find_package(GLEW REQUIRED)
- find_package(CURL REQUIRED)
--find_package(Lua REQUIRED)
-+find_package(Lua ${LUA_VERSION} EXACT REQUIRED)
- pkg_check_modules(DUMB REQUIRED dumb>=1.0)
- include_directories(
- 	${FREEIMAGE_INCLUDE_DIR}

diff --git a/games-util/slade/files/slade-3.1.12a-fluidsynth-driver.patch b/games-util/slade/files/slade-3.1.12a-fluidsynth-driver.patch
deleted file mode 100644
index c0ef70d6dfc..00000000000
--- a/games-util/slade/files/slade-3.1.12a-fluidsynth-driver.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-https://github.com/sirjuddington/SLADE/issues/1147
-
-diff -Naur a/src/Audio/MIDIPlayer.cpp b/src/Audio/MIDIPlayer.cpp
---- a/src/Audio/MIDIPlayer.cpp	2020-05-28 00:08:34.000000000 +0100
-+++ b/src/Audio/MIDIPlayer.cpp	2020-05-31 21:40:03.480211253 +0100
-@@ -74,8 +74,6 @@
- #ifndef NO_FLUIDSYNTH
- 	// Set fluidsynth driver to alsa in linux (no idea why it defaults to jack)
- #if !defined __WXMSW__ && !defined __WXOSX__
--	if (fs_driver == "")
--		fs_driver = "alsa";
- #endif // !defined __WXMSW__ && !defined __WXOSX__
- 
- 	// Init soundfont path

diff --git a/games-util/slade/files/slade-3.1.12a-freetype-deps.patch b/games-util/slade/files/slade-3.1.12a-freetype-deps.patch
deleted file mode 100644
index 33fdbfe8521..00000000000
--- a/games-util/slade/files/slade-3.1.12a-freetype-deps.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From 115ae712d576deafaa95dc5227a7f83dce92a9cb Mon Sep 17 00:00:00 2001
-From: James Le Cuirot <chewi@gentoo.org>
-Date: Sun, 31 May 2020 21:59:06 +0100
-Subject: [PATCH 1/2] Drop unused FreeType dependency
-
-It may be used by FTGL but it's not directly used by this
-project. pkg-config should handle this for static builds.
----
- src/CMakeLists.txt | 3 ---
- 1 file changed, 3 deletions(-)
-
-diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
-index f54b126f..8dab39fc 100644
---- a/src/CMakeLists.txt
-+++ b/src/CMakeLists.txt
-@@ -103,7 +103,6 @@ find_package(SFML COMPONENTS ${SFML_FIND_COMPONENTS} REQUIRED)
- find_package(FTGL REQUIRED)
- find_package(OpenGL REQUIRED)
- find_package(GLEW REQUIRED)
--find_package(Freetype REQUIRED)
- find_package(CURL REQUIRED)
- find_package(Lua REQUIRED)
- find_package(fmt CONFIG REQUIRED)
-@@ -111,7 +110,6 @@ include_directories(
- 	${FREEIMAGE_INCLUDE_DIR}
- 	${SFML_INCLUDE_DIR}
- 	${FTGL_INCLUDE_DIR}
--	${FREETYPE_INCLUDE_DIRS}
- 	${GLEW_INCLUDE_PATH}
- 	${CURL_INCLUDE_DIR}
- 	${LUA_INCLUDE_DIR}
-@@ -184,7 +182,6 @@ target_link_libraries(slade
- 	${SFML_LIBRARY}
- 	${FTGL_LIBRARIES}
- 	${OPENGL_LIBRARIES}
--	${FREETYPE_LIBRARIES}
- 	${GLEW_LIBRARY}
- 	${CURL_LIBRARIES}
- 	${LUA_LIBRARIES}
--- 
-2.26.2
-
-From 9116972a75b58ef32e229842f80cdc96fab04f1e Mon Sep 17 00:00:00 2001
-From: James Le Cuirot <chewi@gentoo.org>
-Date: Sun, 31 May 2020 22:00:53 +0100
-Subject: [PATCH 2/2] Only require FTGL when USE_SFML_RENDERWINDOW is disabled
-
----
- src/CMakeLists.txt | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
-index 8dab39fc..b0d4776d 100644
---- a/src/CMakeLists.txt
-+++ b/src/CMakeLists.txt
-@@ -72,6 +72,7 @@ set(SFML_FIND_COMPONENTS system audio window graphics network)
- ADD_DEFINITIONS(-DUSE_SFML_RENDERWINDOW)
- else (USE_SFML_RENDERWINDOW)
- set(SFML_FIND_COMPONENTS system audio window network)
-+find_package(FTGL REQUIRED)
- endif(USE_SFML_RENDERWINDOW)
- 
- # Fluidsynth
-@@ -100,7 +101,6 @@ endif()
- 
- find_package(FreeImage REQUIRED)
- find_package(SFML COMPONENTS ${SFML_FIND_COMPONENTS} REQUIRED)
--find_package(FTGL REQUIRED)
- find_package(OpenGL REQUIRED)
- find_package(GLEW REQUIRED)
- find_package(CURL REQUIRED)
--- 
-2.26.2
-

diff --git a/games-util/slade/files/slade-3.1.12a-sfml-gtk3.patch b/games-util/slade/files/slade-3.1.12a-sfml-gtk3.patch
deleted file mode 100644
index 745a41d64b8..00000000000
--- a/games-util/slade/files/slade-3.1.12a-sfml-gtk3.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-From 7e2aa2666701cc0db32d8b3185c3cd07ae733ab0 Mon Sep 17 00:00:00 2001
-From: Simon Judd <sirjuddington@gmail.com>
-Date: Fri, 6 Dec 2019 16:36:52 +1030
-Subject: [PATCH] Fix SFML RenderWindow embedding on GTK3
-
-It actually seems to work ok now so might be able to make it the default there
-
-It'd be nice if it worked on macos as well, then I'd be able to remove the wxGLCanvas/FTGL stuff completely...
----
-
-diff --git a/src/UI/Canvas/OGLCanvas.cpp b/src/UI/Canvas/OGLCanvas.cpp
-index 92f86b29..4bba9f98 100644
---- a/src/UI/Canvas/OGLCanvas.cpp
-+++ b/src/UI/Canvas/OGLCanvas.cpp
-@@ -44,6 +44,8 @@
- #endif
- #endif
- 
-+EXTERN_CVAR(Int, gl_depth_buffer_size)
-+
- 
- /*******************************************************************
-  * OGLCANVAS CLASS FUNCTIONS
-@@ -130,29 +132,29 @@ bool OGLCanvas::setContext()
- #endif
- }
- 
--void OGLCanvas::createSFML()
-+bool OGLCanvas::createSFML()
- {
- #ifdef USE_SFML_RENDERWINDOW
- 	// Code taken from SFML wxWidgets integration example
- 	sf::WindowHandle handle;
- #ifdef __WXGTK__
--	// GTK implementation requires to go deeper to find the
--	// low-level X11 identifier of the widget
--	gtk_widget_realize(m_wxwindow);
--	gtk_widget_set_double_buffered(m_wxwindow, false);
--	GdkWindow* Win = gtk_widget_get_window(m_wxwindow);
--	XFlush(GDK_WINDOW_XDISPLAY(Win));
--	//sf::RenderWindow::Create(GDK_WINDOW_XWINDOW(Win));
--	handle = GDK_WINDOW_XWINDOW(Win);
-+	auto widget = GetHandle();
-+	if (!widget)
-+		return false;
-+	auto window = gtk_widget_get_window(widget);
-+	if (!window)
-+		return false;
-+	handle = gdk_x11_window_get_xid(window);
- #else
- 	handle = GetHandle();
- #endif
- 	// Context settings
- 	sf::ContextSettings settings;
--	settings.depthBits = 24;
--	settings.stencilBits = 8;
-+	settings.depthBits = gl_depth_buffer_size;
-+	settings.stencilBits = sf::ContextSettings::Default;
- 	sf::RenderWindow::create(handle, settings);
- #endif
-+	return true;
- }
- 
- /* OGLCanvas::init
-@@ -308,7 +310,9 @@ void OGLCanvas::onPaint(wxPaintEvent& e)
- 
- 	if (recreate)
- 	{
--		createSFML();
-+		if (!createSFML())
-+			return;
-+
- 		recreate = false;
- 	}
- 
-diff --git a/src/UI/Canvas/OGLCanvas.h b/src/UI/Canvas/OGLCanvas.h
-index a1defbee..9b9b07db 100644
---- a/src/UI/Canvas/OGLCanvas.h
-+++ b/src/UI/Canvas/OGLCanvas.h
-@@ -28,7 +28,7 @@ public:
- 	Palette*	getPalette() { return &palette; }
- 	void			setPalette(Palette* pal) { palette.copyPalette(pal); }
- 	bool			setContext();
--	void			createSFML();
-+	bool			createSFML();
- 	void			init();
- 	virtual void	draw() = 0;
- 	virtual void	update(long frametime) {}

diff --git a/games-util/slade/files/slade-3.1.12a-wxGLCanvas.patch b/games-util/slade/files/slade-3.1.12a-wxGLCanvas.patch
deleted file mode 100644
index 64698cc4591..00000000000
--- a/games-util/slade/files/slade-3.1.12a-wxGLCanvas.patch
+++ /dev/null
@@ -1,112 +0,0 @@
-From a934d04b8c49c250e9be27581129c75bc058814a Mon Sep 17 00:00:00 2001
-From: Simon Judd <sirjuddington@gmail.com>
-Date: Mon, 9 Dec 2019 12:26:17 +1030
-Subject: [PATCH] Always use wxGLCanvas as a base for OGLCanvas
-
-Even if using SFML - this fixes the depth buffer not being created on linux
----
-
-diff --git a/src/OpenGL/OpenGL.cpp b/src/OpenGL/OpenGL.cpp
-index 7e506550..0a8d4236 100644
---- a/src/OpenGL/OpenGL.cpp
-+++ b/src/OpenGL/OpenGL.cpp
-@@ -38,14 +38,14 @@ CVAR(Bool, gl_tex_enable_np2, true, CVAR_SAVE)
- CVAR(Bool, gl_point_sprite, true, CVAR_SAVE)
- CVAR(Bool, gl_tweak_accuracy, true, CVAR_SAVE)
- CVAR(Bool, gl_vbo, true, CVAR_SAVE)
--CVAR(Int, gl_depth_buffer_size, 16, CVAR_SAVE)
-+CVAR(Int, gl_depth_buffer_size, 24, CVAR_SAVE)
- 
- namespace OpenGL
- {
- #ifndef USE_SFML_RENDERWINDOW
- 	wxGLContext*	context = NULL;
--	int				wx_gl_attrib[] = { WX_GL_RGBA, WX_GL_DOUBLEBUFFER, WX_GL_DEPTH_SIZE, 16, WX_GL_STENCIL_SIZE, 8, 0 };
- #endif
-+	int				wx_gl_attrib[] = { WX_GL_RGBA, WX_GL_DOUBLEBUFFER, WX_GL_DEPTH_SIZE, 16, WX_GL_STENCIL_SIZE, 8, 0 };
- 	bool			initialised = false;
- 	double			version = 0;
- 	unsigned		max_tex_size = 128;
-@@ -224,7 +224,6 @@ bool OpenGL::accuracyTweak()
- 	return gl_tweak_accuracy;
- }
- 
--#ifndef USE_SFML_RENDERWINDOW
- /* OpenGL::getWxGLAttribs
-  * Returns the GL attributes array for use with wxGLCanvas
-  *******************************************************************/
-@@ -235,7 +234,6 @@ int* OpenGL::getWxGLAttribs()
- 
- 	return wx_gl_attrib;
- }
--#endif
- 
- /* OpenGL::setColour
-  * Sets the colour to [col], and changes the colour blend mode if
-diff --git a/src/OpenGL/OpenGL.h b/src/OpenGL/OpenGL.h
-index 1d5c9b9a..9082687c 100644
---- a/src/OpenGL/OpenGL.h
-+++ b/src/OpenGL/OpenGL.h
-@@ -20,10 +20,8 @@
- #include <GL/glu.h>
- #endif
- 
--#ifndef USE_SFML_RENDERWINDOW
- #include <wx/glcanvas.h>
- #undef None // Why does <X11/X.h> #define this? Idiotic
--#endif
- 
- #define BLEND_NORMAL	0
- #define BLEND_ADDITIVE	1
-@@ -56,9 +54,7 @@ namespace OpenGL
- 	unsigned		maxTextureSize();
- 	bool			isInitialised();
- 	bool			accuracyTweak();
--#ifndef USE_SFML_RENDERWINDOW
- 	int*			getWxGLAttribs();
--#endif
- 	void			setColour(rgba_t col, bool set_blend = true);
- 	void			setColour(uint8_t r, uint8_t g, uint8_t b, uint8_t a = 255, int8_t blend = BLEND_IGNORE);
- 	void			setBlend(int blend);
-diff --git a/src/UI/Canvas/OGLCanvas.cpp b/src/UI/Canvas/OGLCanvas.cpp
-index 4bba9f98..a48d9ac6 100644
---- a/src/UI/Canvas/OGLCanvas.cpp
-+++ b/src/UI/Canvas/OGLCanvas.cpp
-@@ -55,8 +55,9 @@ EXTERN_CVAR(Int, gl_depth_buffer_size)
- /* OGLCanvas::OGLCanvas
-  * OGLCanvas class constructor, SFML implementation
-  *******************************************************************/
--OGLCanvas::OGLCanvas(wxWindow* parent, int id, bool handle_timer, int timer_interval)
--	: wxControl(parent, id, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE|wxWANTS_CHARS), timer(this)
-+OGLCanvas::OGLCanvas(wxWindow* parent, int id, bool handle_timer, int timer_interval) :
-+	wxGLCanvas(parent, id, OpenGL::getWxGLAttribs(), wxDefaultPosition, wxDefaultSize, wxBORDER_NONE | wxWANTS_CHARS),
-+	timer(this)
- {
- 	init_done = false;
- 	recreate = false;
-diff --git a/src/UI/Canvas/OGLCanvas.h b/src/UI/Canvas/OGLCanvas.h
-index 9b9b07db..128cb633 100644
---- a/src/UI/Canvas/OGLCanvas.h
-+++ b/src/UI/Canvas/OGLCanvas.h
-@@ -8,7 +8,7 @@
- 
- class wxWindow;
- #ifdef USE_SFML_RENDERWINDOW
--class OGLCanvas : public wxControl, public sf::RenderWindow
-+class OGLCanvas : public wxGLCanvas, public sf::RenderWindow
- {
- #else
- class OGLCanvas : public wxGLCanvas
-@@ -38,7 +38,11 @@ public:
- 	void			setup2D();
- 
- #ifdef USE_SFML_RENDERWINDOW
--	void	SwapBuffers() { display(); }
-+	bool SwapBuffers() override
-+	{
-+		display();
-+		return true;
-+	}
- #endif
- 
- 	void	onPaint(wxPaintEvent& e);

diff --git a/games-util/slade/slade-3.1.12a-r100.ebuild b/games-util/slade/slade-3.1.12a-r100.ebuild
deleted file mode 100644
index da73f5e0060..00000000000
--- a/games-util/slade/slade-3.1.12a-r100.ebuild
+++ /dev/null
@@ -1,72 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-LUA_COMPAT=( lua5-{1..3} )
-WX_GTK_VER="3.0-gtk3"
-
-inherit cmake lua-single wxwidgets
-
-DESCRIPTION="Modern editor for Doom-engine based games and source ports"
-HOMEPAGE="https://slade.mancubus.net/"
-SRC_URI="https://github.com/sirjuddington/${PN^^}/archive/${PV}.tar.gz -> ${P}.tar.gz"
-LICENSE="GPL-2 MIT"
-SLOT="0"
-KEYWORDS="~amd64"
-IUSE="fluidsynth timidity webkit"
-
-REQUIRED_USE="${LUA_REQUIRED_USE}"
-
-DEPEND="${LUA_DEPS}
-	app-arch/bzip2:=
-	>=media-libs/dumb-2:=
-	media-libs/freeimage[jpeg,png,tiff]
-	media-libs/glew:0=
-	media-libs/libsfml:=
-	net-misc/curl
-	sys-libs/zlib
-	x11-libs/wxGTK:${WX_GTK_VER}[gstreamer,opengl,webkit?,X]
-	fluidsynth? ( media-sound/fluidsynth:= )
-"
-
-RDEPEND="
-	${DEPEND}
-	timidity? ( media-sound/timidity++ )
-"
-
-BDEPEND="
-	app-arch/p7zip
-	virtual/pkgconfig
-"
-
-S="${WORKDIR}/${PN^^}-${PV}"
-
-PATCHES=(
-	"${FILESDIR}"/${P}-bundled-libs.patch
-	"${FILESDIR}"/${P}-sfml-gtk3.patch
-	"${FILESDIR}"/${P}-wxGLCanvas.patch
-	"${FILESDIR}"/${P}-freetype-deps.patch
-	"${FILESDIR}"/${P}-fluidsynth-driver.patch
-	"${FILESDIR}"/${PN}-3.1.12a-cmake-lua-version.patch
-)
-
-src_prepare() {
-	cmake_src_prepare
-
-	# Delete bundled libraries just in case.
-	rm -r src/External/{dumb,glew,lua}/ || die
-
-}
-
-src_configure() {
-	local mycmakeargs=(
-		-DLUA_VERSION=$(lua_get_version)
-		-DNO_FLUIDSYNTH=$(usex fluidsynth OFF ON)
-		-DNO_WEBVIEW=$(usex webkit OFF ON)
-		-DUSE_SFML_RENDERWINDOW=ON
-		-DWX_GTK3=ON
-	)
-	setup-wxwidgets
-	cmake_src_configure
-}

diff --git a/games-util/slade/slade-3.1.12a.ebuild b/games-util/slade/slade-3.1.12a.ebuild
deleted file mode 100644
index 3ddd53ebe75..00000000000
--- a/games-util/slade/slade-3.1.12a.ebuild
+++ /dev/null
@@ -1,67 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-WX_GTK_VER="3.0-gtk3"
-inherit cmake wxwidgets
-
-DESCRIPTION="Modern editor for Doom-engine based games and source ports"
-HOMEPAGE="https://slade.mancubus.net/"
-SRC_URI="https://github.com/sirjuddington/${PN^^}/archive/${PV}.tar.gz -> ${P}.tar.gz"
-LICENSE="GPL-2 MIT"
-SLOT="0"
-KEYWORDS="~amd64"
-IUSE="fluidsynth timidity webkit"
-
-DEPEND="
-	app-arch/bzip2:=
-	dev-lang/lua:0
-	>=media-libs/dumb-2:=
-	media-libs/freeimage[jpeg,png,tiff]
-	media-libs/glew:0=
-	media-libs/libsfml:=
-	net-misc/curl
-	sys-libs/zlib
-	x11-libs/wxGTK:${WX_GTK_VER}[gstreamer,opengl,webkit?,X]
-	fluidsynth? ( media-sound/fluidsynth:= )
-"
-
-RDEPEND="
-	${DEPEND}
-	timidity? ( media-sound/timidity++ )
-"
-
-BDEPEND="
-	app-arch/p7zip
-	virtual/pkgconfig
-"
-
-S="${WORKDIR}/${PN^^}-${PV}"
-
-PATCHES=(
-	"${FILESDIR}"/${P}-bundled-libs.patch
-	"${FILESDIR}"/${P}-sfml-gtk3.patch
-	"${FILESDIR}"/${P}-wxGLCanvas.patch
-	"${FILESDIR}"/${P}-freetype-deps.patch
-	"${FILESDIR}"/${P}-fluidsynth-driver.patch
-)
-
-src_prepare() {
-	cmake_src_prepare
-
-	# Delete bundled libraries just in case.
-	rm -r src/External/{dumb,glew,lua}/ || die
-
-}
-
-src_configure() {
-	local mycmakeargs=(
-		-DNO_FLUIDSYNTH=$(usex fluidsynth OFF ON)
-		-DNO_WEBVIEW=$(usex webkit OFF ON)
-		-DUSE_SFML_RENDERWINDOW=ON
-		-DWX_GTK3=ON
-	)
-	setup-wxwidgets
-	cmake_src_configure
-}


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: games-util/slade/, games-util/slade/files/
@ 2022-04-16  8:09 James Le Cuirot
  0 siblings, 0 replies; 5+ messages in thread
From: James Le Cuirot @ 2022-04-16  8:09 UTC (permalink / raw
  To: gentoo-commits

commit:     da2f9eba4f975c62d061491987f6616e24b53ac5
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 16 08:08:33 2022 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Sat Apr 16 08:08:33 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=da2f9eba

games-util/slade: Version bump to 3.2.0, EAPI 8

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

 games-util/slade/Manifest                          |  1 +
 .../slade/files/slade-3.2.0-bundled-libs.patch     | 84 ++++++++++++++++++++++
 games-util/slade/files/slade-3.2.0-wx3.0.patch     | 66 +++++++++++++++++
 games-util/slade/slade-3.2.0.ebuild                | 78 ++++++++++++++++++++
 4 files changed, 229 insertions(+)

diff --git a/games-util/slade/Manifest b/games-util/slade/Manifest
index 2ca180f19853..2349b328e65a 100644
--- a/games-util/slade/Manifest
+++ b/games-util/slade/Manifest
@@ -1 +1,2 @@
+DIST slade-3.2.0.tar.gz 6464839 BLAKE2B 8e13f153c64526784bd5fa3d03520942d9dbc1b0b0d1e4d0650fb91ed63a7f860655f5d580b4c0a04a52aa98f617b1f4448f47cd1e55c1b3f78fc552b8101654 SHA512 916be3b9556e76ca815514bb472335af80a72bfb8ecd0ae4287db2c0d6ad092a8ada1b335762f8589d300b1fd81adbdede3e6c315cfdc1d49b1624294b405b92
 DIST slade-3.2.0_beta2.tar.gz 5999580 BLAKE2B 29cd515e4553fa1d74a43dc982b376b10d95ebbe2da4a25bc39329c15967466142c73ec134ada371b9aa65d8fc8d9f4a1820cece7fe8dca59fec039aaad32331 SHA512 e46d9664348233c7ee7fa8ed748d7e23914bb1bb6dd65d40aff7603b386e032e988e0990d4a435f597ba8a6416c7ec377c8334a66efacd55ebdd994d3fd11073

diff --git a/games-util/slade/files/slade-3.2.0-bundled-libs.patch b/games-util/slade/files/slade-3.2.0-bundled-libs.patch
new file mode 100644
index 000000000000..c4eae37f945f
--- /dev/null
+++ b/games-util/slade/files/slade-3.2.0-bundled-libs.patch
@@ -0,0 +1,84 @@
+From 5ecc80d27276ba978b8c0268aab722fe8f09b394 Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <chewi@gentoo.org>
+Date: Sat, 20 Feb 2021 12:22:24 +0000
+Subject: [PATCH] Unbundle the DUMB library
+
+---
+ src/Application/App.cpp   | 2 +-
+ src/Audio/ModMusic.cpp    | 2 +-
+ src/CMakeLists.txt        | 4 +++-
+ thirdparty/CMakeLists.txt | 1 -
+ 4 files changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/src/Application/App.cpp b/src/Application/App.cpp
+index 936a8212..2960ca1d 100644
+--- a/src/Application/App.cpp
++++ b/src/Application/App.cpp
+@@ -60,7 +60,7 @@
+ #include "UI/WxUtils.h"
+ #include "Utility/StringUtils.h"
+ #include "Utility/Tokenizer.h"
+-#include "thirdparty/dumb/dumb.h"
++#include <dumb.h>
+ #include <filesystem>
+ 
+ using namespace slade;
+diff --git a/src/Audio/ModMusic.cpp b/src/Audio/ModMusic.cpp
+index cc4b60cf..6d54516d 100644
+--- a/src/Audio/ModMusic.cpp
++++ b/src/Audio/ModMusic.cpp
+@@ -32,7 +32,7 @@
+ // -----------------------------------------------------------------------------
+ #include "Main.h"
+ #include "ModMusic.h"
+-#include "thirdparty/dumb/dumb.h"
++#include <dumb.h>
+ 
+ using namespace slade;
+ using namespace audio;
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index fef3d009..5363802c 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -107,6 +107,7 @@ if (NOT NO_LUA)
+ 	find_package(Lua REQUIRED)
+ endif()
+ find_package(MPG123 REQUIRED)
++pkg_check_modules(DUMB REQUIRED dumb>=1.0)
+ include_directories(
+ 	${FREEIMAGE_INCLUDE_DIR}
+ 	${SFML_INCLUDE_DIR}
+@@ -114,9 +115,9 @@ include_directories(
+ 	${FTGL_INCLUDE_DIR}
+ 	${LUA_INCLUDE_DIR}
+ 	${MPG123_INCLUDE_DIR}
++	${DUMB_INCLUDE_DIRS}
+ 	.
+ 	..
+-	../thirdparty/dumb
+ 	../thirdparty/glad/include
+ 	./Application
+ 	)
+@@ -201,6 +202,7 @@ target_link_libraries(slade
+ 	${OPENGL_LIBRARIES}
+ 	${LUA_LIBRARIES}
+ 	${MPG123_LIBRARIES}
++	${DUMB_LIBRARIES}
+ )
+ 
+ if(LINUX)
+diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt
+index f84cfc8a..2622852b 100644
+--- a/thirdparty/CMakeLists.txt
++++ b/thirdparty/CMakeLists.txt
+@@ -10,7 +10,6 @@ set(BZIP2_LIBRARIES ${BZIP2_LIBRARIES} PARENT_SCOPE)
+ set(EXTERNAL_SOURCES
+ )
+ file(GLOB_RECURSE EXTERNAL_SOURCES
+-	dumb/*.c
+ 	lzma/C/LzmaDec.c
+ 	mus2mid/mus2mid.cpp
+ 	zreaders/*.cpp
+-- 
+2.34.1
+

diff --git a/games-util/slade/files/slade-3.2.0-wx3.0.patch b/games-util/slade/files/slade-3.2.0-wx3.0.patch
new file mode 100644
index 000000000000..2e519b45181b
--- /dev/null
+++ b/games-util/slade/files/slade-3.2.0-wx3.0.patch
@@ -0,0 +1,66 @@
+From 45537095187cb5b985713e7558a230651b599589 Mon Sep 17 00:00:00 2001
+From: Simon Judd <sirjuddington@gmail.com>
+Date: Thu, 14 Apr 2022 21:52:16 -0700
+Subject: [PATCH] Keep up wx3.0 compatibility
+
+I'd like to drop it ideally, but for now it'll stay
+
+Fix #1336
+---
+ src/Graphics/Icons.cpp | 15 +++++++++++++++
+ src/UI/SAuiTabArt.cpp  |  5 ++++-
+ 2 files changed, 19 insertions(+), 1 deletion(-)
+
+diff --git a/src/Graphics/Icons.cpp b/src/Graphics/Icons.cpp
+index 61d5475c..67147f7e 100644
+--- a/src/Graphics/Icons.cpp
++++ b/src/Graphics/Icons.cpp
+@@ -373,7 +373,22 @@ wxBitmap loadPNGIcon(const IconDef& icon, int size, Point2i padding)
+ bool icons::loadIcons()
+ {
+ 	// Check for dark mode
++#if wxMAJOR_VERSION >= 3 && wxMINOR_VERSION >= 1
+ 	ui_icons_dark = wxSystemSettings::GetAppearance().IsDark();
++#else
++	auto fg = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT);
++	auto fg_r = fg.Red();
++	auto fg_g = fg.Green();
++	auto fg_b = fg.Blue();
++	auto bg = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW);
++	auto bg_r = bg.Red();
++	auto bg_g = bg.Green();
++	auto bg_b = bg.Blue();
++	wxColour::MakeGrey(&fg_r, &fg_g, &fg_b);
++	wxColour::MakeGrey(&bg_r, &bg_g, &bg_b);
++	log::info("DARK MODE CHECK: FG {} BG {}", fg_r, bg_r);
++	ui_icons_dark = fg_r > bg_r;
++#endif
+ 
+ 	// Get slade.pk3
+ 	auto* res_archive = app::archiveManager().programResourceArchive();
+diff --git a/src/UI/SAuiTabArt.cpp b/src/UI/SAuiTabArt.cpp
+index 15aad09e..240de8b9 100644
+--- a/src/UI/SAuiTabArt.cpp
++++ b/src/UI/SAuiTabArt.cpp
+@@ -542,6 +542,7 @@ void SAuiDockArt::DrawCaption(wxDC& dc, wxWindow* window, const wxString& text,
+ 	int caption_offset = 0;
+ 	if (pane.icon.IsOk())
+ 	{
++#if wxMAJOR_VERSION >= 3 && wxMINOR_VERSION >= 1
+ 	    // Ensure the icon fits into the title bar.
+ 	    wxSize iconSize = pane.icon.GetSize();
+ 	    if (iconSize.y > rect.height)
+@@ -554,7 +555,9 @@ void SAuiDockArt::DrawCaption(wxDC& dc, wxWindow* window, const wxString& text,
+ 	    dc.DrawBitmap(pane.icon,
+ 	                  rect.x+xOffset, rect.y+(rect.height-pane.icon.GetHeight())/2,
+ 	                  true);
+-
++#else
++		DrawIcon(dc, rect, pane);
++#endif
+ 		caption_offset += pane.icon.GetWidth() + px3;
+ 	}
+ 
+-- 
+2.34.1
+

diff --git a/games-util/slade/slade-3.2.0.ebuild b/games-util/slade/slade-3.2.0.ebuild
new file mode 100644
index 000000000000..76979d24ed46
--- /dev/null
+++ b/games-util/slade/slade-3.2.0.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LUA_COMPAT=( lua5-{1..3} )
+WX_GTK_VER="3.0-gtk3"
+
+inherit cmake lua-single wxwidgets
+
+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}"
+
+DEPEND="
+	${LUA_DEPS}
+	app-arch/bzip2:=
+	dev-libs/libfmt:=
+	>=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}[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-bundled-libs.patch
+	"${FILESDIR}"/${PN}-3.2.0_beta2-fluidsynth-driver.patch
+	"${FILESDIR}"/${PN}-3.2.0-wx3.0.patch
+)
+
+src_prepare() {
+	cmake_src_prepare
+
+	# Delete bundled libraries just in case.
+	rm -r thirdparty/dumb/ || 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_SFML_RENDERWINDOW=ON
+		-DWX_GTK3=ON
+	)
+
+	setup-wxwidgets
+	cmake_src_configure
+}


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: games-util/slade/, games-util/slade/files/
@ 2022-06-28  8:17 James Le Cuirot
  0 siblings, 0 replies; 5+ messages in thread
From: James Le Cuirot @ 2022-06-28  8:17 UTC (permalink / raw
  To: gentoo-commits

commit:     e2c805c2acecbae4a7920d6b9b5b9ca2254f3e23
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 28 08:11:09 2022 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Tue Jun 28 08:14:53 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e2c805c2

games-util/slade: Bump to 3.2.1, drop old 3.2.0

Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 games-util/slade/Manifest                          |  2 +-
 games-util/slade/files/slade-3.2.0-wx3.0.patch     | 66 ----------------------
 .../{slade-3.2.0.ebuild => slade-3.2.1.ebuild}     |  1 -
 3 files changed, 1 insertion(+), 68 deletions(-)

diff --git a/games-util/slade/Manifest b/games-util/slade/Manifest
index 893f5cf476e8..bb06ceb8def6 100644
--- a/games-util/slade/Manifest
+++ b/games-util/slade/Manifest
@@ -1 +1 @@
-DIST slade-3.2.0.tar.gz 6464839 BLAKE2B 8e13f153c64526784bd5fa3d03520942d9dbc1b0b0d1e4d0650fb91ed63a7f860655f5d580b4c0a04a52aa98f617b1f4448f47cd1e55c1b3f78fc552b8101654 SHA512 916be3b9556e76ca815514bb472335af80a72bfb8ecd0ae4287db2c0d6ad092a8ada1b335762f8589d300b1fd81adbdede3e6c315cfdc1d49b1624294b405b92
+DIST slade-3.2.1.tar.gz 6471666 BLAKE2B 17a4f2ec23699a56d4fd970605d7141d3f4593f7ced6fff205c87d9ecddc7b90e6da2991aeea32bd008e24cdfee95b7c16946f78b2701c94e51266afd78863d6 SHA512 b7d5a91c759c5a68af63aa9a8412452a5b2986e70f7189ca92ee99ce4953ef47381be907c8ce1166e479f24679904bf5f0e0b1a5da846fe7873c5b97f4315449

diff --git a/games-util/slade/files/slade-3.2.0-wx3.0.patch b/games-util/slade/files/slade-3.2.0-wx3.0.patch
deleted file mode 100644
index 2e519b45181b..000000000000
--- a/games-util/slade/files/slade-3.2.0-wx3.0.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-From 45537095187cb5b985713e7558a230651b599589 Mon Sep 17 00:00:00 2001
-From: Simon Judd <sirjuddington@gmail.com>
-Date: Thu, 14 Apr 2022 21:52:16 -0700
-Subject: [PATCH] Keep up wx3.0 compatibility
-
-I'd like to drop it ideally, but for now it'll stay
-
-Fix #1336
----
- src/Graphics/Icons.cpp | 15 +++++++++++++++
- src/UI/SAuiTabArt.cpp  |  5 ++++-
- 2 files changed, 19 insertions(+), 1 deletion(-)
-
-diff --git a/src/Graphics/Icons.cpp b/src/Graphics/Icons.cpp
-index 61d5475c..67147f7e 100644
---- a/src/Graphics/Icons.cpp
-+++ b/src/Graphics/Icons.cpp
-@@ -373,7 +373,22 @@ wxBitmap loadPNGIcon(const IconDef& icon, int size, Point2i padding)
- bool icons::loadIcons()
- {
- 	// Check for dark mode
-+#if wxMAJOR_VERSION >= 3 && wxMINOR_VERSION >= 1
- 	ui_icons_dark = wxSystemSettings::GetAppearance().IsDark();
-+#else
-+	auto fg = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT);
-+	auto fg_r = fg.Red();
-+	auto fg_g = fg.Green();
-+	auto fg_b = fg.Blue();
-+	auto bg = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW);
-+	auto bg_r = bg.Red();
-+	auto bg_g = bg.Green();
-+	auto bg_b = bg.Blue();
-+	wxColour::MakeGrey(&fg_r, &fg_g, &fg_b);
-+	wxColour::MakeGrey(&bg_r, &bg_g, &bg_b);
-+	log::info("DARK MODE CHECK: FG {} BG {}", fg_r, bg_r);
-+	ui_icons_dark = fg_r > bg_r;
-+#endif
- 
- 	// Get slade.pk3
- 	auto* res_archive = app::archiveManager().programResourceArchive();
-diff --git a/src/UI/SAuiTabArt.cpp b/src/UI/SAuiTabArt.cpp
-index 15aad09e..240de8b9 100644
---- a/src/UI/SAuiTabArt.cpp
-+++ b/src/UI/SAuiTabArt.cpp
-@@ -542,6 +542,7 @@ void SAuiDockArt::DrawCaption(wxDC& dc, wxWindow* window, const wxString& text,
- 	int caption_offset = 0;
- 	if (pane.icon.IsOk())
- 	{
-+#if wxMAJOR_VERSION >= 3 && wxMINOR_VERSION >= 1
- 	    // Ensure the icon fits into the title bar.
- 	    wxSize iconSize = pane.icon.GetSize();
- 	    if (iconSize.y > rect.height)
-@@ -554,7 +555,9 @@ void SAuiDockArt::DrawCaption(wxDC& dc, wxWindow* window, const wxString& text,
- 	    dc.DrawBitmap(pane.icon,
- 	                  rect.x+xOffset, rect.y+(rect.height-pane.icon.GetHeight())/2,
- 	                  true);
--
-+#else
-+		DrawIcon(dc, rect, pane);
-+#endif
- 		caption_offset += pane.icon.GetWidth() + px3;
- 	}
- 
--- 
-2.34.1
-

diff --git a/games-util/slade/slade-3.2.0.ebuild b/games-util/slade/slade-3.2.1.ebuild
similarity index 97%
rename from games-util/slade/slade-3.2.0.ebuild
rename to games-util/slade/slade-3.2.1.ebuild
index 76979d24ed46..e68c8e1e1a4e 100644
--- a/games-util/slade/slade-3.2.0.ebuild
+++ b/games-util/slade/slade-3.2.1.ebuild
@@ -48,7 +48,6 @@ S="${WORKDIR}/${PN^^}-${MY_PV}"
 PATCHES=(
 	"${FILESDIR}"/${PN}-3.2.0-bundled-libs.patch
 	"${FILESDIR}"/${PN}-3.2.0_beta2-fluidsynth-driver.patch
-	"${FILESDIR}"/${PN}-3.2.0-wx3.0.patch
 )
 
 src_prepare() {


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: games-util/slade/, games-util/slade/files/
@ 2022-08-16 12:18 James Le Cuirot
  0 siblings, 0 replies; 5+ messages in thread
From: James Le Cuirot @ 2022-08-16 12:18 UTC (permalink / raw
  To: gentoo-commits

commit:     1a1fe067379a48c4b329c99db390f75f154a788c
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 16 12:18:08 2022 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Tue Aug 16 12:18:08 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1a1fe067

games-util/slade: Unbundle fmt library, fixing broken SONAME

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

 .../slade/files/slade-3.2.0-bundled-libs.patch     | 176 ++++++++++++++++-----
 .../{slade-3.2.1.ebuild => slade-3.2.1-r1.ebuild}  |   5 +-
 2 files changed, 141 insertions(+), 40 deletions(-)

diff --git a/games-util/slade/files/slade-3.2.0-bundled-libs.patch b/games-util/slade/files/slade-3.2.0-bundled-libs.patch
index c4eae37f945f..c543f09e3fae 100644
--- a/games-util/slade/files/slade-3.2.0-bundled-libs.patch
+++ b/games-util/slade/files/slade-3.2.0-bundled-libs.patch
@@ -1,17 +1,7 @@
-From 5ecc80d27276ba978b8c0268aab722fe8f09b394 Mon Sep 17 00:00:00 2001
-From: James Le Cuirot <chewi@gentoo.org>
-Date: Sat, 20 Feb 2021 12:22:24 +0000
-Subject: [PATCH] Unbundle the DUMB library
-
----
- src/Application/App.cpp   | 2 +-
- src/Audio/ModMusic.cpp    | 2 +-
- src/CMakeLists.txt        | 4 +++-
- thirdparty/CMakeLists.txt | 1 -
- 4 files changed, 5 insertions(+), 4 deletions(-)
+https://github.com/sirjuddington/SLADE/pull/1413
 
 diff --git a/src/Application/App.cpp b/src/Application/App.cpp
-index 936a8212..2960ca1d 100644
+index dddaf875..ede8d73c 100644
 --- a/src/Application/App.cpp
 +++ b/src/Application/App.cpp
 @@ -60,7 +60,7 @@
@@ -21,7 +11,7 @@ index 936a8212..2960ca1d 100644
 -#include "thirdparty/dumb/dumb.h"
 +#include <dumb.h>
  #include <filesystem>
- 
+
  using namespace slade;
 diff --git a/src/Audio/ModMusic.cpp b/src/Audio/ModMusic.cpp
 index cc4b60cf..6d54516d 100644
@@ -33,45 +23,126 @@ index cc4b60cf..6d54516d 100644
  #include "ModMusic.h"
 -#include "thirdparty/dumb/dumb.h"
 +#include <dumb.h>
- 
+
  using namespace slade;
  using namespace audio;
 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
-index fef3d009..5363802c 100644
+index fef3d009..00dbb018 100644
 --- a/src/CMakeLists.txt
 +++ b/src/CMakeLists.txt
-@@ -107,6 +107,7 @@ if (NOT NO_LUA)
- 	find_package(Lua REQUIRED)
- endif()
- find_package(MPG123 REQUIRED)
-+pkg_check_modules(DUMB REQUIRED dumb>=1.0)
- include_directories(
- 	${FREEIMAGE_INCLUDE_DIR}
- 	${SFML_INCLUDE_DIR}
-@@ -114,9 +115,9 @@ include_directories(
- 	${FTGL_INCLUDE_DIR}
- 	${LUA_INCLUDE_DIR}
+@@ -116,7 +116,6 @@ include_directories(
  	${MPG123_INCLUDE_DIR}
-+	${DUMB_INCLUDE_DIRS}
  	.
  	..
 -	../thirdparty/dumb
  	../thirdparty/glad/include
  	./Application
  	)
-@@ -201,6 +202,7 @@ target_link_libraries(slade
- 	${OPENGL_LIBRARIES}
- 	${LUA_LIBRARIES}
- 	${MPG123_LIBRARIES}
-+	${DUMB_LIBRARIES}
- )
- 
- if(LINUX)
+@@ -235,7 +234,7 @@ else(APPLE)
+ 		install(FILES "${SLADE_OUTPUT_DIR}/slade.pk3"
+ 			DESTINATION share/slade3
+ 			)
+-
++
+ 		install(FILES "${PROJECT_SOURCE_DIR}/dist/res/logo_icon.png"
+ 			DESTINATION share/icons/
+ 			RENAME net.mancubus.SLADE.png
+diff --git a/src/General/CVar.cpp b/src/General/CVar.cpp
+index 460a7852..5e171446 100644
+--- a/src/General/CVar.cpp
++++ b/src/General/CVar.cpp
+@@ -32,7 +32,7 @@
+ // -----------------------------------------------------------------------------
+ #include "Main.h"
+ #include "Utility/StringUtils.h"
+-#include "thirdparty/fmt/include/fmt/format.h"
++#include <fmt/format.h>
+
+ using namespace slade;
+
+diff --git a/src/General/Log.cpp b/src/General/Log.cpp
+index 9ad0718f..8d39f644 100644
+--- a/src/General/Log.cpp
++++ b/src/General/Log.cpp
+@@ -31,8 +31,8 @@
+ // -----------------------------------------------------------------------------
+ #include "Main.h"
+ #include "App.h"
+-#include "thirdparty/fmt/include/fmt/chrono.h"
+-#include "thirdparty/fmt/include/fmt/format.h"
++#include <fmt/chrono.h>
++#include <fmt/format.h>
+ #include <fstream>
+
+ using namespace slade;
+diff --git a/src/TextEditor/TextStyle.cpp b/src/TextEditor/TextStyle.cpp
+index 09f4e405..ad51ec0a 100644
+--- a/src/TextEditor/TextStyle.cpp
++++ b/src/TextEditor/TextStyle.cpp
+@@ -43,7 +43,7 @@
+ #include "Utility/Parser.h"
+ #include "Utility/StringUtils.h"
+ #include "Utility/Tokenizer.h"
+-#include "thirdparty/fmt/include/fmt/format.h"
++#include <fmt/format.h>
+
+ using namespace slade;
+
+diff --git a/src/UI/Browser/BrowserItem.cpp b/src/UI/Browser/BrowserItem.cpp
+index 89c0f39c..3f056f71 100644
+--- a/src/UI/Browser/BrowserItem.cpp
++++ b/src/UI/Browser/BrowserItem.cpp
+@@ -126,7 +126,7 @@ void BrowserItem::draw(
+ 		// Create text box if needed
+ 		if (!text_box_)
+ 			text_box_ = std::make_unique<TextBox>(
+-				fmt::format("{}\n{}", index_, name_.c_str()), font, ui::scalePx(144), ui::scalePx(16));
++				fmt::format("{}\n{}", index_, name_.mb_str()), font, ui::scalePx(144), ui::scalePx(16));
+
+ 		int top = y;
+ 		top += ((size - text_box_->height()) * 0.5);
+diff --git a/src/UI/SToolBar/SToolBar.cpp b/src/UI/SToolBar/SToolBar.cpp
+index f38710ad..c002bf97 100644
+--- a/src/UI/SToolBar/SToolBar.cpp
++++ b/src/UI/SToolBar/SToolBar.cpp
+@@ -219,7 +219,7 @@ void SToolBarGroup::hide(bool hide)
+
+ 	// Update 'hidden toolbars' cvar
+ 	string tb_hidden = toolbars_hidden;
+-	auto   name      = fmt::format("[{}]", name_.c_str());
++	auto   name      = fmt::format("[{}]", name_.mb_str());
+ 	if (hide)
+ 		tb_hidden += name;
+ 	else
+diff --git a/src/common.h b/src/common.h
+index 8c3c4b3b..d66cbc04 100644
+--- a/src/common.h
++++ b/src/common.h
+@@ -129,7 +129,7 @@
+ #endif
+
+ // fmt
+-#include "thirdparty/fmt/include/fmt/core.h"
++#include <fmt/core.h>
+
+ // Sigslot
+ #include "thirdparty/sigslot/signal.hpp"
 diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt
-index f84cfc8a..2622852b 100644
+index f84cfc8a..6cb9e0af 100644
 --- a/thirdparty/CMakeLists.txt
 +++ b/thirdparty/CMakeLists.txt
-@@ -10,7 +10,6 @@ set(BZIP2_LIBRARIES ${BZIP2_LIBRARIES} PARENT_SCOPE)
+@@ -6,20 +6,33 @@ find_package(BZip2 REQUIRED)
+ set(ZLIB_LIBRARY ${ZLIB_LIBRARY} PARENT_SCOPE)
+ set(BZIP2_LIBRARIES ${BZIP2_LIBRARIES} PARENT_SCOPE)
+
++option(USE_SYSTEM_DUMB "Use system DUMB library" OFF)
++if(USE_SYSTEM_DUMB)
++	pkg_check_modules(DUMB REQUIRED IMPORTED_TARGET dumb>=1.0)
++else()
++	file(GLOB_RECURSE DUMB_SOURCES dumb/*.c)
++endif()
++
+ # Roll the rest up into a big ball and compile it by itself
  set(EXTERNAL_SOURCES
  )
  file(GLOB_RECURSE EXTERNAL_SOURCES
@@ -79,6 +150,33 @@ index f84cfc8a..2622852b 100644
  	lzma/C/LzmaDec.c
  	mus2mid/mus2mid.cpp
  	zreaders/*.cpp
--- 
-2.34.1
+ 	glad/src/*.c
++	${DUMB_SOURCES}
+ 	${SLADE_HEADERS}
+ 	)
+
+ # Add fmt
+-add_subdirectory(fmt)
++option(USE_SYSTEM_FMT "Use system fmt library" OFF)
++if(USE_SYSTEM_FMT)
++	find_package(fmt REQUIRED)
++else()
++	add_subdirectory(fmt)
++	target_include_directories(fmt INTERFACE ${CMAKE_CURRENT_LIST_DIR}/fmt/include)
++endif()
+
+ # Add lunasvg
+ add_library(lunasvg STATIC)
+@@ -29,5 +42,11 @@ add_subdirectory(lunasvg/3rdparty/software)
+ add_subdirectory(lunasvg/3rdparty/plutovg)
 
+ add_library(external STATIC ${EXTERNAL_SOURCES})
+-target_link_libraries(external ${ZLIB_LIBRARY} lunasvg fmt ${CMAKE_DL_LIBS})
++target_link_libraries(external ${ZLIB_LIBRARY} lunasvg fmt::fmt ${CMAKE_DL_LIBS})
+ set(EXTERNAL_LIBRARIES external PARENT_SCOPE)
++
++if(USE_SYSTEM_DUMB)
++	target_link_libraries(external PkgConfig::DUMB)
++else()
++	target_include_directories(external PUBLIC ${CMAKE_CURRENT_LIST_DIR}/dumb)
++endif()

diff --git a/games-util/slade/slade-3.2.1.ebuild b/games-util/slade/slade-3.2.1-r1.ebuild
similarity index 93%
rename from games-util/slade/slade-3.2.1.ebuild
rename to games-util/slade/slade-3.2.1-r1.ebuild
index e68c8e1e1a4e..285ef98db6f9 100644
--- a/games-util/slade/slade-3.2.1.ebuild
+++ b/games-util/slade/slade-3.2.1-r1.ebuild
@@ -54,7 +54,7 @@ src_prepare() {
 	cmake_src_prepare
 
 	# Delete bundled libraries just in case.
-	rm -r thirdparty/dumb/ || die
+	rm -r thirdparty/dumb/ thirdparty/fmt/ || die
 
 }
 
@@ -66,9 +66,12 @@ src_configure() {
 		-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
 	)
 


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-08-16 12:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-16 12:18 [gentoo-commits] repo/gentoo:master commit in: games-util/slade/, games-util/slade/files/ James Le Cuirot
  -- strict thread matches above, loose matches on Subject: below --
2022-06-28  8:17 James Le Cuirot
2022-04-16  8:09 James Le Cuirot
2021-02-24 20:47 James Le Cuirot
2020-05-31 21:12 James Le Cuirot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox