From 44783c01226a15b4dce33953b34d4ad051f04825 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Sun, 31 Mar 2013 15:10:46 +0200 Subject: [PATCH] - added man-prefix patch (prefix all man pages with allegro-, so that they won't conflict with other packages) - release 4 --- allegro-man-prefix.patch | 49 ++++++++++++++++++++++++++++++++++++++++ allegro.spec | 20 ++++++++-------- 2 files changed, 60 insertions(+), 9 deletions(-) create mode 100644 allegro-man-prefix.patch diff --git a/allegro-man-prefix.patch b/allegro-man-prefix.patch new file mode 100644 index 0000000..904d875 --- /dev/null +++ b/allegro-man-prefix.patch @@ -0,0 +1,49 @@ +--- 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 + #include + #include ++#include + #include + + #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); + } + diff --git a/allegro.spec b/allegro.spec index 650484e..10c6e97 100644 --- a/allegro.spec +++ b/allegro.spec @@ -1,10 +1,10 @@ # # 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? @@ -18,13 +18,14 @@ Summary(it.UTF-8): Una libreria per la programmazione di videogiochi 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 @@ -339,8 +340,9 @@ biblioteki allegro. %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 @@ -408,8 +410,8 @@ rm -rf $RPM_BUILD_ROOT %{_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 -- 2.44.0