added patch to fix bug #701855

This commit is contained in:
Martin Gieseking 2011-05-18 07:51:11 +02:00
parent 6a3730b7b0
commit f82d3c0862
2 changed files with 56 additions and 9 deletions

View File

@ -0,0 +1,34 @@
diff --git a/icotool/main.c b/icotool/main.c
--- a/icotool/main.c
+++ b/icotool/main.c
@@ -17,6 +17,7 @@
*/
#include <config.h>
+#include <locale.h>
#include <unistd.h> /* POSIX */
#include <errno.h> /* C89 */
#include <stdio.h> /* C89 */
diff --git a/wrestool/extract.c b/wrestool/extract.c
--- a/wrestool/extract.c
+++ b/wrestool/extract.c
@@ -172,7 +172,7 @@
if (iconsize != icondir->entries[c].bytes_in_res) {
warn(_("%s: mismatch of size in icon resource `%s' and group (%d vs %d)"), fi->name, name, iconsize, icondir->entries[c].bytes_in_res);
}
- size += iconsize; /* size += icondir->entries[c].bytes_in_res; */
+ size += iconsize < icondir->entries[c].bytes_in_res ? icondir->entries[c].bytes_in_res : iconsize;
/* cursor resources have two additional WORDs that contain
* hotspot info */
diff --git a/wrestool/main.c b/wrestool/main.c
--- a/wrestool/main.c
+++ b/wrestool/main.c
@@ -17,6 +17,7 @@
*/
#include <config.h>
+#include <locale.h>
#include "gettext.h" /* Gnulib */
#include "configmake.h"
#define _(s) gettext(s)

View File

@ -1,12 +1,17 @@
Name: icoutils Name: icoutils
Version: 0.29.1 Version: 0.29.1
Release: 2%{?dist} Release: 3%{?dist}
Summary: Utility for extracting and converting Microsoft icon and cursor files Summary: Utility for extracting and converting Microsoft icon and cursor files
Group: Applications/Multimedia Group: Applications/Multimedia
License: GPLv3+ License: GPLv3+
URL: http://www.nongnu.org/icoutils/ URL: http://www.nongnu.org/icoutils/
Source0: http://savannah.nongnu.org/download/%{name}/%{name}-%{version}.tar.bz2 Source0: http://savannah.nongnu.org/download/%{name}/%{name}-%{version}.tar.bz2
# this patch fixes http://bugzilla.redhat.com/show_bug.cgi?id=701855
# it has already been applied to the upstream Git repo
Patch0: %{name}-%{version}-iconsize.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: gettext libpng-devel BuildRequires: gettext libpng-devel
@ -19,12 +24,13 @@ libraries.
%prep %prep
%setup -q %setup -q
iconv -f ISO88592 -t UTF8 < NEWS > NEWS.utf8 %patch0 -p1
iconv -f ISO88592 -t UTF8 < AUTHORS > AUTHORS.utf8
touch -r NEWS NEWS.utf8 for f in AUTHORS NEWS; do
touch -r AUTHORS AUTHORS.utf8 iconv -f ISO88592 -t UTF8 < $f > $f.utf8 && \
mv NEWS.utf8 NEWS touch -r $f $f.utf8 && \
mv AUTHORS.utf8 AUTHORS mv $f.utf8 $f
done
%build %build
%configure %configure
@ -44,11 +50,18 @@ rm -rf $RPM_BUILD_ROOT
%files -f %{name}.lang %files -f %{name}.lang
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc README AUTHORS COPYING NEWS TODO ChangeLog %doc README AUTHORS COPYING NEWS TODO ChangeLog
%{_mandir}/*/* %{_bindir}/extresso
%{_bindir}/* %{_bindir}/genresscript
%{_bindir}/icotool
%{_bindir}/wrestool
%{_mandir}/man1/*.1*
%changelog %changelog
* Mon May 16 2011 Martin Gieseking <martin.gieseking@uos.de> - 0.29.1-3
- fixed http://bugzilla.redhat.com/show_bug.cgi?id=701855
- minor spec cleanup
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.29.1-2 * Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.29.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild