Hi,

here's an update to bring OpenBSD's ancient OpenAL up to date.

- Freealut regress test was happy
- Supertuxkart worked just fine
- Scorched3D needs to be patched because openal-config binary got removed
- ufoai,-editor built fine, don't know how to test if it actually plays sounds
- Warzone2100 builds but sounds become garbled pretty quickly, I blame its 64b 
bugs (tested on amd64)
- Two other games that I haven't yet submitted worked fine (they crash with the 
openal in ports cvs)

Some games might require reseting configurations if sounds are not playing 
after the update.

Attached is a patch for OpenAL followed by Scorched3D patch. The Scorched3D 
patch
file is from FreeBSD and patch-Alc_sndio_c is from Alexandre Ratchov.

Thanks to everyone involved, especially Alexandre and Jacob, and Chris from 
OpenAL!

-- 
Antti Harri

diff --git audio/openal/Makefile audio/openal/Makefile
index e8cb557..f44adf4 100644
--- audio/openal/Makefile
+++ audio/openal/Makefile
@@ -1,54 +1,32 @@
 # $OpenBSD: ports/audio/openal/Makefile,v 1.19 2010/11/15 00:22:47 espie Exp $
 
-COMMENT=       cross-platform 3D audio API
+COMMENT =      cross-platform 3D audio API
 
-DISTNAME=      openal-0.0.8
-REVISION=      8
-CATEGORIES=    audio
-SHARED_LIBS +=  openal               1.0      # .0.0
+V =            20110624
+DISTNAME =     openal-soft-$V
+PKGNAME =      openal-$V
+CATEGORIES =   audio
+SHARED_LIBS =  openal  2.0
 
-HOMEPAGE=      http://www.openal.org/
+HOMEPAGE =     http://kcat.strangesoft.net/openal.html
 
 # LGPL
-PERMIT_PACKAGE_CDROM=  Yes
-PERMIT_PACKAGE_FTP=    Yes
-PERMIT_DISTFILES_CDROM=        Yes
-PERMIT_DISTFILES_FTP=  Yes
+PERMIT_PACKAGE_CDROM = Yes
+PERMIT_PACKAGE_FTP =   Yes
+PERMIT_DISTFILES_CDROM =Yes
+PERMIT_DISTFILES_FTP = Yes
 
-WANTLIB=               m sndio
+WANTLIB =      c m pthread
 
-MASTER_SITES=  http://openbsd.dead-parrot.de/distfiles/
+MASTER_SITES = ${HOMEPAGE:S,.html,-releases/,} \
+               http://openbsd.fi/dist/
 
-USE_GMAKE=     Yes
-USE_LIBTOOL=   Yes
+LIB_DEPENDS =  audio/portaudio-svn
+MODULES =      devel/cmake
 
-# auto* uses libtool macros
-BUILD_DEPENDS= devel/libtool
-
-AUTOCONF_VERSION=2.59
-AUTOMAKE_VERSION=1.9
-CONFIGURE_STYLE=autoconf automake
-CONFIGURE_ARGS=        --disable-vorbis \
-               --disable-arts \
-               --disable-mp3 \
-               --disable-esd \
-               --disable-sdl \
-               --disable-solaris
-
-MODGNU_CONFIG_GUESS_DIRS=${WRKSRC}/admin/autotools
-
-post-extract:
-       @cp ${FILESDIR}/alc_backend_sndio.c ${WRKSRC}/src/backends/
-
-AUTO_ENV=      AUTOCONF_VERSION=${AUTOCONF_VERSION} \
-               AUTOMAKE_VERSION=${AUTOMAKE_VERSION}
-
-post-patch:
-       @echo "Running aclocal-${AUTOMAKE_VERSION} in ${WRKSRC}"
-       @cd ${WRKSRC}; ${AUTO_ENV} aclocal -I admin/autotools/m4
-
-pre-configure:
-       @echo "Running automake-${AUTOMAKE_VERSION} in ${WRKSRC}"
-       @cd ${WRKSRC}; ${AUTO_ENV} automake --foreign
+post-install:
+       ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/openal
+       ${INSTALL_DATA} ${WRKSRC}/alsoftrc.sample \
+               ${PREFIX}/share/examples/openal
 
 .include <bsd.port.mk>
