Update to SDL-1.2.6; mostly from espie, much testing by jolan, thanks!

This commit is contained in:
pvalchev 2003-09-29 05:41:37 +00:00
parent 9505b533b7
commit 8cb7c089bf
11 changed files with 65 additions and 131 deletions

View File

@ -1,23 +1,24 @@
# $OpenBSD: Makefile,v 1.27 2002/11/30 11:17:26 wcobb Exp $
# $OpenBSD: Makefile,v 1.28 2003/09/29 05:41:37 pvalchev Exp $
# Uses pthreads
COMMENT= "cross-platform multimedia library"
VERSION= 1.2.5
VERSION= 1.2.6
DISTNAME= SDL-${VERSION}
PKGNAME= ${DISTNAME:L}
CATEGORIES= devel
HOMEPAGE= http://www.libsdl.org
HOMEPAGE= http://www.libsdl.org/
MAINTAINER= Peter Valchev <pvalchev@openbsd.org>
# LGPL
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
MASTER_SITES= ${HOMEPAGE}/release/ \
MASTER_SITES= ${HOMEPAGE}release/ \
http://www.devolution.com/~slouken/SDL/release/
FLAVORS= sun esd arts aa no_x11
@ -77,7 +78,7 @@ USE_X11= Yes
NO_REGRESS= Yes
MAKE_FLAGS= libSDL_la_LDFLAGS="-version-info 1:0:0"
MAKE_FLAGS= libSDL_la_LDFLAGS="-version-info 2:0:0"
post-patch:
@touch ${WRKSRC}/aclocal.m4 ${WRKSRC}/configure

View File

