From: Alexandre Ratchov <[email protected]>
I don't know, it's not immediate but doesn't seem difficult. It's a
matter of applying upstream commits between 1.17 and 1.18, then doing
the same changes on the capture bits.
If you've a diff to update to 1.18.2, with sndio enabled, I could do
the merge and add the patches/Alc_backends_sndio_c file.
How about the diff below? Be careful to not crash, I don't know how to
make a new diff for Alc/ALc.c in case there is no backend to probe.
Anyway, no matter how long the merge would take, if the current
capture diff is OK, it could go in.
Yes, the current capture diff is ok.
Index: Makefile
===================================================================
RCS file: /cvs/ports/audio/openal/Makefile,v
retrieving revision 1.50
diff -u -p -u -p -r1.50 Makefile
--- Makefile 31 Dec 2017 18:46:26 -0000 1.50
+++ Makefile 25 Jul 2018 17:51:57 -0000
@@ -4,13 +4,12 @@ BROKEN-hppa = undefined reference to __s
COMMENT = cross-platform 3D audio API
-V = 1.17.2
+V = 1.18.2
EPOCH = 0
DISTNAME = openal-soft-$V
PKGNAME = openal-$V
CATEGORIES = audio
-SHARED_LIBS = openal 3.0
-REVISION = 0
+SHARED_LIBS = openal 4.0
HOMEPAGE = http://kcat.strangesoft.net/openal.html
@@ -19,7 +18,7 @@ MAINTAINER = David Carlier <devnexen@gma
# LGPLv2+
PERMIT_PACKAGE_CDROM = Yes
-WANTLIB += c m pthread sndio ${COMPILER_LIBCXX}
+WANTLIB += c m pthread sndio
MASTER_SITES = ${HOMEPAGE:S,.html,-releases/,}
EXTRACT_SUFX = .tar.bz2
Index: distinfo
===================================================================
RCS file: /cvs/ports/audio/openal/distinfo,v
retrieving revision 1.10
diff -u -p -u -p -r1.10 distinfo
--- distinfo 15 Nov 2017 13:02:42 -0000 1.10
+++ distinfo 25 Jul 2018 17:51:57 -0000
@@ -1,2 +1,2 @@
-SHA256 (openal-soft-1.17.2.tar.bz2) =
o0H4VC8fC4xlJBoX2hPQc/GOwGZY4aFgao7Mi7wrMxQ=
-SIZE (openal-soft-1.17.2.tar.bz2) = 486934
+SHA256 (openal-soft-1.18.2.tar.bz2) =
n4rB4n+6FaWXWKE/DH9lQKBgW2w6aR3vnUIFcFBtfoI=
+SIZE (openal-soft-1.18.2.tar.bz2) = 639420
Index: patches/patch-Alc_ALc_c
===================================================================
RCS file: patches/patch-Alc_ALc_c
diff -N patches/patch-Alc_ALc_c
--- patches/patch-Alc_ALc_c 31 Dec 2017 18:46:26 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,35 +0,0 @@
-$OpenBSD: patch-Alc_ALc_c,v 1.1 2017/12/31 18:46:26 jca Exp $
-
-commit d1e98c36d375433cb11a7a74ce20c968491773aa
-Author: Chris Robinson <[email protected]>
-Date: Sat Apr 30 17:14:55 2016 -0700
-
- Don't crash when there's no backend to probe
-
-Index: Alc/ALc.c
---- Alc/ALc.c.orig
-+++ Alc/ALc.c
-@@ -1117,6 +1117,11 @@ static void alc_initconfig(void)
- V0(factory,init)();
- }
-
-+ if(!PlaybackBackend.name)
-+ WARN("No playback backend available!\n");
-+ if(!CaptureBackend.name)
-+ WARN("No capture backend available!\n");
-+
- if(ConfigValueStr(NULL, NULL, "excludefx", &str))
- {
- size_t len;
-@@ -1230,9 +1235,9 @@ static void ProbeDevices(al_string *list, struct Backe
- LockLists();
- al_string_clear(list);
-
-- if(!backendinfo->getFactory)
-+ if(backendinfo->Probe)
- backendinfo->Probe(type);
-- else
-+ else if(backendinfo->getFactory)
- {
- ALCbackendFactory *factory = backendinfo->getFactory();
- V(factory,probe)(type);
Index: patches/patch-Alc_alcConfig_c
===================================================================
RCS file: /cvs/ports/audio/openal/patches/patch-Alc_alcConfig_c,v
retrieving revision 1.4
diff -u -p -u -p -r1.4 patch-Alc_alcConfig_c
--- patches/patch-Alc_alcConfig_c 15 Nov 2017 13:02:42 -0000 1.4
+++ patches/patch-Alc_alcConfig_c 25 Jul 2018 17:51:57 -0000
@@ -2,8 +2,8 @@ $OpenBSD: patch-Alc_alcConfig_c,v 1.4 20
Index: Alc/alcConfig.c
--- Alc/alcConfig.c.orig
+++ Alc/alcConfig.c
-@@ -353,7 +353,7 @@ void ReadALConfig(void)
- const char *str;
+@@ -424,7 +424,7 @@ void ReadALConfig(void)
+ al_string ppath;
FILE *f;
- str = "/etc/openal/alsoft.conf";
Index: patches/patch-CMakeLists_txt
===================================================================
RCS file: /cvs/ports/audio/openal/patches/patch-CMakeLists_txt,v
retrieving revision 1.7
diff -u -p -u -p -r1.7 patch-CMakeLists_txt
--- patches/patch-CMakeLists_txt 15 Nov 2017 13:02:42 -0000 1.7
+++ patches/patch-CMakeLists_txt 25 Jul 2018 17:51:57 -0000
@@ -2,33 +2,12 @@ $OpenBSD: patch-CMakeLists_txt,v 1.7 201
Index: CMakeLists.txt
--- CMakeLists.txt.orig
+++ CMakeLists.txt
-@@ -843,17 +843,14 @@ ENDIF()
-
- # Check SndIO backend
- OPTION(ALSOFT_REQUIRE_SNDIO "Require SndIO backend" OFF)
--FIND_PACKAGE(SoundIO)
--IF(SOUNDIO_FOUND)
-+FIND_LIBRARY(SNDIOLIB NAMES sndio)
-+IF(NOT SNDIOLIB-NOTFOUND)
- OPTION(ALSOFT_BACKEND_SNDIO "Enable SndIO backend" ON)
- IF(ALSOFT_BACKEND_SNDIO)
- SET(HAVE_SNDIO 1)
- SET(BACKENDS "${BACKENDS} SndIO (linked),")
- SET(ALC_OBJS ${ALC_OBJS} Alc/backends/sndio.c)
-- SET(EXTRA_LIBS ${SOUNDIO_LIBRARIES} ${EXTRA_LIBS})
-- IF(CMAKE_VERSION VERSION_LESS "2.8.8")
-- INCLUDE_DIRECTORIES(${SOUNDIO_INCLUDE_DIRS})
-- ENDIF()
-+ SET(EXTRA_LIBS ${SNDIOLIB} ${EXTRA_LIBS})
- ENDIF()
- ENDIF()
- IF(ALSOFT_REQUIRE_SNDIO AND NOT HAVE_SNDIO)
-@@ -1207,7 +1204,7 @@ ENDIF()
+@@ -1381,7 +1381,7 @@ endif()
# Install alsoft.conf configuration file
IF(ALSOFT_CONFIG)
INSTALL(FILES alsoftrc.sample
-- DESTINATION ${SHARE_INSTALL_DIR}/openal
-+ DESTINATION ${SHARE_INSTALL_DIR}/examples/openal
+- DESTINATION ${CMAKE_INSTALL_DATADIR}/openal
++ DESTINATION ${CMAKE_INSTALL_DATADIR}/examples/openal
)
MESSAGE(STATUS "Installing sample configuration")
MESSAGE(STATUS "")
Index: patches/patch-OpenAL32_alBuffer_c
===================================================================
RCS file: /cvs/ports/audio/openal/patches/patch-OpenAL32_alBuffer_c,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 patch-OpenAL32_alBuffer_c
--- patches/patch-OpenAL32_alBuffer_c 15 Nov 2017 13:02:42 -0000 1.2
+++ patches/patch-OpenAL32_alBuffer_c 25 Jul 2018 17:51:57 -0000
@@ -2,9 +2,9 @@ $OpenBSD: patch-OpenAL32_alBuffer_c,v 1.
Index: OpenAL32/alBuffer.c
--- OpenAL32/alBuffer.c.orig
+++ OpenAL32/alBuffer.c
-@@ -1209,7 +1209,7 @@ static ALboolean DecomposeFormat(ALenum format, enum F
- { AL_FORMAT_BFORMAT3D_16, FmtBFormat3D, FmtShort },
- { AL_FORMAT_BFORMAT3D_FLOAT32, FmtBFormat3D, FmtFloat },
+@@ -1171,7 +1171,7 @@ static ALboolean DecomposeUserFormat(ALenum format, en
+ { AL_FORMAT_BFORMAT3D_FLOAT32, UserFmtBFormat3D, UserFmtFloat },
+ { AL_FORMAT_BFORMAT3D_MULAW, UserFmtBFormat3D, UserFmtMulaw },
};
- ALuint i;
+ volatile ALuint i;
Index: patches/patch-utils_makehrtf_c
===================================================================
RCS file: /cvs/ports/audio/openal/patches/patch-utils_makehrtf_c,v
retrieving revision 1.3
diff -u -p -u -p -r1.3 patch-utils_makehrtf_c
--- patches/patch-utils_makehrtf_c 15 Nov 2017 13:02:42 -0000 1.3
+++ patches/patch-utils_makehrtf_c 25 Jul 2018 17:51:57 -0000
@@ -2,12 +2,12 @@ $OpenBSD: patch-utils_makehrtf_c,v 1.3 2
Index: utils/makehrtf.c
--- utils/makehrtf.c.orig
+++ utils/makehrtf.c
-@@ -2070,7 +2070,7 @@ static int StoreMhr (const HrirDataT * hData, const ch
- step = hData -> mIrSize;
- end = hData -> mIrCount * step;
- n = hData -> mIrPoints;
-- srand (0x31DF840C);
-+ srand_deterministic (0x31DF840C);
- for (j = 0; j < end; j += step) {
- hpHist = 0;
- for (i = 0; i < n; i ++) {
+@@ -1891,7 +1891,7 @@ static int StoreMhr(const HrirDataT *hData, const char
+ step = hData->mIrSize;
+ end = hData->mIrCount * step;
+ n = hData->mIrPoints;
+- srand(0x31DF840C);
++ srand_deterministic(0x31DF840C);
+ for(j = 0;j < end;j += step)
+ {
+ hpHist = 0;
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/audio/openal/pkg/PLIST,v
retrieving revision 1.9
diff -u -p -u -p -r1.9 PLIST
--- pkg/PLIST 15 Nov 2017 13:02:42 -0000 1.9
+++ pkg/PLIST 25 Jul 2018 17:51:57 -0000
@@ -10,6 +10,10 @@ include/AL/alext.h
include/AL/efx-creative.h
include/AL/efx-presets.h
include/AL/efx.h
+lib/cmake/
+lib/cmake/OpenAL/
+lib/cmake/OpenAL/OpenALConfig-openbsd.cmake
+lib/cmake/OpenAL/OpenALConfig.cmake
@lib lib/libopenal.so.${LIBopenal_VERSION}
lib/pkgconfig/openal.pc
share/examples/openal/
@@ -20,3 +24,10 @@ share/openal/
share/openal/hrtf/
share/openal/hrtf/default-44100.mhr
share/openal/hrtf/default-48000.mhr
+share/openal/presets/
+share/openal/presets/3D7.1.ambdec
+share/openal/presets/hexagon.ambdec
+share/openal/presets/itu5.1.ambdec
+share/openal/presets/presets.txt
+share/openal/presets/rectangle.ambdec
+share/openal/presets/square.ambdec