diff --git audio/openal/distinfo audio/openal/distinfo
index 62fa69f..50ba03d 100644
--- audio/openal/distinfo
+++ audio/openal/distinfo
@@ -1,5 +1,5 @@
-MD5 (openal-0.0.8.tar.gz) = ZBz1N2HzXul58+iIYUeXoA==
-RMD160 (openal-0.0.8.tar.gz) = KTaNvO6nz9i1xSC54PDP3HMk4mU=
-SHA1 (openal-0.0.8.tar.gz) = MartwYvSZ1m9UfT6SVvEzLCKyz4=
-SHA256 (openal-0.0.8.tar.gz) = cj4sV8PN/6f/Efm2tUeNbLSvAX5aHuelYDKWnDnBwv4=
-SIZE (openal-0.0.8.tar.gz) = 870671
+MD5 (openal-soft-20110624.tar.gz) = L8M/Id/SGBcwe8H8oVEEig==
+RMD160 (openal-soft-20110624.tar.gz) = UYApge4g5siqTUo5u+0FUh3L1XA=
+SHA1 (openal-soft-20110624.tar.gz) = nBrhIH1LRy3h/SkRYOzcvYXuMDE=
+SHA256 (openal-soft-20110624.tar.gz) = 
yVTeVTQMZoKOj9s59/v9DRULrS3hD3H47A+2bKeekd4=
+SIZE (openal-soft-20110624.tar.gz) = 231667
diff --git audio/openal/files/alc_backend_sndio.c 
audio/openal/files/alc_backend_sndio.c
deleted file mode 100644
index a25cd64..0000000
--- audio/openal/files/alc_backend_sndio.c
+++ /dev/null
@@ -1,128 +0,0 @@
-/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
- * vi:set ts=8:
- *
- * Sndio backend for OpenAL
- *
- */
-#include "al_siteconfig.h"
-
-#include <AL/al.h>
-#include <AL/alext.h>
-#include <fcntl.h>
-#include <sndio.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <unistd.h>
-
-#include "al_main.h"
-#include "al_debug.h"
-
-#include "backends/alc_backend.h"
-
-void *
-alcBackendOpenNative_ (ALC_OpenMode mode)
-{
-       return mode == ALC_OPEN_INPUT_ ?
-           sio_open(NULL, SIO_REC, 0) : sio_open(NULL, SIO_PLAY, 0);
-}
-
-ALboolean
-alcBackendSetAttributesNative_ (ALC_OpenMode mode, void *handle,
-                                ALuint *bufsiz, ALenum *fmt, ALuint *speed)
-{
-       struct sio_par par;
-       unsigned chan;
-
-       sio_initpar(&par);
-       par.bits = _alGetBitsFromFormat(*fmt);
-       par.sig = par.bits == 8 ? 0 : 1;
-       par.le = SIO_LE_NATIVE;
-       chan = _alGetChannelsFromFormat(*fmt);
-       if (mode == ALC_OPEN_INPUT_)
-               par.rchan = chan;
-       else
-               par.pchan = chan;
-       par.rate = *speed;
-
-       par.round = *bufsiz / SIO_BPS(par.bits) / chan;
-       par.appbufsz = *bufsiz > par.rate / 20 ? *bufsiz * 2 : par.rate / 10;
-
-       if (!sio_setpar(handle, &par) || !sio_getpar(handle, &par) ||
-           !sio_start(handle)) {
-               sio_close(handle);
-               return AL_FALSE;
-       }
-
-       if (!(par.bits == 16 && par.sig) && !(par.bits == 8 && !par.sig)) {
-               sio_close(handle);
-               return AL_FALSE;
-       }
-       chan = mode == ALC_OPEN_INPUT_ ? par.rchan : par.pchan;
-       switch (chan) {
-       case 1:
-               *fmt = par.bits == 16 ? AL_FORMAT_MONO16 : AL_FORMAT_MONO8;
-               break;
-       case 2:
-               *fmt = par.bits == 16 ? AL_FORMAT_STEREO16 : AL_FORMAT_STEREO8;
-               break;
-       case 4:
-               *fmt = par.bits == 16 ? AL_FORMAT_QUAD16_LOKI :
-                   AL_FORMAT_QUAD8_LOKI;
-               break;
-       default:
-               sio_close(handle);
-               return AL_FALSE;
-       }
-
-       *bufsiz = par.round * par.bps * chan;
-       *speed = par.rate;
-
-       return AL_TRUE;
-}
-
-void
-native_blitbuffer (void *handle, void *dataptr, int bytes_to_write)
-{
-       sio_write(handle, dataptr, bytes_to_write);
-}
-
-void
-release_native (void *handle)
-{
-       sio_close(handle);
-}
-
-void
-pause_nativedevice (void *handle)
-{
-       sio_stop(handle);
-}
-
-void
-resume_nativedevice (void *handle)
-{
-       sio_start(handle);
-}
-
-ALsizei
-capture_nativedevice (void *handle, void *capture_buffer, int bufsiz)
-{
-       return sio_read(handle, capture_buffer, bufsiz);
-}
-
-ALfloat
-get_nativechannel (UNUSED(void *handle), UNUSED(ALuint channel))
-{
-       return 0.0;
-}
-
-int
-set_nativechannel (UNUSED(void *handle), UNUSED(ALuint channel),
-                   UNUSED(ALfloat volume))
-{
-       return 0;
-}
diff --git audio/openal/patches/patch-Alc_sndio_c 
audio/openal/patches/patch-Alc_sndio_c
new file mode 100644
index 0000000..7eaef73
--- /dev/null
+++ audio/openal/patches/patch-Alc_sndio_c
@@ -0,0 +1,42 @@
+$OpenBSD$
+--- Alc/sndio.c.orig   Thu Jun 23 06:48:45 2011
++++ Alc/sndio.c        Fri Jun 24 01:21:24 2011
+@@ -136,31 +136,19 @@ static ALuint sndio_proc(ALvoid *ptr)
+     ALsizei frameSize;
+     size_t wrote;
+ 
+-    SetRTPriority();
+-
+     frameSize = FrameSizeFromDevFmt(device->FmtChans, device->FmtType);
+ 
+     while(!data->killNow && device->Connected)
+     {
+-        ALsizei len = data->data_size;
+-        ALubyte *WritePtr = data->mix_data;
+-
+-        aluMixData(device, WritePtr, len/frameSize);
+-        while(len > 0 && !data->killNow)
++        aluMixData(device, data->mix_data, data->data_size / frameSize);
++        wrote = sio_write(data->sndHandle, data->mix_data, data->data_size);
++        if(wrote < data->data_size)
+         {
+-            wrote = sio_write(data->sndHandle, WritePtr, len);
+-            if(wrote == 0)
+-            {
+-                AL_PRINT("sio_write failed\n");
+-                aluHandleDisconnect(device);
+-                break;
+-            }
+-
+-            len -= wrote;
+-            WritePtr += wrote;
+-        }
++          AL_PRINT("sio_write: short write\n");
++          aluHandleDisconnect(device);
++          break;
++      }
+     }
+-
+     return 0;
+ }
+ 
diff --git audio/openal/patches/patch-CMakeLists_txt 
audio/openal/patches/patch-CMakeLists_txt
new file mode 100644
index 0000000..0da3f26
--- /dev/null
+++ audio/openal/patches/patch-CMakeLists_txt
@@ -0,0 +1,58 @@
+$OpenBSD$
+--- CMakeLists.txt.orig        Thu Jun 23 06:48:45 2011
++++ CMakeLists.txt     Fri Jun 24 03:38:43 2011
+@@ -145,13 +145,13 @@ ELSE()
+         ADD_DEFINITIONS(-Werror)
+     ENDIF()
+ 
+-    SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-g -O2 -D_DEBUG" CACHE STRING
++    SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-g -D_DEBUG" CACHE STRING
+         "Flags used by the compiler during Release with Debug Info builds."
+         FORCE)
+-    SET(CMAKE_C_FLAGS_MINSIZEREL "-Os -DNDEBUG" CACHE STRING
++    SET(CMAKE_C_FLAGS_MINSIZEREL "-DNDEBUG" CACHE STRING
+         "Flags used by the compiler during release minsize builds."
+         FORCE)
+-    SET(CMAKE_C_FLAGS_RELEASE "-O2 -fomit-frame-pointer -DNDEBUG" CACHE STRING
++    SET(CMAKE_C_FLAGS_RELEASE "-fomit-frame-pointer -DNDEBUG" CACHE STRING
+         "Flags used by the compiler during release builds"
+         FORCE)
+     SET(CMAKE_C_FLAGS_DEBUG "-g3 -D_DEBUG" CACHE STRING
+@@ -508,17 +508,26 @@ ENDIF()
+ 
+ # Check PortAudio backend
+ IF(PORTAUDIO)
+-    CHECK_INCLUDE_FILE(portaudio.h HAVE_PORTAUDIO_H)
+-    IF(HAVE_PORTAUDIO_H)
+-        CHECK_SHARED_LIBRARY_EXISTS(portaudio Pa_Initialize 0 "" 
HAVE_LIBPORTAUDIO)
+-        IF(HAVE_LIBPORTAUDIO OR HAVE_DLFCN_H OR WIN32)
+-            SET(HAVE_PORTAUDIO 1)
+-            SET(ALC_OBJS  ${ALC_OBJS} Alc/portaudio.c)
+-            IF(HAVE_DLFCN_H OR WIN32)
+-                SET(BACKENDS  "${BACKENDS} PortAudio,")
+-            ELSE()
+-                SET(BACKENDS  "${BACKENDS} PortAudio \(linked\),")
+-                SET(EXTRA_LIBS portaudio ${EXTRA_LIBS})
++    IF(${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD")
++        INCLUDE(FindPkgConfig)
++        PKG_CHECK_MODULES(PORTAUDIO REQUIRED portaudio-2.0)
++        SET(HAVE_PORTAUDIO 1)
++        SET(ALC_OBJS  ${ALC_OBJS} Alc/portaudio.c)
++        SET(BACKENDS  "${BACKENDS} PortAudio,")
++        INCLUDE_DIRECTORIES("${PORTAUDIO_INCLUDE_DIRS}")
++    ELSE()
++        CHECK_INCLUDE_FILE(portaudio.h HAVE_PORTAUDIO_H)
++        IF(HAVE_PORTAUDIO_H)
++            CHECK_SHARED_LIBRARY_EXISTS(portaudio Pa_Initialize 0 "" 
HAVE_LIBPORTAUDIO)
++            IF(HAVE_LIBPORTAUDIO OR HAVE_DLFCN_H OR WIN32)
++                SET(HAVE_PORTAUDIO 1)
++                SET(ALC_OBJS  ${ALC_OBJS} Alc/portaudio.c)
++                IF(HAVE_DLFCN_H OR WIN32)
++                    SET(BACKENDS  "${BACKENDS} PortAudio,")
++                ELSE()
++                    SET(BACKENDS  "${BACKENDS} PortAudio \(linked\),")
++                    SET(EXTRA_LIBS portaudio ${EXTRA_LIBS})
++                ENDIF()
+             ENDIF()
+         ENDIF()
+     ENDIF()
diff --git audio/openal/patches/patch-admin_pkgconfig_openal-config_in 
audio/openal/patches/patch-admin_pkgconfig_openal-config_in
deleted file mode 100644
index 2d3888d..0000000
--- audio/openal/patches/patch-admin_pkgconfig_openal-config_in
+++ /dev/null
@@ -1,15 +0,0 @@
-$OpenBSD: ports/audio/openal/patches/patch-admin_pkgconfig_openal-config_in,v 
1.2 2009/12/16 20:00:41 naddy Exp $
---- admin/pkgconfig/openal-config.in.orig      Sat Feb 11 10:36:55 2006
-+++ admin/pkgconfig/openal-config.in   Thu Oct 15 15:11:54 2009
-@@ -9,9 +9,9 @@ PACKAGE_VERSION="@PACKAGE_VERSION@"
- # PTHREAD_CFLAGS="@PTHREAD_CFLAGS@"
- # PTHREAD_LIBS="@PTHREAD_LIBS@"
- 
--openal_dynamic_ldflags="-lopenal"
-+openal_dynamic_ldflags="-lopenal -lsndio"
- # TODO: configure should provide the following...
--openal_static_ldflags="-lopenal"
-+openal_static_ldflags="-lopenal -lsndio"
- 
- prefix_set=no
- echo_prefix=no
diff --git audio/openal/patches/patch-admin_pkgconfig_openal_pc_in 
audio/openal/patches/patch-admin_pkgconfig_openal_pc_in
deleted file mode 100644
index b95c6c8..0000000
--- audio/openal/patches/patch-admin_pkgconfig_openal_pc_in
+++ /dev/null
@@ -1,14 +0,0 @@
-$OpenBSD: ports/audio/openal/patches/patch-admin_pkgconfig_openal_pc_in,v 1.3 
2009/12/16 20:00:41 naddy Exp $
---- admin/pkgconfig/openal.pc.in.orig  Sat Feb 11 10:36:55 2006
-+++ admin/pkgconfig/openal.pc.in       Thu Oct 15 15:12:25 2009
-@@ -5,8 +5,8 @@ includedir=@includedir@
- 
- Name: OpenAL
- Description:  OpenAL is a cross-platform 3D audio API.
--Requires: @requirements@
-+Requires:
- Version: @PACKAGE_VERSION@
--Libs: -L${libdir} -lopenal
-+Libs: -L${libdir} -lopenal -lsndio
- Cflags: -I${includedir}
- 
diff --git audio/openal/patches/patch-common_include_AL_al_h 
audio/openal/patches/patch-common_include_AL_al_h
deleted file mode 100644
index bd81bd1..0000000
--- audio/openal/patches/patch-common_include_AL_al_h
+++ /dev/null
@@ -1,12 +0,0 @@
-$OpenBSD: ports/audio/openal/patches/patch-common_include_AL_al_h,v 1.1 
2009/10/14 14:27:34 naddy Exp $
---- common/include/AL/al.h.orig        Wed Oct 14 16:22:21 2009
-+++ common/include/AL/al.h     Wed Oct 14 16:22:52 2009
-@@ -73,7 +73,7 @@ typedef char ALboolean;
- typedef char ALchar;
- 
- /** signed 8-bit 2's complement integer */
--typedef char ALbyte;
-+typedef signed char ALbyte;
- 
- /** unsigned 8-bit integer */
- typedef unsigned char ALubyte;
diff --git audio/openal/patches/patch-common_include_AL_alc_h 
audio/openal/patches/patch-common_include_AL_alc_h
deleted file mode 100644
index f74d303..0000000
--- audio/openal/patches/patch-common_include_AL_alc_h
+++ /dev/null
@@ -1,25 +0,0 @@
-$OpenBSD: ports/audio/openal/patches/patch-common_include_AL_alc_h,v 1.2 
2009/10/14 14:27:34 naddy Exp $
-
-plain char is unsigned on some architectures
-typedef void is illegal in newer versions of GCC
-
---- common/include/AL/alc.h.orig       Sat Feb 11 10:36:55 2006
-+++ common/include/AL/alc.h    Wed Oct 14 16:22:38 2009
-@@ -52,7 +52,7 @@ typedef char ALCboolean;
- typedef char ALCchar;
- 
- /** signed 8-bit 2's complement integer */
--typedef char ALCbyte;
-+typedef signed char ALCbyte;
- 
- /** unsigned 8-bit integer */
- typedef unsigned char ALCubyte;
-@@ -82,7 +82,7 @@ typedef float ALCfloat;
- typedef double ALCdouble;
- 
- /** void type (for opaque pointers only) */
--typedef void ALCvoid;
-+#define ALCvoid void
- 
- 
- /* Enumerant values begin at column 50. No tabs. */
diff --git audio/openal/patches/patch-configure_ac 
audio/openal/patches/patch-configure_ac
deleted file mode 100644
index db3a3c6..0000000
--- audio/openal/patches/patch-configure_ac
+++ /dev/null
@@ -1,76 +0,0 @@
-$OpenBSD: ports/audio/openal/patches/patch-configure_ac,v 1.1 2009/12/16 
20:00:41 naddy Exp $
---- configure.ac.orig  Sat Feb 11 10:36:55 2006
-+++ configure.ac       Thu Oct 15 15:00:10 2009
-@@ -365,7 +365,7 @@ esac
- 
- dnl Special objs for architectures
- case "$target" in
--    *i386* | *i486* | *i586* | *i686* | *x86_64*)
-+    *i386* | *i486* | *i586* | *i686* )
-     openal_x86_support_yn=yes
- 
-     AC_MSG_CHECKING([for MMX support])
-@@ -637,7 +637,7 @@ OPENAL_ENABLE([aRts backend], [openal_backend_arts_sup
- 
- # check for native BSD/OSS backend 
#############################################
- 
--# ToDo: Hmmm, OpenBSD/FreeBSD are using OSS, too, just like Linux. Perhaps 
some
-+# ToDo: Hmmm, FreeBSD is using OSS, too, just like Linux. Perhaps some
- # re-use is possible?
- 
- AC_ARG_ENABLE([bsd],
-@@ -648,6 +648,10 @@ if test "x$enable_bsd" = xno; then
-   openal_backend_bsd_support=disabled
- else
-   case "$target" in
-+    *openbsd*) openal_backend_bsd_support=none
-+               if test "x$enable_bsd" = xyes; then
-+                 AC_MSG_WARN([--enabled-bsd ignored in favor of sndio.])
-+               fi ;;
-     *bsd*) openal_backend_bsd_support=static ;;
-     *) openal_backend_bsd_support=none
-        if test "x$enable_bsd" = xyes; then
-@@ -941,6 +945,43 @@ fi
- 
- OPENAL_ENABLE([native Solaris backend], [openal_backend_solaris_support],
-               [USE_BACKEND_NATIVE_SOLARIS], [USEBACKENDNATIVESOLARIS])
-+
-+# check for native sndio backend 
###############################################
-+
-+AC_ARG_ENABLE([sndio],
-+[AS_HELP_STRING([--enable-sndio],
-+                [enable native sndio backend @<:@default=auto@:>@])])
-+
-+if test "x$enable_sndio" = xno; then
-+  openal_backend_sndio_support=disabled
-+else
-+  AC_CHECK_HEADER([sndio.h],
-+    [openal_libs_sndio="-lsndio"
-+     openal_saved_LIBS=$LIBS
-+     LIBS="$openal_libs_sndio $LIBS"
-+     AC_CACHE_CHECK([for sio_open], [openal_cv_func_sio_open],
-+       [AC_LINK_IFELSE([AC_LANG_CALL([], [sio_open])],
-+         [openal_cv_func_sio_open=yes],
-+         [openal_cv_func_sio_open=no])])
-+     if test "x$openal_cv_func_sio_open" = xyes; then
-+       openal_backend_sndio_support=static
-+       LIBS="$openal_libs_sndio $LIBS"
-+     else
-+       openal_backend_sndio_support=none
-+       LIBS=$openal_saved_LIBS
-+       if test "x$enable_sndio" = xyes; then
-+         AC_MSG_WARN([--enable-sndio ignored because the sndio library could 
not be found.])
-+       fi
-+     fi],
-+    [openal_backend_sndio_support=none
-+     if test "x$enable_sndio" = xyes; then
-+       AC_MSG_WARN([--enable-sndio ignored because the sndio header could not 
be found.])
-+     fi],
-+    [AC_INCLUDES_DEFAULT([])])
-+fi
-+
-+OPENAL_ENABLE([native sndio backend], [openal_backend_sndio_support],
-+              [USE_BACKEND_NATIVE_SNDIO], [USEBACKENDNATIVESNDIO])
- 
- # check for WAVE backend 
#######################################################
- 
diff --git audio/openal/patches/patch-src_Makefile_am 
audio/openal/patches/patch-src_Makefile_am
deleted file mode 100644
index e896519..0000000
--- audio/openal/patches/patch-src_Makefile_am
+++ /dev/null
@@ -1,15 +0,0 @@
-$OpenBSD: ports/audio/openal/patches/patch-src_Makefile_am,v 1.1 2009/12/16 
20:00:41 naddy Exp $
---- src/Makefile.am.orig       Thu Jan 19 21:58:50 2006
-+++ src/Makefile.am    Thu Oct 15 14:47:15 2009
-@@ -119,6 +119,11 @@ libopenal_la_SOURCES +=                   \
-       backends/alc_backend_solaris.c
- endif
- 
-+if USEBACKENDNATIVESNDIO
-+libopenal_la_SOURCES +=                       \
-+      backends/alc_backend_sndio.c
-+endif
-+
- if USEBACKENDWAVEOUT
- libopenal_la_SOURCES +=                       \
-       backends/alc_backend_wave.c
diff --git audio/openal/patches/patch-src_al_mixer_h 
audio/openal/patches/patch-src_al_mixer_h
deleted file mode 100644
index 263304f..0000000
--- audio/openal/patches/patch-src_al_mixer_h
+++ /dev/null
@@ -1,12 +0,0 @@
-$OpenBSD: ports/audio/openal/patches/patch-src_al_mixer_h,v 1.1 2006/10/30 
23:31:37 steven Exp $
---- src/al_mixer.h.orig        Sat Oct 21 11:19:57 2006
-+++ src/al_mixer.h     Sat Oct 21 11:20:27 2006
-@@ -26,7 +26,7 @@
- #define GENMIXSOURCES 64
- #endif /* USE_LIGHT_GEN_MIXING */
- 
--#ifdef __MMX__
-+#if defined(__MMX__) && !defined(__amd64__)
- #define MMXMIXSOURCES 32
- #else
- #define MMXMIXSOURCES 0
diff --git audio/openal/patches/patch-src_al_mixfunc_c 
audio/openal/patches/patch-src_al_mixfunc_c
deleted file mode 100644
index a7fd8bf..0000000
--- audio/openal/patches/patch-src_al_mixfunc_c
+++ /dev/null
@@ -1,12 +0,0 @@
-$OpenBSD: ports/audio/openal/patches/patch-src_al_mixfunc_c,v 1.2 2008/04/04 
09:33:10 jasper Exp $
---- src/al_mixfunc.c.orig      Fri Sep 30 11:20:51 2005
-+++ src/al_mixfunc.c   Tue Apr  1 15:30:54 2008
-@@ -38,7 +38,7 @@ ALboolean _alMixFuncInit( ALMixFunc *mf, ALuint size )
-               return AL_FALSE;
-       }
- 
--#ifdef __MMX__
-+#if defined(__MMX__) && !defined(__amd64__)
-       if (_alHaveMMX()) {
-               /* FIXME: we really ignore size. */
-               mf->max      = MMXMIXSOURCES;
diff --git audio/openal/patches/patch-src_al_source_c 
audio/openal/patches/patch-src_al_source_c
deleted file mode 100644
index f5082a7..0000000
--- audio/openal/patches/patch-src_al_source_c
+++ /dev/null
@@ -1,12 +0,0 @@
-$OpenBSD: ports/audio/openal/patches/patch-src_al_source_c,v 1.1 2010/10/07 
04:34:59 jakemsr Exp $
---- src/al_source.c.orig       Sat Feb 11 01:36:55 2006
-+++ src/al_source.c    Tue Oct  5 12:30:56 2010
-@@ -3137,7 +3137,7 @@ void *_alGetSourceParam(AL_source *source, ALenum para
-       {
-               case AL_BUFFER:
-                       if( source->bid_queue.read_index >=
--                          source->bid_queue.size )
-+                          source->bid_queue.size && source->bid_queue.size )
-                       {
-                               int size = source->bid_queue.size;
- 
diff --git audio/openal/patches/patch-src_arch_i386_x86_cpu_caps_prk_c 
audio/openal/patches/patch-src_arch_i386_x86_cpu_caps_prk_c
deleted file mode 100644
index a0a591f..0000000
--- audio/openal/patches/patch-src_arch_i386_x86_cpu_caps_prk_c
+++ /dev/null
@@ -1,12 +0,0 @@
-$OpenBSD: ports/audio/openal/patches/patch-src_arch_i386_x86_cpu_caps_prk_c,v 
1.2 2008/04/04 09:33:10 jasper Exp $
---- src/arch/i386/x86_cpu_caps_prk.c.orig      Thu Jan 19 15:58:51 2006
-+++ src/arch/i386/x86_cpu_caps_prk.c   Tue Apr  1 15:30:54 2008
-@@ -47,7 +47,7 @@ struct x86cpu_caps_s x86cpu_caps_use = { 1, 1, 1, 1, 1
- void _alDetectCPUCaps(void)
- {
-       /* compile time detection */
--#ifdef __MMX__
-+#if defined(__MMX__) && !defined(__amd64__)
-       x86cpu_caps.mmx = 1;
- #endif
- #ifdef __SSE__
diff --git audio/openal/patches/patch-src_arch_i386_x86_floatmul_c 
audio/openal/patches/patch-src_arch_i386_x86_floatmul_c
deleted file mode 100644
index bce3ec2..0000000
--- audio/openal/patches/patch-src_arch_i386_x86_floatmul_c
+++ /dev/null
@@ -1,12 +0,0 @@
-$OpenBSD: ports/audio/openal/patches/patch-src_arch_i386_x86_floatmul_c,v 1.2 
2008/04/04 09:33:10 jasper Exp $
---- src/arch/i386/x86_floatmul.c.orig  Wed Dec 21 14:06:35 2005
-+++ src/arch/i386/x86_floatmul.c       Tue Apr  1 15:30:54 2008
-@@ -34,7 +34,7 @@ void _alFloatMul(ALshort *bpt, ALfloat sa, ALuint len)
-       ALint scaled_sa = sa * SCALING_FACTOR;
-       ALint iter;
-       
--#ifdef __MMX__
-+#if defined(__MMX__) && !defined(__amd64__)
-       if (_alHaveMMX()) {
-               union {
-                       short s[4];
diff --git audio/openal/patches/patch-src_mixaudio16_h 
audio/openal/patches/patch-src_mixaudio16_h
deleted file mode 100644
index 581c372..0000000
--- audio/openal/patches/patch-src_mixaudio16_h
+++ /dev/null
@@ -1,12 +0,0 @@
-$OpenBSD: ports/audio/openal/patches/patch-src_mixaudio16_h,v 1.1 2006/10/30 
23:31:37 steven Exp $
---- src/mixaudio16.h.orig      Sat Oct 21 11:24:03 2006
-+++ src/mixaudio16.h   Sat Oct 21 11:24:11 2006
-@@ -12,7 +12,7 @@
- #include "al_types.h"
- #include "al_siteconfig.h"
- 
--#ifdef __MMX__
-+#if defined(__MMX__) && !defined(__amd64__)
- #include "mixaudio16_mmx_prk.h"
- #endif /* __MMX__ */
- 
diff --git audio/openal/pkg/DESCR audio/openal/pkg/DESCR
index 061bada..ef97db0 100644
--- audio/openal/pkg/DESCR
+++ audio/openal/pkg/DESCR
@@ -1,2 +1,9 @@
-OpenAL is a cross-platform 3D audio API appropriate for use with
-gaming applications and many other types of audio applications.
+OpenAL Soft is an LGPL-licensed, cross-platform, software implementation
+of the OpenAL 3D audio API.
+
+OpenAL provides capabilities for playing audio in a virtual 3D
+environment. Distance attenuation, doppler shift, and directional sound
+emitters are among the features handled by the API. More advanced
+effects, including air absorption, low-pass filters, and reverb, are
+available through the EFX extension. It also facilitates streaming
+audio, multi-channel buffers, and audio capture.
diff --git audio/openal/pkg/PLIST audio/openal/pkg/PLIST
index e6182dd..41f3c07 100644
--- audio/openal/pkg/PLIST
+++ audio/openal/pkg/PLIST
@@ -1,11 +1,15 @@
 @comment $OpenBSD: ports/audio/openal/pkg/PLIST,v 1.3 2006/10/30 23:31:37 
steven Exp $
-bin/openal-config
+@bin bin/openal-info
 include/AL/
 include/AL/al.h
 include/AL/alc.h
 include/AL/alext.h
-lib/libopenal.a
-lib/libopenal.la
 %%SHARED%%
+include/AL/efx-creative.h
+include/AL/efx.h
 lib/pkgconfig/
 lib/pkgconfig/openal.pc
+share/examples/openal/
+@sample ${SYSCONFDIR}/openal/
+share/examples/openal/alsoftrc.sample
+@sample ${SYSCONFDIR}/openal/alsoft.conf


diff --git games/scorched3d/Makefile games/scorched3d/Makefile
index db2cd30..fbf06ae 100644
--- games/scorched3d/Makefile
+++ games/scorched3d/Makefile
@@ -4,7 +4,7 @@ COMMENT =               modernization of the classic DOS game 
Scorched Earth
 
 DISTNAME =             Scorched3D-43.1c-src
 PKGNAME =              ${DISTNAME:L:S/-src//}
-REVISION =             0
+REVISION =             1
 
 CATEGORIES =           games x11
 
@@ -16,7 +16,7 @@ PERMIT_PACKAGE_FTP =  Yes
 PERMIT_DISTFILES_CDROM =Yes
 PERMIT_DISTFILES_FTP = Yes
 
-WANTLIB +=             GL GLU c expat freetype m pthread sndio stdc++ z
+WANTLIB +=             GL GLU c expat freetype m pthread stdc++ z
 WANTLIB +=             SDL SDL_net alut fftw3f jpeg openal png ogg vorbisfile
 WANTLIB +=             wx_base wx_base_net wx_base_odbc wx_base_xml vorbis
 WANTLIB +=             wx_gtk2_adv wx_gtk2_aui wx_gtk2_core wx_gtk2_dbgrid
@@ -34,10 +34,21 @@ LIB_DEPENDS =               audio/openal \
 RUN_DEPENDS =          devel/xdg-utils
 
 CONFIGURE_STYLE =      gnu
-CONFIGURE_ARGS =       --disable-openaltest \
-                       --datarootdir=${PREFIX}/share/scorched3d/
+CONFIGURE_ARGS =       --datarootdir=${PREFIX}/share/scorched3d/
+
+AUTOCONF_VERSION =     2.63
+AUTOMAKE_VERSION =     1.11
+
 FAKE_FLAGS+=           docdir="${PREFIX}/share/doc/scorched3d/"
 
+CFLAGS +=              `pkg-config --cflags libpng`
 WRKDIST =              ${WRKDIR}/scorched
 
+pre-configure:
+       cd ${WRKSRC}; \
+               touch NEWS AUTHORS ChangeLog; \
+               AUTOMAKE_VERSION=${AUTOMAKE_VERSION} \
+               AUTOCONF_VERSION=${AUTOCONF_VERSION} \
+                       autoreconf -fi
+
 .include <bsd.port.mk>
diff --git games/scorched3d/patches/patch-configure-al_m4 
games/scorched3d/patches/patch-configure-al_m4
new file mode 100644
index 0000000..595322b
--- /dev/null
+++ games/scorched3d/patches/patch-configure-al_m4
@@ -0,0 +1,32 @@
+$OpenBSD$
+--- configure-al.m4.orig       Fri Oct  2 01:22:31 2009
++++ configure-al.m4    Thu Jun 23 00:00:52 2011
+@@ -7,25 +7,9 @@ AC_ARG_ENABLE(openaltest, 
+       [  --disable-openaltest    Do not try to compile and run a test OpenAL 
program],
+                   , enable_openaltest=yes)
+ AC_MSG_CHECKING(for OpenAL support)
+-AC_PATH_PROG(OPENAL_CONFIG, openal-config, no)
+-if test x$OPENAL_CONFIG = xno; then
+-      echo "*** The openal-config script installed by OpenAL could not be 
found"
+-      echo "*** Make sure openal-config is in your path, or set the 
OPENAL_CONFIG"
+-      echo "*** environment variable to the full path to openal-config."
+-
+-      AC_MSG_ERROR([*** Can't find the openal library. Try: 
http://www.openal.org/])
+-else
+-
+-      if test x"$use_static_openal" = x"yes"; then
+-              AL_LIBS="/usr/local/lib/libopenal.a"
+-      else
+-              AL_LIBS="`$OPENAL_CONFIG --libs`"
+-      fi
+-      
+-      AL_CFLAGS="`$OPENAL_CONFIG --cflags`"
+-
+-      AC_MSG_RESULT(yes)
+-fi
++AL_LIBS="`pkg-config --libs openal`"
++AL_CFLAGS="`pkg-config --cflags openal`"
++AC_MSG_RESULT(yes)
+ 
+ AC_MSG_CHECKING(for Freealut support)
+ AC_PATH_PROG(FREEALUT_CONFIG, freealut-config, no)

Reply via email to