[packages/allegro] - new URLs, updated to 4.4.3.1 - updated info patch, modify makedoc to pass tabs in direntry - remov

qboosh qboosh at pld-linux.org
Tue Dec 3 18:11:32 CET 2019


commit c84c079d85a1a8cb98cbd8ad59fc31821f26e68b
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Tue Dec 3 18:12:02 2019 +0100

    - new URLs, updated to 4.4.3.1
    - updated info patch, modify makedoc to pass tabs in direntry
    - removed obsolete format patch

 allegro-format.patch | 100 ---------------------------------------------------
 allegro-info.patch   |  86 ++++++++++++++++++++++++++++++++++++++++++++
 allegro.spec         |  49 +++++++++++++------------
 3 files changed, 110 insertions(+), 125 deletions(-)
---
diff --git a/allegro.spec b/allegro.spec
index b59f546..f1e3701 100644
--- a/allegro.spec
+++ b/allegro.spec
@@ -17,17 +17,18 @@ Summary(fr.UTF-8):	Une librairie de programmation de jeux
 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:	6
+# NOTE: keep 4.x here; for 5.x see allegro5.spec
+Version:	4.4.3.1
+Release:	1
 License:	Giftware
 Group:		Libraries
-Source0:	http://downloads.sourceforge.net/alleg/%{name}-%{version}.tar.gz
-# Source0-md5:	4db71b0460fc99926ae91d223199c2e6
+#Source0Download: https://github.com/liballeg/allegro5/releases
+Source0:	https://github.com/liballeg/allegro5/releases/download/%{version}/%{name}-%{version}.tar.gz
+# Source0-md5:	d0435da87d4c157ad3620e1cc58b807e
 Patch0:		%{name}-info.patch
 Patch1:		%{name}-config.patch
 Patch2:		%{name}-man-prefix.patch
-Patch3:		%{name}-format.patch
-URL:		http://alleg.sourceforge.net/
+URL:		https://liballeg.org/
 BuildRequires:	OpenGL-GLU-devel
 BuildRequires:	OpenGL-devel
 %{?with_alsa:BuildRequires:	alsa-lib-devel >= 0.9}
@@ -39,7 +40,6 @@ BuildRequires:	libstdc++-devel
 BuildRequires:	libvorbis-devel
 BuildRequires:	pkgconfig
 BuildRequires:	rpmbuild(macros) >= 1.600
-BuildRequires:	sed >= 4.0
 %{?with_svga:BuildRequires:	svgalib-devel}
 BuildRequires:	texinfo
 BuildRequires:	xorg-lib-libX11-devel
@@ -50,6 +50,8 @@ BuildRequires:	xorg-lib-libXxf86dga-devel
 BuildRequires:	xorg-lib-libXxf86vm-devel
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+%define		pkgver	4.4.3
+
 %description
 Allegro is a cross-platform library intended for use in computer games
 and other types of multimedia programming.
@@ -342,9 +344,6 @@ biblioteki allegro.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
-%patch3 -p1
-
-%{__sed} -i -e 's/ADDON_LINKAGE STATIC/ADDON_LINKAGE SHARED/' CMakeLists.txt
 
 %build
 install -d build
@@ -366,19 +365,19 @@ install -d $RPM_BUILD_ROOT%{_mandir}/man3
 %{__make} -C build install \
 	DESTDIR=$RPM_BUILD_ROOT
 
-install modules.lst $RPM_BUILD_ROOT%{_libdir}/allegro/%{version}
+cp -p modules.lst $RPM_BUILD_ROOT%{_libdir}/allegro/%{pkgver}
 
 # install examples and tests
 find build/examples -maxdepth 1 -perm 755 -name "ex*" -exec install {} $RPM_BUILD_ROOT%{_bindir} \;
 find build/tests -maxdepth 1 -perm 755 ! -name CMakeFiles -exec install {} $RPM_BUILD_ROOT%{_bindir} \;
 
 # force install man pages
-cp build/docs/man/* $RPM_BUILD_ROOT%{_mandir}/man3
+cp -p build/docs/man/* $RPM_BUILD_ROOT%{_mandir}/man3
 
-mv $RPM_BUILD_ROOT%{_bindir}/play{,-allegro}
-mv $RPM_BUILD_ROOT%{_bindir}/test{,-allegro}
+%{__mv} $RPM_BUILD_ROOT%{_bindir}/play{,-allegro}
+%{__mv} $RPM_BUILD_ROOT%{_bindir}/test{,-allegro}
 
-%{__rm} -r $RPM_BUILD_ROOT%{_prefix}/doc/allegro-%{version}
+%{__rm} -r $RPM_BUILD_ROOT%{_prefix}/doc/allegro-%{pkgver}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -397,12 +396,12 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc AUTHORS CHANGES THANKS readme.txt todo.txt
+%doc todo.txt docs/txt/{changes,license,readme,thanks}.txt
 %attr(755,root,root) %{_libdir}/liballeg.so.*.*.*
 %attr(755,root,root) %ghost %{_libdir}/liballeg.so.4.4
 %dir %{_libdir}/allegro
-%dir %{_libdir}/allegro/%{version}
-%{_libdir}/allegro/%{version}/modules.lst
+%dir %{_libdir}/allegro/%{pkgver}
+%{_libdir}/allegro/%{pkgver}/modules.lst
 
 %files devel
 %defattr(644,root,root,755)
@@ -420,36 +419,36 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with dga2}
 %files dga2
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/allegro/%{version}/alleg-dga2.so
+%attr(755,root,root) %{_libdir}/allegro/%{pkgver}/alleg-dga2.so
 %endif
 
 %files fbcon
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/allegro/%{version}/alleg-fbcon.so
+%attr(755,root,root) %{_libdir}/allegro/%{pkgver}/alleg-fbcon.so
 
 %if %{with svga}
 %files svgalib
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/allegro/%{version}/alleg-svgalib.so
+%attr(755,root,root) %{_libdir}/allegro/%{pkgver}/alleg-svgalib.so
 %endif
 
 %if %{with vga}
 %files vga
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/allegro/%{version}/alleg-vga.so
+%attr(755,root,root) %{_libdir}/allegro/%{pkgver}/alleg-vga.so
 %endif
 
 %if %{with alsa}
 %files alsa
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/allegro/%{version}/alleg-alsadigi.so
-%attr(755,root,root) %{_libdir}/allegro/%{version}/alleg-alsamidi.so
+%attr(755,root,root) %{_libdir}/allegro/%{pkgver}/alleg-alsadigi.so
+%attr(755,root,root) %{_libdir}/allegro/%{pkgver}/alleg-alsamidi.so
 %endif
 
 %if %{with jack}
 %files jack
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/allegro/%{version}/alleg-jack.so
+%attr(755,root,root) %{_libdir}/allegro/%{pkgver}/alleg-jack.so
 %endif
 
 %files addons
diff --git a/allegro-format.patch b/allegro-format.patch
deleted file mode 100644
index 2baed67..0000000
--- a/allegro-format.patch
+++ /dev/null
@@ -1,100 +0,0 @@
---- allegro-4.4.2/src/unix/umodules.c.orig	2011-05-13 10:11:33.000000000 +0200
-+++ allegro-4.4.2/src/unix/umodules.c	2013-03-31 15:38:10.240570677 +0200
-@@ -126,11 +126,11 @@
- 	 continue;
- 
-       if (!fullpath_slash) {
--         snprintf(fullpath, sizeof fullpath, filename);
-+         snprintf(fullpath, sizeof fullpath, "%s", filename);
- 	 fullpath[(sizeof fullpath) - 1] = 0;
-       }
-       else {
--	 snprintf(fullpath_slash+1, (sizeof fullpath) - (fullpath_slash - fullpath) - 1, filename);
-+	 snprintf(fullpath_slash+1, (sizeof fullpath) - (fullpath_slash - fullpath) - 1, "%s", filename);
- 	 fullpath[(sizeof fullpath) - 1] = 0;
-       }
-       
---- allegro-4.4.2/src/linux/ljoy.c.orig	2010-02-20 06:18:16.000000000 +0100
-+++ allegro-4.4.2/src/linux/ljoy.c	2013-03-31 16:10:01.382066535 +0200
-@@ -93,7 +93,7 @@
- 
-       if (ioctl(joy_fd[i], JSIOCGVERSION, &raw_version) < 0) {
-          /* NOTE: IOCTL fails if the joystick API is version 0.x */
--         uszprintf(allegro_error, ALLEGRO_ERROR_SIZE, get_config_text("Your Linux joystick API is version 0.x which is unsupported."));
-+         uszprintf(allegro_error, ALLEGRO_ERROR_SIZE, "%s", get_config_text("Your Linux joystick API is version 0.x which is unsupported."));
-          return -1; 
-       }
-       
---- allegro-4.4.2/examples/exkeys.c.orig	2008-01-10 20:46:00.000000000 +0100
-+++ allegro-4.4.2/examples/exkeys.c	2013-03-31 17:08:24.133321018 +0200
-@@ -193,7 +193,7 @@
-       if (key_shifts & KB_NUMLOCK_FLAG)  strcat(buf, " num");
-       if (key_shifts & KB_SCROLOCK_FLAG) strcat(buf, " scrl");
-       scroll();
--      textprintf_ex(screen, font, 8, SCREEN_H-16, makecol(0, 0, 0), makecol(255, 255, 255), buf);
-+      textprintf_ex(screen, font, 8, SCREEN_H-16, makecol(0, 0, 0), makecol(255, 255, 255), "%s", buf);
-    } while (k != 27);
- 
-    /* various scan codes are defined in allegro.h as KEY_* constants */
-@@ -234,7 +234,7 @@
-       if (key[KEY_8]) buf[8] = '8'; else buf[8] = ' ';
-       if (key[KEY_9]) buf[9] = '9'; else buf[9] = ' ';
-       buf[10] = 0;
--      textprintf_ex(screen, font, 8, SCREEN_H-16, makecol(0, 0, 0), makecol(255, 255, 255), buf);
-+      textprintf_ex(screen, font, 8, SCREEN_H-16, makecol(0, 0, 0), makecol(255, 255, 255), "%s", buf);
-       rest(1);
-    } while (!keypressed() || (readkey() >> 8) != KEY_ESC);
- 
---- allegro-4.4.2/examples/extrans2.c.orig	2008-01-30 11:56:50.000000000 +0100
-+++ allegro-4.4.2/examples/extrans2.c	2013-03-31 17:12:57.722608195 +0200
-@@ -211,7 +211,7 @@
-       } else {
-          msg = "no flipping";
-       }
--      textprintf_ex(buffer, font, 1, 1, makecol(255, 255, 255), -1, msg);
-+      textprintf_ex(buffer, font, 1, 1, makecol(255, 255, 255), -1, "%s", msg);
- 
-       /* finally blit the back buffer on the screen */
-       blit(buffer, screen, 0, 0, 0, 0, buffer->w, buffer->h);
---- allegro-4.4.2/tools/pack.c.orig	2006-05-20 16:49:58.000000000 +0200
-+++ allegro-4.4.2/tools/pack.c	2013-03-31 17:43:56.811562844 +0200
-@@ -42,7 +42,7 @@
-       printf(": %s", s1);
- 
-    if (s2)
--      printf(s2);
-+      fputs(s2, stdout);
- 
-    printf("\n");
- 
---- allegro-4.4.2/setup/setup.c.orig	2010-05-23 18:05:33.000000000 +0200
-+++ allegro-4.4.2/setup/setup.c	2013-03-31 18:03:16.278298378 +0200
-@@ -1163,7 +1163,7 @@
- 	 textprintf_ex(bmp, font, SCREEN_W/2-96, SCREEN_H/2-60+c*20, -1, -1, uconvert_ascii("%s (%d/%d)", tmp),
-                     joystick_driver->name, i+1, num_joysticks);
-       else
--	 textprintf_ex(bmp, font, SCREEN_W/2-96, SCREEN_H/2-60+c*20, -1, -1, joystick_driver->name);
-+	 textprintf_ex(bmp, font, SCREEN_W/2-96, SCREEN_H/2-60+c*20, -1, -1, "%s", joystick_driver->name);
-       c++;
-    }
- 
-@@ -2879,7 +2879,7 @@
-       alert(uconvert_ascii("Error loading " SETUP_DATA_FILE, tmp1), NULL, NULL, uconvert_ascii("OK", tmp2), NULL, 13, 0);
-     #else
-       set_gfx_mode(GFX_TEXT, 0, 0, 0, 0);
--      allegro_message(uconvert_ascii("Error loading " SETUP_DATA_FILE "\n", tmp1));
-+      allegro_message("%s", uconvert_ascii("Error loading " SETUP_DATA_FILE "\n", tmp1));
-     #endif
-       return 1;
-    }
---- allegro-4.4.2/tests/play.c.orig	2005-03-19 12:15:07.000000000 +0100
-+++ allegro-4.4.2/tests/play.c	2013-03-31 18:04:24.698120328 +0200
-@@ -74,7 +74,7 @@
- 
-    strcat(msg, "\nIf you don't specify the card, Allegro will auto-detect (ie. guess :-)\n");
- 
--   allegro_message(msg);
-+   allegro_message("%s", msg);
-    free(msg);
- }
- 
diff --git a/allegro-info.patch b/allegro-info.patch
index 0254e5b..a12d9dd 100644
--- a/allegro-info.patch
+++ b/allegro-info.patch
@@ -12,3 +12,89 @@
  @$@end direntry
  @$This is the Info version of the Allegro manual
  @$
+@@ -12197,7 +12197,7 @@
+       0, 0, 0,  /* Viewer position, in this case, 0/0/0. */
+       0, 0, -1, /* Viewer direction, in this case along negative z. */
+       0, 1, 0,  /* Up vector, in this case positive y. */
+-      32,       /* The FOV, here 45�. */
++      32,       /* The FOV, here 45°. */
+       (float)SCREEN_W / (float)SCREEN_H)); /* Aspect ratio. */
+   
+    /* Applying the matrix transforms the point 100/200/-300
+@@ -12384,7 +12384,7 @@
+    The fov parameter specifies the field of view (ie. width of the camera
+    focus) in binary, 256 degrees to the circle format. For typical
+    projections, a field of view in the region 32-48 will work well. 64
+-   (90�) applies no extra scaling - so something which is one unit away
++   (90°) applies no extra scaling - so something which is one unit away
+    from the viewer will be directly scaled to the viewport. A bigger FOV
+    moves you closer to the viewing plane, so more objects will appear. A
+    smaller FOV moves you away from the viewing plane, which means you see a
+--- allegro-4.4.3.1/docs/src/makedoc/makedoc.c.orig	2019-03-04 02:30:11.000000000 +0100
++++ allegro-4.4.3.1/docs/src/makedoc/makedoc.c	2019-12-03 16:16:18.533920627 +0100
+@@ -29,6 +29,7 @@
+  */
+ 
+ 
++#include <stdbool.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <stddef.h>
+@@ -70,7 +71,7 @@
+ static void _add_line(char *buf, int flags);
+ static void _add_toc_line(const char *buf, const char *alt, int root, int num, int texinfoable, int htmlable, int otherfile);
+ static void _add_external_file(const char *buf, int line_number);
+-static char *_my_fgets(char *p, int max, FILE *f);
++static char *_my_fgets(char *p, int max, FILE *f, bool expand);
+ static void _add_toc(char *buf, int root, int num, int texinfoable, int htmlable);
+ static void _activate_email_mangling(const char *txt);
+ static void _mangle_email_links(char *buf);
+@@ -314,6 +316,7 @@
+    char buf[1024];
+    FILE *f;
+    int line = 0;
++   bool expand = true;
+ 
+    /*printf("reading %s\n", filename);*/
+ 
+@@ -321,7 +324,7 @@
+    if (!f)
+       return 1;
+       
+-   while (_my_fgets(buf, 1023, f)) {
++   while (_my_fgets(buf, 1023, f, expand)) {
+       char *end = strpbrk(buf, "\r\n");
+       line++;
+ 
+@@ -503,7 +506,13 @@
+ 	 else if (strincmp(buf+1, "external-css=") == 0)
+ 	    html_css_filename = m_strdup(buf+14);
+ 	 else if (buf[1] == '$')
++	 {
++            if (strincmp(buf+2, "@direntry") == 0)
++              expand = false;
++            else if (strincmp(buf+2, "@end direntry") == 0)
++              expand = true;
+ 	    _add_line(buf+2, TEXINFO_FLAG | TEXINFO_CMD_FLAG);
++	 }
+ 	 else if (buf[1] == '@') {
+ 	    char *found_struct_definition = strstr(buf+2, "struct @");
+ 	    if(!found_struct_definition)
+@@ -761,7 +770,7 @@
+  * on the character buffer being modifiable, so cleaning this would
+  * practically mean having to rewrite the other functions too.
+  */
+-static char *_my_fgets(char *p, int max, FILE *f)
++static char *_my_fgets(char *p, int max, FILE *f, bool expand)
+ {
+    int c, ch;
+ 
+@@ -779,7 +788,7 @@
+ 	 c--;
+       else if (p[c] == '\n')
+ 	 break;
+-      else if (p[c] == '\t') {
++      else if (expand && (p[c] == '\t')) {
+ 	 p[c] = ' ';
+ 	 while ((c+1) & 7) {
+ 	    c++;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/allegro.git/commitdiff/c84c079d85a1a8cb98cbd8ad59fc31821f26e68b



More information about the pld-cvs-commit mailing list