Author: scop
Update of /cvs/extras/rpms/allegro/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv13998
Modified Files:
allegro.spec
Added Files:
allegro-4.0.3-novga.patch
Log Message:
Fix PPC build.
allegro-4.0.3-novga.patch:
--- NEW FILE allegro-4.0.3-novga.patch ---
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 <sys/io.h>
#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 <sys/mman.h>
#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 <string.h>
#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 <string.h>
#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 <unistd.h>
-#ifdef HAVE_SYS_IO_H
-#include <sys/io.h>
-#endif
-#include "allegro/platform/aintlnx.h"
-#endif
-
-
#ifdef HAVE_LIBPTHREAD
@@ -38,6 +28,16 @@
#include <sys/time.h>
+/* See hack later. */
+#ifdef ALLEGRO_LINUX_VGA
+#ifdef HAVE_SYS_IO_H
+/* iopl() exists in here instead of unistd.h in glibc */
+#include <sys/io.h>
+#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
Index: allegro.spec
===================================================================
RCS file: /cvs/extras/rpms/allegro/devel/allegro.spec,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- allegro.spec 27 Nov 2004 10:18:31 -0000 1.5
+++ allegro.spec 13 Feb 2005 19:45:27 -0000 1.6
@@ -1,6 +1,6 @@
Name: allegro
Version: 4.0.3
-Release: 7
+Release: 8
Epoch: 0
Summary: A game programming library
Summary(es): Una libreria de programacion de juegos
@@ -11,7 +11,8 @@
License: Giftware
URL:
http://alleg.sourceforge.net/
Source:
http://download.sourceforge.net/alleg/allegro-4.0.3.tar.gz
-Patch: allegro-4.0.3-mmaptest.patch
+Patch0: %{name}-4.0.3-mmaptest.patch
+Patch1: %{name}-4.0.3-novga.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: XFree86-devel, esound-devel, texinfo, perl, arts-devel
@@ -94,14 +95,19 @@
%prep
%setup -q
-%patch -p1 -b .mmaptest
+%patch0 -p1 -b .mmaptest
+%patch1 -p1 -b .novga
%{__perl} -pi -e \
's|\$TARGET_ARCH\s+-O\S+|\$RPM_OPT_FLAGS| ; s|LDFLAGS="-s
|LDFLAGS="|' \
configure
%build
-%configure --enable-svgalib=no
+%configure \
+%ifnarch %{ix86} x86_64 ia64
+ --enable-vga=no --enable-vbeaf=no \
+%endif
+ --enable-svgalib=no
make %{?_smp_mflags}
MKDATA_PRELOAD=../../lib/unix/liballeg-%{version}.so \
DAT=../../tools/dat sh misc/mkdata.sh
@@ -109,7 +115,8 @@
%install
rm -rf $RPM_BUILD_ROOT
-make install install-man install-info DESTDIR=$RPM_BUILD_ROOT
+make install install-man install-info \
+ DESTDIR=$RPM_BUILD_ROOT LDCONFIG=/bin/true
install -Dpm 644 allegro.cfg $RPM_BUILD_ROOT%{_sysconfdir}/allegrorc
install -dm 755 $RPM_BUILD_ROOT%{_datadir}/allegro
install -pm 644 keyboard.dat language.dat $RPM_BUILD_ROOT%{_datadir}/allegro
@@ -172,6 +179,10 @@
%changelog
+* Sun Feb 13 2005 Ville Skytt�� <ville.skytta at iki.fi> - 0:4.0.3-8
+- Build without vga and vbeaf on non-x86-like archs.
+- Apply upstream patch to fix build without vga.
+
* Fri Nov 12 2004 Ville Skytt�� <ville.skytta at iki.fi> - 0:4.0.3-7
- Explicitly disable svgalib for now.
- Let rpm take care of all stripping.