From 7c047ec165789a549211d5400bca4f6566a45f80616b18ab872fea9838843c36 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 22 Jun 2020 20:16:48 +0000 Subject: [PATCH] - Add lzma.diff to use system-provided clzma library. OBS-URL: https://build.opensuse.org/package/show/games:tools/slade?expand=0&rev=30 --- clzma.diff | 24 ++++++++++++++++++++++++ slade.changes | 5 +++++ slade.spec | 16 ++++++++++------ 3 files changed, 39 insertions(+), 6 deletions(-) create mode 100644 clzma.diff diff --git a/clzma.diff b/clzma.diff new file mode 100644 index 0000000..535b786 --- /dev/null +++ b/clzma.diff @@ -0,0 +1,24 @@ +From: Jan Engelhardt +Date: 2020-06-22 21:16:10.343429323 +0200 + +Make use of the clzma library in openSUSE. +--- + src/External/CMakeLists.txt | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +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 +@@ -26,10 +26,9 @@ file(GLOB_RECURSE EXTERNAL_SOURCES + *.cxx + dumb/*.c + lua/*.c +- lzma/C/LzmaDec.c + ${SLADE_HEADERS} + ) + + add_library(external STATIC ${EXTERNAL_SOURCES}) +-target_link_libraries(external ${ZLIB_LIBRARY} ${wxWidgets_LIBRARIES}) ++target_link_libraries(external ${ZLIB_LIBRARY} ${wxWidgets_LIBRARIES} -lclzma) + set(EXTERNAL_LIBRARIES external PARENT_SCOPE) diff --git a/slade.changes b/slade.changes index 1492812..84abd5a 100644 --- a/slade.changes +++ b/slade.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Jun 22 20:16:13 UTC 2020 - Jan Engelhardt + +- Add lzma.diff to use system-provided clzma library. + ------------------------------------------------------------------- Tue May 26 08:26:11 UTC 2020 - Jan Engelhardt diff --git a/slade.spec b/slade.spec index 7a23529..1342d64 100644 --- a/slade.spec +++ b/slade.spec @@ -28,6 +28,7 @@ Source2: slade.desktop Source100: slade.appdata.xml Patch1: basepk3.diff Patch2: wx.diff +Patch3: clzma.diff Patch10: disable_sse.patch BuildRequires: ImageMagick BuildRequires: cmake >= 3.1 @@ -38,6 +39,7 @@ BuildRequires: strip-nondeterminism BuildRequires: update-desktop-files BuildRequires: wxWidgets-3_0-devel BuildRequires: zip +BuildRequires: pkgconfig(clzma) BuildRequires: pkgconfig(fluidsynth) BuildRequires: pkgconfig(ftgl) BuildRequires: pkgconfig(gl) @@ -47,21 +49,23 @@ BuildRequires: pkgconfig(sfml-all) BuildRequires: pkgconfig(x11) %description -SLADE3 is an editor for Doom-engine based games and source +SLADE is an editor for Doom-engine based games and source ports. It has the ability to view, modify, and write many different game-specific formats, and even convert between some of them, or from/to other generic formats such as PNG. %prep %setup -q -n SLADE-%version -%patch -P 1 -P 2 -p1 +%patch -P 1 -P 2 -P 3 -p1 %ifnarch %ix86 x86_64 %patch10 -p0 %endif %build %define _lto_cflags %nil -%cmake -DNO_WEBVIEW=ON -DWX_GTK3=OFF +%cmake -DNO_WEBVIEW=ON -DWX_GTK3=OFF \ + -DCMAKE_C_FLAGS_RELWITHDEBINFO:STRING="%optflags" \ + -DCMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING="%optflags" make %{?_smp_mflags} %install @@ -75,10 +79,10 @@ install -Dpm0644 "%name.png" "$b/%_datadir/pixmaps/%name.png" install -Dpm0644 %{SOURCE100} "$b/%_datadir/appdata/%name.appdata.xml" pushd misc -for txtfile in detect_functions.txt old-simage-formats.txt stuff.txt udmf11.txt \ - udmf_zdoom.txt usdf.txt usdf_zdoom.txt +for txtfile in detect_functions.txt old-simage-formats.txt stuff.txt \ + udmf11.txt udmf_zdoom.txt usdf.txt usdf_zdoom.txt do - install -Dm644 $txtfile "$b/%_datadir/slade3/misc/$txtfile" + install -Dm644 "$txtfile" "$b/%_datadir/slade3/misc/$txtfile" done popd