summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorkristerw <kristerw>2002-10-13 19:28:56 +0000
committerkristerw <kristerw>2002-10-13 19:28:56 +0000
commit28de0560075af280a6ca2d50e3656ae2cd49125d (patch)
tree30ef6400233edcbc79753d2eed2480ac6b83a913 /devel
parent645e64dd884e0ee4b115d9fa6bc8caa69491c5ed (diff)
downloadpkgsrc-28de0560075af280a6ca2d50e3656ae2cd49125d.tar.gz
Update SDL to version 1.2.5.
This update consists of numerous bugfixes. See http://www.libsdl.org/release/changes-1.2.html for a full list.
Diffstat (limited to 'devel')
-rw-r--r--devel/SDL/Makefile20
-rw-r--r--devel/SDL/PLIST5
-rw-r--r--devel/SDL/distinfo20
-rw-r--r--devel/SDL/files/Makefile.am8
-rw-r--r--devel/SDL/files/Makefile.in335
-rw-r--r--devel/SDL/files/SDL_sysjoystick.c436
-rw-r--r--devel/SDL/patches/patch-aa22
-rw-r--r--devel/SDL/patches/patch-ab342
-rw-r--r--devel/SDL/patches/patch-ac13
-rw-r--r--devel/SDL/patches/patch-ad12
-rw-r--r--devel/SDL/patches/patch-ah12
-rw-r--r--devel/SDL/patches/patch-ai13
-rw-r--r--devel/SDL/patches/patch-aj239
-rw-r--r--devel/SDL/patches/patch-ak15
-rw-r--r--devel/SDL/patches/patch-am691
-rw-r--r--devel/SDL/patches/patch-an15
16 files changed, 386 insertions, 1812 deletions
diff --git a/devel/SDL/Makefile b/devel/SDL/Makefile
index 5a70575080a..f95681787dd 100644
--- a/devel/SDL/Makefile
+++ b/devel/SDL/Makefile
@@ -1,8 +1,7 @@
-# $NetBSD: Makefile,v 1.41 2002/08/27 18:19:44 jlam Exp $
+# $NetBSD: Makefile,v 1.42 2002/10/13 19:28:56 kristerw Exp $
#
-DISTNAME= SDL-1.2.3
-PKGREVISION= 2
+DISTNAME= SDL-1.2.5
CATEGORIES= devel games
MASTER_SITES= http://www.libsdl.org/release/
@@ -36,7 +35,6 @@ CONFIGURE_ARGS+= --disable-nas
.endif
CONFIGURE_ARGS+= --disable-arts
-CONFIGURE_ARGS+= --disable-pthread-sem
CONFIGURE_ARGS+= --enable-video-aalib
CONFIGURE_ENV+= NASMFLAGS="${NASMFLAGS}"
MAKE_ENV+= NASMFLAGS="${NASMFLAGS}"
@@ -47,18 +45,16 @@ MAKE_ENV+= NASMFLAGS="${NASMFLAGS}"
#
CONFIGURE_ENV+= SYSTEM_LIBS="${LDFLAGS}"
-pre-patch:
- cd ${WRKSRC} && ${MKDIR} src/audio/netbsd
- cd ${WRKSRC} && ${MKDIR} src/joystick/bsd
- ${CP} ${FILESDIR}/[MS]* ${WRKSRC}/src/joystick/bsd
-
-post-configure:
- cd ${WRKSRC}/src/audio && ${CP} *.[ch] netbsd/
+.include "../../mk/pthread.buildlink2.mk"
+.if ${_PKG_PTHREAD} == "pth"
+# Let SDL know that we do not have native pthreads.
+CONFIGURE_ARGS+= --disable-pthreads
+CONFIGURE_ARGS+= --enable-pth
+.endif
.include "../../audio/esound/buildlink2.mk"
.include "../../graphics/Mesa/buildlink2.mk"
.include "../../graphics/aalib-x11/buildlink2.mk"
-.include "../../mk/pthread.buildlink2.mk"
.include "../../mk/ossaudio.buildlink2.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/devel/SDL/PLIST b/devel/SDL/PLIST
index 811bf15d0a5..091bf9e50df 100644
--- a/devel/SDL/PLIST
+++ b/devel/SDL/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.2 2002/02/14 00:39:45 wiz Exp $
+@comment $NetBSD: PLIST,v 1.3 2002/10/13 19:28:56 kristerw Exp $
bin/sdl-config
include/SDL/SDL.h
include/SDL/SDL_active.h
@@ -16,6 +16,7 @@ include/SDL/SDL_keysym.h
include/SDL/SDL_main.h
include/SDL/SDL_mouse.h
include/SDL/SDL_mutex.h
+include/SDL/SDL_name.h
include/SDL/SDL_opengl.h
include/SDL/SDL_quit.h
include/SDL/SDL_rwops.h
@@ -31,7 +32,7 @@ lib/libSDL.a
lib/libSDL.la
lib/libSDL.so
lib/libSDL.so.0
-lib/libSDL.so.0.3
+lib/libSDL.so.0.5
lib/libSDLmain.a
man/man3/SDLKey.3
man/man3/SDL_ActiveEvent.3
diff --git a/devel/SDL/distinfo b/devel/SDL/distinfo
index 794b8832780..55f8a4d6c47 100644
--- a/devel/SDL/distinfo
+++ b/devel/SDL/distinfo
@@ -1,20 +1,14 @@
-$NetBSD: distinfo,v 1.14 2002/08/25 19:22:17 jlam Exp $
+$NetBSD: distinfo,v 1.15 2002/10/13 19:28:56 kristerw Exp $
-SHA1 (SDL-1.2.3.tar.gz) = f74f5bf47a472083da8700d2354cb90062e2a845
-Size (SDL-1.2.3.tar.gz) = 1568671 bytes
-SHA1 (patch-aa) = 43b3532f1939fb6d1ead45297aa34dd5b1f2383d
-SHA1 (patch-ab) = f04507e6faaa43ff7ae276bd1f6dc10bf42539d9
-SHA1 (patch-ac) = 86c50bbf2672440b4fcb88c241bf3d11ec237d70
-SHA1 (patch-ad) = bff300dd22af3cbfa59f760858a3b25ab97e685a
+SHA1 (SDL-1.2.5.tar.gz) = c1bdc68d390d421158778f68f3498f5b9d63a9e4
+Size (SDL-1.2.5.tar.gz) = 1854550 bytes
+SHA1 (patch-aa) = 1423cbdff5fd996f7d09e034a535760403870d1d
SHA1 (patch-af) = f5e824addf308f9c467de02e3b262afbc0ef77c0
SHA1 (patch-ag) = 989c3464686a3158c538034ad7ea012a4e4b4b9e
-SHA1 (patch-ah) = f509c0c146002cf2525bd9b7c7532fbca7aa4fb6
-SHA1 (patch-ai) = 0edabed555e3fc4b0a92aff9240359fc6637f022
-SHA1 (patch-aj) = e986d0f4935c2402d46672e8fec666d2a21d7087
-SHA1 (patch-ak) = 657947be674831c98850f044315e4681fe58ea29
+SHA1 (patch-aj) = ca6c5cd0f99c50e784f910b5b2f5eadb2324761b
+SHA1 (patch-ak) = 425fbb5abecd35aab01f57e7deec06d8f40a392d
SHA1 (patch-al) = 0fe579ae0358d59f87a78fe4b5b006ef991d44f0
-SHA1 (patch-am) = ad3cf66da2b924ccf524bb6f4822c0facc708b69
-SHA1 (patch-an) = b875bc9e173d69cb5fcc1b4ea3e7039b7633d187
+SHA1 (patch-am) = 27813c0331a6b6870286219c6bfa9b7a0d275ee1
SHA1 (patch-ap) = ca979b24a57a8f115f5e1bdf6b1e5672a60d20a9
SHA1 (patch-aq) = 45f63636a9caa338274db68596c8cf8c1d3cd0f0
SHA1 (patch-ar) = 1a78f0bcb6a8f65f71af23accb2a9780331f275b
diff --git a/devel/SDL/files/Makefile.am b/devel/SDL/files/Makefile.am
deleted file mode 100644
index 5d2ce1602ef..00000000000
--- a/devel/SDL/files/Makefile.am
+++ /dev/null
@@ -1,8 +0,0 @@
-
-## Makefile.am for the BSD joystick driver for SDL
-
-noinst_LTLIBRARIES = libjoystick_bsd.la
-libjoystick_bsd_la_SOURCES = $(SRCS)
-
-# The SDL joystick driver sources
-SRCS = SDL_sysjoystick.c
diff --git a/devel/SDL/files/Makefile.in b/devel/SDL/files/Makefile.in
deleted file mode 100644
index 4096e5d5746..00000000000
--- a/devel/SDL/files/Makefile.in
+++ /dev/null
@@ -1,335 +0,0 @@
-# Makefile.in generated automatically by automake 1.4 from Makefile.am
-
-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-
-top_builddir = ../../..
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-host_alias = @host_alias@
-host_triplet = @host@
-ARCH = @ARCH@
-ARTSCCONFIG = @ARTSCCONFIG@
-AS = @AS@
-ASFLAGS = @ASFLAGS@
-AUDIO_DRIVERS = @AUDIO_DRIVERS@
-AUDIO_SUBDIRS = @AUDIO_SUBDIRS@
-CC = @CC@
-CDROM_DRIVERS = @CDROM_DRIVERS@
-CDROM_SUBDIRS = @CDROM_SUBDIRS@
-CXX = @CXX@
-DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@
-DIRECTFB_LIBS = @DIRECTFB_LIBS@
-DLLTOOL = @DLLTOOL@
-ESD_CFLAGS = @ESD_CFLAGS@
-ESD_CONFIG = @ESD_CONFIG@
-ESD_LIBS = @ESD_LIBS@
-JOYSTICK_DRIVERS = @JOYSTICK_DRIVERS@
-JOYSTICK_SUBDIRS = @JOYSTICK_SUBDIRS@
-LIBTOOL = @LIBTOOL@
-LN_S = @LN_S@
-LT_AGE = @LT_AGE@
-LT_CURRENT = @LT_CURRENT@
-LT_RELEASE = @LT_RELEASE@
-LT_REVISION = @LT_REVISION@
-MAKEINFO = @MAKEINFO@
-NASM = @NASM@
-NASMFLAGS = @NASMFLAGS@
-OBJC = @OBJC@
-OBJCDEPMODE = @OBJCDEPMODE@
-OBJCFLAGS = @OBJCFLAGS@
-OBJDUMP = @OBJDUMP@
-PACKAGE = @PACKAGE@
-PKG_CONFIG = @PKG_CONFIG@
-PTH_CONFIG = @PTH_CONFIG@
-RANLIB = @RANLIB@
-SDL_BINARY_AGE = @SDL_BINARY_AGE@
-SDL_CFLAGS = @SDL_CFLAGS@
-SDL_EXTRADIRS = @SDL_EXTRADIRS@
-SDL_EXTRALIBS = @SDL_EXTRALIBS@
-SDL_INTERFACE_AGE = @SDL_INTERFACE_AGE@
-SDL_LIBS = @SDL_LIBS@
-SDL_MAJOR_VERSION = @SDL_MAJOR_VERSION@
-SDL_MICRO_VERSION = @SDL_MICRO_VERSION@
-SDL_MINOR_VERSION = @SDL_MINOR_VERSION@
-SDL_RLD_FLAGS = @SDL_RLD_FLAGS@
-SDL_VERSION = @SDL_VERSION@
-SHARED_SYSTEM_LIBS = @SHARED_SYSTEM_LIBS@
-STATIC_SYSTEM_LIBS = @STATIC_SYSTEM_LIBS@
-SYSTEM_LIBS = @SYSTEM_LIBS@
-VERSION = @VERSION@
-VIDEO_DRIVERS = @VIDEO_DRIVERS@
-VIDEO_SUBDIRS = @VIDEO_SUBDIRS@
-arts_lib = @arts_lib@
-esd_lib = @esd_lib@
-
-noinst_LTLIBRARIES = libjoystick_bsd.la
-libjoystick_bsd_la_SOURCES = $(SRCS)
-
-# The SDL joystick driver sources
-SRCS = SDL_sysjoystick.c
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_CLEAN_FILES =
-LTLIBRARIES = $(noinst_LTLIBRARIES)
-
-
-DEFS = @DEFS@ -I. -I$(srcdir)
-CPPFLAGS = @CPPFLAGS@
-LDFLAGS = @LDFLAGS@
-LIBS = @LIBS@
-X_CFLAGS = @X_CFLAGS@
-X_LIBS = @X_LIBS@
-X_EXTRA_LIBS = @X_EXTRA_LIBS@
-X_PRE_LIBS = @X_PRE_LIBS@
-libjoystick_bsd_la_LDFLAGS =
-libjoystick_bsd_la_LIBADD =
-libjoystick_bsd_la_OBJECTS = SDL_sysjoystick.lo
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-DIST_COMMON = Makefile.am Makefile.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = gtar
-GZIP_ENV = --best
-SOURCES = $(libjoystick_bsd_la_SOURCES)
-OBJECTS = $(libjoystick_bsd_la_OBJECTS)
-
-all: all-redirect
-.SUFFIXES:
-.SUFFIXES: .S .c .lo .o .s
-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --foreign --include-deps src/joystick/bsd/Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-
-mostlyclean-noinstLTLIBRARIES:
-
-clean-noinstLTLIBRARIES:
- -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
-
-distclean-noinstLTLIBRARIES:
-
-maintainer-clean-noinstLTLIBRARIES:
-
-.c.o:
- $(COMPILE) -c $<
-
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
-
-mostlyclean-compile:
- -rm -f *.o core *.core
-
-clean-compile:
-
-distclean-compile:
- -rm -f *.tab.c
-
-maintainer-clean-compile:
-
-.c.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-.s.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-.S.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
-
-maintainer-clean-libtool:
-
-libjoystick_bsd.la: $(libjoystick_bsd_la_OBJECTS) $(libjoystick_bsd_la_DEPENDENCIES)
- $(LINK) $(libjoystick_bsd_la_LDFLAGS) $(libjoystick_bsd_la_OBJECTS) $(libjoystick_bsd_la_LIBADD) $(LIBS)
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
-
-subdir = src/joystick/bsd
-
-distdir: $(DISTFILES)
- @for file in $(DISTFILES); do \
- d=$(srcdir); \
- if test -d $$d/$$file; then \
- cp -pr $$/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
-info-am:
-info: info-am
-dvi-am:
-dvi: dvi-am
-check-am: all-am
-check: check-am
-installcheck-am:
-installcheck: installcheck-am
-install-exec-am:
-install-exec: install-exec-am
-
-install-data-am:
-install-data: install-data-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-am
-uninstall-am:
-uninstall: uninstall-am
-all-am: Makefile $(LTLIBRARIES)
-all-redirect: all-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs:
-
-
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-
-maintainer-clean-generic:
-mostlyclean-am: mostlyclean-noinstLTLIBRARIES mostlyclean-compile \
- mostlyclean-libtool mostlyclean-tags \
- mostlyclean-generic
-
-mostlyclean: mostlyclean-am
-
-clean-am: clean-noinstLTLIBRARIES clean-compile clean-libtool \
- clean-tags clean-generic mostlyclean-am
-
-clean: clean-am
-
-distclean-am: distclean-noinstLTLIBRARIES distclean-compile \
- distclean-libtool distclean-tags distclean-generic \
- clean-am
- -rm -f libtool
-
-distclean: distclean-am
-
-maintainer-clean-am: maintainer-clean-noinstLTLIBRARIES \
- maintainer-clean-compile maintainer-clean-libtool \
- maintainer-clean-tags maintainer-clean-generic \
- distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
-
-maintainer-clean: maintainer-clean-am
-
-.PHONY: mostlyclean-noinstLTLIBRARIES distclean-noinstLTLIBRARIES \
-clean-noinstLTLIBRARIES maintainer-clean-noinstLTLIBRARIES \
-mostlyclean-compile distclean-compile clean-compile \
-maintainer-clean-compile mostlyclean-libtool distclean-libtool \
-clean-libtool maintainer-clean-libtool tags mostlyclean-tags \
-distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
-dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
-install-exec install-data-am install-data install-am install \
-uninstall-am uninstall all-redirect all-am all installdirs \
-mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/devel/SDL/files/SDL_sysjoystick.c b/devel/SDL/files/SDL_sysjoystick.c
deleted file mode 100644
index bc2d7080090..00000000000
--- a/devel/SDL/files/SDL_sysjoystick.c
+++ /dev/null
@@ -1,436 +0,0 @@
-/*
- SDL - Simple DirectMedia Layer
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Sam Lantinga
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
- Sam Lantinga
- slouken@devolution.com
-*/
-
-/*
- * Joystick driver for the uhid(4) interface found in OpenBSD,
- * NetBSD and FreeBSD.
- *
- * Maintainer: <vedge at csoft.org>
- */
-
-#ifdef SAVE_RCSID
-static char rcsid =
- "@(#) $Id: SDL_sysjoystick.c,v 1.2 2002/08/25 19:22:18 jlam Exp $";
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <string.h>
-#include <errno.h>
-
-#if defined(HAVE_USB_H)
-#include <usb.h>
-#endif
-#include <dev/usb/usb.h>
-#include <dev/usb/usbhid.h>
-
-#if defined(HAVE_USBHID_H)
-#include <usbhid.h>
-#elif defined(HAVE_LIBUSB_H)
-#include <libusb.h>
-#elif defined(HAVE_LIBUSBHID_H)
-#include <libusbhid.h>
-#endif
-
-#include "SDL_error.h"
-#include "SDL_joystick.h"
-#include "SDL_sysjoystick.h"
-#include "SDL_joystick_c.h"
-
-#define MAX_UHID_JOYS 4
-#define MAX_JOY_JOYS 2
-#define MAX_JOYS (MAX_UHID_JOYS + MAX_JOY_JOYS)
-
-struct report {
- struct usb_ctl_report *buf; /* Buffer */
- size_t size; /* Buffer size */
- int rid; /* Report ID */
- enum {
- SREPORT_UNINIT,
- SREPORT_CLEAN,
- SREPORT_DIRTY
- } status;
-};
-
-static struct {
- int uhid_report;
- hid_kind_t kind;
- const char *name;
-} const repinfo[] = {
- { UHID_INPUT_REPORT, hid_input, "input" },
- { UHID_OUTPUT_REPORT, hid_output, "output" },
- { UHID_FEATURE_REPORT, hid_feature, "feature" }
-};
-
-enum {
- REPORT_INPUT = 0,
- REPORT_OUTPUT = 1,
- REPORT_FEATURE = 2
-};
-
-enum {
- JOYAXE_X,
- JOYAXE_Y,
- JOYAXE_Z,
- JOYAXE_SLIDER,
- JOYAXE_WHEEL
-};
-
-struct joystick_hwdata {
- int fd;
- char *path;
- enum {
- BSDJOY_UHID, /* uhid(4) */
- BSDJOY_JOY /* joy(4) */
- } type;
- struct report_desc *repdesc;
- struct report inreport;
-#if 0
- int axismin[];
- int axismax[];
-#endif
-};
-
-static char *joynames[MAX_JOYS];
-static char *joydevnames[MAX_JOYS];
-
-static int report_alloc(struct report *, struct report_desc *, int);
-static void report_free(struct report *);
-
-#ifdef USBHID_UCR_DATA
-#define REP_BUF_DATA(rep) ((rep)->buf->ucr_data)
-#else
-#define REP_BUF_DATA(rep) ((rep)->buf->data)
-#endif
-
-int
-SDL_SYS_JoystickInit(void)
-{
- char s[10];
- int i, fd;
-
- SDL_numjoysticks = 0;
-
- memset(joynames, NULL, sizeof(joynames));
- memset(joydevnames, NULL, sizeof(joydevnames));
-
- for (i = 0; i < MAX_UHID_JOYS; i++) {
- sprintf(s, "/dev/uhid%d", i);
- fd = open(s, O_RDWR);
- if (fd > 0) {
- joynames[SDL_numjoysticks++] = strdup(s);
- close(fd);
- }
- }
- for (i = 0; i < MAX_JOY_JOYS; i++) {
- sprintf(s, "/dev/joy%d", i);
- fd = open(s, O_RDWR);
- if (fd > 0) {
- joynames[SDL_numjoysticks++] = strdup(s);
- close(fd);
- }
- }
-
- /* Read the default USB HID usage table. */
- hid_init(NULL);
-
- return (SDL_numjoysticks);
-}
-
-const char *
-SDL_SYS_JoystickName(int index)
-{
- if (joydevnames[index] != NULL) {
- return (joydevnames[index]);
- }
- return (joynames[index]);
-}
-
-int
-SDL_SYS_JoystickOpen(SDL_Joystick *joy)
-{
- char *path = joynames[joy->index];
- struct joystick_hwdata *hw;
- struct hid_item hitem;
- struct hid_data *hdata;
- struct report *rep;
- int fd;
-
- fd = open(path, O_RDWR);
- if (fd < 0) {
- SDL_SetError("%s: %s", path, strerror(errno));
- return (-1);
- }
-
- hw = (struct joystick_hwdata *)malloc(sizeof(struct joystick_hwdata));
- if (hw == NULL) {
- SDL_OutOfMemory();
- close(fd);
- return (-1);
- }
- joy->hwdata = hw;
- hw->fd = fd;
- hw->path = strdup(path);
- hw->type = BSDJOY_UHID;
- hw->repdesc = hid_get_report_desc(fd);
- if (hw->repdesc == NULL) {
- SDL_SetError("%s: USB_GET_REPORT_DESC: %s", hw->path,
- strerror(errno));
- goto usberr;
- }
-
- rep = &hw->inreport;
- if (report_alloc(rep, hw->repdesc, REPORT_INPUT) < 0) {
- goto usberr;
- }
- if (rep->size <= 0) {
- SDL_SetError("%s: Input report descriptor has invalid length",
- hw->path);
- goto usberr;
- }
-
-#ifdef USBHID_NEW
- hdata = hid_start_parse(hw->repdesc, 1 << hid_input, rep->rid);
-#else
- hdata = hid_start_parse(hw->repdesc, 1 << hid_input);
-#endif
- if (hdata == NULL) {
- SDL_SetError("%s: Cannot start HID parser", hw->path);
- goto usberr;
- }
- joy->naxes = 0;
- joy->nbuttons = 0;
- joy->nhats = 0;
- joy->nballs = 0;
-
- while (hid_get_item(hdata, &hitem) > 0) {
- char *sp;
- const char *s;
-
- switch (hitem.kind) {
- case hid_collection:
- switch (HID_PAGE(hitem.usage)) {
- case HUP_GENERIC_DESKTOP:
- switch (HID_USAGE(hitem.usage)) {
- case HUG_JOYSTICK:
- case HUG_GAME_PAD:
- s = hid_usage_in_page(hitem.usage);
- sp = malloc(strlen(s) + 5);
- sprintf(sp, "%s (%d)", s,
- joy->index);
- joydevnames[joy->index] = sp;
- }
- }
- break;
- case hid_input:
- switch (HID_PAGE(hitem.usage)) {
- case HUP_GENERIC_DESKTOP:
- switch (HID_USAGE(hitem.usage)) {
- case HUG_X:
- case HUG_Y:
- case HUG_Z:
- case HUG_SLIDER:
- case HUG_WHEEL:
-#if 0
- hw->axismin[joy->naxes] =
- hitem.logical_minimum;
- hw->axismax[joy->naxes] =
- hitem.logical_maximum;
-#endif
- joy->naxes++;
- break;
- }
- break;
- case HUP_BUTTON:
- joy->nbuttons++;
- break;
- default:
- break;
- }
- break;
- default:
- break;
- }
- }
- hid_end_parse(hdata);
-
- /* The poll blocks the event thread. */
- fcntl(fd, F_SETFL, O_NONBLOCK);
-
- return (0);
-usberr:
- close(hw->fd);
- free(hw->path);
- free(hw);
- return (-1);
-}
-
-void
-SDL_SYS_JoystickUpdate(SDL_Joystick *joy)
-{
- struct hid_item hitem;
- struct hid_data *hdata;
- struct report *rep;
- int nbutton, naxe = -1;
- Sint32 v;
-
- rep = &joy->hwdata->inreport;
-
- if (read(joy->hwdata->fd, REP_BUF_DATA(rep), rep->size) != rep->size) {
- return;
- }
-#ifdef USBHID_NEW
- hdata = hid_start_parse(joy->hwdata->repdesc, 1 << hid_input, rep->rid);
-#else
- hdata = hid_start_parse(joy->hwdata->repdesc, 1 << hid_input);
-#endif
- if (hdata == NULL) {
- fprintf(stderr, "%s: Cannot start HID parser\n",
- joy->hwdata->path);
- return;
- }
-
- for (nbutton = 0; hid_get_item(hdata, &hitem) > 0;) {
- switch (hitem.kind) {
- case hid_input:
- switch (HID_PAGE(hitem.usage)) {
- case HUP_GENERIC_DESKTOP:
- switch (HID_USAGE(hitem.usage)) {
- case HUG_X:
- naxe = JOYAXE_X;
- goto scaleaxe;
- case HUG_Y:
- naxe = JOYAXE_Y;
- goto scaleaxe;
- case HUG_Z:
- naxe = JOYAXE_Z;
- goto scaleaxe;
- case HUG_SLIDER:
- naxe = JOYAXE_SLIDER;
- goto scaleaxe;
- case HUG_WHEEL:
- naxe = JOYAXE_WHEEL;
- goto scaleaxe;
- default:
- continue;
- }
-scaleaxe:
- v = (Sint32)hid_get_data(REP_BUF_DATA(rep),
- &hitem);
- v -= (hitem.logical_maximum + hitem.logical_minimum + 1)/2;
- v *= 32768/((hitem.logical_maximum - hitem.logical_minimum + 1)/2);
- if (v != joy->axes[naxe]) {
- SDL_PrivateJoystickAxis(joy, naxe, v);
- }
- break;
- case HUP_BUTTON:
- v = (Sint32)hid_get_data(REP_BUF_DATA(rep),
- &hitem);
- if (joy->buttons[nbutton] != v) {
- SDL_PrivateJoystickButton(joy,
- nbutton, v);
- }
- nbutton++;
- break;
- default:
- continue;
- }
- break;
- default:
- break;
- }
- }
- hid_end_parse(hdata);
-
- return;
-}
-
-/* Function to close a joystick after use */
-void
-SDL_SYS_JoystickClose(SDL_Joystick *joy)
-{
- report_free(&joy->hwdata->inreport);
- hid_dispose_report_desc(joy->hwdata->repdesc);
- close(joy->hwdata->fd);
- free(joy->hwdata->path);
- free(joy->hwdata);
-
- return;
-}
-
-void
-SDL_SYS_JoystickQuit(void)
-{
- int i;
-
- for (i = 0; i < MAX_JOYS; i++) {
- if (joynames[i] != NULL)
- free(joynames[i]);
- if (joydevnames[i] != NULL)
- free(joydevnames[i]);
- }
-
- return;
-}
-
-static int
-report_alloc(struct report *r, struct report_desc *rd, int repind)
-{
- 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);
-#endif
- if (len < 0) {
- SDL_SetError("Negative HID report size");
- return (-1);
- }
- r->size = len;
-
- if (r->size > 0) {
- r->buf = malloc(sizeof(*r->buf) - sizeof(REP_BUF_DATA(r)) +
- r->size);
- if (r->buf == NULL) {
- SDL_OutOfMemory();
- return (-1);
- }
- } else {
- r->buf = NULL;
- }
-
- r->status = SREPORT_CLEAN;
- return (0);
-}
-
-static void
-report_free(struct report *r)
-{
- if (r->buf != NULL) {
- free(r->buf);
- }
- r->status = SREPORT_UNINIT;
-}
-
diff --git a/devel/SDL/patches/patch-aa b/devel/SDL/patches/patch-aa
deleted file mode 100644
index e6b5c8614b2..00000000000
--- a/devel/SDL/patches/patch-aa
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD: patch-aa,v 1.1.1.1 2000/06/26 01:09:09 wiz Exp $
-
---- src/audio/netbsd/Makefile.am.orig Fri Jun 23 03:53:49 2000
-+++ src/audio/netbsd/Makefile.am Fri Jun 23 03:53:49 2000
-@@ -0,0 +1,17 @@
-+
-+## Makefile.am for the SDL NetBSD audio subsystem
-+
-+noinst_LTLIBRARIES = libaudio_arch.la
-+
-+if TARGET_NETBSD
-+ARCH_SRCS = SDL_audiodev.c SDL_audiodev_c.h \
-+ SDL_lowaudio.h SDL_sysaudio.c \
-+ SDL_esdaudio.c SDL_esdaudio.h
-+else
-+ARCH_SRCS =
-+endif
-+
-+libaudio_arch_la_SOURCES = $(ARCH_SRCS)
-+
-+# All of the sources come from other architecture directories
-+DISTCLEANFILES = $(ARCH_SRCS)
diff --git a/devel/SDL/patches/patch-ab b/devel/SDL/patches/patch-ab
deleted file mode 100644
index 7ee4f689d9c..00000000000
--- a/devel/SDL/patches/patch-ab
+++ /dev/null
@@ -1,342 +0,0 @@
-$NetBSD: patch-ab,v 1.1.1.1 2000/06/26 01:09:09 wiz Exp $
-
---- src/audio/netbsd/Makefile.in.orig Fri Jun 23 03:53:50 2000
-+++ src/audio/netbsd/Makefile.in Fri Jun 23 03:54:43 2000
-@@ -0,0 +1,337 @@
-+# Makefile.in generated automatically by automake 1.4 from Makefile.am
-+
-+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
-+# This Makefile.in is free software; the Free Software Foundation
-+# gives unlimited permission to copy and/or distribute it,
-+# with or without modifications, as long as this notice is preserved.
-+
-+# This program is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-+# PARTICULAR PURPOSE.
-+
-+
-+SHELL = @SHELL@
-+
-+srcdir = @srcdir@
-+top_srcdir = @top_srcdir@
-+VPATH = @srcdir@
-+prefix = @prefix@
-+exec_prefix = @exec_prefix@
-+
-+bindir = @bindir@
-+sbindir = @sbindir@
-+libexecdir = @libexecdir@
-+datadir = @datadir@
-+sysconfdir = @sysconfdir@
-+sharedstatedir = @sharedstatedir@
-+localstatedir = @localstatedir@
-+libdir = @libdir@
-+infodir = @infodir@
-+mandir = @mandir@
-+includedir = @includedir@
-+oldincludedir = /usr/include
-+
-+DESTDIR =
-+
-+pkgdatadir = $(datadir)/@PACKAGE@
-+pkglibdir = $(libdir)/@PACKAGE@
-+pkgincludedir = $(includedir)/@PACKAGE@
-+
-+top_builddir = ../../..
-+
-+ACLOCAL = @ACLOCAL@
-+AUTOCONF = @AUTOCONF@
-+AUTOMAKE = @AUTOMAKE@
-+AUTOHEADER = @AUTOHEADER@
-+
-+INSTALL = @INSTALL@
-+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-+INSTALL_DATA = @INSTALL_DATA@
-+INSTALL_SCRIPT = @INSTALL_SCRIPT@
-+transform = @program_transform_name@
-+
-+NORMAL_INSTALL = :
-+PRE_INSTALL = :
-+POST_INSTALL = :
-+NORMAL_UNINSTALL = :
-+PRE_UNINSTALL = :
-+POST_UNINSTALL = :
-+host_alias = @host_alias@
-+host_triplet = @host@
-+ARCH = @ARCH@
-+AS = @AS@
-+AUDIO_ARCH = @AUDIO_ARCH@
-+AUDIO_ARCH_LIB = @AUDIO_ARCH_LIB@
-+CC = @CC@
-+CXX = @CXX@
-+DLLTOOL = @DLLTOOL@
-+ESD_CFLAGS = @ESD_CFLAGS@
-+ESD_CONFIG = @ESD_CONFIG@
-+ESD_LIBS = @ESD_LIBS@
-+EXEEXT = @EXEEXT@
-+LD = @LD@
-+LIBTOOL = @LIBTOOL@
-+LN_S = @LN_S@
-+LT_AGE = @LT_AGE@
-+LT_CURRENT = @LT_CURRENT@
-+LT_RELEASE = @LT_RELEASE@
-+LT_REVISION = @LT_REVISION@
-+MAKEINFO = @MAKEINFO@
-+NASM = @NASM@
-+NASMFLAGS = @NASMFLAGS@
-+NM = @NM@
-+OBJDUMP = @OBJDUMP@
-+OBJEXT = @OBJEXT@
-+PACKAGE = @PACKAGE@
-+RANLIB = @RANLIB@
-+SDL_BINARY_AGE = @SDL_BINARY_AGE@
-+SDL_CFLAGS = @SDL_CFLAGS@
-+SDL_EXTRADIRS = @SDL_EXTRADIRS@
-+SDL_EXTRALIBS = @SDL_EXTRALIBS@
-+SDL_INTERFACE_AGE = @SDL_INTERFACE_AGE@
-+SDL_LIBS = @SDL_LIBS@
-+SDL_MAJOR_VERSION = @SDL_MAJOR_VERSION@
-+SDL_MICRO_VERSION = @SDL_MICRO_VERSION@
-+SDL_MINOR_VERSION = @SDL_MINOR_VERSION@
-+SDL_RLD_FLAGS = @SDL_RLD_FLAGS@
-+SDL_VERSION = @SDL_VERSION@
-+STRIP = @STRIP@
-+SYSTEM_LIBS = @SYSTEM_LIBS@
-+VERSION = @VERSION@
-+VIDEO_DRIVERS = @VIDEO_DRIVERS@
-+VIDEO_SUBDIRS = @VIDEO_SUBDIRS@
-+with_gcc = @with_gcc@
-+with_gnu_ld = @with_gnu_ld@
-+
-+noinst_LTLIBRARIES = libaudio_arch.la
-+@TARGET_NETBSD_TRUE@ARCH_SRCS = SDL_audiodev.c SDL_audiodev_c.h SDL_lowaudio.h SDL_sysaudio.c SDL_esdaudio.c SDL_esdaudio.h
-+@TARGET_NETBSD_FALSE@ARCH_SRCS =
-+
-+libaudio_arch_la_SOURCES = $(ARCH_SRCS)
-+
-+# All of the sources come from other architecture directories
-+DISTCLEANFILES = $(ARCH_SRCS)
-+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-+CONFIG_CLEAN_FILES =
-+LTLIBRARIES = $(noinst_LTLIBRARIES)
-+
-+
-+DEFS = @DEFS@ -I. -I$(srcdir)
-+CPPFLAGS = @CPPFLAGS@
-+LDFLAGS = @LDFLAGS@
-+LIBS = @LIBS@
-+X_CFLAGS = @X_CFLAGS@
-+X_LIBS = @X_LIBS@
-+X_EXTRA_LIBS = @X_EXTRA_LIBS@
-+X_PRE_LIBS = @X_PRE_LIBS@
-+libaudio_arch_la_LDFLAGS =
-+libaudio_arch_la_LIBADD =
-+@TARGET_NETBSD_FALSE@libaudio_arch_la_OBJECTS =
-+@TARGET_NETBSD_TRUE@libaudio_arch_la_OBJECTS = SDL_audiodev.lo \
-+@TARGET_NETBSD_TRUE@SDL_sysaudio.lo SDL_esdaudio.lo
-+CFLAGS = @CFLAGS@
-+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-+LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-+CCLD = $(CC)
-+LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-+DIST_COMMON = Makefile.am Makefile.in
-+
-+
-+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-+
-+TAR = tar
-+GZIP_ENV = --best
-+SOURCES = $(libaudio_arch_la_SOURCES)
-+OBJECTS = $(libaudio_arch_la_OBJECTS)
-+
-+all: all-redirect
-+.SUFFIXES:
-+.SUFFIXES: .S .c .lo .o .obj .s
-+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
-+ cd $(top_srcdir) && $(AUTOMAKE) --foreign --include-deps src/audio/netbsd/Makefile
-+
-+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-+ cd $(top_builddir) \
-+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
-+
-+
-+mostlyclean-noinstLTLIBRARIES:
-+
-+clean-noinstLTLIBRARIES:
-+ -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
-+
-+distclean-noinstLTLIBRARIES:
-+
-+maintainer-clean-noinstLTLIBRARIES:
-+
-+.c.o:
-+ $(COMPILE) -c $<
-+
-+# FIXME: We should only use cygpath when building on Windows,
-+# and only if it is available.
-+.c.obj:
-+ $(COMPILE) -c `cygpath -w $<`
-+
-+.s.o:
-+ $(COMPILE) -c $<
-+
-+.S.o:
-+ $(COMPILE) -c $<
-+
-+mostlyclean-compile:
-+ -rm -f *.o core *.core
-+ -rm -f *.$(OBJEXT)
-+
-+clean-compile:
-+
-+distclean-compile:
-+ -rm -f *.tab.c
-+
-+maintainer-clean-compile:
-+
-+.c.lo:
-+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-+
-+.s.lo:
-+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-+
-+.S.lo:
-+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-+
-+mostlyclean-libtool:
-+ -rm -f *.lo
-+
-+clean-libtool:
-+ -rm -rf .libs _libs
-+
-+distclean-libtool:
-+
-+maintainer-clean-libtool:
-+
-+libaudio_arch.la: $(libaudio_arch_la_OBJECTS) $(libaudio_arch_la_DEPENDENCIES)
-+ $(LINK) $(libaudio_arch_la_LDFLAGS) $(libaudio_arch_la_OBJECTS) $(libaudio_arch_la_LIBADD) $(LIBS)
-+
-+tags: TAGS
-+
-+ID: $(HEADERS) $(SOURCES) $(LISP)
-+ list='$(SOURCES) $(HEADERS)'; \
-+ unique=`for i in $$list; do echo $$i; done | \
-+ awk ' { files[$$0] = 1; } \
-+ END { for (i in files) print i; }'`; \
-+ here=`pwd` && cd $(srcdir) \
-+ && mkid -f$$here/ID $$unique $(LISP)
-+
-+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
-+ tags=; \
-+ here=`pwd`; \
-+ list='$(SOURCES) $(HEADERS)'; \
-+ unique=`for i in $$list; do echo $$i; done | \
-+ awk ' { files[$$0] = 1; } \
-+ END { for (i in files) print i; }'`; \
-+ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
-+ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
-+
-+mostlyclean-tags:
-+
-+clean-tags:
-+
-+distclean-tags:
-+ -rm -f TAGS ID
-+
-+maintainer-clean-tags:
-+
-+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
-+
-+subdir = src/audio/netbsd
-+
-+distdir: $(DISTFILES)
-+ @for file in $(DISTFILES); do \
-+ d=$(srcdir); \
-+ if test -d $$d/$$file; then \
-+ cp -pr $$/$$file $(distdir)/$$file; \
-+ else \
-+ test -f $(distdir)/$$file \
-+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
-+ || cp -p $$d/$$file $(distdir)/$$file || :; \
-+ fi; \
-+ done
-+info-am:
-+info: info-am
-+dvi-am:
-+dvi: dvi-am
-+check-am: all-am
-+check: check-am
-+installcheck-am:
-+installcheck: installcheck-am
-+install-exec-am:
-+install-exec: install-exec-am
-+
-+install-data-am:
-+install-data: install-data-am
-+
-+install-am: all-am
-+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-+install: install-am
-+uninstall-am:
-+uninstall: uninstall-am
-+all-am: Makefile $(LTLIBRARIES)
-+all-redirect: all-am
-+install-strip:
-+ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-+installdirs:
-+
-+
-+mostlyclean-generic:
-+
-+clean-generic:
-+
-+distclean-generic:
-+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
-+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
-+
-+maintainer-clean-generic:
-+mostlyclean-am: mostlyclean-noinstLTLIBRARIES mostlyclean-compile \
-+ mostlyclean-libtool mostlyclean-tags \
-+ mostlyclean-generic
-+
-+mostlyclean: mostlyclean-am
-+
-+clean-am: clean-noinstLTLIBRARIES clean-compile clean-libtool \
-+ clean-tags clean-generic mostlyclean-am
-+
-+clean: clean-am
-+
-+distclean-am: distclean-noinstLTLIBRARIES distclean-compile \
-+ distclean-libtool distclean-tags distclean-generic \
-+ clean-am
-+ -rm -f libtool
-+
-+distclean: distclean-am
-+
-+maintainer-clean-am: maintainer-clean-noinstLTLIBRARIES \
-+ maintainer-clean-compile maintainer-clean-libtool \
-+ maintainer-clean-tags maintainer-clean-generic \
-+ distclean-am
-+ @echo "This command is intended for maintainers to use;"
-+ @echo "it deletes files that may require special tools to rebuild."
-+
-+maintainer-clean: maintainer-clean-am
-+
-+.PHONY: mostlyclean-noinstLTLIBRARIES distclean-noinstLTLIBRARIES \
-+clean-noinstLTLIBRARIES maintainer-clean-noinstLTLIBRARIES \
-+mostlyclean-compile distclean-compile clean-compile \
-+maintainer-clean-compile mostlyclean-libtool distclean-libtool \
-+clean-libtool maintainer-clean-libtool tags mostlyclean-tags \
-+distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
-+dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
-+install-exec install-data-am install-data install-am install \
-+uninstall-am uninstall all-redirect all-am all installdirs \
-+mostlyclean-generic distclean-generic clean-generic \
-+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-+
-+
-+# Tell versions [3.59,3.63) of GNU make to not export all variables.
-+# Otherwise a system limit (for SysV at least) may be exceeded.
-+.NOEXPORT:
diff --git a/devel/SDL/patches/patch-ac b/devel/SDL/patches/patch-ac
deleted file mode 100644
index c22ef241406..00000000000
--- a/devel/SDL/patches/patch-ac
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ac,v 1.5 2001/09/24 14:28:55 rh Exp $
-
---- src/audio/SDL_audio.c.orig Mon Jul 23 04:58:42 2001
-+++ src/audio/SDL_audio.c
-@@ -241,7 +241,7 @@
- /* Select the proper audio driver */
- audio = NULL;
- idx = 0;
--#ifdef unix
-+#if defined(unix) || defined (__NetBSD__)
- if ( (driver_name == NULL) && (getenv("ESPEAKER") != NULL) ) {
- /* Ahem, we know that if ESPEAKER is set, user probably wants
- to use ESD, but don't start it if it's not already running.
diff --git a/devel/SDL/patches/patch-ad b/devel/SDL/patches/patch-ad
deleted file mode 100644
index 3e12078523f..00000000000
--- a/devel/SDL/patches/patch-ad
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD: patch-ad,v 1.3 2001/07/03 06:17:33 rh Exp $
-
---- src/audio/SDL_audiomem.c.orig Thu Apr 26 18:50:17 2001
-+++ src/audio/SDL_audiomem.c
-@@ -35,6 +35,7 @@
- #include <sys/ipc.h>
- #include <sys/shm.h>
- #include <stddef.h>
-+#include <stdlib.h>
- #endif
-
- #include "SDL_audiomem.h"
diff --git a/devel/SDL/patches/patch-ah b/devel/SDL/patches/patch-ah
deleted file mode 100644
index b97f72eb642..00000000000
--- a/devel/SDL/patches/patch-ah
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD: patch-ah,v 1.1.1.1 2000/06/26 01:09:09 wiz Exp $
-
---- src/cdrom/freebsd/SDL_syscdrom.c.orig Sun Apr 23 21:43:28 2000
-+++ src/cdrom/freebsd/SDL_syscdrom.c Fri Jun 23 03:53:51 2000
-@@ -27,6 +27,7 @@
-
- /* Functions for system-level CD-ROM audio control */
-
-+#include <sys/ioctl.h>
- #include <sys/types.h>
- #include <stdlib.h>
- #include <sys/stat.h>
diff --git a/devel/SDL/patches/patch-ai b/devel/SDL/patches/patch-ai
deleted file mode 100644
index 5de5d973291..00000000000
--- a/devel/SDL/patches/patch-ai
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ai,v 1.4 2001/09/24 14:28:55 rh Exp $
-
---- include/SDL_syswm.h.orig Sun Jul 8 11:00:06 2001
-+++ include/SDL_syswm.h
-@@ -49,7 +49,7 @@
- #else
-
- /* This is the structure for custom window manager events */
--#if (defined(unix) || defined(__unix__) || defined(_AIX) || defined(__OpenBSD__)) && \
-+#if (defined(unix) || defined(__unix__) || defined(_AIX) || defined(__NetBSD__) || defined(__OpenBSD__)) && \
- (!defined(DISABLE_X11) && !defined(__CYGWIN32__))
- /* AIX is unix, of course, but the native compiler CSet doesn't define unix */
- #include <X11/Xlib.h>
diff --git a/devel/SDL/patches/patch-aj b/devel/SDL/patches/patch-aj
index cc64d832002..8833f1ee0ef 100644
--- a/devel/SDL/patches/patch-aj
+++ b/devel/SDL/patches/patch-aj
@@ -1,7 +1,7 @@
-$NetBSD: patch-aj,v 1.13 2002/08/25 19:22:18 jlam Exp $
---- configure.in.orig Thu Nov 8 08:28:00 2001
-+++ configure.in Mon Jul 15 23:28:12 2002
-@@ -374,10 +374,7 @@
+$NetBSD: patch-aj,v 1.14 2002/10/13 19:28:58 kristerw Exp $
+--- configure.in.orig Sun Oct 13 14:01:53 2002
++++ configure.in Sun Oct 13 20:41:57 2002
+@@ -412,10 +412,7 @@
, enable_nas=yes)
if test x$enable_audio = xyes -a x$enable_nas = xyes; then
AC_MSG_CHECKING(for NAS audio support)
@@ -12,8 +12,8 @@ $NetBSD: patch-aj,v 1.13 2002/08/25 19:22:18 jlam Exp $
AC_MSG_RESULT($have_nas)
if test x$have_nas = xyes; then
CFLAGS="$CFLAGS -DNAS_SUPPORT"
-@@ -429,7 +426,7 @@
- NASMFLAGS="-f win32"
+@@ -488,7 +485,7 @@
+ NASMFLAGS="-f aoutb"
;;
*)
- NASMFLAGS="-f elf"
@@ -21,7 +21,25 @@ $NetBSD: patch-aj,v 1.13 2002/08/25 19:22:18 jlam Exp $
;;
esac
AC_SUBST(NASMFLAGS)
-@@ -999,8 +996,8 @@
+@@ -1104,12 +1101,13 @@
+ [ --enable-pth use GNU pth library for multi-threading [default=yes]],
+ , enable_pth=yes)
+ if test x$enable_threads = xyes -a x$enable_pth = xyes; then
+- AC_PATH_PROG(PTH_CONFIG, pth-config, no)
+- if test "$PTH_CONFIG" = "no"; then
++ # Use the libpthread version of the pth library.
++ AC_PATH_PROG(PTHREAD_CONFIG, pthread-config, no)
++ if test "$PTHREAD_CONFIG" = "no"; then
+ use_pth=no
+ else
+- PTH_CFLAGS=`$PTH_CONFIG --cflags`
+- PTH_LIBS=`$PTH_CONFIG --libs --all`
++ PTH_CFLAGS=`$PTHREAD_CONFIG --cflags`
++ PTH_LIBS=`$PTHREAD_CONFIG --libs --all`
+ SDL_CFLAGS="$SDL_CFLAGS $PTH_CFLAGS"
+ SDL_LIBS="$SDL_LIBS $PTH_LIBS"
+ CFLAGS="$CFLAGS -DENABLE_PTH"
+@@ -1150,8 +1148,8 @@
pthread_lib="-pthread"
;;
*-*-netbsd*)
@@ -32,19 +50,13 @@ $NetBSD: patch-aj,v 1.13 2002/08/25 19:22:18 jlam Exp $
;;
*-*-openbsd*)
pthread_cflags="-D_REENTRANT"
-@@ -1281,6 +1278,126 @@
- VIDEO_DRIVERS="$VIDEO_DRIVERS quartz/libvideo_quartz.la"
- }
-
-+dnl Check for the usbhid(3) library on *BSD
-+CheckUSBHID()
-+{
-+ if test x$enable_joystick = xyes; then
-+ have_libusbhid=no
-+ have_libusb=no
-+ AC_CHECK_LIB(usbhid, hid_init, have_libusbhid=yes)
-+ if test x$have_libusbhid = xyes; then
-+ SYSTEM_LIBS="$SYSTEM_LIBS -lusbhid"
+@@ -1566,29 +1564,31 @@
+ have_libusbhid=no
+ have_libusb=no
+ AC_CHECK_LIB(usbhid, hid_init, have_libusbhid=yes)
+- AC_CHECK_LIB(usb, hid_init, have_libusb=yes)
+ if test x$have_libusbhid = xyes; then
+ SYSTEM_LIBS="$SYSTEM_LIBS -lusbhid"
+
+ AC_CHECK_HEADER(usbhid.h, have_usbhid_h=yes)
+ AC_CHECK_HEADER(libusbhid.h, have_libusbhid_h=yes)
@@ -53,119 +65,33 @@ $NetBSD: patch-aj,v 1.13 2002/08/25 19:22:18 jlam Exp $
+ fi
+ if test x$have_libusbhid_h = xyes; then
+ CFLAGS="$CFLAGS -DHAVE_LIBUSBHID_H"
-+ fi
+ fi
+ else
+ AC_CHECK_LIB(usb, hid_init, have_libusb=yes)
-+ if test x$have_libusb = xyes; then
-+ SYSTEM_LIBS="$SYSTEM_LIBS -lusb"
-+
-+ AC_CHECK_HEADER(usb.h, have_usb_h=yes)
-+ AC_CHECK_HEADER(libusb.h, have_libusb_h=yes)
-+ if test x$have_usb_h = xyes; then
-+ CFLAGS="$CFLAGS -DHAVE_USB_H"
-+ fi
-+ if test x$have_libusb_h = xyes; then
-+ CFLAGS="$CFLAGS -DHAVE_LIBUSB_H"
-+ fi
-+ fi
-+ fi
-+
-+ AC_MSG_CHECKING(for usbhid)
-+ have_usbhid=no
-+ AC_TRY_COMPILE([
-+ #include <sys/types.h>
-+ #if defined(HAVE_USB_H)
-+ #include <usb.h>
-+ #endif
-+ #include <dev/usb/usb.h>
-+ #include <dev/usb/usbhid.h>
-+ #if defined(HAVE_USBHID_H)
-+ #include <usbhid.h>
-+ #elif defined(HAVE_LIBUSB_H)
-+ #include <libusb.h>
-+ #elif defined(HAVE_LIBUSBHID_H)
-+ #include <libusbhid.h>
-+ #endif
-+ ],[
-+ struct report_desc *repdesc;
-+ struct usb_ctl_report *repbuf;
-+ hid_kind_t hidkind;
-+ ],[
-+ have_usbhid=yes
-+ ])
-+ AC_MSG_RESULT($have_usbhid)
-+
-+ if test x$have_usbhid = xyes; then
-+ AC_MSG_CHECKING(for ucr_data member of usb_ctl_report)
-+ have_usbhid_ucr_data=no
-+ AC_TRY_COMPILE([
-+ #include <sys/types.h>
-+ #if defined(HAVE_USB_H)
-+ #include <usb.h>
-+ #endif
-+ #include <dev/usb/usb.h>
-+ #include <dev/usb/usbhid.h>
-+ #if defined(HAVE_USBHID_H)
-+ #include <usbhid.h>
-+ #elif defined(HAVE_LIBUSB_H)
-+ #include <libusb.h>
-+ #elif defined(HAVE_LIBUSBHID_H)
-+ #include <libusbhid.h>
-+ #endif
-+ ],[
-+ struct usb_ctl_report buf;
-+ if (buf.ucr_data) { }
-+ ],[
-+ have_usbhid_ucr_data=yes
-+ ])
-+ if test x$have_usbhid_ucr_data = xyes; then
-+ CFLAGS="$CFLAGS -DUSBHID_UCR_DATA"
-+ fi
-+ AC_MSG_RESULT($have_usbhid_ucr_data)
-+
-+ AC_MSG_CHECKING(for new usbhid API)
-+ have_usbhid_new=no
-+ AC_TRY_COMPILE([
-+ #include <sys/types.h>
-+ #if defined(HAVE_USB_H)
-+ #include <usb.h>
-+ #endif
-+ #include <dev/usb/usb.h>
-+ #include <dev/usb/usbhid.h>
-+ #if defined(HAVE_USBHID_H)
-+ #include <usbhid.h>
-+ #elif defined(HAVE_LIBUSB_H)
-+ #include <libusb.h>
-+ #elif defined(HAVE_LIBUSBHID_H)
-+ #include <libusbhid.h>
-+ #endif
-+ ],[
-+ report_desc_t d;
-+ hid_start_parse(d, 1, 1);
-+ ],[
-+ have_usbhid_new=yes
-+ ])
-+ if test x$have_usbhid_new = xyes; then
-+ CFLAGS="$CFLAGS -DUSBHID_NEW"
+ if test x$have_libusb = xyes; then
+ SYSTEM_LIBS="$SYSTEM_LIBS -lusb"
+- fi
+
+ AC_CHECK_HEADER(usb.h, have_usb_h=yes)
+- AC_CHECK_HEADER(usbhid.h, have_usbhid_h=yes)
+ AC_CHECK_HEADER(libusb.h, have_libusb_h=yes)
+- AC_CHECK_HEADER(libusbhid.h, have_libusbhid_h=yes)
+ if test x$have_usb_h = xyes; then
+ CFLAGS="$CFLAGS -DHAVE_USB_H"
+ fi
+- if test x$have_usbhid_h = xyes; then
+- CFLAGS="$CFLAGS -DHAVE_USBHID_H"
+- fi
+ if test x$have_libusb_h = xyes; then
+ CFLAGS="$CFLAGS -DHAVE_LIBUSB_H"
+ fi
+- if test x$have_libusbhid_h = xyes; then
+- CFLAGS="$CFLAGS -DHAVE_LIBUSBHID_H"
+ fi
-+ AC_MSG_RESULT($have_usbhid_new)
-+
-+ JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS bsd"
-+ JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS bsd/libjoystick_bsd.la"
-+ fi
-+ fi
-+}
-+
- case "$target" in
- *-*-linux*)
- ARCH=linux
-@@ -1465,14 +1582,17 @@
- CheckDummyVideo
- CheckDiskAudio
- CheckNASM
-+ CheckOPENBSDAUDIO
- CheckOSS
- CheckARTSC
+ fi
+
+ AC_MSG_CHECKING(for usbhid)
+@@ -1834,6 +1834,7 @@
CheckESD
CheckNAS
CheckX11
@@ -173,51 +99,26 @@ $NetBSD: patch-aj,v 1.13 2002/08/25 19:22:18 jlam Exp $
CheckAAlib
CheckOpenGL
CheckPTHREAD
-+ CheckUSBHID
- # Set up files for the main() stub
+@@ -1842,9 +1843,9 @@
COPY_ARCH_SRC(src/main, linux, SDL_main.c)
# Set up files for the audio library
-@@ -1481,12 +1601,6 @@
- AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
- AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
+ if test x$enable_audio = xyes; then
+- CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
+- AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
+- AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
++ CFLAGS="$CFLAGS -DOPENBSD_AUDIO_SUPPORT"
++ AUDIO_SUBDIRS="$AUDIO_SUBDIRS openbsd"
++ AUDIO_DRIVERS="$AUDIO_DRIVERS openbsd/libaudio_openbsd.la"
fi
-- # Set up files for the joystick library
-- # (No joystick support yet)
-- if test x$enable_joystick = xyes; then
-- JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
-- JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
-- fi
# Set up files for the cdrom library
if test x$enable_cdrom = xyes; then
- CDROM_SUBDIRS="$CDROM_SUBDIRS openbsd"
-@@ -1770,7 +1884,11 @@
- COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
- COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
- COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
-+ if test x$use_pthreads = xyes -a x$enable_pthread_sem != xyes; then
-+ COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
-+ else
- COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
-+ fi
- COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
- COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
- COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
-@@ -2159,6 +2277,10 @@
- SDL_RLD_FLAGS="-R\${exec_prefix}/lib"
+@@ -2483,6 +2484,9 @@
fi
-
+ if test $ARCH = solaris; then
+ SDL_RLD_FLAGS="-R\${exec_prefix}/lib"
++fi
+if test $ARCH = netbsd; then
+ SDL_RLD_FLAGS="-Wl,-rpath,\${exec_prefix}/lib -Wl,-rpath,${X11BASE}/lib"
-+fi
-+
- if test $ARCH = openbsd; then
- SDL_RLD_FLAGS="-Wl,-rpath,\${exec_prefix}/lib $SYSTEM_LIBS"
fi
-@@ -2277,6 +2399,7 @@
- src/joystick/Makefile
- src/joystick/amigaos/Makefile
- src/joystick/beos/Makefile
-+src/joystick/bsd/Makefile
- src/joystick/darwin/Makefile
- src/joystick/dummy/Makefile
- src/joystick/linux/Makefile
+
+ case "$ARCH" in
diff --git a/devel/SDL/patches/patch-ak b/devel/SDL/patches/patch-ak
index c3dd8009da3..ea90afbc2b8 100644
--- a/devel/SDL/patches/patch-ak
+++ b/devel/SDL/patches/patch-ak
@@ -1,15 +1,12 @@
-$NetBSD: patch-ak,v 1.4 2001/04/17 16:27:22 rh Exp $
-
---- sdl-config.in.orig Wed Feb 28 16:53:18 2001
-+++ sdl-config.in
-@@ -48,8 +48,8 @@
- echo $includes -I@includedir@/SDL @SDL_CFLAGS@
+$NetBSD: patch-ak,v 1.5 2002/10/13 19:28:58 kristerw Exp $
+--- sdl-config.in.orig Sun Oct 13 14:31:53 2002
++++ sdl-config.in Sun Oct 13 14:33:12 2002
+@@ -51,7 +51,7 @@
+ #echo $includes -I@includedir@/SDL @SDL_CFLAGS@
;;
@ENABLE_SHARED_TRUE@ --libs)
-@ENABLE_SHARED_TRUE@ libdirs="-L@libdir@ @SDL_RLD_FLAGS@"
--@ENABLE_SHARED_TRUE@ echo $libdirs @SDL_LIBS@
+@ENABLE_SHARED_TRUE@ libdirs="-L@libdir@ -Wl,-R@libdir@ @SDL_RLD_FLAGS@"
-+@ENABLE_SHARED_TRUE@ echo $libdirs @SDL_LIBS@ @SYSTEM_LIBS@
+ @ENABLE_SHARED_TRUE@ echo $libdirs @SDL_LIBS@ @SHARED_SYSTEM_LIBS@
@ENABLE_SHARED_TRUE@ ;;
@ENABLE_STATIC_TRUE@@ENABLE_SHARED_TRUE@ --static-libs)
- @ENABLE_STATIC_TRUE@@ENABLE_SHARED_FALSE@ --libs|--static-libs)
diff --git a/devel/SDL/patches/patch-am b/devel/SDL/patches/patch-am
index fa336c5b8cb..6b1299f6549 100644
--- a/devel/SDL/patches/patch-am
+++ b/devel/SDL/patches/patch-am
@@ -1,10 +1,10 @@
-$NetBSD: patch-am,v 1.6 2002/08/25 19:22:19 jlam Exp $
---- configure.orig Thu Nov 8 08:28:08 2001
-+++ configure Mon Jul 15 23:31:06 2002
-@@ -3588,10 +3588,7 @@
+$NetBSD: patch-am,v 1.7 2002/10/13 19:28:58 kristerw Exp $
+--- configure.orig Sun Oct 13 14:02:02 2002
++++ configure Sun Oct 13 20:42:24 2002
+@@ -3630,10 +3630,7 @@
if test x$enable_audio = xyes -a x$enable_nas = xyes; then
echo $ac_n "checking for NAS audio support""... $ac_c" 1>&6
- echo "configure:3591: checking for NAS audio support" >&5
+ echo "configure:3633: checking for NAS audio support" >&5
- have_nas=no
- if test -r /usr/X11R6/include/audio/audiolib.h; then
have_nas=yes
@@ -12,8 +12,8 @@ $NetBSD: patch-am,v 1.6 2002/08/25 19:22:19 jlam Exp $
echo "$ac_t""$have_nas" 1>&6
if test x$have_nas = xyes; then
CFLAGS="$CFLAGS -DNAS_SUPPORT"
-@@ -3683,7 +3680,7 @@
- NASMFLAGS="-f win32"
+@@ -3782,7 +3779,7 @@
+ NASMFLAGS="-f aoutb"
;;
*)
- NASMFLAGS="-f elf"
@@ -21,7 +21,79 @@ $NetBSD: patch-am,v 1.6 2002/08/25 19:22:19 jlam Exp $
;;
esac
-@@ -5582,8 +5579,8 @@
+@@ -5755,19 +5752,20 @@
+ fi
+
+ if test x$enable_threads = xyes -a x$enable_pth = xyes; then
+- # Extract the first word of "pth-config", so it can be a program name with args.
+-set dummy pth-config; ac_word=$2
++ # Use the libpthread version of the pth library.
++ # Extract the first word of "pthread-config", so it can be a program name with args.
++set dummy pthread-config; ac_word=$2
+ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+-echo "configure:5762: checking for $ac_word" >&5
+-if eval "test \"`echo '$''{'ac_cv_path_PTH_CONFIG'+set}'`\" = set"; then
++echo "configure:5760: checking for $ac_word" >&5
++if eval "test \"`echo '$''{'ac_cv_path_PTHREAD_CONFIG'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+- case "$PTH_CONFIG" in
++ case "$PTHREAD_CONFIG" in
+ /*)
+- ac_cv_path_PTH_CONFIG="$PTH_CONFIG" # Let the user override the test with a path.
++ ac_cv_path_PTHREAD_CONFIG="$PTHREAD_CONFIG" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+- ac_cv_path_PTH_CONFIG="$PTH_CONFIG" # Let the user override the test with a dos path.
++ ac_cv_path_PTHREAD_CONFIG="$PTHREAD_CONFIG" # Let the user override the test with a dos path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+@@ -5775,34 +5773,34 @@
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+- ac_cv_path_PTH_CONFIG="$ac_dir/$ac_word"
++ ac_cv_path_PTHREAD_CONFIG="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+- test -z "$ac_cv_path_PTH_CONFIG" && ac_cv_path_PTH_CONFIG="no"
++ test -z "$ac_cv_path_PTHREAD_CONFIG" && ac_cv_path_PTHREAD_CONFIG="no"
+ ;;
+ esac
+ fi
+-PTH_CONFIG="$ac_cv_path_PTH_CONFIG"
+-if test -n "$PTH_CONFIG"; then
+- echo "$ac_t""$PTH_CONFIG" 1>&6
++PTHREAD_CONFIG="$ac_cv_path_PTHREAD_CONFIG"
++if test -n "$PTHREAD_CONFIG"; then
++ echo "$ac_t""$PTHREAD_CONFIG" 1>&6
+ else
+ echo "$ac_t""no" 1>&6
+ fi
+
+- if test "$PTH_CONFIG" = "no"; then
++ if test "$PTHREAD_CONFIG" = "no"; then
+ use_pth=no
+ else
+- PTH_CFLAGS=`$PTH_CONFIG --cflags`
+- PTH_LIBS=`$PTH_CONFIG --libs --all`
++ PTH_CFLAGS=`$PTHREAD_CONFIG --cflags`
++ PTH_LIBS=`$PTHREAD_CONFIG --libs --all`
+ SDL_CFLAGS="$SDL_CFLAGS $PTH_CFLAGS"
+ SDL_LIBS="$SDL_LIBS $PTH_LIBS"
+ CFLAGS="$CFLAGS -DENABLE_PTH"
+ use_pth=yes
+ fi
+ echo $ac_n "checking pth""... $ac_c" 1>&6
+-echo "configure:5806: checking pth" >&5
++echo "configure:5804: checking pth" >&5
+ if test "x$use_pth" = xyes; then
+ echo "$ac_t""yes" 1>&6
+ else
+@@ -5844,8 +5842,8 @@
pthread_lib="-pthread"
;;
*-*-netbsd*)
@@ -32,124 +104,112 @@ $NetBSD: patch-am,v 1.6 2002/08/25 19:22:19 jlam Exp $
;;
*-*-openbsd*)
pthread_cflags="-D_REENTRANT"
-@@ -6034,6 +6031,379 @@
- VIDEO_DRIVERS="$VIDEO_DRIVERS quartz/libvideo_quartz.la"
- }
+@@ -6760,66 +6758,55 @@
+ echo "$ac_t""no" 1>&6
+ fi
-+CheckUSBHID()
-+{
-+ if test x$enable_joystick = xyes; then
-+ have_libusbhid=no
-+ have_libusb=no
-+ echo $ac_n "checking for hid_init in -lusbhid""... $ac_c" 1>&6
-+echo "configure:6041: checking for hid_init in -lusbhid" >&5
-+ac_lib_var=`echo usbhid'_'hid_init | sed 'y%./+-%__p_%'`
-+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-+ echo $ac_n "(cached) $ac_c" 1>&6
-+else
-+ ac_save_LIBS="$LIBS"
-+LIBS="-lusbhid $LIBS"
-+cat > conftest.$ac_ext <<EOF
-+#line 6049 "configure"
-+#include "confdefs.h"
-+/* Override any gcc2 internal prototype to avoid an error. */
-+/* We use char because int might match the return type of a gcc2
-+ builtin and then its argument prototype would still apply. */
-+char hid_init();
-+
-+int main() {
-+hid_init()
-+; return 0; }
-+EOF
-+if { (eval echo configure:6060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+ rm -rf conftest*
-+ eval "ac_cv_lib_$ac_lib_var=yes"
-+else
-+ echo "configure: failed program was:" >&5
-+ cat conftest.$ac_ext >&5
-+ rm -rf conftest*
-+ eval "ac_cv_lib_$ac_lib_var=no"
-+fi
-+rm -f conftest*
-+LIBS="$ac_save_LIBS"
-+
-+fi
-+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-+ echo "$ac_t""yes" 1>&6
-+ have_libusbhid=yes
-+else
-+ echo "$ac_t""no" 1>&6
-+fi
-+
+- echo $ac_n "checking for hid_init in -lusb""... $ac_c" 1>&6
+-echo "configure:6765: checking for hid_init in -lusb" >&5
+-ac_lib_var=`echo usb'_'hid_init | sed 'y%./+-%__p_%'`
+-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ if test x$have_libusbhid = xyes; then
+ SYSTEM_LIBS="$SYSTEM_LIBS -lusbhid"
+
+ ac_safe=`echo "usbhid.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for usbhid.h""... $ac_c" 1>&6
-+echo "configure:6085: checking for usbhid.h" >&5
++echo "configure:6767: checking for usbhid.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-+ echo $ac_n "(cached) $ac_c" 1>&6
-+else
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+- ac_save_LIBS="$LIBS"
+-LIBS="-lusb $LIBS"
+-cat > conftest.$ac_ext <<EOF
+-#line 6773 "configure"
+ cat > conftest.$ac_ext <<EOF
-+#line 6090 "configure"
-+#include "confdefs.h"
++#line 6772 "configure"
+ #include "confdefs.h"
+-/* Override any gcc2 internal prototype to avoid an error. */
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+-char hid_init();
+-
+-int main() {
+-hid_init()
+-; return 0; }
+#include <usbhid.h>
-+EOF
+ EOF
+-if { (eval echo configure:6784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-+{ (eval echo configure:6095: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:6777: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
-+ rm -rf conftest*
+ rm -rf conftest*
+- eval "ac_cv_lib_$ac_lib_var=yes"
+ eval "ac_cv_header_$ac_safe=yes"
-+else
+ else
+ echo "$ac_err" >&5
-+ echo "configure: failed program was:" >&5
-+ cat conftest.$ac_ext >&5
-+ rm -rf conftest*
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+- eval "ac_cv_lib_$ac_lib_var=no"
+ eval "ac_cv_header_$ac_safe=no"
-+fi
-+rm -f conftest*
-+fi
+ fi
+ rm -f conftest*
+-LIBS="$ac_save_LIBS"
+-
+ fi
+-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-+ echo "$ac_t""yes" 1>&6
+ echo "$ac_t""yes" 1>&6
+- have_libusb=yes
+ have_usbhid_h=yes
-+else
-+ echo "$ac_t""no" 1>&6
-+fi
-+
+ else
+ echo "$ac_t""no" 1>&6
+ fi
+
+- if test x$have_libusbhid = xyes; then
+- SYSTEM_LIBS="$SYSTEM_LIBS -lusbhid"
+- fi
+- if test x$have_libusb = xyes; then
+- SYSTEM_LIBS="$SYSTEM_LIBS -lusb"
+- fi
+-
+- ac_safe=`echo "usb.h" | sed 'y%./+-%__p_%'`
+-echo $ac_n "checking for usb.h""... $ac_c" 1>&6
+-echo "configure:6813: checking for usb.h" >&5
+ ac_safe=`echo "libusbhid.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for libusbhid.h""... $ac_c" 1>&6
-+echo "configure:6118: checking for libusbhid.h" >&5
-+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-+ echo $ac_n "(cached) $ac_c" 1>&6
-+else
-+ cat > conftest.$ac_ext <<EOF
-+#line 6123 "configure"
-+#include "confdefs.h"
++echo "configure:6800: checking for libusbhid.h" >&5
+ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 6818 "configure"
++#line 6805 "configure"
+ #include "confdefs.h"
+-#include <usb.h>
+#include <libusbhid.h>
-+EOF
-+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-+{ (eval echo configure:6128: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-+if test -z "$ac_err"; then
-+ rm -rf conftest*
-+ eval "ac_cv_header_$ac_safe=yes"
-+else
-+ echo "$ac_err" >&5
-+ echo "configure: failed program was:" >&5
-+ cat conftest.$ac_ext >&5
-+ rm -rf conftest*
-+ eval "ac_cv_header_$ac_safe=no"
-+fi
-+rm -f conftest*
-+fi
-+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-+ echo "$ac_t""yes" 1>&6
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:6823: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:6810: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+ if test -z "$ac_err"; then
+ rm -rf conftest*
+@@ -6835,57 +6822,74 @@
+ fi
+ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+- have_usb_h=yes
+ have_libusbhid_h=yes
-+else
-+ echo "$ac_t""no" 1>&6
-+fi
-+
+ else
+ echo "$ac_t""no" 1>&6
+ fi
+
+- ac_safe=`echo "usbhid.h" | sed 'y%./+-%__p_%'`
+-echo $ac_n "checking for usbhid.h""... $ac_c" 1>&6
+-echo "configure:6846: checking for usbhid.h" >&5
+-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ if test x$have_usbhid_h = xyes; then
+ CFLAGS="$CFLAGS -DHAVE_USBHID_H"
+ fi
@@ -158,16 +218,19 @@ $NetBSD: patch-am,v 1.6 2002/08/25 19:22:19 jlam Exp $
+ fi
+ else
+ echo $ac_n "checking for hid_init in -lusb""... $ac_c" 1>&6
-+echo "configure:6157: checking for hid_init in -lusb" >&5
++echo "configure:6839: checking for hid_init in -lusb" >&5
+ac_lib_var=`echo usb'_'hid_init | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-+ echo $ac_n "(cached) $ac_c" 1>&6
-+else
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+- cat > conftest.$ac_ext <<EOF
+-#line 6851 "configure"
+ ac_save_LIBS="$LIBS"
+LIBS="-lusb $LIBS"
+cat > conftest.$ac_ext <<EOF
-+#line 6165 "configure"
-+#include "confdefs.h"
++#line 6847 "configure"
+ #include "confdefs.h"
+-#include <usbhid.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
@@ -176,249 +239,119 @@ $NetBSD: patch-am,v 1.6 2002/08/25 19:22:19 jlam Exp $
+int main() {
+hid_init()
+; return 0; }
-+EOF
-+if { (eval echo configure:6176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+ rm -rf conftest*
+ EOF
+-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:6856: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+-if test -z "$ac_err"; then
++if { (eval echo configure:6858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+- eval "ac_cv_header_$ac_safe=yes"
+ eval "ac_cv_lib_$ac_lib_var=yes"
-+else
-+ echo "configure: failed program was:" >&5
-+ cat conftest.$ac_ext >&5
-+ rm -rf conftest*
+ else
+- echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+- eval "ac_cv_header_$ac_safe=no"
+ eval "ac_cv_lib_$ac_lib_var=no"
-+fi
-+rm -f conftest*
+ fi
+ rm -f conftest*
+LIBS="$ac_save_LIBS"
+
-+fi
+ fi
+-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-+ echo "$ac_t""yes" 1>&6
+ echo "$ac_t""yes" 1>&6
+- have_usbhid_h=yes
+ have_libusb=yes
-+else
-+ echo "$ac_t""no" 1>&6
-+fi
-+
+ else
+ echo "$ac_t""no" 1>&6
+ fi
+
+- ac_safe=`echo "libusb.h" | sed 'y%./+-%__p_%'`
+-echo $ac_n "checking for libusb.h""... $ac_c" 1>&6
+-echo "configure:6879: checking for libusb.h" >&5
+ if test x$have_libusb = xyes; then
+ SYSTEM_LIBS="$SYSTEM_LIBS -lusb"
+
+ ac_safe=`echo "usb.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for usb.h""... $ac_c" 1>&6
-+echo "configure:6201: checking for usb.h" >&5
-+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-+ echo $ac_n "(cached) $ac_c" 1>&6
-+else
-+ cat > conftest.$ac_ext <<EOF
-+#line 6206 "configure"
-+#include "confdefs.h"
++echo "configure:6883: checking for usb.h" >&5
+ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 6884 "configure"
++#line 6888 "configure"
+ #include "confdefs.h"
+-#include <libusb.h>
+#include <usb.h>
-+EOF
-+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-+{ (eval echo configure:6211: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-+if test -z "$ac_err"; then
-+ rm -rf conftest*
-+ eval "ac_cv_header_$ac_safe=yes"
-+else
-+ echo "$ac_err" >&5
-+ echo "configure: failed program was:" >&5
-+ cat conftest.$ac_ext >&5
-+ rm -rf conftest*
-+ eval "ac_cv_header_$ac_safe=no"
-+fi
-+rm -f conftest*
-+fi
-+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-+ echo "$ac_t""yes" 1>&6
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:6889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:6893: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+ if test -z "$ac_err"; then
+ rm -rf conftest*
+@@ -6901,24 +6905,24 @@
+ fi
+ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+- have_libusb_h=yes
+ have_usb_h=yes
-+else
-+ echo "$ac_t""no" 1>&6
-+fi
-+
+ else
+ echo "$ac_t""no" 1>&6
+ fi
+
+- ac_safe=`echo "libusbhid.h" | sed 'y%./+-%__p_%'`
+-echo $ac_n "checking for libusbhid.h""... $ac_c" 1>&6
+-echo "configure:6912: checking for libusbhid.h" >&5
+ ac_safe=`echo "libusb.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for libusb.h""... $ac_c" 1>&6
-+echo "configure:6234: checking for libusb.h" >&5
-+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-+ echo $ac_n "(cached) $ac_c" 1>&6
-+else
-+ cat > conftest.$ac_ext <<EOF
-+#line 6239 "configure"
-+#include "confdefs.h"
++echo "configure:6916: checking for libusb.h" >&5
+ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 6917 "configure"
++#line 6921 "configure"
+ #include "confdefs.h"
+-#include <libusbhid.h>
+#include <libusb.h>
-+EOF
-+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-+{ (eval echo configure:6244: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-+if test -z "$ac_err"; then
-+ rm -rf conftest*
-+ eval "ac_cv_header_$ac_safe=yes"
-+else
-+ echo "$ac_err" >&5
-+ echo "configure: failed program was:" >&5
-+ cat conftest.$ac_ext >&5
-+ rm -rf conftest*
-+ eval "ac_cv_header_$ac_safe=no"
-+fi
-+rm -f conftest*
-+fi
-+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-+ echo "$ac_t""yes" 1>&6
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:6922: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:6926: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+ if test -z "$ac_err"; then
+ rm -rf conftest*
+@@ -6934,7 +6938,7 @@
+ fi
+ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+- have_libusbhid_h=yes
+ have_libusb_h=yes
-+else
-+ echo "$ac_t""no" 1>&6
-+fi
-+
-+ if test x$have_usb_h = xyes; then
-+ CFLAGS="$CFLAGS -DHAVE_USB_H"
-+ fi
-+ if test x$have_libusb_h = xyes; then
-+ CFLAGS="$CFLAGS -DHAVE_LIBUSB_H"
-+ fi
-+ fi
-+ fi
-+
-+ echo $ac_n "checking for usbhid""... $ac_c" 1>&6
-+echo "configure:6275: checking for usbhid" >&5
-+ have_usbhid=no
-+ cat > conftest.$ac_ext <<EOF
-+#line 6278 "configure"
-+#include "confdefs.h"
-+
-+ #include <sys/types.h>
-+ #if defined(HAVE_USB_H)
-+ #include <usb.h>
-+ #endif
-+ #include <dev/usb/usb.h>
-+ #include <dev/usb/usbhid.h>
-+ #if defined(HAVE_USBHID_H)
-+ #include <usbhid.h>
-+ #elif defined(HAVE_LIBUSB_H)
-+ #include <libusb.h>
-+ #elif defined(HAVE_LIBUSBHID_H)
-+ #include <libusbhid.h>
-+ #endif
-+
-+int main() {
-+
-+ struct report_desc *repdesc;
-+ struct usb_ctl_report *repbuf;
-+ hid_kind_t hidkind;
-+
-+; return 0; }
-+EOF
-+if { (eval echo configure:6303: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+ rm -rf conftest*
-+
-+ have_usbhid=yes
-+
-+else
-+ echo "configure: failed program was:" >&5
-+ cat conftest.$ac_ext >&5
-+fi
-+rm -f conftest*
-+ echo "$ac_t""$have_usbhid" 1>&6
-+
-+ if test x$have_usbhid = xyes; then
-+ echo $ac_n "checking for ucr_data member of usb_ctl_report""... $ac_c" 1>&6
-+echo "configure:6317: checking for ucr_data member of usb_ctl_report" >&5
-+ have_usbhid_ucr_data=no
-+ cat > conftest.$ac_ext <<EOF
-+#line 6320 "configure"
-+#include "confdefs.h"
-+
-+ #include <sys/types.h>
-+ #if defined(HAVE_USB_H)
-+ #include <usb.h>
-+ #endif
-+ #include <dev/usb/usb.h>
-+ #include <dev/usb/usbhid.h>
-+ #if defined(HAVE_USBHID_H)
-+ #include <usbhid.h>
-+ #elif defined(HAVE_LIBUSB_H)
-+ #include <libusb.h>
-+ #elif defined(HAVE_LIBUSBHID_H)
-+ #include <libusbhid.h>
-+ #endif
-+
-+int main() {
-+
-+ struct usb_ctl_report buf;
-+ if (buf.ucr_data) { }
-+
-+; return 0; }
-+EOF
-+if { (eval echo configure:6344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+ rm -rf conftest*
-+
-+ have_usbhid_ucr_data=yes
-+
-+else
-+ echo "configure: failed program was:" >&5
-+ cat conftest.$ac_ext >&5
-+fi
-+rm -f conftest*
-+ if test x$have_usbhid_ucr_data = xyes; then
-+ CFLAGS="$CFLAGS -DUSBHID_UCR_DATA"
-+ fi
-+ echo "$ac_t""$have_usbhid_ucr_data" 1>&6
-+
-+ echo $ac_n "checking for new usbhid API""... $ac_c" 1>&6
-+echo "configure:6360: checking for new usbhid API" >&5
-+ have_usbhid_new=no
-+ cat > conftest.$ac_ext <<EOF
-+#line 6363 "configure"
-+#include "confdefs.h"
-+
-+ #include <sys/types.h>
-+ #if defined(HAVE_USB_H)
-+ #include <usb.h>
-+ #endif
-+ #include <dev/usb/usb.h>
-+ #include <dev/usb/usbhid.h>
-+ #if defined(HAVE_USBHID_H)
-+ #include <usbhid.h>
-+ #elif defined(HAVE_LIBUSB_H)
-+ #include <libusb.h>
-+ #elif defined(HAVE_LIBUSBHID_H)
-+ #include <libusbhid.h>
-+ #endif
-+
-+int main() {
-+
-+ report_desc_t d;
-+ hid_start_parse(d, 1, 1);
-+
-+; return 0; }
-+EOF
-+if { (eval echo configure:6387: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+ rm -rf conftest*
-+
-+ have_usbhid_new=yes
-+
-+else
-+ echo "configure: failed program was:" >&5
-+ cat conftest.$ac_ext >&5
-+fi
-+rm -f conftest*
-+ if test x$have_usbhid_new = xyes; then
-+ CFLAGS="$CFLAGS -DUSBHID_NEW"
+ else
+ echo "$ac_t""no" 1>&6
+ fi
+@@ -6942,14 +6946,10 @@
+ if test x$have_usb_h = xyes; then
+ CFLAGS="$CFLAGS -DHAVE_USB_H"
+ fi
+- if test x$have_usbhid_h = xyes; then
+- CFLAGS="$CFLAGS -DHAVE_USBHID_H"
+- fi
+ if test x$have_libusb_h = xyes; then
+ CFLAGS="$CFLAGS -DHAVE_LIBUSB_H"
+ fi
+- if test x$have_libusbhid_h = xyes; then
+- CFLAGS="$CFLAGS -DHAVE_LIBUSBHID_H"
+ fi
-+ echo "$ac_t""$have_usbhid_new" 1>&6
-+
-+ JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS bsd"
-+ JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS bsd/libjoystick_bsd.la"
-+ fi
-+ fi
-+}
-+
- case "$target" in
- *-*-linux*)
- ARCH=linux
-@@ -6588,14 +6958,17 @@
- CheckDummyVideo
- CheckDiskAudio
- CheckNASM
-+ CheckOPENBSDAUDIO
- CheckOSS
- CheckARTSC
+ fi
+
+ echo $ac_n "checking for usbhid""... $ac_c" 1>&6
+@@ -7313,6 +7313,7 @@
CheckESD
CheckNAS
CheckX11
@@ -426,75 +359,35 @@ $NetBSD: patch-am,v 1.6 2002/08/25 19:22:19 jlam Exp $
CheckAAlib
CheckOpenGL
CheckPTHREAD
-+ CheckUSBHID
- # Set up files for the main() stub
-
- echo "Copying src/main/linux/SDL_main.c -> src/main/SDL_main.c"
-@@ -6614,12 +6987,6 @@
- AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
- AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
+@@ -7331,9 +7332,9 @@
+
+ # Set up files for the audio library
+ if test x$enable_audio = xyes; then
+- CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
+- AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
+- AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
++ CFLAGS="$CFLAGS -DOPENBSD_AUDIO_SUPPORT"
++ AUDIO_SUBDIRS="$AUDIO_SUBDIRS openbsd"
++ AUDIO_DRIVERS="$AUDIO_DRIVERS openbsd/libaudio_openbsd.la"
fi
-- # Set up files for the joystick library
-- # (No joystick support yet)
-- if test x$enable_joystick = xyes; then
-- JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
-- JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
-- fi
# Set up files for the cdrom library
if test x$enable_cdrom = xyes; then
- CDROM_SUBDIRS="$CDROM_SUBDIRS openbsd"
-@@ -7553,6 +7920,19 @@
- __EOF__
- cat >>$new <$old
-
-+ if test x$use_pthreads = xyes -a x$enable_pthread_sem != xyes; then
-+
-+ echo "Copying src/thread/generic/SDL_syssem.c -> src/thread/SDL_syssem.c"
-+ old="$srcdir/src/thread/generic/SDL_syssem.c"
-+ new="$srcdir/src/thread/SDL_syssem.c"
-+ cat >$new <<__EOF__
-+/* WARNING: This file was automatically generated!
-+ * Original: $old
-+ */
-+__EOF__
-+ cat >>$new <$old
-+
-+ else
-
- echo "Copying src/thread/linux/SDL_syssem.c -> src/thread/SDL_syssem.c"
- old="$srcdir/src/thread/linux/SDL_syssem.c"
-@@ -7564,6 +7944,7 @@
- __EOF__
- cat >>$new <$old
-
-+ fi
-
- echo "Copying src/thread/generic/SDL_syssem_c.h -> src/thread/SDL_syssem_c.h"
- old="$srcdir/src/thread/generic/SDL_syssem_c.h"
-@@ -8844,6 +9225,10 @@
+@@ -8765,6 +8766,9 @@
+ if test $ARCH = solaris; then
SDL_RLD_FLAGS="-R\${exec_prefix}/lib"
fi
-
+if test $ARCH = netbsd; then
+ SDL_RLD_FLAGS="-Wl,-rpath,\${exec_prefix}/lib -Wl,-rpath,${X11BASE}/lib"
+fi
-+
- if test $ARCH = openbsd; then
- SDL_RLD_FLAGS="-Wl,-rpath,\${exec_prefix}/lib $SYSTEM_LIBS"
- fi
-@@ -9068,6 +9453,7 @@
- src/joystick/Makefile
- src/joystick/amigaos/Makefile
- src/joystick/beos/Makefile
-+src/joystick/bsd/Makefile
- src/joystick/darwin/Makefile
- src/joystick/dummy/Makefile
- src/joystick/linux/Makefile
-@@ -9328,6 +9714,7 @@
- src/joystick/Makefile
- src/joystick/amigaos/Makefile
- src/joystick/beos/Makefile
-+src/joystick/bsd/Makefile
- src/joystick/darwin/Makefile
- src/joystick/dummy/Makefile
- src/joystick/linux/Makefile
+
+ case "$ARCH" in
+ openbsd | netbsd | bsdi)
+@@ -9143,7 +9147,7 @@
+ s%@PKG_CONFIG@%$PKG_CONFIG%g
+ s%@DIRECTFB_CFLAGS@%$DIRECTFB_CFLAGS%g
+ s%@DIRECTFB_LIBS@%$DIRECTFB_LIBS%g
+-s%@PTH_CONFIG@%$PTH_CONFIG%g
++s%@PTHREAD_CONFIG@%$PTHREAD_CONFIG%g
+ s%@ARCH@%$ARCH%g
+ s%@TARGET_LINUX_TRUE@%$TARGET_LINUX_TRUE%g
+ s%@TARGET_LINUX_FALSE@%$TARGET_LINUX_FALSE%g
diff --git a/devel/SDL/patches/patch-an b/devel/SDL/patches/patch-an
deleted file mode 100644
index f2d4ca16aec..00000000000
--- a/devel/SDL/patches/patch-an
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-an,v 1.2 2001/04/17 16:27:23 rh Exp $
-
---- src/audio/sun/SDL_sunaudio.c.orig Sat Feb 10 08:20:03 2001
-+++ src/audio/sun/SDL_sunaudio.c
-@@ -52,6 +52,10 @@
- #include "SDL_audio_c.h"
- #include "SDL_timer.h"
-
-+#if _POSIX_THREAD_SYSCALL_SOFT
-+#include <pthread.h>
-+#endif
-+
- /* Open the audio device for playback, and don't block if busy */
- #define OPEN_FLAGS (O_WRONLY|O_NONBLOCK)
-