Hi,
this is a little update of openal using clang + backport of the C11
atomic fix. tested with astromenace and supertuxkart.
Hope it finds its way.
? patches/patch-OpenAL32_alBuffer_c
Index: Makefile
===================================================================
RCS file: /cvs/ports/audio/openal/Makefile,v
retrieving revision 1.38
diff -u -p -r1.38 Makefile
--- Makefile 1 Sep 2016 10:53:26 -0000 1.38
+++ Makefile 4 Sep 2016 22:06:22 -0000
@@ -1,13 +1,13 @@
# $OpenBSD: Makefile,v 1.38 2016/09/01 10:53:26 jasper Exp $
-BROKEN-arm = undefined reference to __sync atomic ops
BROKEN-hppa = undefined reference to __sync atomic ops
+BROKEN-mips64 = undefined reference to __sync atomic ops
+BROKEN-mips64el = undefined reference to __sync atomic ops
COMMENT = cross-platform 3D audio API
-V = 1.15.1
+V = 1.16.0
EPOCH = 0
-REVISION = 4
DISTNAME = openal-soft-$V
PKGNAME = openal-$V
CATEGORIES = audio
@@ -20,32 +20,41 @@ MAINTAINER = David Carlier <devnexen@gma
# LGPLv2+
PERMIT_PACKAGE_CDROM = Yes
-WANTLIB = c m pthread sndio
+WANTLIB += c m pthread sndio
MASTER_SITES = ${HOMEPAGE:S,.html,-releases/,}
EXTRACT_SUFX = .tar.bz2
-CONFIGURE_ARGS =-DCMAKE_C_FLAGS="${CFLAGS} -DNDEBUG" \
- -DCMAKE_BUILD_TYPE=OpenBSD \
- -DDLOPEN=Off \
- -DREQUIRE_SNDIO=On \
- -DPULSEAUDIO=Off \
- -DPORTAUDIO=Off \
- -DSOLARIS=Off \
- -DALSA=Off \
- -DOSS=Off \
- -DCOREAUDIO=Off \
- -DDSOUND=Off \
- -DOPENSL=Off \
- -DEXAMPLES=Off
-
-MODULES = devel/cmake
+CONFIGURE_ARGS =-DCMAKE_BUILD_TYPE=OpenBSD \
+ -DALSOFT_SYSCONFDIR=${SYSCONFDIR} \
+ -DALSOFT_CONFIG_DESTINATION=share/examples/openal \
+ -DALSOFT_DLOPEN=Off \
+ -DALSOFT_UTILS=On \
+ -DALSOFT_EXAMPLES=Off \
+ -DALSOFT_REQUIRE_SNDIO=On \
+ -DALSOFT_BACKEND_ALSA=Off \
+ -DALSOFT_BACKEND_COREAUDIO=Off \
+ -DALSOFT_BACKEND_DSOUND=Off \
+ -DALSOFT_BACKEND_JACK=Off \
+ -DALSOFT_BACKEND_MMDEVAPI=Off \
+ -DALSOFT_BACKEND_OPENSL=Off \
+ -DALSOFT_BACKEND_OSS=Off \
+ -DALSOFT_BACKEND_PORTAUDIO=Off \
+ -DALSOFT_BACKEND_PULSEAUDIO=Off \
+ -DALSOFT_BACKEND_QSA=Off \
+ -DALSOFT_BACKEND_SOLARIS=Off \
+ -DALSOFT_BACKEND_WAVE=Off \
+ -DALSOFT_BACKEND_WINMM=Off
+
+MODULES = devel/cmake lang/clang
+MODCLANG_ARCHS = *
+MODCLANG_LANGS = c c++
SEPARATE_BUILD =Yes
NO_TEST = Yes
pre-build:
- @${SUBST_CMD} ${WRKSRC}/Alc/alcConfig.c
+ @${SUBST_CMD} ${WRKSRC}/Alc/alcConfig.c ${WRKSRC}/alsoftrc.sample
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/openal
Index: distinfo
===================================================================
RCS file: /cvs/ports/audio/openal/distinfo,v
retrieving revision 1.8
diff -u -p -r1.8 distinfo
--- distinfo 11 Mar 2013 15:26:14 -0000 1.8
+++ distinfo 4 Sep 2016 22:06:22 -0000
@@ -1,2 +1,2 @@
-SHA256 (openal-soft-1.15.1.tar.bz2) =
DimhYvCEHMtBNc526S6KcEWJtoCoXt33b4mN5SNusFY=
-SIZE (openal-soft-1.15.1.tar.bz2) = 253006
+SHA256 (openal-soft-1.16.0.tar.bz2) =
Lz3NMT/iY5EoT7+FloY3I/mcZdbGhG3MtI55ytr0DV8=
+SIZE (openal-soft-1.16.0.tar.bz2) = 393280
Index: patches/patch-Alc_alcConfig_c
===================================================================
RCS file: /cvs/ports/audio/openal/patches/patch-Alc_alcConfig_c,v
retrieving revision 1.2
diff -u -p -r1.2 patch-Alc_alcConfig_c
--- patches/patch-Alc_alcConfig_c 11 Mar 2013 15:26:15 -0000 1.2
+++ patches/patch-Alc_alcConfig_c 4 Sep 2016 22:06:22 -0000
@@ -1,12 +1,12 @@
$OpenBSD: patch-Alc_alcConfig_c,v 1.2 2013/03/11 15:26:15 bcallah Exp $
---- Alc/alcConfig.c.orig Tue Dec 11 15:35:55 2012
-+++ Alc/alcConfig.c Thu Mar 7 10:10:08 2013
-@@ -227,7 +227,7 @@ void ReadALConfig(void)
- }
- }
- #else
-- f = fopen("/etc/openal/alsoft.conf", "r");
-+ f = fopen("${SYSCONFDIR}/openal/alsoft.conf", "r");
- if(f)
- {
- LoadConfigFromFile(f);
+--- Alc/alcConfig.c.orig Fri Aug 15 08:06:59 2014
++++ Alc/alcConfig.c Sun Sep 4 22:48:18 2016
+@@ -326,7 +326,7 @@ void ReadALConfig(void)
+ const char *str;
+ FILE *f;
+
+- str = "/etc/openal/alsoft.conf";
++ str = "${SYSCONFDIR}/openal/alsoft.conf";
+
+ TRACE("Loading config %s...\n", str);
+ f = al_fopen(str, "r");
Index: patches/patch-CMakeLists_txt
===================================================================
RCS file: /cvs/ports/audio/openal/patches/patch-CMakeLists_txt,v
retrieving revision 1.5
diff -u -p -r1.5 patch-CMakeLists_txt
--- patches/patch-CMakeLists_txt 11 Mar 2013 15:26:15 -0000 1.5
+++ patches/patch-CMakeLists_txt 4 Sep 2016 22:06:22 -0000
@@ -1,7 +1,16 @@
$OpenBSD: patch-CMakeLists_txt,v 1.5 2013/03/11 15:26:15 bcallah Exp $
---- CMakeLists.txt.orig Thu Mar 7 10:11:07 2013
-+++ CMakeLists.txt Thu Mar 7 10:11:45 2013
-@@ -797,7 +797,7 @@ ENDIF()
+--- CMakeLists.txt.orig Fri Aug 15 08:06:59 2014
++++ CMakeLists.txt Sun Sep 4 22:58:36 2016
+@@ -186,7 +186,7 @@ HAVE_C11_ALIGNAS)
+ # Check if we have C11 _Atomic
+ CHECK_C_SOURCE_COMPILES(
+ "#include <stdatomic.h>
+- int _Atomic foo;
++ const int _Atomic foo = ATOMIC_VAR_INIT(~0);
+ int main()
+ {
+ return atomic_load(&foo);
+@@ -1134,7 +1134,7 @@ ENDIF()
# Install alsoft.conf configuration file
IF(ALSOFT_CONFIG)
INSTALL(FILES alsoftrc.sample
Index: patches/patch-utils_makehrtf_c
===================================================================
RCS file: /cvs/ports/audio/openal/patches/patch-utils_makehrtf_c,v
retrieving revision 1.1
diff -u -p -r1.1 patch-utils_makehrtf_c
--- patches/patch-utils_makehrtf_c 9 Dec 2014 20:46:00 -0000 1.1
+++ patches/patch-utils_makehrtf_c 4 Sep 2016 22:06:22 -0000
@@ -1,7 +1,7 @@
$OpenBSD: patch-utils_makehrtf_c,v 1.1 2014/12/09 20:46:00 sthen Exp $
---- utils/makehrtf.c.orig Tue Dec 9 20:40:59 2014
-+++ utils/makehrtf.c Tue Dec 9 20:41:24 2014
-@@ -2017,7 +2017,7 @@ static int StoreMhr (const HrirDataT * hData, const ch
+--- utils/makehrtf.c.orig Fri Aug 15 08:06:59 2014
++++ utils/makehrtf.c Sun Sep 4 22:48:18 2016
+@@ -2071,7 +2071,7 @@ static int StoreMhr (const HrirDataT * hData, const ch
step = hData -> mIrSize;
end = hData -> mIrCount * step;
n = hData -> mIrPoints;
@@ -10,12 +10,3 @@ $OpenBSD: patch-utils_makehrtf_c,v 1.1 2
for (j = 0; j < end; j += step) {
hpHist = 0;
for (i = 0; i < n; i ++) {
-@@ -2072,7 +2072,7 @@ static int StoreTable (const HrirDataT * hData, const
- "static const ALshort defaultCoeffs[%u] =\n{\n", hData
-> mIrCount * n);
- if (! WriteAscii (text, fp, filename))
- return (0);
-- srand (0x31DF840C);
-+ srand_deterministic (0x31DF840C);
- for (j = 0; j < end; j += step) {
- if (! WriteAscii (" ", fp, filename))
- return (0);
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/audio/openal/pkg/PLIST,v
retrieving revision 1.7
diff -u -p -r1.7 PLIST
--- pkg/PLIST 22 May 2015 11:31:11 -0000 1.7
+++ pkg/PLIST 4 Sep 2016 22:06:22 -0000
@@ -14,3 +14,7 @@ share/examples/openal/
@sample ${SYSCONFDIR}/openal/
share/examples/openal/alsoftrc.sample
@sample ${SYSCONFDIR}/openal/alsoft.conf
+share/openal/
+share/openal/hrtf/
+share/openal/hrtf/default-44100.mhr
+share/openal/hrtf/default-48000.mhr