- Restore basepk3.diff for proper search order

OBS-URL: https://build.opensuse.org/package/show/games:tools/slade?expand=0&rev=4
This commit is contained in:
Jan Engelhardt 2016-12-28 19:58:31 +00:00 committed by Git OBS Bridge
parent 8e90feb93d
commit ec598c90c4
4 changed files with 70 additions and 25 deletions

30
basepk3.diff Normal file
View File

@ -0,0 +1,30 @@
From: Jan Engelhardt <jengelh@inai.de>
Search for the resource file in /usr/share/slade, and prefer ~/.slade
over anything else.
(DIR_RES is /usr/share/appinfo according to wxWidgets,
which is not used in Linux distros.)
---
src/Archive/ArchiveManager.cpp | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
Index: SLADE-3.1.1.4/src/Archive/ArchiveManager.cpp
===================================================================
--- SLADE-3.1.1.4.orig/src/Archive/ArchiveManager.cpp
+++ SLADE-3.1.1.4/src/Archive/ArchiveManager.cpp
@@ -138,14 +138,12 @@ bool ArchiveManager::init()
}
// Find slade3.pk3 directory
- string dir_slade_pk3 = appPath("slade.pk3", DIR_RES);
+ 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);
- if (!wxFileExists(dir_slade_pk3))
dir_slade_pk3 = "slade.pk3";
// Open slade.pk3

View File

@ -1,9 +1,14 @@
-------------------------------------------------------------------
Wed Dec 28 19:57:42 UTC 2016 - jengelh@inai.de
- Restore basepk3.diff for proper search order
-------------------------------------------------------------------
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
- Add patch wxChar.diff
+ Corrects an issue with conversion from wxString to wxChar in
column sort

View File

@ -23,16 +23,16 @@ Summary: An editor for DOOM maps and WAD/PK3 archives
License: GPL-2.0+
Group: Amusements/Games/3D/Shoot
Url: https://github.com/sirjuddington/SLADE
Source0: https://github.com/sirjuddington/%{name}/archive/SLADE-%{version}.tar.gz
Source1: slade.desktop
# PATCH-FIX-UPSTREAM Fix conversion from wxString to wxChar when using wxWidgets >= 3.0.2
Patch0: wxChar.patch
Source: https://github.com/sirjuddington/%name/archive/SLADE-%version.tar.gz
Source2: slade.desktop
Patch1: basepk3.diff
Patch2: wxChar.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: ImageMagick
BuildRequires: cmake
BuildRequires: freeimage-devel
BuildRequires: ftgl-devel
BuildRequires: gcc-c++
BuildRequires: ImageMagick
BuildRequires: sfml2-devel
BuildRequires: update-desktop-files
BuildRequires: wxWidgets-3_0-devel
@ -50,29 +50,30 @@ game-specific formats, and even convert between some of them, or
from/to other generic formats such as PNG.
%prep
%setup -qn SLADE-3.1.1.4
%patch0 -p1
%setup -qn SLADE-%version
%patch -P 1 -P 2 -p1
%build
%cmake -DUSE_WEBKIT_STARTPAGE=ON
make %{?_smp_mflags}
%install
install -Dm755 build/slade %{buildroot}%{_bindir}/slade
install -Dm644 build/slade.pk3 %{buildroot}%{_datadir}/slade3/slade.pk3
b="%buildroot"
install -Dm755 build/slade "$b/%_bindir/slade"
install -Dm644 build/slade.pk3 "$b/%_datadir/slade3/slade.pk3"
convert build/msvc/slade.ico[0] -alpha on %{name}.png
install -D -p -m 644 %{name}.png %{buildroot}%{_datadir}/pixmaps/%{name}.png
convert "build/msvc/slade.ico[0]" -alpha on "%name.png"
install -Dpm0644 "%name.png" "$b/%_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
install -Dm644 $txtfile "$b/%_datadir/slade3/misc/$txtfile"
done
popd
install -Dm644 %{SOURCE1} %{buildroot}%{_datadir}/applications/%{name}.desktop
install -Dm644 "%_sourcedir/slade.desktop" "$b/%_datadir/applications/%name.desktop"
%post
%desktop_database_post
@ -83,9 +84,9 @@ install -Dm644 %{SOURCE1} %{buildroot}%{_datadir}/applications/%{name}.desktop
%files
%defattr(-,root,root)
%doc gpl-2.0.txt README.md
%{_bindir}/slade
%{_datadir}/slade3/
%{_datadir}/pixmaps/%{name}.png
%{_datadir}/applications/%{name}.desktop
%_bindir/slade
%_datadir/slade3/
%_datadir/pixmaps/%name.png
%_datadir/applications/%name.desktop
%changelog

View File

@ -1,15 +1,24 @@
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)
From: Luke Jones <luke.nukem.jones@gmail.com>
Date: Mon, 19 Dec 2016 21:33:56 +0000
Fix conversion from wxString to wxChar when using wxWidgets >= 3.0.2
---
src/UI/Lists/ArchiveEntryList.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
Index: SLADE-3.1.1.4/src/UI/Lists/ArchiveEntryList.cpp
===================================================================
--- SLADE-3.1.1.4.orig/src/UI/Lists/ArchiveEntryList.cpp
+++ SLADE-3.1.1.4/src/UI/Lists/ArchiveEntryList.cpp
@@ -584,8 +584,10 @@ bool ArchiveEntryList::entrySort(long le
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();
+ const wxChar *reName = re->getName().c_str();
+ result = le->getName().CompareTo(reName, string::ignoreCase);
+ }