summaryrefslogtreecommitdiff
path: root/games-util/slade
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-06-13 10:39:22 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-06-13 10:39:22 +0100
commit9452a6e87b6c2c70513bc47a2470bf9f1168920e (patch)
tree8ac67e26b45f34d71c5aab3621813b100a0d5f00 /games-util/slade
parentf516638b7fe9592837389826a6152a7e1b251c54 (diff)
gentoo resync : 13.06.2020
Diffstat (limited to 'games-util/slade')
-rw-r--r--games-util/slade/Manifest8
-rw-r--r--games-util/slade/files/slade-3.1.12a-bundled-libs.patch80
-rw-r--r--games-util/slade/files/slade-3.1.12a-fluidsynth-driver.patch14
-rw-r--r--games-util/slade/files/slade-3.1.12a-freetype-deps.patch74
-rw-r--r--games-util/slade/files/slade-3.1.12a-sfml-gtk3.patch88
-rw-r--r--games-util/slade/files/slade-3.1.12a-wxGLCanvas.patch112
-rw-r--r--games-util/slade/metadata.xml14
-rw-r--r--games-util/slade/slade-3.1.12a.ebuild67
8 files changed, 457 insertions, 0 deletions
diff --git a/games-util/slade/Manifest b/games-util/slade/Manifest
new file mode 100644
index 000000000000..268152481619
--- /dev/null
+++ b/games-util/slade/Manifest
@@ -0,0 +1,8 @@
+AUX slade-3.1.12a-bundled-libs.patch 2424 BLAKE2B fbd40c43b396d9d82fc4ce8af75a23ebfb2cfe85d3a217680b219601e02fdcc58e158052249b2e4d949742643d1b6efda9e38c7b44c1932f163e8a66ebfa818e SHA512 31706d662b25f5c0cbf618970de874da27c48390421809da2462b909d8d207b856c56e212b3efa13c78d6048f3619fd74a95d9c25c87ee6c8a481e36e7f695bf
+AUX slade-3.1.12a-fluidsynth-driver.patch 541 BLAKE2B a8596e7c65014201eee1d87b7779d78b582338b35447d4722341176a507314cae2977d254d7a948e2207ba619a2aa6a443303fbf6546ac10da23243e23f96e35 SHA512 002f44606a9efc1f6b299353d29e133cf84a2bd13e6eb37f601365ce55d03037f4db94c569c0dd0bd7bc97ea5701714ecc5d9e83a374cfe988deb8b3d13bcb9c
+AUX slade-3.1.12a-freetype-deps.patch 2207 BLAKE2B 48ae8033f80c6438db6af26f8c8105c663ef7133b7e4560d7df82588afdd771bdf0df30678a5148456338254cef5e3e0d805d4f23f4a5facc6272cd65cb00925 SHA512 f03f57d9e76f283bde48d48904ae9ff4759b472e78efc01f40d24427a6a27114e36e27e4ad7b3f9ebb149c5b600b0540e901eef8dcd5f30949af95810255ebd9
+AUX slade-3.1.12a-sfml-gtk3.patch 2524 BLAKE2B 0bdd400ba218d1c0a0db48a3ab144b6083c22fcc69d112765aeda069853c03a97c4f774d24cb73c1bb202089eb8184435a121a0473f5914d17ee208bdf181a4d SHA512 b83c27f224c45533738d8341ac7116e226ae45e13514b9dca85f5813d73c2b1f13460961ea8fbbbe8acb40ab80d37100f3c66abc7df4b49abeabba1ffa8fa70c
+AUX slade-3.1.12a-wxGLCanvas.patch 3768 BLAKE2B b69e84d4c31c7f46c9298f282f4407c10edaf77ec73ccea780f3a9dddbcd89bd315e327716dee8432a27e8150133b42a6a819c8af7b8567980941c79a8b7a138 SHA512 5ae7d5e91012a3e526fe95003cfbcfcb69de9636b453018a654da50af11772c2be4690f36786634e8941d011f8094093fa2a7e8ac1d099a0627e93e1ee47b863
+DIST slade-3.1.12a.tar.gz 5883702 BLAKE2B 400cf032bf0b60555b45b450c524d85f145d593d74601461f33fa571360a0c66a1d5933a7d48e8cfad98981bcf446df213240f53da237be6d9a1ce09517c4566 SHA512 ecedec880b8ebed921e152d016a451164efd4de90ae69963be077d1ef39326670254ca8eb03e1045ca7ae5b02f7512dbbe712f83c845cbbd4ed787a90899ad13
+EBUILD slade-3.1.12a.ebuild 1391 BLAKE2B 36c2bb38430d78af113f0408c428ece5af94bff7fe2d89440f17cf39cf7e3f978d1757a0b739da0f424be346edd6e3e33307750056acd91105eff0a3429c7204 SHA512 e62795cbdd0e197f78407e1ed207d5cce2c4ef1d9cc8c95bcadc9840320844dfc48161bca4ed6e7a2d6ba0c94cf884b2844c554c70f9acd4fe4194b261bd2cd1
+MISC metadata.xml 456 BLAKE2B bb0657015b0259912543f091f7e08695a3bba37da01594f9979c71d435bd1505790f009d827cd654267b96de446666c4eca7c564962e35563eff26027b30e119 SHA512 e6cc7225d2bcf85aaf62158fdfb7b92f2816f4363795f7b82293f932efc4182275979117a2673242f7c666d26036a1de1a6caaab0c3a48e19ca00b639007f272
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 000000000000..6e8285d81056
--- /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 000000000000..c0ef70d6dfc8
--- /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 000000000000..33fdbfe8521c
--- /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 000000000000..745a41d64b80
--- /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 000000000000..64698cc4591d
--- /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 000000000000..9312c313b00b
--- /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 000000000000..641a17fb0105
--- /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}[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
+}