SHA256
1
0
forked from pool/slade

Compare commits

...

7 Commits

Author SHA256 Message Date
Ana Guerrero
09f019436d Accepting request 1228587 from games:tools
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/1228587
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/slade?expand=0&rev=16
2024-12-06 13:26:06 +00:00
OBS User unknown
517b679cdf [info=660aab5cf295b570fdec6cb717962d47960d9db53e8bd082b26e19b0b4a2bb89]
OBS-URL: https://build.opensuse.org/package/show/games:tools/slade?expand=0&rev=49
2024-11-28 20:45:42 +00:00
OBS User unknown
4febfd3150 [info=c54c8654e835f3914bed4556799cc04785968d12bb30e89ef503c755df608b89]
OBS-URL: https://build.opensuse.org/package/show/games:tools/slade?expand=0&rev=48
2024-11-27 22:31:46 +00:00
OBS User unknown
a6d7ea9a85 [info=ae3a81c72830eaea789c5acec04582893b2059d8060a8fa981fe3e682d3edd15]
OBS-URL: https://build.opensuse.org/package/show/games:tools/slade?expand=0&rev=47
2024-11-27 20:48:53 +00:00
OBS User unknown
80a871a0bf [info=2cdd65b84473dbea37548c24060ae134a7276999e6af045d084f919072b40ccd]
OBS-URL: https://build.opensuse.org/package/show/games:tools/slade?expand=0&rev=46
2024-11-27 18:03:40 +00:00
95bbd13df6 [info=7968d9c2a230f8cd2caf90abd31d4ad81e55a88779bbc57b8dd9f6585583fbe7]
OBS-URL: https://build.opensuse.org/package/show/games:tools/slade?expand=0&rev=45
2024-11-27 16:37:19 +00:00
6afcedf9d0 NOTE: This is untested!
- Update to version 3.2.6:
  * Please see Release Notes upstream at
    https://github.com/sirjuddington/SLADE/releases
- Drop patches fixed upstream:
  * disable_sse.patch
  * 0001-build-add-cmake-option-to-skip-Lua-components-1175.patch
- Disable patches that needs rebase or dropping:
  * basepk3.diff
  * wx.diff
  * clzma.diff
- Rebase  0001-build-allow-deactivating-the-crash-handler-at-build-.patch
- Replace wxWidgets-3_0-devel for wxWidgets-devel BuildRequires:
  Package builds just fine with the newer 3.2 version.
- Add pkgconfig(libmpg123) BuildRequires: New dependency.

OBS-URL: https://build.opensuse.org/package/show/games:tools/slade?expand=0&rev=44
2024-11-27 16:03:11 +00:00
12 changed files with 151 additions and 334 deletions

View File

