SHA256
1
0
forked from pool/slade

Accepting request 447091 from home:luke_nukem:branches:games:tools

Everything fixed up as suggested. Hope this is satisfactory.

OBS-URL: https://build.opensuse.org/request/show/447091
OBS-URL: https://build.opensuse.org/package/show/games:tools/slade?expand=0&rev=2
This commit is contained in:
Jan Engelhardt 2016-12-19 21:41:58 +00:00 committed by Git OBS Bridge
parent de9773f5a1
commit 09f5d2a9ce
7 changed files with 77 additions and 47 deletions

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

Binary file not shown.

BIN
SLADE-3.1.1.4.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -1,28 +0,0 @@
From: Jan Engelhardt <jengelh@inai.de>
Search for the resource file in /usr/share/slade, and prefer ~/.slade
over anything else.
---
src/ArchiveManager.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
Index: SLADE-3.1.0.5/src/ArchiveManager.cpp
===================================================================
--- SLADE-3.1.0.5.orig/src/ArchiveManager.cpp
+++ SLADE-3.1.0.5/src/ArchiveManager.cpp
@@ -138,11 +138,13 @@ bool ArchiveManager::init()
}
// Find slade3.pk3 directory
- string dir_slade_pk3 = appPath("slade.pk3", DIR_DATA);
+ string dir_slade_pk3 = appPath("slade.pk3", DIR_USER);
+ if (!wxFileExists(dir_slade_pk3))
+ dir_slade_pk3 = appPath("slade.pk3", DIR_DATA);
if (!wxFileExists(dir_slade_pk3))
dir_slade_pk3 = appPath("slade.pk3", DIR_APP);
if (!wxFileExists(dir_slade_pk3))
- dir_slade_pk3 = appPath("slade.pk3", DIR_USER);
+ dir_slade_pk3 = "/usr/share/slade/slade.pk3";
if (!wxFileExists(dir_slade_pk3))
dir_slade_pk3 = "slade.pk3";

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Mon Dec 19 05:19:27 UTC 2016 - luke.nukem.jones@gmail.com
- Update to version 3.1.1.4
- Remove patch basepk3.diff
- Add patch wxWidgets.diff
+ Corrects an issue with conversion from wxString to wxChar in
column sort
------------------------------------------------------------------- -------------------------------------------------------------------
Sun Jul 17 01:15:06 UTC 2016 - jengelh@inai.de Sun Jul 17 01:15:06 UTC 2016 - jengelh@inai.de

10
slade.desktop Normal file
View File

@ -0,0 +1,10 @@
[Desktop Entry]
Type=Application
Version=1.0
Name=SLADE
GenericName=Doom editor
Icon=slade
Exec=slade %F
Terminal=false
MimeType=application/x-doom-wad;application/x-pak;application/zip;inode/directory;
Categories=GTK;Utility;Archiving;

View File

@ -17,26 +17,30 @@
Name: slade Name: slade
Version: 3.1.0.5 Version: 3.1.1.4
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+ License: GPL-3.0+
Group: Amusements/Games/3D/Shoot Group: Amusements/Games/3D/Shoot
Url: http://slade.mancubus.net/ Url: https://github.com/sirjuddington/SLADE
Source0: https://github.com/sirjuddington/%{name}/archive/SLADE-%{version}.tar.gz
Source: https://github.com/sirjuddington/SLADE/archive/%version.tar.gz Source1: slade.desktop
Patch1: basepk3.diff # PATCH-FIX-UPSTREAM Fix conversion from wxString to wxChar when using wxWidgets >= 3.0.2
Patch0: wxChar.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: cmake BuildRequires: cmake
BuildRequires: freeimage-devel BuildRequires: freeimage-devel
BuildRequires: ftgl-devel BuildRequires: ftgl-devel
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: ImageMagick
BuildRequires: sfml2-devel BuildRequires: sfml2-devel
BuildRequires: update-desktop-files
BuildRequires: wxWidgets-3_0-devel BuildRequires: wxWidgets-3_0-devel
BuildRequires: zip BuildRequires: zip
BuildRequires: pkgconfig(fluidsynth) BuildRequires: pkgconfig(fluidsynth)
BuildRequires: pkgconfig(gl) BuildRequires: pkgconfig(gl)
BuildRequires: pkgconfig(glew) BuildRequires: pkgconfig(glew)
BuildRequires: pkgconfig(libcurl)
BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(x11)
%description %description
@ -46,24 +50,42 @@ 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 -qn SLADE-%version %setup -qn SLADE-3.1.1.4
%patch -P 1 -p1 %patch0 -p1
%build %build
%cmake %cmake -DUSE_WEBKIT_STARTPAGE=ON
make %{?_smp_mflags} make %{?_smp_mflags}
%install %install
mkdir -p "%buildroot/%_bindir" "%buildroot/%_datadir/%name" install -Dm755 build/slade %{buildroot}%{_bindir}/slade
pushd build/ install -Dm644 build/slade.pk3 %{buildroot}%{_datadir}/slade3/slade.pk3
install -pm0755 slade "%buildroot/%_bindir/"
install -pm0644 slade.pk3 "%buildroot/%_datadir/%name/" convert "build/msvc/slade.ico" -alpha on -flatten %{name}.png
install -D -p -m 644 %{name}.png %{buildroot}%{_datadir}/pixmaps/%{name}.png
pushd misc
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 %{buildroot}%{_datadir}/slade3/misc/$txtfile
done
popd popd
install -Dm644 %{SOURCE1} %{buildroot}%{_datadir}/applications/%{name}.desktop
%post
%desktop_database_post
%postun
%desktop_database_postun
%files %files
%defattr(-,root,root) %defattr(-,root,root)
%_bindir/slade %doc gpl-2.0.txt README.md
%_datadir/%name/ %{_bindir}/slade
%doc u*.txt gpl*txt %{_datadir}/slade3/
%{_datadir}/pixmaps/%{name}.png
%{_datadir}/applications/%{name}.desktop
%changelog %changelog

17
wxChar.patch Normal file
View File

@ -0,0 +1,17 @@
diff --git a/src/UI/Lists/ArchiveEntryList.cpp b/src/UI/Lists/ArchiveEntryList.cpp
index 4c1ad82..e7cbe1c 100644
--- a/src/UI/Lists/ArchiveEntryList.cpp
+++ b/src/UI/Lists/ArchiveEntryList.cpp
@@ -581,8 +581,10 @@ bool ArchiveEntryList::entrySort(long left, long right)
result = 0;
// Name sort
- else if (ael_current->col_name >= 0 && ael_current->col_name == lv_current->sortColumn())
- result = le->getName().CompareTo(re->getName(), string::ignoreCase);
+ else if (ael_current->col_name >= 0 && ael_current->col_name == lv_current->sortColumn()) {
+ const wxChar* reName = re->getName().c_str();
+ result = le->getName().CompareTo(reName, string::ignoreCase);
+ }
// Other (default) sort
else