diff --git a/.cvsignore b/.cvsignore index ff0b73c..f3eb88d 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -allegro-4.0.3.tar.gz +allegro-4.2.0.tar.gz diff --git a/allegro-4.0.3-gcc4.patch b/allegro-4.0.3-gcc4.patch deleted file mode 100644 index bac40ae..0000000 --- a/allegro-4.0.3-gcc4.patch +++ /dev/null @@ -1,156 +0,0 @@ ---- allegro-4.0.3/tools/textconv.c.gcc4 2003-04-19 03:06:49.000000000 -0400 -+++ allegro-4.0.3/tools/textconv.c 2005-05-25 09:32:42.000000000 -0400 -@@ -190,7 +190,7 @@ - if (out_flip) - c = ((c&0xFF)<<8) | ((c&0xFF00)>>8); - -- size = out_type->u_setc(buf, c); -+ size = out_type->u_setc((char *)buf, c); - - for (i=0; i= 0) \ -- (unsigned char*) s += (size), dd += _al_stretch.i2; \ -- else \ -+for (; d < dend; d += (size), s += _al_stretch.sinc) { \ -+ set(d, get((type*) s)); \ -+ if (dd >= 0) { \ -+ s += (size), dd += _al_stretch.i2; \ -+ } else \ - dd += _al_stretch.i1; \ - } - -@@ -127,15 +127,15 @@ - */ - #define DECLARE_MASKED_STRETCHER(type, size, set, get, mask) \ - int dd = _al_stretch.dd; \ --type *s = (type*) sptr; \ -+unsigned char *s = (unsigned char*) sptr; \ - unsigned long d = dptr; \ - unsigned long dend = d + _al_stretch.dw; \ --for (; d < dend; d += (size), (unsigned char*) s += _al_stretch.sinc) { \ -- unsigned long color = get(s); \ -+for (; d < dend; d += (size), s += _al_stretch.sinc) { \ -+ unsigned long color = get((type*) s); \ - if (color != (mask)) \ - set(d, color); \ - if (dd >= 0) \ -- (unsigned char*) s += (size), dd += _al_stretch.i2; \ -+ s += (size), dd += _al_stretch.i2; \ - else \ - dd += _al_stretch.i1; \ - } ---- allegro-4.0.3/src/sound.c.gcc4 2003-04-19 03:06:47.000000000 -0400 -+++ allegro-4.0.3/src/sound.c 2005-05-25 09:32:42.000000000 -0400 -@@ -25,7 +25,7 @@ - - - --extern DIGI_DRIVER digi_none; -+static DIGI_DRIVER digi_none; - - - ---- allegro-4.0.3/src/x/xwin.c.gcc4 2003-04-19 03:06:49.000000000 -0400 -+++ allegro-4.0.3/src/x/xwin.c 2005-05-25 09:32:42.000000000 -0400 -@@ -765,7 +765,7 @@ - _xwin.fast_visual_depth = _xwin_private_fast_visual_depth(); - - /* Create screen bitmap from frame buffer. */ -- return _xwin_private_create_screen_bitmap(drv, 0, _xwin.ximage->data + _xwin.ximage->xoffset, -+ return _xwin_private_create_screen_bitmap(drv, 0, (unsigned char *)(_xwin.ximage->data + _xwin.ximage->xoffset), - _xwin.ximage->bytes_per_line); - } - -@@ -1400,7 +1400,7 @@ - return 0; - - /* Use first line of XImage for test. */ -- p8 = _xwin.ximage->data + _xwin.ximage->xoffset; -+ p8 = (unsigned char *)(_xwin.ximage->data + _xwin.ximage->xoffset); - p16 = (unsigned short*) p8; - p32 = (unsigned long*) p8; - -@@ -2989,7 +2989,7 @@ - XF86DGASetViewPort(_xwin.display, _xwin.screen, 0, 0); - - /* Create screen bitmap from frame buffer. */ -- return _xwin_private_create_screen_bitmap(drv, 1, fb_addr + offset_y * fb_width + offset_x * (_xwin.fast_visual_depth / 8), fb_width); -+ return _xwin_private_create_screen_bitmap(drv, 1, (unsigned char *)(fb_addr + offset_y * fb_width + offset_x * (_xwin.fast_visual_depth / 8)), fb_width); - } - - BITMAP *_xdga_create_screen(GFX_DRIVER *drv, int w, int h, int vw, int vh, int depth, int fullscreen) ---- allegro-4.0.3/src/fli.c.gcc4 2003-04-19 03:06:47.000000000 -0400 -+++ allegro-4.0.3/src/fli.c 2005-05-25 09:32:42.000000000 -0400 -@@ -184,16 +184,16 @@ - - - /* helpers for reading FLI chunk data */ --#define READ_BYTE_NC(p) (*((unsigned char *)(p))++) --#define READ_CHAR_NC(p) (*((signed char *)(p))++) -+#define READ_BYTE_NC(p) (((unsigned char *)(p))[0]++) -+#define READ_CHAR_NC(p) (((signed char *)(p))[0]++) - - #if (defined ALLEGRO_GCC) && (defined ALLEGRO_I386) - - /* for gcc on i386 */ --#define READ_WORD_NC(p) (*((unsigned short *)(p))++) --#define READ_SHORT_NC(p) (*((signed short *)(p))++) --#define READ_ULONG_NC(p) (*((unsigned long *)(p))++) --#define READ_LONG_NC(p) (*((signed long *)(p))++) -+#define READ_WORD_NC(p) (((unsigned short *)(p))[0]++) -+#define READ_SHORT_NC(p) (((signed short *)(p))[0]++) -+#define READ_ULONG_NC(p) (((unsigned long *)(p))[0]++) -+#define READ_LONG_NC(p) (((signed long *)(p))[0]++) - - #else - -@@ -289,16 +289,16 @@ - * sz is a size of chunk after subtructing size bytes (known to be < 0) - * size is how much bytes we need - * (size + sz) is how much bytes is left in chunk */ --#define FLI_KLUDGE(p,sz,size) \ --{ \ -- if (((size) + (sz)) <= 0) { \ -- memset(_fli_broken_data, 0, (size)); \ -- } \ -- else { \ -- memcpy(_fli_broken_data, (p), (size) + (sz)); \ -- memset(_fli_broken_data + (size) + (sz), 0, -(sz)); \ -- } \ -- (p) = _fli_broken_data; \ -+inline void FLI_KLUDGE(char *p,int sz, int size) -+{ -+ if (size + sz <= 0) { -+ memset(_fli_broken_data, 0, size); -+ } -+ else { -+ memcpy(_fli_broken_data, p, size + sz); -+ memset(_fli_broken_data + size + sz, 0, -sz); -+ } -+ p = _fli_broken_data; - } - - ---- allegro-4.0.3/examples/exspline.c.gcc4 2003-04-19 03:06:46.000000000 -0400 -+++ allegro-4.0.3/examples/exspline.c 2005-05-25 09:32:42.000000000 -0400 -@@ -84,6 +84,7 @@ - - n.x = node.x - (prev.x - node.x) / 8; - n.y = node.y - (prev.y - node.y) / 8; -+ n.tangent = 0; - - return n; - } diff --git a/allegro-4.0.3-mmaptest.patch b/allegro-4.0.3-mmaptest.patch deleted file mode 100644 index 4cc369e..0000000 --- a/allegro-4.0.3-mmaptest.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Nur allegro-4.0.3-orig/configure allegro-4.0.3/configure ---- allegro-4.0.3-orig/configure 2003-04-19 09:13:09.000000000 +0200 -+++ allegro-4.0.3/configure 2004-11-10 17:07:13.172543144 +0100 -@@ -4470,7 +4470,7 @@ - #ifdef __cplusplus - extern "C" { void *malloc(unsigned); } - #else --char *malloc(); -+/* char *malloc(); */ - #endif - - int diff --git a/allegro-4.0.3-novga.patch b/allegro-4.0.3-novga.patch deleted file mode 100644 index 3ef9717..0000000 --- a/allegro-4.0.3-novga.patch +++ /dev/null @@ -1,267 +0,0 @@ -Index: allegro/include/allegro/platform/aintlnx.h -diff -u allegro/include/allegro/platform/aintlnx.h:1.3 allegro/include/allegro/platform/aintlnx.h:1.3.2.1 ---- allegro/include/allegro/platform/aintlnx.h:1.3 Tue Nov 13 14:52:13 2001 -+++ allegro/include/allegro/platform/aintlnx.h Thu Oct 9 08:02:07 2003 -@@ -259,8 +259,11 @@ - - - /* VGA register access helpers */ --#include "allegro/internal/aintern.h" --#include "allegro/internal/aintvga.h" -+/* This is conditional because configure may have disabled VGA support */ -+#ifdef ALLEGRO_LINUX_VGA -+ #include "allegro/internal/aintern.h" -+ #include "allegro/internal/aintvga.h" -+#endif - - - -Index: allegro/include/allegro/platform/alunix.h -diff -u allegro/include/allegro/platform/alunix.h:1.2.2.2 allegro/include/allegro/platform/alunix.h:1.2.2.3 ---- allegro/include/allegro/platform/alunix.h:1.2.2.2 Fri Jan 31 08:12:50 2003 -+++ allegro/include/allegro/platform/alunix.h Thu Oct 9 08:02:08 2003 -@@ -251,6 +251,8 @@ - - /* Port I/O functions -- maybe these should be internal */ - -+#ifdef ALLEGRO_LINUX_VGA -+ - static INLINE void outportb(unsigned short port, unsigned char value) - { - __asm__ volatile ("outb %0, %1" : : "a" (value), "d" (port)); -@@ -287,6 +289,8 @@ - return value; - } - -+#endif /* ALLEGRO_LINUX_VGA */ -+ - - #endif /* ALLEGRO_LINUX */ - -Index: allegro/src/linux/lsystem.c -diff -u allegro/src/linux/lsystem.c:1.17.2.1 allegro/src/linux/lsystem.c:1.17.2.4 ---- allegro/src/linux/lsystem.c:1.17.2.1 Fri Feb 7 04:41:09 2003 -+++ allegro/src/linux/lsystem.c Thu Oct 9 08:02:09 2003 -@@ -26,13 +26,16 @@ - #include "allegro.h" - #include "allegro/internal/aintern.h" - #include "allegro/platform/aintunix.h" --#include "allegro/internal/aintvga.h" --#include "linalleg.h" -+#include "allegro/platform/aintlnx.h" - -+#ifdef ALLEGRO_LINUX_VGA - #ifdef HAVE_SYS_IO_H - /* iopl() exists in here instead of unistd.h in glibc */ - #include - #endif -+#endif -+ -+#include "linalleg.h" - - #ifndef ALLEGRO_LINUX - #error Something is wrong with the makefile -@@ -171,7 +174,9 @@ - * we attempt to set our euid to 0, in case this is the - * second time we've been called. */ - __al_linux_have_ioperms = !seteuid (0); -+#ifdef ALLEGRO_LINUX_VGA - __al_linux_have_ioperms &= !iopl (3); -+#endif - __al_linux_have_ioperms &= !__al_linux_init_memory(); - - /* At this stage we can drop the root privileges. */ -@@ -189,8 +194,10 @@ - if (__al_linux_init_console()) return -1; - - /* Initialise VGA helpers */ -+#ifdef ALLEGRO_LINUX_VGA - if (__al_linux_have_ioperms) - if (__al_linux_init_vga_helpers()) return -1; -+#endif - - /* Install emergency-exit signal handlers */ - old_sig_abrt = signal(SIGABRT, signal_handler); -@@ -242,7 +249,10 @@ - #endif - - /* shut down VGA helpers */ -- __al_linux_shutdown_vga_helpers(); -+#ifdef ALLEGRO_LINUX_VGA -+ if (__al_linux_have_ioperms) -+ __al_linux_shutdown_vga_helpers(); -+#endif - - /* shut down the console subsystem */ - __al_linux_done_console(); -@@ -254,7 +264,9 @@ - _unix_driver_lists_shutdown(); - - __al_linux_shutdown_memory(); -+#ifdef ALLEGRO_LINUX_VGA - iopl (0); -+#endif - } - - -Index: allegro/src/linux/lvga.c -diff -u allegro/src/linux/lvga.c:1.7 allegro/src/linux/lvga.c:1.7.2.1 ---- allegro/src/linux/lvga.c:1.7 Mon Dec 3 05:34:27 2001 -+++ allegro/src/linux/lvga.c Thu Oct 9 08:02:09 2003 -@@ -24,12 +24,13 @@ - #include - - #include "allegro.h" -+ -+#if ((defined ALLEGRO_LINUX_VGA) && ((!defined ALLEGRO_WITH_MODULES) || (defined ALLEGRO_MODULE))) -+ - #include "allegro/internal/aintern.h" - #include "allegro/platform/aintunix.h" - #include "allegro/internal/aintvga.h" - --#if ((defined ALLEGRO_LINUX_VGA) && ((!defined ALLEGRO_WITH_MODULES) || (defined ALLEGRO_MODULE))) -- - - - static MODE_REGISTERS mode13h = /* 320x200x8bpp NI */ -Index: allegro/src/linux/lvgahelp.c -diff -u allegro/src/linux/lvgahelp.c:1.4 allegro/src/linux/lvgahelp.c:1.4.2.1 ---- allegro/src/linux/lvgahelp.c:1.4 Tue Nov 13 14:52:13 2001 -+++ allegro/src/linux/lvgahelp.c Thu Oct 9 08:02:09 2003 -@@ -20,6 +20,9 @@ - #endif - - #include "allegro.h" -+ -+#ifdef ALLEGRO_LINUX_VGA -+ - #include "allegro/internal/aintern.h" - #include "allegro/platform/aintunix.h" - #include "allegro/internal/aintvga.h" -@@ -263,3 +266,4 @@ - __al_linux_set_vga_regs (&txt_regs); - } - -+#endif /* ALLEGRO_LINUX_VGA */ -Index: allegro/src/linux/vtswitch.c -diff -u allegro/src/linux/vtswitch.c:1.8.2.2 allegro/src/linux/vtswitch.c:1.8.2.3 ---- allegro/src/linux/vtswitch.c:1.8.2.2 Fri Feb 7 05:35:56 2003 -+++ allegro/src/linux/vtswitch.c Thu Oct 9 08:02:10 2003 -@@ -26,5 +26,4 @@ - #include "allegro.h" - #include "allegro/internal/aintern.h" - #include "allegro/platform/aintunix.h" --#include "allegro/internal/aintvga.h" - #include "linalleg.h" - - #ifdef HAVE_MMAP -Index: allegro/src/misc/modex.c -diff -u allegro/src/misc/modex.c:1.23.2.3 allegro/src/misc/modex.c:1.23.2.4 ---- allegro/src/misc/modex.c:1.23.2.3 Fri Feb 14 05:25:33 2003 -+++ allegro/src/misc/modex.c Thu Oct 9 08:02:10 2003 -@@ -23,6 +23,9 @@ - #include - - #include "allegro.h" -+ -+#ifdef GFX_MODEX -+ - #include "allegro/internal/aintern.h" - #include "allegro/internal/aintvga.h" - -@@ -30,7 +33,6 @@ - #include ALLEGRO_INTERNAL_HEADER - #endif - --#ifdef GFX_MODEX - #if (!defined ALLEGRO_LINUX) || ((defined ALLEGRO_LINUX_VGA) && ((!defined ALLEGRO_WITH_MODULES) || (defined ALLEGRO_MODULE))) - - -Index: allegro/src/misc/vga.c -diff -u allegro/src/misc/vga.c:1.17.2.1 allegro/src/misc/vga.c:1.17.2.2 ---- allegro/src/misc/vga.c:1.17.2.1 Fri Feb 7 05:36:02 2003 -+++ allegro/src/misc/vga.c Thu Oct 9 08:02:10 2003 -@@ -23,6 +23,9 @@ - #include - - #include "allegro.h" -+ -+#ifdef GFX_VGA -+ - #include "allegro/internal/aintern.h" - #include "allegro/internal/aintvga.h" - -@@ -30,7 +33,6 @@ - #include ALLEGRO_INTERNAL_HEADER - #endif - --#ifdef GFX_VGA - #if (!defined ALLEGRO_LINUX) || ((defined ALLEGRO_LINUX_VGA) && ((!defined ALLEGRO_WITH_MODULES) || (defined ALLEGRO_MODULE))) - - -Index: allegro/src/misc/vgaregs.c -diff -u allegro/src/misc/vgaregs.c:1.5 allegro/src/misc/vgaregs.c:1.5.2.1 ---- allegro/src/misc/vgaregs.c:1.5 Tue Nov 13 14:52:13 2001 -+++ allegro/src/misc/vgaregs.c Thu Oct 9 08:02:10 2003 -@@ -17,6 +17,9 @@ - - - #include "allegro.h" -+ -+#ifdef GFX_VGA -+ - #include "allegro/internal/aintern.h" - #include "allegro/internal/aintvga.h" - -@@ -88,3 +91,4 @@ - } - - -+#endif /* GFX_VGA */ -Index: allegro/src/unix/uptimer.c -diff -u allegro/src/unix/uptimer.c:1.6 allegro/src/unix/uptimer.c:1.6.2.1 ---- allegro/src/unix/uptimer.c:1.6 Wed Jan 23 14:25:34 2002 -+++ allegro/src/unix/uptimer.c Sat Oct 4 13:04:27 2003 -@@ -19,16 +19,6 @@ - #include "allegro.h" - #include "allegro/internal/aintern.h" - --/* See hack later. */ --#ifdef ALLEGRO_LINUX --#include --#ifdef HAVE_SYS_IO_H --#include --#endif --#include "allegro/platform/aintlnx.h" --#endif -- -- - - #ifdef HAVE_LIBPTHREAD - -@@ -38,6 +28,16 @@ - #include - - -+/* See hack later. */ -+#ifdef ALLEGRO_LINUX_VGA -+#ifdef HAVE_SYS_IO_H -+/* iopl() exists in here instead of unistd.h in glibc */ -+#include -+#endif -+#include "allegro/platform/aintlnx.h" -+#endif -+ -+ - #define TIMER_TO_USEC(x) ((long)((x) / 1.193181)) - #define USEC_TO_TIMER(x) ((long)((x) * (TIMERS_PER_SECOND / 1000000.))) - -@@ -89,7 +89,7 @@ - - block_all_signals(); - --#ifdef ALLEGRO_LINUX -+#ifdef ALLEGRO_LINUX_VGA - /* privileges hack for Linux: - * One of the jobs of the timer thread is to update the mouse pointer - * on screen. When using the Mode-X driver under Linux console, this diff --git a/allegro.spec b/allegro.spec index 6094c02..d7e2f02 100644 --- a/allegro.spec +++ b/allegro.spec @@ -1,6 +1,6 @@ Name: allegro -Version: 4.0.3 -Release: 13 +Version: 4.2.0 +Release: 1 Summary: A game programming library Summary(es): Una libreria de programacion de juegos @@ -11,14 +11,11 @@ Summary(cz): Knihovna pro programování her Group: System Environment/Libraries License: Giftware URL: http://alleg.sourceforge.net/ -Source: http://download.sourceforge.net/alleg/allegro-4.0.3.tar.gz -Patch0: allegro-4.0.3-mmaptest.patch -Patch1: allegro-4.0.3-novga.patch -Patch2: allegro-4.0.3-libdir.patch -Patch3: allegro-4.0.3-cfg.patch -Patch4: allegro-4.0.3-gcc4.patch +Source: http://download.sourceforge.net/alleg/allegro-%{version}.tar.gz +Patch1: allegro-4.0.3-libdir.patch +Patch2: allegro-4.0.3-cfg.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: XFree86-devel, esound-devel, texinfo, perl, arts-devel +BuildRequires: xorg-x11-devel, esound-devel, texinfo, perl, arts-devel %description Allegro is a cross-platform library intended for use in computer games @@ -116,11 +113,8 @@ které jsou užitečné pro vývoj Allegro programů. %prep %setup -q -%patch0 -p1 -b .mmaptest -%patch1 -p1 -b .novga -%patch2 -p0 -b .libdir -%patch3 -p0 -b .cfg -%patch4 -p1 -b .gcc4 +%patch1 -p0 -b .libdir +%patch2 -p0 -b .cfg %build @@ -188,13 +182,15 @@ rm -rf $RPM_BUILD_ROOT %{_includedir}/*alleg* %{_infodir}/allegro.info* %{_mandir}/man3/* +%{_datadir}/aclocal/allegro.m4 %files tools %defattr(-,root,root,-) -%doc tools/grabber.txt docs/makedoc.c +%doc tools/plugins/plugins.txt %{_bindir}/colormap %{_bindir}/dat %{_bindir}/dat2s +%{_bindir}/dat2c %{_bindir}/exedat %{_bindir}/grabber %{_bindir}/pack @@ -204,6 +200,12 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Wed May 25 2005 Jindrich Novy 4.2.0-1 +- update to 4.2.0 +- package dat2c, allegro.m4 +- replace XFree86-devel Buildrequires with xorg-x11-devel +- drop mmaptest, novga, gcc4 patches + * Wed May 25 2005 Jindrich Novy 4.0.3-13 - fix compilation on x86_64 (#158648) diff --git a/sources b/sources index f8a29b1..75ee1c4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4fd1d27c323ba33b6d6cad6c5a1d8a44 allegro-4.0.3.tar.gz +a8b2c85c58b16345fe735f72763f3a6e allegro-4.2.0.tar.gz