[alphabet-soup] Rebuild for new allegro-4.4 Fix crash when selecting an alternative dictionary (rhbz#699425)

Hans de Goede jwrdegoede at fedoraproject.org
Sat Jul 16 15:38:34 UTC 2011


commit dd3e68e4f1b9e61980d1c0efe10e31e0e90aa051
Author: Hans de Goede <hdegoede at redhat.com>
Date:   Sat Jul 16 17:39:26 2011 +0200

    Rebuild for new allegro-4.4
    Fix crash when selecting an alternative dictionary (rhbz#699425)

 alphabet-soup-1.1-rhbz699425.patch |   30 ++++++++++++++++++++++++++++++
 alphabet-soup.spec                 |   28 ++++++++++++++--------------
 2 files changed, 44 insertions(+), 14 deletions(-)
---
diff --git a/alphabet-soup-1.1-rhbz699425.patch b/alphabet-soup-1.1-rhbz699425.patch
new file mode 100644
index 0000000..c1f825f
--- /dev/null
+++ b/alphabet-soup-1.1-rhbz699425.patch
@@ -0,0 +1,30 @@
+--- alphabet-soup-1.1/dictionary.c	2011-07-16 17:33:05.156782507 +0200
++++ new/dictionary.c	2011-07-16 17:32:56.727782244 +0200
+@@ -98,25 +98,15 @@
+ void dictionary_load(DICTIONARY * dp, char * fn)
+ {
+ 	PACKFILE * fp;
+-	char word[128];
++	char word[WORD_MAX_LENGTH];
+ 	int i;
+ 	
+ 	dp->words = 0;
+ 	dp->word_min = 64;
+ 	dp->word_max = 0;
+ 	fp = pack_fopen(fn, "r");
+-	while(!pack_feof(fp))
++	while(pack_fgets(word, WORD_MAX_LENGTH, fp))
+ 	{
+-		for(i = 0; i < 32; i++)
+-		{
+-			word[i] = pack_getc(fp);
+-			if(word[i] == '\r')
+-			{
+-				word[i] = '\0';
+-				pack_getc(fp);
+-				break;
+-			}
+-		}
+ 		if(strlen(word) > 0)
+ 		{
+ 			dictionary_add(dp, word);
diff --git a/alphabet-soup.spec b/alphabet-soup.spec
index 65f498e..c618322 100644
--- a/alphabet-soup.spec
+++ b/alphabet-soup.spec
@@ -1,6 +1,6 @@
 Name:           alphabet-soup
 Version:        1.1
-Release:        7%{?dist}
+Release:        8%{?dist}
 Summary:        Guide your worm through the soup to spell words
 Group:          Amusements/Games
 License:        Crystal Stacker
@@ -9,7 +9,7 @@ Source0:        http://www.t3-i.com/ncdgames/as11src.zip
 Source1:        alphabet-soup.desktop
 Source2:        alphabet-soup.png
 Patch0:         alphabet-soup-1.1-linux.patch
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Patch1:         alphabet-soup-1.1-rhbz699425.patch
 BuildRequires:  alfont-devel dumb-devel desktop-file-utils
 Requires:       hicolor-icon-theme
 
@@ -22,6 +22,7 @@ included dictionaries, or import your own.
 %prep
 %setup -q -c
 %patch0 -p1 -z .unix
+%patch1 -p1
 sed -i 's/\r//' readme.txt
 
 
@@ -31,7 +32,6 @@ make %{?_smp_mflags} -f Makefile.unix PREFIX=%{_prefix} \
 
 
 %install
-rm -rf $RPM_BUILD_ROOT
 make -f Makefile.unix install PREFIX=$RPM_BUILD_ROOT%{_prefix}
 
 # below is the desktop file and icon stuff.
@@ -44,22 +44,18 @@ install -p -m 644 %{SOURCE2} \
   $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps
 
 
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-
 %post
-touch --no-create %{_datadir}/icons/hicolor || :
-if [ -x %{_bindir}/gtk-update-icon-cache ]; then
-   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
-fi
+touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
 
 %postun
-touch --no-create %{_datadir}/icons/hicolor || :
-if [ -x %{_bindir}/gtk-update-icon-cache ]; then
-   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
+if [ $1 -eq 0 ] ; then
+    touch --no-create %{_datadir}/icons/hicolor &>/dev/null
+    gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 fi
 
+%posttrans
+gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+
 
 %files
 %defattr(-,root,root,-)
@@ -71,6 +67,10 @@ fi
 
 
 %changelog
+* Sat Jul 16 2011 Hans de Goede <hdegoede at redhat.com> - 1.1-8
+- Rebuild for new allegro-4.4
+- Fix crash when selecting an alternative dictionary (rhbz#699425)
+
 * Mon Feb 07 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.1-7
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
 


More information about the scm-commits mailing list