commit e5179cadd58afa3b9723b2f6c3073c2a329732c9
Author: Hans de Goede <hdegoede(a)redhat.com>
Date: Thu Jul 5 15:29:26 2012 +0200
New upstream release 2.0.9
.gitignore | 1 +
alfont-2.0.6-linux.patch | 79 ----------------------------------------------
alfont-2.0.9-linux.patch | 58 +++++++++++++++++++++++++++++++++
alfont.spec | 18 ++++++----
sources | 2 +-
5 files changed, 71 insertions(+), 87 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 85b813b..92dacf9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
alfont-2.0.6.tar.gz
+/alfont-2.0.9.tar.gz
diff --git a/alfont-2.0.9-linux.patch b/alfont-2.0.9-linux.patch
new file mode 100644
index 0000000..9b3da99
--- /dev/null
+++ b/alfont-2.0.9-linux.patch
@@ -0,0 +1,58 @@
+diff -up alfont-2.0.9/include/alfont.h.linux alfont-2.0.9/include/alfont.h
+--- alfont-2.0.9/include/alfont.h.linux 2009-02-01 23:52:34.000000000 +0100
++++ alfont-2.0.9/include/alfont.h 2012-07-04 17:54:36.934125374 +0200
+@@ -10,9 +10,9 @@
+ /* See FTL.txt (FreeType Project License) for license */
+
+
+-#define ALFONT_WINDOWS //When compiling in WINDOWS,please uncomment this line.
++//#define ALFONT_WINDOWS //When compiling in WINDOWS,please uncomment this line.
+ //#define ALFONT_DOS //When compiling in DOS,please uncomment this line.
+-//#define ALFONT_LINUX //When compiling in LINUX,please uncomment this line.
++#define ALFONT_LINUX //When compiling in LINUX,please uncomment this line.
+
+
+ #ifndef ALFONT_H
+@@ -468,4 +468,4 @@ TDS565
+
+ Platform specifics
+ RISCOS-LATIN1
+-*/
+\ No newline at end of file
++*/
+diff -up alfont-2.0.9/src/alfont.c.linux alfont-2.0.9/src/alfont.c
+--- alfont-2.0.9/src/alfont.c.linux 2009-02-04 22:40:24.000000000 +0100
++++ alfont-2.0.9/src/alfont.c 2012-07-05 12:09:47.299021581 +0200
+@@ -468,7 +468,7 @@ ALFONT_FONT *alfont_load_font(const char
+ alfont_set_char_extra_spacing(font, 0);
+
+ //Initial Font attribute
+- font->language=""; /* Initial Language */
++ font->language=NULL; /* Initial Language */
+ font->type=0; /* Initial Code Convert */
+ font->outline_top=0; /* Initial Font top outline width */
+ font->outline_bottom=0; /* Initial Font bottom outline width */
+@@ -548,7 +548,7 @@ ALFONT_FONT *alfont_load_font_from_mem(c
+ alfont_set_char_extra_spacing(font, 0);
+
+ //Initial Font attribute
+- font->language=""; /* Initial Language */
++ font->language=NULL; /* Initial Language */
+ font->type=0; /* Initial Code Convert */
+ font->outline_top=0; /* Initial Font top outline width */
+ font->outline_bottom=0; /* Initial Font bottom outline width */
+@@ -4823,12 +4823,13 @@ void alfont_set_char_extra_spacing(ALFON
+
+
+ void alfont_set_language(ALFONT_FONT *f, const char *language) {
++ free(f->language);
+ if (language == NULL) {
+ f->language = NULL;
+ }
+ else
+ {
+- f->language=(char *)malloc(strlen(language)*sizeof(char));
++ f->language=(char *)malloc((strlen(language)+1)*sizeof(char));
+ strcpy(f->language,language);
+ }
+ }
diff --git a/alfont.spec b/alfont.spec
index 7519491..e21708a 100644
--- a/alfont.spec
+++ b/alfont.spec
@@ -1,13 +1,13 @@
Name: alfont
-Version: 2.0.6
-Release: 9%{?dist}
+Version: 2.0.9
+Release: 1%{?dist}
Summary: Font rendering library for the Allegro game library
Group: System Environment/Libraries
License: FTL
URL:
http://chernsha.sitesled.com/
-# this is
http://chernsha.sitesled.com/AlFont206.rar repackaged in .tgz format
+# this is
http://chernsha.sitesled.com/AlFont209.rar repackaged in .tgz format
Source0: %{name}-%{version}.tar.gz
-Patch0: alfont-2.0.6-linux.patch
+Patch0: alfont-2.0.9-linux.patch
BuildRequires: allegro-devel freetype-devel
%description
@@ -30,7 +30,10 @@ developing applications that use %{name}.
%prep
%setup -q
%patch0 -p1 -z .linux
-sed -i s'/\r//g' freetype/docs/FTL.TXT
+for i in include/alfont*.h freetype/docs/FTL.TXT; do
+ sed -i.orig s'/\r//g' $i
+ touch -r $i.orig $i
+done
%build
@@ -57,17 +60,18 @@ install -m 644 include/%{name}*.h $RPM_BUILD_ROOT%{_includedir}
%files
-%defattr(-,root,root,-)
%doc CHANGES.txt README.txt freetype/docs/FTL.TXT
%{_libdir}/lib%{name}.so.*
%files devel
-%defattr(-,root,root,-)
%{_includedir}/%{name}*.h
%{_libdir}/lib%{name}.so
%changelog
+* Thu Jul 5 2012 Hans de Goede <hdegoede(a)redhat.com> - 2.0.9-1
+- New upstream release 2.0.9
+
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
2.0.6-9
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
diff --git a/sources b/sources
index 1546682..de6b0e3 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-12ffff67b0089c70037ad3d3f6306b9f alfont-2.0.6.tar.gz
+71112b3089f941a7cfd9e2eeae2f99df alfont-2.0.9.tar.gz