@ -1,3 +1,3 @@
MD5 (SDL-1.2.5.tar.gz) = cacacf4e4cca546de168fedc23b9b44b
RMD160 (SDL-1.2.5.tar.gz) = 30aba74beb9e2899847edcc9ebe1ba181a0113d6
SHA1 (SDL-1.2.5.tar.gz) = c1bdc68d390d421158778f68f3498f5b9d63a9e4
MD5 (SDL-1.2.6.tar.gz) = 9011f147f23ec535515291d0c9c6904c
RMD160 (SDL-1.2.6.tar.gz) = 881e4d635ae29ddccb5eb0786e5969075b8ffe96
SHA1 (SDL-1.2.6.tar.gz) = 6f64b79427ea279e5ae18ea07d9fe353fd138422

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-configure_in,v 1.20 2003/04/18 02:37:06 pvalchev Exp $
--- configure.in.orig Sun Oct 6 14:34:53 2002
+++ configure.in Thu Apr 17 20:27:23 2003
@@ -484,9 +484,6 @@ CheckNASM()
$OpenBSD: patch-configure_in,v 1.21 2003/09/29 05:41:37 pvalchev Exp $
--- configure.in.orig 2003-08-30 21:13:18.000000000 +0200
+++ configure.in 2003-09-21 14:43:28.000000000 +0200
@@ -492,9 +492,6 @@ CheckNASM()
win32)
NASMFLAGS="-f win32"
;;
@ -11,7 +11,7 @@ $OpenBSD: patch-configure_in,v 1.20 2003/04/18 02:37:06 pvalchev Exp $
*)
NASMFLAGS="-f elf"
;;
@@ -2484,6 +2481,9 @@ fi
@@ -2549,6 +2546,9 @@ fi
if test $ARCH = solaris; then
SDL_RLD_FLAGS="-R\${exec_prefix}/lib"
fi
@ -21,7 +21,7 @@ $OpenBSD: patch-configure_in,v 1.20 2003/04/18 02:37:06 pvalchev Exp $
case "$ARCH" in
openbsd | netbsd | bsdi)
@@ -2503,7 +2503,7 @@ esac
@@ -2571,7 +2571,7 @@ esac
STATIC_SYSTEM_LIBS="$SYSTEM_LIBS"
dnl Output the video drivers we use

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-ltmain_sh,v 1.4 2002/11/30 11:17:26 wcobb Exp $
--- ltmain.sh.orig Sat Jun 8 16:33:48 2002
+++ ltmain.sh Fri Nov 1 21:54:11 2002
@@ -3614,40 +3614,6 @@ libdir='$install_libdir'\
$OpenBSD: patch-ltmain_sh,v 1.5 2003/09/29 05:41:37 pvalchev Exp $
--- ltmain.sh.orig 2003-08-30 21:13:00.000000000 +0200
+++ ltmain.sh 2003-09-21 14:43:28.000000000 +0200
@@ -3626,40 +3626,6 @@ libdir='$install_libdir'\
# Exit here if they wanted silent mode.
test "$show" = : && exit 0

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-src_Makefile_in,v 1.5 2002/11/30 11:17:26 wcobb Exp $
--- src/Makefile.in.orig Sun Oct 6 17:34:55 2002
+++ src/Makefile.in Fri Nov 1 21:54:11 2002
@@ -135,7 +135,7 @@ DIST_SUBDIRS = $(CORE_SUBDIRS) $(EXTRA_S
$OpenBSD: patch-src_Makefile_in,v 1.6 2003/09/29 05:41:37 pvalchev Exp $
--- src/Makefile.in.orig 2003-08-30 21:13:19.000000000 +0200
+++ src/Makefile.in 2003-09-21 14:43:28.000000000 +0200
@@ -140,7 +140,7 @@ DIST_SUBDIRS = $(CORE_SUBDIRS) $(EXTRA_S
lib_LTLIBRARIES = libSDL.la
libSDL_la_SOURCES = $(GENERAL_SRCS)

View File

@ -1,55 +0,0 @@
$OpenBSD: patch-src_joystick_bsd_SDL_sysjoystick_c,v 1.3 2002/11/30 11:17:26 wcobb Exp $
--- src/joystick/bsd/SDL_sysjoystick.c.orig Fri Nov 1 22:19:59 2002
+++ src/joystick/bsd/SDL_sysjoystick.c Fri Nov 1 23:13:44 2002
@@ -136,17 +136,24 @@ SDL_SYS_JoystickInit(void)
memset(joydevnames, NULL, sizeof(joydevnames));
for (i = 0; i < MAX_UHID_JOYS; i++) {
+ SDL_Joystick nj;
+
sprintf(s, "/dev/uhid%d", i);
- fd = open(s, O_RDWR);
- if (fd > 0) {
- joynames[SDL_numjoysticks++] = strdup(s);
- close(fd);
+
+ nj.index = SDL_numjoysticks;
+ joynames[nj.index] = strdup(s);
+
+ if (SDL_SYS_JoystickOpen(&nj) == 0) {
+ SDL_SYS_JoystickClose(&nj);
+ SDL_numjoysticks++;
+ } else {
+ free(joynames[nj.index]);
}
}
for (i = 0; i < MAX_JOY_JOYS; i++) {
sprintf(s, "/dev/joy%d", i);
- fd = open(s, O_RDWR);
- if (fd > 0) {
+ fd = open(s, O_RDONLY);
+ if (fd != -1) {
joynames[SDL_numjoysticks++] = strdup(s);
close(fd);
}
@@ -178,7 +185,7 @@ SDL_SYS_JoystickOpen(SDL_Joystick *joy)
int fd;
fd = open(path, O_RDWR);
- if (fd < 0) {
+ if (fd == -1) {
SDL_SetError("%s: %s", path, strerror(errno));
return (-1);
}
@@ -400,9 +407,9 @@ report_alloc(struct report *r, struct re
int len;
#ifdef USBHID_NEW
- len = hid_report_size(rd, repinfo[repind].kind, &r->rid);
-#else
len = hid_report_size(rd, repinfo[repind].kind, r->rid);
+#else
+ len = hid_report_size(rd, repinfo[repind].kind, &r->rid);
#endif
if (len < 0) {
SDL_SetError("Negative HID report size");

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-src_video_x11_SDL_x11gl_c,v 1.5 2003/02/23 07:58:25 pvalchev Exp $
--- src/video/x11/SDL_x11gl.c.orig Mon Aug 19 11:58:08 2002
+++ src/video/x11/SDL_x11gl.c Sun Feb 23 00:44:24 2003
$OpenBSD: patch-src_video_x11_SDL_x11gl_c,v 1.6 2003/09/29 05:41:37 pvalchev Exp $
--- src/video/x11/SDL_x11gl.c.orig 2003-08-30 21:13:12.000000000 +0200
+++ src/video/x11/SDL_x11gl.c 2003-09-21 14:43:28.000000000 +0200
@@ -34,7 +34,7 @@ static char rcsid =
#include "SDL_x11dga_c.h"
#include "SDL_x11gl_c.h"
@ -8,5 +8,5 @@ $OpenBSD: patch-src_video_x11_SDL_x11gl_c,v 1.5 2003/02/23 07:58:25 pvalchev Exp
-#define DEFAULT_OPENGL "libGL.so.1"
+#define DEFAULT_OPENGL "libGL.so.2.0"
/* return the preferred visual to use for openGL graphics */
XVisualInfo *X11_GL_GetVisual(_THIS)
#ifndef GLX_ARB_multisample
#define GLX_ARB_multisample

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-src_video_x11_SDL_x11modes_c,v 1.2 2003/04/22 00:16:53 wcobb Exp $
--- src/video/x11/SDL_x11modes.c.orig Sun Sep 29 21:35:25 2002
+++ src/video/x11/SDL_x11modes.c Mon Apr 21 20:37:47 2003
$OpenBSD: patch-src_video_x11_SDL_x11modes_c,v 1.3 2003/09/29 05:41:37 pvalchev Exp $
--- src/video/x11/SDL_x11modes.c.orig 2003-08-30 21:13:12.000000000 +0200
+++ src/video/x11/SDL_x11modes.c 2003-09-21 14:51:18.000000000 +0200
@@ -44,6 +44,8 @@ static char rcsid =
#endif
@ -93,39 +93,39 @@ $OpenBSD: patch-src_video_x11_SDL_x11modes_c,v 1.2 2003/04/22 00:16:53 wcobb Exp
static void get_real_resolution(_THIS, int* w, int* h);
static void set_best_resolution(_THIS, int width, int height)
@@ -101,10 +179,11 @@ static void set_best_resolution(_THIS, i
SDL_NAME(XF86VidModeModeInfo) **modes;
@@ -102,9 +180,11 @@ static void set_best_resolution(_THIS, i
int i;
int best_width = 0, best_height = 0;
int nmodes;
+ char *bitmap;
+ char *bitmap;
if ( SDL_NAME(XF86VidModeGetModeLine)(SDL_Display, SDL_Screen, &i, &mode) &&
- SDL_NAME(XF86VidModeGetAllModeLines)(SDL_Display,SDL_Screen,&nmodes,&modes)){
- qsort(modes, nmodes, sizeof *modes, cmpmodes);
+ SDL_NAME(XF86VidModeGetAllModeLines)(SDL_Display,SDL_Screen,&nmodes,&modes) &&
+ get_vidmode_filter(modes, nmodes, &bitmap) ) {
+ get_vidmode_filter(modes, nmodes, &bitmap) ){
#ifdef XFREE86_DEBUG
printf("Available modes:\n");
printf("Available modes (unsorted):\n");
for ( i = 0; i < nmodes; ++i ) {
@@ -113,15 +192,24 @@ static void set_best_resolution(_THIS, i
}
@@ -116,14 +196,16 @@ static void set_best_resolution(_THIS, i
#endif
for ( i = nmodes-1; i > 0 ; --i ) {
+ if ( (modes[i]->hdisplay == width) &&
for ( i = 0; i < nmodes ; i++ ) {
if ( (modes[i]->hdisplay == width) &&
- (modes[i]->vdisplay == height) )
+ (modes[i]->vdisplay == height) &&
+ (bitmap[i] == 1) )
+ goto match;
+ }
+ for ( i = nmodes-1; i > 0 ; --i ) {
if ( (modes[i]->hdisplay >= width) &&
- (modes[i]->vdisplay >= height) )
+ (modes[i]->vdisplay >= height) &&
+ (bitmap[i] == 1) )
break;
+ (bitmap[i] == 1) )
goto match;
}
+ match:
if ( (modes[i]->hdisplay != mode.hdisplay) ||
(modes[i]->vdisplay != mode.vdisplay) ) {
qsort(modes, nmodes, sizeof *modes, cmpmodes);
for ( i = nmodes-1; i >= 0 ; i-- ) {
if ( ! best_width ) {
if ( (modes[i]->hdisplay >= width) &&
- (modes[i]->vdisplay >= height) ) {
+ (modes[i]->vdisplay >= height) &&
+ (bitmap[i] == 1) ) {
best_width = modes[i]->hdisplay;
best_height = modes[i]->vdisplay;
}
@@ -141,6 +223,7 @@ static void set_best_resolution(_THIS, i
SDL_NAME(XF86VidModeSwitchToMode)(SDL_Display, SDL_Screen, modes[i]);
}
XFree(modes);
@ -133,7 +133,7 @@ $OpenBSD: patch-src_video_x11_SDL_x11modes_c,v 1.2 2003/04/22 00:16:53 wcobb Exp
}
}
#endif /* XFREE86_VM */
@@ -269,6 +357,7 @@ int X11_GetVideoModes(_THIS)
@@ -288,6 +371,7 @@ int X11_GetVideoModes(_THIS)
int vm_major, vm_minor;
int nmodes;
SDL_NAME(XF86VidModeModeInfo) **modes;
@ -141,29 +141,17 @@ $OpenBSD: patch-src_video_x11_SDL_x11modes_c,v 1.2 2003/04/22 00:16:53 wcobb Exp
#endif
#ifdef HAVE_XIGXME
int xme_major, xme_minor;
@@ -304,8 +393,8 @@ int X11_GetVideoModes(_THIS)
fclose(metro_fp);
}
}
-#if defined(__alpha__) || defined(__powerpc__)
- /* The alpha and PPC XFree86 servers are also buggy */
+#if defined(__alpha__) || defined(__powerpc__) || defined(__sparc64__)
+ /* The alpha, sparc64 and PPC XFree86 servers are also buggy */
buggy_X11 = 1;
#endif
/* Enumerate the available fullscreen modes */
@@ -330,15 +419,18 @@ int X11_GetVideoModes(_THIS)
@@ -349,7 +433,8 @@ int X11_GetVideoModes(_THIS)
}
}
if ( ! buggy_X11 &&
- SDL_NAME(XF86VidModeGetAllModeLines)(SDL_Display, SDL_Screen,&nmodes,&modes) ) {
+ SDL_NAME(XF86VidModeGetAllModeLines)(SDL_Display, SDL_Screen,&nmodes,&modes) &&
+ SDL_NAME(XF86VidModeGetAllModeLines)(SDL_Display, SDL_Screen,&nmodes,&modes) &&
+ get_vidmode_filter(modes, nmodes, &bitmap) ) {
- qsort(modes, nmodes, sizeof *modes, cmpmodes);
SDL_modelist = (SDL_Rect **)malloc((nmodes+2)*sizeof(SDL_Rect *));
if ( SDL_modelist ) {
n = 0;
#ifdef XFREE86_DEBUG
printf("Available modes: (sorted)\n");
@@ -368,6 +453,9 @@ int X11_GetVideoModes(_THIS)
for ( i=0; i<nmodes; ++i ) {
int w, h;
@ -173,7 +161,7 @@ $OpenBSD: patch-src_video_x11_SDL_x11modes_c,v 1.2 2003/04/22 00:16:53 wcobb Exp
/* Check to see if we should add the screen size (Xinerama) */
w = modes[i]->hdisplay;
h = modes[i]->vdisplay;
@@ -371,6 +463,7 @@ int X11_GetVideoModes(_THIS)
@@ -400,6 +488,7 @@ int X11_GetVideoModes(_THIS)
SDL_modelist[n] = NULL;
}
XFree(modes);

View File

@ -17,5 +17,3 @@ Packages can be built with additional FLAVORs:
This FLAVOR requires the aalib package.
no_x11: Built without X11.
WWW: ${HOMEPAGE}

View File

@ -1,3 +1,3 @@
@comment $OpenBSD: PFRAG.shared,v 1.6 2002/04/21 00:22:37 pvalchev Exp $
lib/libSDL.so.1.0
@comment $OpenBSD: PFRAG.shared,v 1.7 2003/09/29 05:41:37 pvalchev Exp $
lib/libSDL.so.2.0
DYNLIBDIR(%B)

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST,v 1.5 2003/08/14 00:59:58 espie Exp $
@comment $OpenBSD: PLIST,v 1.6 2003/09/29 05:41:37 pvalchev Exp $
bin/sdl-config
include/SDL/SDL.h
include/SDL/SDL_active.h
@ -13,6 +13,7 @@ include/SDL/SDL_getenv.h
include/SDL/SDL_joystick.h
include/SDL/SDL_keyboard.h
include/SDL/SDL_keysym.h
include/SDL/SDL_loadso.h
include/SDL/SDL_main.h
include/SDL/SDL_mouse.h
include/SDL/SDL_mutex.h
@ -207,4 +208,5 @@ man/man3/SDL_keysym.3
man/man3/SDL_mutexP.3
man/man3/SDL_mutexV.3
share/aclocal/sdl.m4
@comment @dirrm share/aclocal
@dirrm include/SDL