[xu4] Update to new SVN, better icon, format-security
Jason ティビツ
tibbs at fedoraproject.org
Mon Feb 23 03:08:22 UTC 2015
commit 2cc62929848ca753b26f1dac9f2ff78ae653759d
Author: Jason Tibbitts <tibbs at math.uh.edu>
Date: Sun Feb 22 21:07:38 2015 -0600
Update to new SVN, better icon, format-security
xu4-1.1-format-security.patch | 12 ++++++++++++
xu4-1.1-unbundle.patch | 33 +++++++++++++++++----------------
xu4.spec | 31 ++++++++++++++++++-------------
3 files changed, 47 insertions(+), 29 deletions(-)
---
diff --git a/xu4-1.1-format-security.patch b/xu4-1.1-format-security.patch
new file mode 100644
index 0000000..87d7d77
--- /dev/null
+++ b/xu4-1.1-format-security.patch
@@ -0,0 +1,12 @@
+diff -u -r u4-format-security/src/screen_sdl.cpp u4/src/screen_sdl.cpp
+--- u4-format-security/src/screen_sdl.cpp 2015-01-23 21:44:46.000000000 -0600
++++ u4/src/screen_sdl.cpp 2015-02-22 15:59:04.665560535 -0600
+@@ -257,7 +257,7 @@
+
+ screenRefreshThread = SDL_CreateThread(screenRefreshThreadFunction, NULL);
+ if (!screenRefreshThread) {
+- errorWarning(SDL_GetError());
++ errorWarning("%s", SDL_GetError());
+ return;
+ }
+ }
diff --git a/xu4-1.1-unbundle.patch b/xu4-1.1-unbundle.patch
index 49762f3..d6a63b6 100644
--- a/xu4-1.1-unbundle.patch
+++ b/xu4-1.1-unbundle.patch
@@ -1,7 +1,7 @@
-diff -up u4/src/Makefile.common.unbundle u4/src/Makefile.common
---- u4/src/Makefile.common.unbundle 2011-03-29 20:31:06.682285027 -0500
-+++ u4/src/Makefile.common 2011-03-29 20:31:15.882001317 -0500
-@@ -6,7 +6,6 @@ VERSION=1.1svn
+diff -u -r u4-unbundle/src/Makefile.common u4/src/Makefile.common
+--- u4-unbundle/src/Makefile.common 2012-03-18 06:32:01.000000000 -0500
++++ u4/src/Makefile.common 2015-02-22 15:23:52.420625704 -0600
+@@ -6,7 +6,6 @@
CSRCS=\
lzw/hash.c \
lzw/lzw.c \
@@ -9,24 +9,24 @@ diff -up u4/src/Makefile.common.unbundle u4/src/Makefile.common
$(NULL)
CXXSRCS=\
-diff -up u4/src/Makefile.unbundle u4/src/Makefile
---- u4/src/Makefile.unbundle 2010-12-13 16:50:58.000000000 -0600
-+++ u4/src/Makefile 2011-03-29 20:23:10.861965251 -0500
+diff -u -r u4/src/Makefile.unbundle u4/src/Makefile
+--- u4/src/Makefile.unbundle 2010-12-13 16:50:58.000000000 -0600
++++ u4/src/Makefile 2011-03-29 20:23:10.861965251 -0500
@@ -15,7 +15,7 @@ FEATURES=-DHAVE_BACKTRACE=1 -DHAVE_VARIA
DEBUGCXXFLAGS=-ggdb1 -rdynamic -g -O0 -fno-inline -fno-eliminate-unused-debug-types -gstabs -g3
- CXXFLAGS=$(FEATURES) -Wall -I. $(UIFLAGS) $(shell xml2-config --cflags) -DICON_FILE=\"$(datadir)/pixmaps/u4.bmp\" -DVERSION=\"$(VERSION)\" $(DEBUGCXXFLAGS)
+ CXXFLAGS=$(FEATURES) -Wall -I. $(UIFLAGS) $(shell xml2-config --cflags) -DICON_FILE=\"$(datadir)/pixmaps/u4.bmp\" -DVERSION=\"$(VERSIO
CFLAGS=$(CXXFLAGS)
--LIBS=$(UILIBS) $(shell xml2-config --libs) -lpng
-+LIBS=$(UILIBS) $(shell xml2-config --libs) -lpng $(EXTRALIBS)
+-LIBS=$(UILIBS) $(shell xml2-config --libs) -lpng -lz
++LIBS=$(UILIBS) $(shell xml2-config --libs) -lpng -lz $(EXTRALIBS)
INSTALL=install
-
+
ifeq ($(STATIC_GCC_LIBS),true)
-diff -up u4/src/u4file.cpp.unbundle u4/src/u4file.cpp
---- u4/src/u4file.cpp.unbundle 2011-03-29 20:23:10.856965406 -0500
-+++ u4/src/u4file.cpp 2011-03-29 20:23:10.868965036 -0500
-@@ -4,9 +4,9 @@
-
+diff -u -r u4-unbundle/src/u4file.cpp u4/src/u4file.cpp
+--- u4-unbundle/src/u4file.cpp 2015-02-22 15:22:38.738442217 -0600
++++ u4/src/u4file.cpp 2015-02-22 15:28:54.605175840 -0600
+@@ -5,9 +5,9 @@
#include <cctype>
+ #include <cstring>
#include <cstdlib>
+#include <unzip.h>
@@ -35,3 +35,4 @@ diff -up u4/src/u4file.cpp.unbundle u4/src/u4file.cpp
#include "debug.h"
#ifdef MACOSX
#include <libgen.h>
+
diff --git a/xu4.spec b/xu4.spec
index 22430f1..bc053e7 100644
--- a/xu4.spec
+++ b/xu4.spec
@@ -15,8 +15,9 @@ Source2: xu4.autodlrc
Source3: u4download.txt
Patch0: xu4-1.0beta3-desktop.patch
Patch1: xu4-1.1-unbundle.patch
+Patch2: xu4-1.1-format-security.patch
BuildRequires: SDL_mixer-devel libxml2-devel minizip-devel
-BuildRequires: libpng-devel desktop-file-utils
+BuildRequires: libicns-utils libpng-devel desktop-file-utils
Requires: hicolor-icon-theme autodownloader
%description
@@ -33,9 +34,7 @@ spirit of the original game will be added.
%prep
-%setup -q -n u4
-%patch0 -p1 -z .desktop
-%patch1 -p1 -z .unbundle
+%autosetup -p1 -n u4
if [ "%{_lib}" = "lib64" ]; then
sed -i 's|/usr/lib|%{_libdir}|g' src/u4file.cpp
fi
@@ -48,6 +47,10 @@ make DEBUGCXXFLAGS="%{optflags}" EXTRALIBS=-lminizip\
bindir=%{_bindir} datadir=%{_datadir} libdir=%{_libdir} %{?_smp_mflags}
popd
+# The apple icns file has a higher resolution icon, but still not 256x256.
+pushd icons
+icns2png -x xu4.icns
+popd
%install
pushd src
@@ -63,14 +66,15 @@ install -p -m 755 %{SOURCE1} %{buildroot}/%{_bindir}/u4
install -p -m 644 %{SOURCE2} %{buildroot}/%{_libdir}/u4
# below is the desktop file and icon stuff.
-desktop-file-install \
- --dir %{buildroot}/%{_datadir}/applications \
- --delete-original \
- %{buildroot}/%{_datadir}/applications/u4.desktop
+desktop-file-install \
+ --dir %{buildroot}/%{_datadir}/applications \
+ --delete-original \
+ %{buildroot}/%{_datadir}/applications/u4.desktop
-mkdir -p %{buildroot}/%{_datadir}/icons/hicolor/64x64/apps
-mv %{buildroot}/%{_datadir}/pixmaps/u4.png \
- %{buildroot}/%{_datadir}/icons/hicolor/64x64/apps
+mkdir -p %{buildroot}/%{_datadir}/icons/hicolor/128x128/apps
+install -p -m 655 icons/xu4_128x128x32.png \
+ %{buildroot}/%{_datadir}/icons/hicolor/128x128/apps/u4.png
+rm -rf %{buildroot}/%{_datadir}/pixmaps
%post
@@ -90,14 +94,15 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%doc doc/U4Notes.txt doc/tools.txt u4download.txt
%{_bindir}/u4*
%{_libdir}/u4
-%{_datadir}/pixmaps/u4.bmp
%{_datadir}/applications/u4.desktop
-%{_datadir}/icons/hicolor/64x64/apps/u4.png
+%{_datadir}/icons/hicolor/128x128/apps/u4.png
%changelog
* Sat Feb 21 2015 Jason L Tibbitts III <tibbs at math.uh.edu> - 1.1-0.1.20150221svn3087
- Update from SVN.
+- Extract higher resulution icon from macos .icns archive.
+- Fix a format-security error.
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.1-0.22.20120106svn2999
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
More information about the scm-commits
mailing list