--- /dev/null
+--- allegro-4.4.2/docs/src/makedoc/makeman.c.orig 2005-09-24 04:30:04.000000000 +0200
++++ allegro-4.4.2/docs/src/makedoc/makeman.c 2013-03-31 14:34:45.839923935 +0200
+@@ -21,6 +21,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdlib.h>
++#include <limits.h>
+ #include <assert.h>
+
+ #include "makeman.h"
+@@ -52,7 +53,7 @@
+ */
+ int write_man(char *filename)
+ {
+- char buf[256], buf2[256];
++ char buf[PATH_MAX], buf2[PATH_MAX];
+ char *xref[256];
+ int xrefs = 0;
+ LINE *line = head;
+@@ -98,9 +99,7 @@
+
+ if (p) {
+ strcpy(buf, filename);
+- strcpy(get_filename(buf), p);
+- strcat(buf, ".");
+- strcat(buf, get_extension(filename));
++ sprintf(get_filename(buf), "allegro-%s.%s", p, get_extension(filename));
+
+ /*printf("writing %s\n", buf);*/
+ f = fopen(buf, "w");
+@@ -163,16 +162,14 @@
+
+ if (p) {
+ strcpy(buf2, filename);
+- strcpy(get_filename(buf2), p);
+- strcat(buf2, ".");
+- strcat(buf2, get_extension(filename));
++ sprintf(get_filename(buf2), "allegro-%s.%s", p, get_extension(filename));
+
+ /*printf("writing %s\n", buf2);*/
+ f2 = fopen(buf2, "w");
+ if (!f2)
+ return 1;
+
+- fprintf(f2, ".so man%s/%s\n", get_extension(filename), get_filename(buf));
++ fprintf(f2, ".so man%s/allegro-%s\n", get_extension(filename), get_filename(buf));
+ fclose(f2);
+ }
+
#
# Conditional build:
-%bcond_without alsa # without ALSA modules
-%bcond_without dga2 # without DGA2 module
-%bcond_without jack # without JACK module
-%bcond_with svga # without svgalib module
-%bcond_without vga # without vga module (x86-only)
+%bcond_without alsa # ALSA modules
+%bcond_without dga2 # DGA2 module
+%bcond_without jack # JACK module
+%bcond_with svga # svgalib module
+%bcond_without vga # vga module (x86-only)
#
%ifnarch %{ix86}
# x86_64 too?
Summary(pl.UTF-8): Biblioteka do programowania gier
Name: allegro
Version: 4.4.2
-Release: 3
+Release: 4
License: Giftware
Group: Libraries
Source0: http://downloads.sourceforge.net/alleg/%{name}-%{version}.tar.gz
# Source0-md5: 4db71b0460fc99926ae91d223199c2e6
Patch0: %{name}-info.patch
Patch1: %{name}-config.patch
+Patch2: %{name}-man-prefix.patch
URL: http://alleg.sourceforge.net/
BuildRequires: OpenGL-GLU-devel
BuildRequires: OpenGL-devel
%setup -q
%patch0 -p1
%patch1 -p1
+%patch2 -p1
-sed -i -e 's/ADDON_LINKAGE STATIC/ADDON_LINKAGE SHARED/' CMakeLists.txt
+%{__sed} -i -e 's/ADDON_LINKAGE STATIC/ADDON_LINKAGE SHARED/' CMakeLists.txt
%build
install -d build
%{_includedir}/allegro.h
%{_includedir}/linalleg.h
%{_includedir}/xalleg.h
-# XXX: aren't some names too generic?
-%{_mandir}/man3/*.3*
+# original names were too generic, man-prefix patch adds "allegro-" prefix
+%{_mandir}/man3/allegro-*.3*
%{_infodir}/allegro.info*
%{_pkgconfigdir}/allegro.pc