SHA256
1
0
forked from pool/slade

- 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 Mon Dec 19 05:19:27 UTC 2016 - luke.nukem.jones@gmail.com
- Update to version 3.1.1.4 - Update to version 3.1.1.4
- Remove patch basepk3.diff - Remove patch basepk3.diff
- Add patch wxWidgets.diff - Add patch wxChar.diff
+ Corrects an issue with conversion from wxString to wxChar in + Corrects an issue with conversion from wxString to wxChar in
column sort column sort

View File

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

View File

@ -1,17 +1,26 @@
diff --git a/src/UI/Lists/ArchiveEntryList.cpp b/src/UI/Lists/ArchiveEntryList.cpp From: Luke Jones <luke.nukem.jones@gmail.com>
index 4c1ad82..e7cbe1c 100644 Date: Mon, 19 Dec 2016 21:33:56 +0000
--- a/src/UI/Lists/ArchiveEntryList.cpp
+++ b/src/UI/Lists/ArchiveEntryList.cpp Fix conversion from wxString to wxChar when using wxWidgets >= 3.0.2
@@ -581,8 +581,10 @@ bool ArchiveEntryList::entrySort(long left, long right)
---
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; result = 0;
// Name sort // Name sort
- else if (ael_current->col_name >= 0 && ael_current->col_name == lv_current->sortColumn()) - else if (ael_current->col_name >= 0 && ael_current->col_name == lv_current->sortColumn())
- result = le->getName().CompareTo(re->getName(), string::ignoreCase); - result = le->getName().CompareTo(re->getName(), string::ignoreCase);
+ else if (ael_current->col_name >= 0 && ael_current->col_name == lv_current->sortColumn()) { + 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); + result = le->getName().CompareTo(reName, string::ignoreCase);
+ } + }
// Other (default) sort // Other (default) sort
else else