@ -1,231 +0,0 @@
From a54f12b4c29e949458949d5bede2f74b1aa8a34a Mon Sep 17 00:00:00 2001
From: jengelh <jengelh@inai.de>
Date: Mon, 29 Jun 2020 03:43:01 +0200
Subject: [PATCH] build: add cmake option to skip Lua components (#1175)
sol.hpp has a lot of templates which, when building with -g
-fsanitize=address -fsanitize=undefined, incur long compile time and
high memory usage (~8500MB) [applies to Scripting/Export/Archive.cpp
and Scripting/Export/Graphics.cpp].
Add a cmake option so I can skip building some parts and focus on
the rest.
Co-authored-by: Simon Judd <sirjuddington@gmail.com>
---
src/Application/App.cpp | 8 ++++++++
src/CMakeLists.txt | 11 ++++++++++-
src/MainEditor/UI/ArchivePanel.cpp | 10 ++++++++++
src/MainEditor/UI/MainWindow.cpp | 2 ++
src/MapEditor/UI/MapEditorWindow.cpp | 6 ++++++
5 files changed, 36 insertions(+), 1 deletion(-)
Index: SLADE-3.1.12/src/Application/App.cpp
===================================================================
--- SLADE-3.1.12.orig/src/Application/App.cpp
+++ SLADE-3.1.12/src/Application/App.cpp
@@ -450,8 +450,10 @@ bool App::init(vector<string>& args, dou
SAction::setBaseWxId(26000);
SAction::initActions();
+#ifdef USE_LUA
// Init lua
Lua::init();
+#endif
// Init UI
UI::init(ui_scale);
@@ -515,8 +517,10 @@ bool App::init(vector<string>& args, dou
Log::info("Loading game configurations");
Game::init();
+#ifdef USE_LUA
// Init script manager
ScriptManager::init();
+#endif
// Show the main window
MainEditor::windowWx()->Show(true);
@@ -644,8 +648,10 @@ void App::exit(bool save_config)
// Save custom special presets
Game::saveCustomSpecialPresets();
+#ifdef USE_LUA
// Save custom scripts
ScriptManager::saveUserScripts();
+#endif
}
// Close all open archives
@@ -666,8 +672,10 @@ void App::exit(bool save_config)
files = temp.GetNext(&filename);
}
+#ifdef USE_LUA
// Close lua
Lua::close();
+#endif
// Close DUMB
dumb_exit();
Index: SLADE-3.1.12/src/CMakeLists.txt
===================================================================
--- SLADE-3.1.12.orig/src/CMakeLists.txt
+++ SLADE-3.1.12/src/CMakeLists.txt
@@ -105,6 +105,9 @@ find_package(OpenGL REQUIRED)
find_package(GLEW REQUIRED)
find_package(Freetype REQUIRED)
find_package(CURL REQUIRED)
+if (NOT NO_LUA)
+ find_package(Lua REQUIRED)
+endif()
include_directories(
${FREEIMAGE_INCLUDE_DIR}
${SFML_INCLUDE_DIR}
@@ -133,6 +136,7 @@ endif ()
set(SLADE_SOURCES
)
+set(SLADE_SCRIPTING_SOURCES)
# Don't include external libraries here as they should be compiled separately
file(GLOB_RECURSE SLADE_SOURCES
Application/*.cpp
@@ -147,9 +151,14 @@ file(GLOB_RECURSE SLADE_SOURCES
OpenGL/*.cpp
UI/*.cpp
Utility/*.cpp
- Scripting/*.cpp
TextEditor/*.cpp
)
+if (NOT NO_LUA)
+ file(GLOB_RECURSE SLADE_SCRIPTING_SOURCES Scripting/*.cpp)
+ set(SLADE_SOURCES ${SLADE_SOURCES} ${SLADE_SCRIPTING_SOURCES})
+ ADD_DEFINITIONS(-DUSE_LUA)
+else ()
+endif ()
set(SLADE_HEADERS
)
file(GLOB_RECURSE SLADE_HEADERS *.h *.hpp)
Index: SLADE-3.1.12/src/MainEditor/UI/ArchivePanel.cpp
===================================================================
--- SLADE-3.1.12.orig/src/MainEditor/UI/ArchivePanel.cpp
+++ SLADE-3.1.12/src/MainEditor/UI/ArchivePanel.cpp
@@ -522,7 +522,9 @@ void ArchivePanel::addMenus()
SAction::fromId("arch_replace_maps")->addToMenu(menu_clean);
menu_archive->AppendSubMenu(menu_clean, "&Maintenance");
auto menu_scripts = new wxMenu();
+#ifdef USE_LUA
ScriptManager::populateEditorScriptMenu(menu_scripts, ScriptManager::ScriptType::Archive, "arch_script");
+#endif
menu_archive->AppendSubMenu(menu_scripts, "&Run Script");
}
if (!menu_entry)
@@ -546,7 +548,9 @@ void ArchivePanel::addMenus()
menu_entry->AppendSeparator();
SAction::fromId("arch_entry_bookmark")->addToMenu(menu_entry);
auto menu_scripts = new wxMenu();
+#ifdef USE_LUA
ScriptManager::populateEditorScriptMenu(menu_scripts, ScriptManager::ScriptType::Entry, "arch_entry_script");
+#endif
menu_entry->AppendSubMenu(menu_scripts, "&Run Script");
}
@@ -3189,9 +3193,11 @@ bool ArchivePanel::handleAction(string i
dlg.ShowModal();
}
+#ifdef USE_LUA
// Archive->Scripts->...
else if (id == "arch_script")
ScriptManager::runArchiveScript(archive_, wx_id_offset);
+#endif
// ------------------------------------------------------------------------
@@ -3269,9 +3275,11 @@ bool ArchivePanel::handleAction(string i
else if (id == "arch_entry_openext")
openEntryExternal();
+#ifdef USE_LUA
// Entry->Run Script
else if (id == "arch_entry_script")
ScriptManager::runEntryScript(entry_list_->getSelectedEntries(), wx_id_offset, MainEditor::windowWx());
+#endif
// Context menu actions
@@ -3785,6 +3793,7 @@ void ArchivePanel::onEntryListRightClick
#endif
}
+#ifdef USE_LUA
// Entry scripts
if (!ScriptManager::editorScripts(ScriptManager::ScriptType::Entry).empty())
{
@@ -3793,6 +3802,7 @@ void ArchivePanel::onEntryListRightClick
context.AppendSeparator();
context.AppendSubMenu(menu_scripts, "Run &Script");
}
+#endif
// Popup the context menu
PopupMenu(&context);
Index: SLADE-3.1.12/src/MainEditor/UI/MainWindow.cpp
===================================================================
--- SLADE-3.1.12.orig/src/MainEditor/UI/MainWindow.cpp
+++ SLADE-3.1.12/src/MainEditor/UI/MainWindow.cpp
@@ -661,12 +661,14 @@ bool MainWindow::handleAction(string id)
if (id == "main_showstartpage")
openStartPageTab();
+#ifdef USE_LUA
// Tools->Run Script
if (id == "main_runscript")
{
ScriptManager::open();
return true;
}
+#endif
// Help->About
if (id == "main_about")
Index: SLADE-3.1.12/src/MapEditor/UI/MapEditorWindow.cpp
===================================================================
--- SLADE-3.1.12.orig/src/MapEditor/UI/MapEditorWindow.cpp
+++ SLADE-3.1.12/src/MapEditor/UI/MapEditorWindow.cpp
@@ -269,7 +269,9 @@ void MapEditorWindow::setupMenu()
// Tools menu
wxMenu* menu_tools = new wxMenu("");
menu_scripts_ = new wxMenu();
+#ifdef USE_LUA
ScriptManager::populateEditorScriptMenu(menu_scripts_, ScriptManager::ScriptType::Map, "mapw_script");
+#endif
menu_tools->AppendSubMenu(menu_scripts_, "Run Script");
SAction::fromId("mapw_runscript")->addToMenu(menu_tools);
menu->Append(menu_tools, "&Tools");
@@ -1136,7 +1138,9 @@ void MapEditorWindow::reloadScriptsMenu(
while (menu_scripts_->FindItemByPosition(0))
menu_scripts_->Delete(menu_scripts_->FindItemByPosition(0));
+#ifdef USE_LUA
ScriptManager::populateEditorScriptMenu(menu_scripts_, ScriptManager::ScriptType::Map, "mapw_script");
+#endif
}
// ----------------------------------------------------------------------------
@@ -1436,6 +1440,7 @@ bool MapEditorWindow::handleAction(strin
return true;
}
+#ifdef USE_LUA
// Tools->Run Script
else if (id == "mapw_script")
{
@@ -1449,6 +1454,7 @@ bool MapEditorWindow::handleAction(strin
ScriptManager::open();
return true;
}
+#endif
return false;
}

View File

@ -14,16 +14,15 @@ SLADE's own crash handler has two problems:
Fixes: #1166 Fixes: #1166
--- ---
COMPILE.md | 1 + src/Application/SLADEWxApp.cpp | 2 +-
src/Application/SLADEWxApp.cpp | 2 +- src/CMakeLists.txt | 4 ++++
src/CMakeLists.txt | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-)
3 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/Application/SLADEWxApp.cpp b/src/Application/SLADEWxApp.cpp Index: SLADE-3.2.6/src/Application/SLADEWxApp.cpp
index 375f62b8..d9196355 100644 ===================================================================
--- a/src/Application/SLADEWxApp.cpp --- SLADE-3.2.6.orig/src/Application/SLADEWxApp.cpp
+++ b/src/Application/SLADEWxApp.cpp +++ SLADE-3.2.6/src/Application/SLADEWxApp.cpp
@@ -523,7 +523,7 @@ bool SLADEWxApp::OnInit() @@ -449,7 +449,7 @@ bool SLADEWxApp::OnInit()
#endif #endif
// Handle exceptions using wxDebug stuff, but only in release mode // Handle exceptions using wxDebug stuff, but only in release mode
@ -32,21 +31,15 @@ index 375f62b8..d9196355 100644
wxHandleFatalExceptions(true); wxHandleFatalExceptions(true);
#endif #endif
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt Index: SLADE-3.2.6/src/CMakeLists.txt
index 4ce2403d..5eabe4c7 100644 ===================================================================
--- a/src/CMakeLists.txt --- SLADE-3.2.6.orig/src/CMakeLists.txt
+++ b/src/CMakeLists.txt +++ SLADE-3.2.6/src/CMakeLists.txt
@@ -132,6 +132,10 @@ if (NOT NO_FLUIDSYNTH) @@ -41,3 +41,7 @@ if (WIN32 AND MSVC)
include_directories(${FLUIDSYNTH_INCLUDE_DIR}) else ()
endif() include("unix") # Linux or MacOS
endif ()
+if (NOT NO_CRASHHANDLER) +if (NOT NO_CRASHHANDLER)
+ add_definitions(-DUSE_CRASHHANDLER) + add_definitions(-DUSE_CRASHHANDLER)
+endif () +endif ()
+ +
set(SLADE_SOURCES
)
# Don't include external libraries here as they should be compiled separately
--
2.27.0

BIN
3.1.13.tar.gz (Stored with Git LFS)

Binary file not shown.

BIN
3.2.6.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

4
_scmsync.obsinfo Normal file
View File

@ -0,0 +1,4 @@
mtime: 1732826729
commit: 660aab5cf295b570fdec6cb717962d47960d9db53e8bd082b26e19b0b4a2bb89
url: https://src.opensuse.org/jengelh/slade
revision: master

View File

@ -8,23 +8,23 @@ which is not used in Linux distros.)
src/Archive/ArchiveManager.cpp | 4 +--- src/Archive/ArchiveManager.cpp | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-) 1 file changed, 1 insertion(+), 3 deletions(-)
Index: SLADE-3.1.11/src/Archive/ArchiveManager.cpp Index: SLADE-3.2.6/src/Archive/ArchiveManager.cpp
=================================================================== ===================================================================
--- SLADE-3.1.11.orig/src/Archive/ArchiveManager.cpp --- SLADE-3.2.6.orig/src/Archive/ArchiveManager.cpp
+++ SLADE-3.1.11/src/Archive/ArchiveManager.cpp +++ SLADE-3.2.6/src/Archive/ArchiveManager.cpp
@@ -153,14 +153,12 @@ bool ArchiveManager::init() @@ -132,14 +132,12 @@ bool ArchiveManager::init()
} }
// Find slade3.pk3 directory // Find slade3.pk3 directory
- string dir_slade_pk3 = App::path("slade.pk3", App::Dir::Resources); - auto dir_slade_pk3 = app::path("slade.pk3", app::Dir::Resources);
+ string dir_slade_pk3 = App::path("slade.pk3", App::Dir::User); + auto dir_slade_pk3 = app::path("slade.pk3", app::Dir::User);
if (!wxFileExists(dir_slade_pk3)) if (!fileutil::fileExists(dir_slade_pk3))
dir_slade_pk3 = App::path("slade.pk3", App::Dir::Data); dir_slade_pk3 = app::path("slade.pk3", app::Dir::Data);
if (!wxFileExists(dir_slade_pk3)) if (!fileutil::fileExists(dir_slade_pk3))
dir_slade_pk3 = App::path("slade.pk3", App::Dir::Executable); dir_slade_pk3 = app::path("slade.pk3", app::Dir::Executable);
if (!wxFileExists(dir_slade_pk3)) if (!fileutil::fileExists(dir_slade_pk3))
- dir_slade_pk3 = App::path("slade.pk3", App::Dir::User); - dir_slade_pk3 = app::path("slade.pk3", app::Dir::User);
- if (!wxFileExists(dir_slade_pk3)) - if (!fileutil::fileExists(dir_slade_pk3))
dir_slade_pk3 = "slade.pk3"; dir_slade_pk3 = "slade.pk3";
// Open slade.pk3 // Open slade.pk3

3
build.specials.obscpio Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:961a33826b87f6a82bf708e28134394c2ae843741cae83abd58aa41d0d520710
size 256

View File

@ -2,23 +2,30 @@ From: Jan Engelhardt <jengelh@inai.de>
Date: 2020-06-22 21:16:10.343429323 +0200 Date: 2020-06-22 21:16:10.343429323 +0200
Make use of the clzma library in openSUSE. Make use of the clzma library in openSUSE.
[openSUSE-specific patch. I was under the impression that Debian and/or Ubuntu shipped
lzma-sdk-dev too, but, upon checking, do not do so (anymore) as of 2024-11-27.]
--- ---
src/External/CMakeLists.txt | 3 +-- thirdparty/CMakeLists.txt | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-) 1 file changed, 1 insertion(+), 2 deletions(-)
Index: SLADE-3.1.12/src/External/CMakeLists.txt Index: SLADE-3.2.6/thirdparty/CMakeLists.txt
=================================================================== ===================================================================
--- SLADE-3.1.12.orig/src/External/CMakeLists.txt --- SLADE-3.2.6.orig/thirdparty/CMakeLists.txt
+++ SLADE-3.1.12/src/External/CMakeLists.txt +++ SLADE-3.2.6/thirdparty/CMakeLists.txt
@@ -26,10 +26,9 @@ file(GLOB_RECURSE EXTERNAL_SOURCES @@ -17,7 +17,6 @@ endif()
*.cxx set(EXTERNAL_SOURCES
dumb/*.c )
lua/*.c file(GLOB_RECURSE EXTERNAL_SOURCES
- lzma/C/LzmaDec.c - lzma/C/LzmaDec.c
${SLADE_HEADERS} mus2mid/mus2mid.cpp
) zreaders/*.cpp
glad/src/*.c
@@ -43,7 +42,7 @@ add_subdirectory(lunasvg/3rdparty/softwa
add_subdirectory(lunasvg/3rdparty/plutovg)
add_library(external STATIC ${EXTERNAL_SOURCES}) add_library(external STATIC ${EXTERNAL_SOURCES})
-target_link_libraries(external ${ZLIB_LIBRARY} ${wxWidgets_LIBRARIES}) -target_link_libraries(external ${ZLIB_LIBRARY} lunasvg fmt::fmt ${CMAKE_DL_LIBS})
+target_link_libraries(external ${ZLIB_LIBRARY} ${wxWidgets_LIBRARIES} -lclzma) +target_link_libraries(external ${ZLIB_LIBRARY} -lclzma lunasvg fmt::fmt ${CMAKE_DL_LIBS})
set(EXTERNAL_LIBRARIES external PARENT_SCOPE) set(EXTERNAL_LIBRARIES external PARENT_SCOPE)
if(USE_SYSTEM_DUMB)

View File

@ -1,12 +1,43 @@
--- SLADE-3.1.13/src/CMakeLists.txt.orig 2021-06-15 14:13:13.473287606 +0200 From: Jan Engelhardt <ej@inai.de>
+++ SLADE-3.1.13/src/CMakeLists.txt 2021-06-15 14:13:28.233451010 +0200 Date: 2024-11-27 17:12:00 +0100
@@ -159,9 +159,6 @@ if(APPLE) Original-Submitter: guillaume.gardet@opensuse.org
set_source_files_properties(${OSX_ICON} PROPERTIES MACOSX_PACKAGE_LOCATION Resources) Original-Date: 2018-04-18 14:26:53
endif(APPLE)
SSE is not guaranteed to be available on i586.
Testing the compiler for SSE availability is wrong — if anything,
the test needs to happen at runtime.
---
cmake/unix.cmake | 5 -----
thirdparty/dumb/helpers/resampler.c | 2 +-
2 files changed, 1 insertion(+), 6 deletions(-)
Index: SLADE-3.2.6/cmake/unix.cmake
===================================================================
--- SLADE-3.2.6.orig/cmake/unix.cmake
+++ SLADE-3.2.6/cmake/unix.cmake
@@ -150,11 +150,6 @@ endif(APPLE)
-# enable SSE instructions for dumb library # Enable SSE instructions for dumb library
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_USE_SSE -msse") include(CheckCCompilerFlag)
- -check_c_compiler_flag(-msse HAVE_SSE)
if(USE_SANITIZER) -if(HAVE_SSE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address") - add_compile_options(-msse)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address") - add_definitions(-D_USE_SSE)
-endif()
# Enable debug symbols for glib (so gdb debugging works properly with strings etc.)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_GLIBCXX_DEBUG")
Index: SLADE-3.2.6/thirdparty/dumb/helpers/resampler.c
===================================================================
--- SLADE-3.2.6.orig/thirdparty/dumb/helpers/resampler.c
+++ SLADE-3.2.6/thirdparty/dumb/helpers/resampler.c
@@ -2,7 +2,7 @@
#include <string.h>
#define _USE_MATH_DEFINES
#include <math.h>
-#if (defined(_M_IX86) || defined(__i386__) || defined(_M_X64) || defined(__amd64__))
+#if defined(_USE_SSE) && (defined(_M_IX86) || defined(__i386__) || defined(_M_X64) || defined(__amd64__))
#include <xmmintrin.h>
#define RESAMPLER_SSE
#endif

View File

@ -1,3 +1,26 @@
-------------------------------------------------------------------
Wed Nov 27 12:15:46 UTC 2024 - Bjørn Lie <bjorn.lie@gmail.com>
- Update to version 3.2.6:
* Support for vertical toolbars in the UI
* Support creation of Quake PAK archives. Support for reading
WebP and Ion Fury .art files.
* Added EDGE-Classic support
* Added support for Doom 32X map format
* Added support for MBF21 features via new 'Boom + MBF21' port
configuration
* Added missing ZDoom special 107
* mapeditor: Moving a sector now also moves things within it
* ME: Added keybinds to rotate things in 2d mode (< and > by default)
* ME: Added toggleable point light previews in 2D things mode
* Added (experimental, unfinished) 3d floor preview support in
3D mode (turned off by default)
- Drop patches fixed upstream:
* 0001-build-add-cmake-option-to-skip-Lua-components-1175.patch
- Replace wxWidgets-3_0-devel for wxWidgets-devel BuildRequires:
Package builds just fine with the newer 3.2 version.
- Add pkgconfig(libmpg123) BuildRequires: New dependency.
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Feb 26 13:25:20 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org> Mon Feb 26 13:25:20 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>

View File

@ -1,7 +1,7 @@
# #
# spec file for package slade # spec file for package slade
# #
# Copyright (c) 2021 SUSE LLC # Copyright (c) 2024 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -17,7 +17,7 @@
Name: slade Name: slade
Version: 3.1.13 Version: 3.2.6
Release: 0 Release: 0
Summary: An editor for DOOM maps and WAD/PK3 archives Summary: An editor for DOOM maps and WAD/PK3 archives
License: GPL-2.0-or-later License: GPL-2.0-or-later
@ -29,16 +29,14 @@ Patch2: wx.diff
Patch3: clzma.diff Patch3: clzma.diff
Patch4: 0001-build-allow-deactivating-the-crash-handler-at-build-.patch Patch4: 0001-build-allow-deactivating-the-crash-handler-at-build-.patch
Patch10: disable_sse.patch Patch10: disable_sse.patch
Patch11: 0001-build-add-cmake-option-to-skip-Lua-components-1175.patch
# slade 3.2 will need gcc-c++>=8 and pkgconfig(fmt)>=6
BuildRequires: ImageMagick BuildRequires: ImageMagick
BuildRequires: cmake >= 3.1 BuildRequires: cmake >= 3.1
BuildRequires: freeimage-devel BuildRequires: freeimage-devel
BuildRequires: gcc-c++ >= 6 BuildRequires: gcc-c++ >= 8
BuildRequires: pkg-config BuildRequires: pkg-config
BuildRequires: strip-nondeterminism BuildRequires: strip-nondeterminism
BuildRequires: update-desktop-files BuildRequires: update-desktop-files
BuildRequires: wxWidgets-3_0-devel BuildRequires: wxWidgets-devel
BuildRequires: zip BuildRequires: zip
BuildRequires: pkgconfig(clzma) BuildRequires: pkgconfig(clzma)
BuildRequires: pkgconfig(fluidsynth) BuildRequires: pkgconfig(fluidsynth)
@ -46,8 +44,14 @@ BuildRequires: pkgconfig(ftgl)
BuildRequires: pkgconfig(gl) BuildRequires: pkgconfig(gl)
BuildRequires: pkgconfig(glew) BuildRequires: pkgconfig(glew)
BuildRequires: pkgconfig(libcurl) BuildRequires: pkgconfig(libcurl)
BuildRequires: pkgconfig(libmpg123)
BuildRequires: pkgconfig(sfml-all) BuildRequires: pkgconfig(sfml-all)
BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(x11)
%if 0%{?suse_version} >= 1600
BuildRequires: fmt-10-devel
%else
Provides: bundled(fmt) = 10
%endif
Provides: bundled(dumb) = 0.9.3 Provides: bundled(dumb) = 0.9.3
%description %description
@ -57,21 +61,17 @@ game-specific formats, and even convert between some of them, or
from/to other generic formats such as PNG. from/to other generic formats such as PNG.
%prep %prep
%setup -q -n SLADE-%version %autosetup -p1 -n SLADE-%version
%patch -P 1 -P 2 -P 3 -P 4 -p1
%ifnarch %ix86 x86_64
%patch -P 10 -p1
%endif
%if 0%{?suse_version} >= 1550
%patch -P 11 -p1
%endif
%build %build
%define _lto_cflags %nil %define _lto_cflags %nil
%cmake -DNO_WEBVIEW=ON -DWX_GTK3=OFF -DNO_CRASHHANDLER=ON \ %cmake -DNO_WEBVIEW=ON -DWX_GTK3=OFF -DNO_CRASHHANDLER=ON \
-DCMAKE_C_FLAGS_RELWITHDEBINFO:STRING="%optflags" \ -DCMAKE_C_FLAGS_RELWITHDEBINFO:STRING="%optflags" \
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING="%optflags" \ -DCMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING="%optflags" \
-DNO_LUA:BOOL=TRUE %if 0%{?suse_version} >= 1600
-DUSE_SYSTEM_FMT:BOOL=ON \
%endif
-DNO_LUA:BOOL=ON
%cmake_build %cmake_build
%install %install
@ -79,11 +79,11 @@ strip-nondeterminism build/slade.pk3
%cmake_install %cmake_install
%files %files
%license gpl-2.0.txt %license LICENSE
%doc README.md %doc README.md
%_bindir/slade %_bindir/slade
%_datadir/slade3/ %_datadir/slade3/
%_datadir/icons/net.mancubus.SLADE.png %_datadir/icons/hicolor/scalable/apps/net.mancubus.SLADE.svg
%_datadir/applications/net.mancubus.SLADE.desktop %_datadir/applications/net.mancubus.SLADE.desktop
%_datadir/metainfo/net.mancubus.SLADE.metainfo.xml %_datadir/metainfo/net.mancubus.SLADE.metainfo.xml

35
wx.diff
View File

@ -1,41 +1,28 @@
From: Jan Engelhardt <jengelh@inai.de> From: Jan Engelhardt <jengelh@inai.de>
Date: 2020-04-18 20:10:34.215071041 +0200 Date: 2020-04-18 20:10:34.215071041 +0200
external.so references wx functions (including those present in base), but does Under SLADE 3.1.x, I observed:
not link them => add wx libs to the link.
[ 12s] /usr/include/wx-3.0/wx/filename.h:139: undefined reference to `wxFileName::Assign(wxString const&, wxPathFormat)' [ 12s] /usr/include/wx-3.0/wx/filename.h:139: undefined reference to `wxFileName::Assign(wxString const&, wxPathFormat)'
[ 12s] /usr/lib64/gcc/x86_64-suse-linux/9/../../../../x86_64-suse-linux/bin/ld: CMakeFiles/external.dir/email/wxEmailMessage.o: in function `wxEmailMessage::DoAddAttachment(wxString const&, wxString&) const': [ 12s] /usr/lib64/gcc/x86_64-suse-linux/9/../../../../x86_64-suse-linux/bin/ld: CMakeFiles/external.dir/email/wxEmailMessage.o: in function `wxEmailMessage::DoAddAttachment(wxString const&, wxString&) const':
Furthermore, external.so references MemChunk:: functions, but does not link While external.so is gone in SLADE 3.2.6, the function is still used,
them => change to STATIC because I am too lazy. and so we should add "base" to WX_LIBS regardless.
--- ---
src/CMakeLists.txt | 2 +- cmake/unix.cmake | 2 +-
src/External/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
2 files changed, 2 insertions(+), 2 deletions(-)
Index: SLADE-3.1.12/src/CMakeLists.txt Index: SLADE-3.2.6/cmake/unix.cmake
=================================================================== ===================================================================
--- SLADE-3.1.12.orig/src/CMakeLists.txt --- SLADE-3.2.6.orig/cmake/unix.cmake
+++ SLADE-3.1.12/src/CMakeLists.txt +++ SLADE-3.2.6/cmake/unix.cmake
@@ -52,7 +52,7 @@ if (WX_GTK3) @@ -65,7 +65,7 @@ if (WX_GTK3)
set(wxWidgets_CONFIG_OPTIONS --toolkit=gtk3) set(wxWidgets_CONFIG_OPTIONS --toolkit=gtk3)
endif (WX_GTK3) endif (WX_GTK3)
-SET(WX_LIBS std aui gl stc richtext propgrid media) -SET(WX_LIBS std aui gl stc richtext propgrid)
+SET(WX_LIBS base std aui gl stc richtext propgrid media) +SET(WX_LIBS base std aui gl stc richtext propgrid)
if (NO_WEBVIEW) if (NO_WEBVIEW)
SET(WX_LIBS ${WX_LIBS} html) SET(WX_LIBS ${WX_LIBS} html)
else (NO_WEBVIEW) else (NO_WEBVIEW)
Index: SLADE-3.1.12/src/External/CMakeLists.txt
===================================================================
--- SLADE-3.1.12.orig/src/External/CMakeLists.txt
+++ SLADE-3.1.12/src/External/CMakeLists.txt
@@ -31,5 +31,5 @@ file(GLOB_RECURSE EXTERNAL_SOURCES
)
add_library(external STATIC ${EXTERNAL_SOURCES})
-target_link_libraries(external ${ZLIB_LIBRARY})
+target_link_libraries(external ${ZLIB_LIBRARY} ${wxWidgets_LIBRARIES})
set(EXTERNAL_LIBRARIES external PARENT_SCOPE)