Update of /cvsroot/freevo/freevo/contrib/rpm
In directory sc8-pr-cvs1:/tmp/cvs-serv31268

Modified Files:
        SDL.spec SDL_ttf.spec 
Added Files:
        SDL-1.2.6-nokeyboard.patch 
Log Message:
Added spec files for directfb support in SDL, patched SDL_ttf


--- NEW FILE: SDL-1.2.6-nokeyboard.patch ---
diff -ur SDL-1.2.5/src/video/fbcon/SDL_fbevents.c 
SDL-1.2.5-freevo/src/video/fbcon/SDL_fbevents.c
--- SDL-1.2.5/src/video/fbcon/SDL_fbevents.c    Wed Mar  6 05:23:03 2002
+++ SDL-1.2.5-freevo/src/video/fbcon/SDL_fbevents.c     Fri Jan 10 00:28:55 2003
@@ -153,13 +153,69 @@
 
 int FB_InGraphicsMode(_THIS)
 {
+       if (getenv("SDL_NOKEYBOARD") != NULL) {
+               return (1); /* Special handling for no keyboard */
+       }
+  
        return((keyboard_fd >= 0) && (saved_kbd_mode >= 0));
 }
 
+
+static void
+tty_enable (void)
+{
+       int tty;
+  
+       tty = open ("/dev/tty0", O_RDWR);
+       if(tty < 0) {
+               perror("Error can't open /dev/tty0");
+               exit (1);
+       }
+
+       if (ioctl (tty, KDSETMODE, KD_TEXT) == -1) {
+               perror ("Error setting text mode for tty");
+               close (tty);
+               exit (1);
+       }
+  
+       close(tty);
+}
+
+
+static void
+tty_disable (void)
+{
+       int tty;
+
+
+       tty = open ("/dev/tty0", O_RDWR);
+       if (tty < 0) {
+               perror ("Error can't open /dev/tty0");
+               exit (1);
+       }
+
+       if (ioctl (tty, KDSETMODE, KD_GRAPHICS) == -1) {
+               perror ("Error setting graphics mode for tty");
+               close (tty);
+               exit (1);
+       }
+  
+       close (tty);
+
+}
+
+
 int FB_EnterGraphicsMode(_THIS)
 {
        struct termios keyboard_termios;
+       int fd;
 
+        
+       if (getenv("SDL_NOKEYBOARD") != NULL) {
+               tty_disable ();
+               return (1);              /* Do not touch the keyboard */
+        }
+        
        /* Set medium-raw keyboard mode */
        if ( (keyboard_fd >= 0) && !FB_InGraphicsMode(this) ) {
 
@@ -219,6 +275,12 @@
 
 void FB_LeaveGraphicsMode(_THIS)
 {
+  
+       if (getenv("SDL_NOKEYBOARD") != NULL) {
+               tty_enable ();
+               return; /* Special handling for no keyboard */
+        }
+
        if ( FB_InGraphicsMode(this) ) {
                ioctl(keyboard_fd, KDSETMODE, KD_TEXT);
                ioctl(keyboard_fd, KDSKBMODE, saved_kbd_mode);
@@ -841,6 +903,11 @@
        Uint32 screen_arealen;
        Uint8 *screen_contents;
 
+       
+       if (getenv("SDL_NOKEYBOARD") != NULL) {
+               return;        /* Do not touch the keyboard */
+       }
+        
        /* Figure out whether or not we're switching to a new console */
        if ( (ioctl(keyboard_fd, VT_GETSTATE, &vtstate) < 0) ||
             (which == vtstate.v_active) ) {
@@ -891,6 +958,11 @@
        int scancode;
        SDL_keysym keysym;
 
+
+       if (getenv("SDL_NOKEYBOARD") != NULL) {
+               return;        /* Do not touch the keyboard */
+       }
+        
        nread = read(keyboard_fd, keybuf, BUFSIZ);
        for ( i=0; i<nread; ++i ) {
                scancode = keybuf[i] & 0x7F;
@@ -934,6 +1006,10 @@
        int max_fd;
        static struct timeval zero;
 
+        if (getenv("SDL_NOKEYBOARD") != NULL) {
+          return;        /* XXX Do not touch the keyboard */
+        }
+        
        do {
                posted = 0;
 
diff -ur SDL-1.2.5/src/video/fbcon/SDL_fbvideo.c 
SDL-1.2.5-freevo/src/video/fbcon/SDL_fbvideo.c
--- SDL-1.2.5/src/video/fbcon/SDL_fbvideo.c     Mon Sep  2 16:42:15 2002
+++ SDL-1.2.5-freevo/src/video/fbcon/SDL_fbvideo.c      Fri Jan 10 00:27:10 2003
@@ -529,10 +529,18 @@
        }
 
        /* Enable mouse and keyboard support */
-       if ( FB_OpenKeyboard(this) < 0 ) {
-               FB_VideoQuit(this);
-               return(-1);
+       {
+               const char *sdl_nokbd;
+
+               sdl_nokbd = getenv("SDL_NOKEYBOARD");
+               if (!sdl_nokbd) {
+                       if ( FB_OpenKeyboard(this) < 0 ) {
+                               FB_VideoQuit(this);
+                               return(-1);
+                       }
+               }
        }
+        
        if ( FB_OpenMouse(this) < 0 ) {
                const char *sdl_nomouse;
 

Index: SDL.spec
===================================================================
RCS file: /cvsroot/freevo/freevo/contrib/rpm/SDL.spec,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** SDL.spec    17 Sep 2003 09:15:28 -0000      1.1
--- SDL.spec    29 Sep 2003 07:18:55 -0000      1.2
***************
*** 1,249 ****
! Summary: A cross-platform multimedia library.
! Name: SDL
! Version: 1.2.5
! Release: 4_freevo
! Source: http://www.libsdl.org/release/%{name}-%{version}.tar.gz
! Patch0: SDL-1.1.7-byteorder.patch
! Patch2: SDL-1.2.2-autoconf25.patch
! Patch4: SDL-1.2.3-prefersounddaemons.patch
! Patch5: SDL-1.2.3-c++.patch
! Patch6: SDL-1.2.5-dgavideo-modes.patch
! Patch7: SDL-1.2.5-nokeyboard.patch
! Patch8: SDL-1.2.5-dxr3-ffmpeg.patch
  URL: http://www.libsdl.org/
! License: LGPL
  Group: System Environment/Libraries
! BuildRoot: %{_tmppath}/%{name}-%{version}-root
  Prefix: %{_prefix}
! BuildRequires: arts-devel audiofile-devel
! BuildRequires: esound-devel
  
  %description
! Simple DirectMedia Layer (SDL) is a cross-platform multimedia library
! designed to provide fast access to the graphics frame buffer and audio
! device.
  
  %package devel
! Summary: Files needed to develop Simple DirectMedia Layer applications.
  Group: Development/Libraries
! Requires: SDL = %{version} XFree86-devel
  
  %description devel
! Simple DirectMedia Layer (SDL) is a cross-platform multimedia library
! designed to provide fast access to the graphics frame buffer and audio
! device. This package provides the libraries, include files, and other
! resources needed for developing SDL applications.
  
  %prep
! rm -rf %{buildroot}
  
  %setup -q 
! %patch0 -p1 -b .byte
! AUTOMAKE_VER=`automake --version |head -n1 |sed -e "s,.* ,," |cut -b1-3 | sed -e 
"s,\.,,g"`
! if [ "$AUTOMAKE_VER" -gt 14 ]; then
! %patch2 -p1 -b .ac25x
! fi
! %patch4 -p1 -b .prefer
! %patch5 -p1 -b .c++
! %patch6 -p1 -b .modes
! %patch7 -p1 
! %patch8 -p1 
  
  %build
! cp /usr/share/libtool/config.{sub,guess} .
! ./autogen.sh
! CFLAGS="$RPM_OPT_FLAGS -fPIC" CXXFLAGS="$RPM_OPT_FLAGS -fPIC" LDFLAGS="-fPIC" 
./configure --disable-debug --prefix=%{prefix} --sysconfdir=/etc --enable-dlopen 
--enable-arts --enable-arts-shared --libdir=%{_libdir} \
! --enable-esd --enable-esd-shared
! # Workaround for broken automake mess
! AUTOMAKE_VER=`automake --version |head -n1 |sed -e "s,.* ,," |cut -b1-3 | sed -e 
"s,\.,,g"`
! if [ "$AUTOMAKE_VER" -gt 14 ]; then
! cat >automake <<EOF
! exit 0
! EOF
! chmod +x automake
! export PATH=`pwd`:$PATH
! fi
! # End workaround
! make %{?_smp_mflags}
  
  %install
! rm -rf %{buildroot}
! # Continued workaround for automake mess
! export PATH=`pwd`:$PATH
! %makeinstall
  
  %clean
! rm -rf %{buildroot}
! 
! %post -p /sbin/ldconfig
! 
! %postun -p /sbin/ldconfig
  
  %files
  %defattr(-,root,root)
  %doc README-SDL.txt COPYING CREDITS BUGS
! %{_libdir}/lib*.so.*
  
  %files devel
  %defattr(-,root,root)
! %doc README README-SDL.txt COPYING CREDITS BUGS WhatsNew docs.html docs/html
! %doc docs/index.html
! %{_bindir}/*-config
! %{_libdir}/lib*.so
! %{_libdir}/*a
! %{_includedir}/SDL
! %{_datadir}/aclocal/*
! %{_mandir}/man3/SDL*.3*
  
  %changelog
! * Tue Sep 16 2003 TC Wan <[EMAIL PROTECTED]> 1.2.5-4_freevo
! - Patched for no keyboard, dxr3 ffmpeg support
! 
! * Mon Feb 10 2003 Thomas Woerner  <[EMAIL PROTECTED]> 1.2.5-3
! - added -fPIC to LDFLAGS
! 
! * Wed Jan 22 2003 Tim Powers <[EMAIL PROTECTED]>
! - rebuilt
! 
! * Tue Dec 10 2002 Thomas Woerner <[EMAIL PROTECTED]> 1.2.5-1
! - new version 1.2.5
! - disabled conflicting automake16 patch
! - dgavideo modes fix (#78861)
! 
! * Sun Dec 01 2002 Elliot Lee <[EMAIL PROTECTED]> 1.2.4-7
! - Fix unpackaged files by including them.
! - _smp_mflags
! 
! * Fri Nov 29 2002 Tim Powers <[EMAIL PROTECTED]> 1.2.4-6
! - remove unpackaged files from the buildroot
! - lib64'ize
! 
! * Sat Jul 20 2002 Florian La Roche <[EMAIL PROTECTED]>
! - do not require nasm for mainframe
! 
! * Tue Jul  2 2002 Bernhard Rosenkraenzer <[EMAIL PROTECTED]> 1.2.4-4
! - Fix bug #67255
! 
! * Fri Jun 21 2002 Tim Powers <[EMAIL PROTECTED]>
! - automated rebuild
! 
! * Sun May 26 2002 Tim Powers <[EMAIL PROTECTED]>
! - automated rebuild
! 
! * Thu May 23 2002 Bernhard Rosenkraenzer <[EMAIL PROTECTED]> 1.2.4-1
! - 1.2.4
! - Fix build with automake 1.6
! 
! * Mon Mar 11 2002 Bernhard Rosenkraenzer <[EMAIL PROTECTED]> 1.2.3-7
! - Fix AM_PATH_SDL automake macro with AC_LANG(c++) (#60533)
! 
! * Thu Feb 28 2002 Bernhard Rosenkraenzer <[EMAIL PROTECTED]> 1.2.3-6
! - Rebuild in current environment
! 
! * Thu Jan 24 2002 Bernhard Rosenkraenzer <[EMAIL PROTECTED]> 1.2.3-5
! - dlopen() aRts and esd rather than linking directly to them.
! - make sure aRts and esd are actually used if they're running.
! 
! * Mon Jan 21 2002 Bernhard Rosenkraenzer <[EMAIL PROTECTED]> 1.2.3-4
! - Don't crash without xv optimization: BuildRequire a version of nasm that
!   works.
! 
! * Wed Jan 09 2002 Tim Powers <[EMAIL PROTECTED]>
! - automated rebuild
! 
! * Mon Dec 17 2001 Bernhard Rosenkraenzer <[EMAIL PROTECTED]> 1.2.3-2
! - Rebuild with new aRts, require arts-devel rather than kdelibs-sound-devel
! - Temporarily exclude alpha (compiler bugs)
! 
! * Thu Nov 22 2001 Bernhard Rosenkraenzer <[EMAIL PROTECTED]> 1.2.3-1
! - 1.2.3
! 
! * Sat Nov 17 2001 Bernhard Rosenkraenzer <[EMAIL PROTECTED]> 1.2.2-5
! - Add workaround for automake 1.5 asm bugs
! 
! * Tue Oct 30 2001 Bernhard Rosenkraenzer <[EMAIL PROTECTED]> 1.2.2-4
! - Make sure -fPIC is used on all architectures (#55039)
! - Fix build with autoconf 2.5x
! 
! * Fri Aug 31 2001 Bill Nottingham <[EMAIL PROTECTED]> 1.2.2-3
! - rebuild (fixes #50750??)
! 
! * Thu Aug  2 2001 Bernhard Rosenkraenzer <[EMAIL PROTECTED]> 1.2.2-2
! - SDL-devel should require esound-devel and kdelibs-sound-devel (#44884)
! 
! * Tue Jul 24 2001 Bernhard Rosenkraenzer <[EMAIL PROTECTED]> 1.2.2-1
! - Update to 1.2.2; this should fix #47941
! - Add build dependencies
! 
! * Tue Jul 10 2001 Elliot Lee <[EMAIL PROTECTED]> 1.2.1-3
! - Rebuild to eliminate libXv/libXxf86dga deps.
! 
! * Fri Jun 29 2001 Preston Brown <[EMAIL PROTECTED]>
! - output same libraries for sdl-config whether --libs or --static-libs 
!   selected.  Fixes compilation of most SDL programs.
! - properly packaged new HTML documentation
! 
! * Sun Jun 24 2001 Bernhard Rosenkraenzer <[EMAIL PROTECTED]> 1.2.1-1
! - 1.2.1
! 
! * Mon May  7 2001 Bernhard Rosenkraenzer <[EMAIL PROTECTED]> 1.2.0-2
! - Add Bill's byteorder patch
! 
! * Sun Apr 15 2001 Bernhard Rosenkraenzer <[EMAIL PROTECTED]>
! - 1.2.0
! 
! * Tue Feb 27 2001 Karsten Hopp <[EMAIL PROTECTED]>
! - SDL-devel requires SDL
! 
! * Tue Jan 16 2001 Bernhard Rosenkraenzer <[EMAIL PROTECTED]>
! - Require arts rather than kdelibs-sound
! 
! * Sun Jan  7 2001 Bernhard Rosenkraenzer <[EMAIL PROTECTED]>
! - 1.1.7
! 
! * Tue Oct 24 2000 Bernhard Rosenkraenzer <[EMAIL PROTECTED]>
! - 1.1.6
! 
! * Mon Aug  7 2000 Bernhard Rosenkraenzer <[EMAIL PROTECTED]>
! - build against new DGA
! - update to 1.1.4, remove patches (they're now in the base release)
! 
! * Tue Aug  1 2000 Bernhard Rosenkraenzer <[EMAIL PROTECTED]>
! - %%post -p /sbin/ldconfig (Bug #14928)
! - add URL
! 
! * Wed Jul 12 2000 Prospector <[EMAIL PROTECTED]>
! - automatic rebuild
! 
! * Sun Jun 18 2000 Bill Nottingham <[EMAIL PROTECTED]>
! - replace patch that fell out of SRPM
! 
! * Tue Jun 13 2000 Preston Brown <[EMAIL PROTECTED]>
! - FHS paths
! - use 1.1 (development) version; everything even from Loki links to it!
! 
! * Thu May  4 2000 Bill Nottingham <[EMAIL PROTECTED]>
! - autoconf fixes for ia64
! 
! * Mon Apr 24 2000 Tim Powers <[EMAIL PROTECTED]>
! - updated to 1.0.8
! 
! * Tue Feb 15 2000 Tim Powers <[EMAIL PROTECTED]>
! - updated to 1.0.4, fixes problems when run in 8bpp
! 
! * Tue Feb 01 2000 Tim  Powers <[EMAIL PROTECTED]>
! - applied patch from Hans de Goede <[EMAIL PROTECTED]> for fullscreen toggling.
! - using  --enable-video-x11-dgamouse since it smoothes the mouse some.
! 
! * Sun Jan 30 2000 Tim Powers <[EMAIL PROTECTED]>
! - updated to 1.0.3, bugfix update
! 
! * Fri Jan 28 2000 Tim Powers <[EMAIL PROTECTED]>
! - fixed group etc
! 
! * Fri Jan 21 2000 Tim Powers <[EMAIL PROTECTED]>
! - build for 6.2 Powertools
  
! * Wed Jan 19 2000 Sam Lantinga <[EMAIL PROTECTED]>
  - Re-integrated spec file into SDL distribution
  - 'name' and 'version' come from configure 
--- 1,78 ----
! %define name SDL
! %define version 1.2.6
! %define release 2_freevo
! 
! Summary: Simple DirectMedia Layer
! Name: %{name}
! Version: %{version}
! Release: %{release}
! Source0: %{name}-%{version}.tar.gz
! Patch0: %{name}-%{version}-nokeyboard.patch
  URL: http://www.libsdl.org/
! Copyright: LGPL
  Group: System Environment/Libraries
! BuildRoot: /var/tmp/%{name}-buildroot
  Prefix: %{_prefix}
! Provides: libSDL-1.1.so.0
  
  %description
! This is the Simple DirectMedia Layer, a generic API that provides low
! level access to audio, keyboard, mouse, and display framebuffer across
! multiple platforms.
  
  %package devel
! Summary: Libraries, includes and more to develop SDL applications.
  Group: Development/Libraries
! Requires: %{name}
  
  %description devel
! This is the Simple DirectMedia Layer, a generic API that provides low
! level access to audio, keyboard, mouse, and display framebuffer across
! multiple platforms.
! 
! This is the libraries, include files and other resources you can use
! to develop SDL applications.
! 
  
  %prep
! rm -rf ${RPM_BUILD_ROOT}
  
  %setup -q 
! %patch0 -p1
  
  %build
! CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix} --disable-video-svga 
--disable-video-ggi --disable-video-aalib --disable-debug --enable-dlopen 
--enable-esd-shared --enable-arts-shared --enable-video-directfb
! make
  
  %install
! rm -rf $RPM_BUILD_ROOT
! make install prefix=$RPM_BUILD_ROOT/%{prefix}
! ln -s libSDL-1.2.so.0 $RPM_BUILD_ROOT/%{prefix}/lib/libSDL-1.1.so.0
  
  %clean
! rm -rf $RPM_BUILD_ROOT
  
  %files
  %defattr(-,root,root)
  %doc README-SDL.txt COPYING CREDITS BUGS
! %{prefix}/lib/lib*.so.*
  
  %files devel
  %defattr(-,root,root)
! %doc README README-SDL.txt COPYING CREDITS BUGS WhatsNew docs.html
! %doc docs/index.html docs/html
! %{prefix}/bin/*-config
! %{prefix}/lib/lib*.a
! %{prefix}/lib/lib*.la
! %{prefix}/lib/lib*.so
! %{prefix}/include/SDL/
! %{prefix}/man/man3/*
! %{prefix}/share/aclocal/*
  
  %changelog
! * Mon Sep 29 2003 TC Wan <[EMAIL PROTECTED]>
! - Enabled alsa and directfb support, added nokeyboard patch
  
! * Wed Jan 19 2000 Sam Lantinga <[EMAIL PROTECTED]>
  - Re-integrated spec file into SDL distribution
  - 'name' and 'version' come from configure 

Index: SDL_ttf.spec
===================================================================
RCS file: /cvsroot/freevo/freevo/contrib/rpm/SDL_ttf.spec,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** SDL_ttf.spec        17 Sep 2003 09:15:28 -0000      1.1
--- SDL_ttf.spec        29 Sep 2003 07:18:55 -0000      1.2
***************
*** 5,15 ****
  Source0: %{name}-%{version}.tar.gz
  Patch0: %{name}-%{version}-freevo.patch
  Copyright: LGPL
  Group: System Environment/Libraries
  BuildRoot: /var/tmp/%{name}-buildroot
  Prefix: %{_prefix}
! Packager: Hakan Tandogan <[EMAIL PROTECTED]>
! #BuildRequires: SDL-devel
! #BuildRequires: freetype-devel
  
  %description
--- 5,15 ----
  Source0: %{name}-%{version}.tar.gz
  Patch0: %{name}-%{version}-freevo.patch
+ URL: http://www.libsdl.org/
  Copyright: LGPL
  Group: System Environment/Libraries
  BuildRoot: /var/tmp/%{name}-buildroot
  Prefix: %{_prefix}
! BuildRequires: SDL-devel
! BuildRequires: freetype-devel
  
  %description
***************
*** 56,59 ****
--- 56,61 ----
  
  %changelog
+ * Mon Sep 23 2003 Sam Lantinga 
+ - Rebuilt for Freevo, patched
  * Wed Jan 19 2000 Sam Lantinga 
  - converted to get package information from configure




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to