Re: [UPDATE] audio/openal 1.19.0 with sndio capture support

2018-09-10 Thread Leonid Bobrov
Hm, MIME is broken, so here's plain-text patch:

Index: Makefile
===
RCS file: /cvs/ports/audio/openal/Makefile,v
retrieving revision 1.51
diff -u -p -u -p -r1.51 Makefile
--- Makefile9 Aug 2018 20:50:47 -   1.51
+++ Makefile8 Sep 2018 13:42:50 -
@@ -1,16 +1,13 @@
 # $OpenBSD: Makefile,v 1.51 2018/08/09 20:50:47 ratchov Exp $
 
-BROKEN-hppa =  undefined reference to __sync atomic ops
-
 COMMENT =  cross-platform 3D audio API
 
-V =1.17.2
+V =1.19.0
 EPOCH =0
 DISTNAME = openal-soft-$V
 PKGNAME =  openal-$V
 CATEGORIES =   audio
-SHARED_LIBS =  openal  3.0
-REVISION = 1
+SHARED_LIBS =  openal  3.1
 
 HOMEPAGE = http://kcat.strangesoft.net/openal.html
 
@@ -19,7 +16,7 @@ MAINTAINER =  David Carlier 
Index: distinfo
===
RCS file: /cvs/ports/audio/openal/distinfo,v
retrieving revision 1.10
diff -u -p -u -p -r1.10 distinfo
--- distinfo15 Nov 2017 13:02:42 -  1.10
+++ distinfo8 Sep 2018 13:42:50 -
@@ -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.19.0.tar.bz2) = 
8a3zpuc+L5JwoP0AiH6iN5OWj6eH9g3N7EGjsvQqDtY=
+SIZE (openal-soft-1.19.0.tar.bz2) = 575163
Index: patches/patch-Alc_ALc_c
===
RCS file: /cvs/ports/audio/openal/patches/patch-Alc_ALc_c,v
retrieving revision 1.1
diff -u -p -u -p -r1.1 patch-Alc_ALc_c
--- patches/patch-Alc_ALc_c 31 Dec 2017 18:46:26 -  1.1
+++ patches/patch-Alc_ALc_c 8 Sep 2018 13:42:50 -
@@ -1,35 +1,54 @@
-$OpenBSD: patch-Alc_ALc_c,v 1.1 2017/12/31 18:46:26 jca Exp $
-
-commit d1e98c36d375433cb11a7a74ce20c968491773aa
-Author: Chris Robinson 
-Date:   Sat Apr 30 17:14:55 2016 -0700
-
-Don't crash when there's no backend to probe
+$OpenBSD$
 
 Index: Alc/ALc.c
 --- Alc/ALc.c.orig
 +++ Alc/ALc.c
-@@ -1117,6 +1117,11 @@ static void alc_initconfig(void)
- V0(factory,init)();
- }
+@@ -79,7 +79,7 @@ static struct BackendInfo BackendList[] = {
+ { "solaris", ALCsolarisBackendFactory_getFactory },
+ #endif
+ #ifdef HAVE_SNDIO
+-{ "sndio", ALCsndioBackendFactory_getFactory },
++{ "sndio", SndioBackendFactory_getFactory },
+ #endif
+ #ifdef HAVE_OSS
+ { "oss", ALCossBackendFactory_getFactory },
+@@ -656,9 +656,9 @@ static const struct {
  
-+if(!PlaybackBackend.name)
-+WARN("No playback backend available!\n");
-+if(!CaptureBackend.name)
-+WARN("No capture backend available!\n");
-+
- if(ConfigValueStr(NULL, NULL, "excludefx", ))
- {
- 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)
+ DECL(AL_DEDICATED_GAIN),
+ 
+-DECL(AL_AUTOWAH_ATTACK_TIME),
+-DECL(AL_AUTOWAH_RELEASE_TIME),
+-DECL(AL_AUTOWAH_RESONANCE),
++DECL(AL_AUTOWAH_ATTACK_TIME),
++DECL(AL_AUTOWAH_RELEASE_TIME),
++DECL(AL_AUTOWAH_RESONANCE),
+ DECL(AL_AUTOWAH_PEAK_GAIN),
+ 
+ DECL(AL_NUM_RESAMPLERS_SOFT),
+@@ -1314,7 +1314,7 @@ static void ProbeDevices(al_string *list, struct Backe
+ if(backendinfo->getFactory)
  {
  ALCbackendFactory *factory = backendinfo->getFactory();
- V(factory,probe)(type);
+-V(factory,probe)(type);
++V(factory,probe)(type, list);
+ }
+ 
+ UnlockLists();
+@@ -1323,17 +1323,6 @@ static void ProbeAllDevicesList(void)
+ { ProbeDevices(, , ALL_DEVICE_PROBE); }
+ static void ProbeCaptureDeviceList(void)
+ { ProbeDevices(, , CAPTURE_DEVICE_PROBE); 
}
+-
+-static void AppendDevice(const ALCchar *name, al_string *devnames)
+-{
+-size_t len = strlen(name);
+-if(len > 0)
+-alstr_append_range(devnames, name, name+len+1);
+-}
+-void AppendAllDevicesList(const ALCchar *name)
+-{ AppendDevice(name, ); }
+-void AppendCaptureDeviceList(const ALCchar *name)
+-{ AppendDevice(name, ); }
+ 
+ 
+ /
Index: patches/patch-Alc_alcConfig_c
===
RCS file: patches/patch-Alc_alcConfig_c
diff -N patches/patch-Alc_alcConfig_c
--- patches/patch-Alc_alcConfig_c   15 Nov 2017 13:02:42 -  1.4
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,13 +0,0 @@
-$OpenBSD: patch-Alc_alcConfig_c,v 1.4 2017/11/15 13:02:42 sthen Exp $
-Index: Alc/alcConfig.c
 Alc/alcConfig.c.orig
-+++ Alc/alcConfig.c
-@@ -353,7 +353,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);

Re: [UPDATE] audio/openal 1.19.0 with sndio capture support

2018-09-08 Thread Leonid Bobrov
On Sat, Sep 08, 2018 at 06:27:52PM +0100, David CARLIER wrote:
> Hi,
> 
> When I tried to apply your patch, it fails for PLIST ... makefile and so 
> on
> 

What? That's impossible, I assume that your local repo copy is up to
date and you're running patch(1) in ports/audio/openal directory, not
anywhere else:
$ cd somewhere
$ cvs -d anoncvs@your.favourite.mirror:/cvs co ports/audio/openal
$ cd ports/audio/openal
$ patch -i /path/to/openal.patch

Please tell me the steps you have done when you applied my diff.



[UPDATE] audio/openal 1.19.0 with sndio capture support

2018-09-08 Thread Leonid Bobrov
Yo!

So, openal-soft 1.19.0 was released yesterday and today kcat has pushed
3 commits one of which adds sndio input support (thanks to ratchov@'s
work) that will happen in 1.19.1 release, meanwhile I am taking upstream
patches and removing redundant patches, making this port easier to
maintain. I raised minor version number and nothing seems to be broken
yet...
Index: Makefile
===
RCS file: /cvs/ports/audio/openal/Makefile,v
retrieving revision 1.51
diff -u -p -u -p -r1.51 Makefile
--- Makefile9 Aug 2018 20:50:47 -   1.51
+++ Makefile8 Sep 2018 13:42:50 -
@@ -1,16 +1,13 @@
 # $OpenBSD: Makefile,v 1.51 2018/08/09 20:50:47 ratchov Exp $
 
-BROKEN-hppa =  undefined reference to __sync atomic ops
-
 COMMENT =  cross-platform 3D audio API
 
-V =1.17.2
+V =1.19.0
 EPOCH =0
 DISTNAME = openal-soft-$V
 PKGNAME =  openal-$V
 CATEGORIES =   audio
-SHARED_LIBS =  openal  3.0
-REVISION = 1
+SHARED_LIBS =  openal  3.1
 
 HOMEPAGE = http://kcat.strangesoft.net/openal.html
 
@@ -19,7 +16,7 @@ MAINTAINER =  David Carlier 
Index: distinfo
===
RCS file: /cvs/ports/audio/openal/distinfo,v
retrieving revision 1.10
diff -u -p -u -p -r1.10 distinfo
--- distinfo15 Nov 2017 13:02:42 -  1.10
+++ distinfo8 Sep 2018 13:42:50 -
@@ -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.19.0.tar.bz2) = 
8a3zpuc+L5JwoP0AiH6iN5OWj6eH9g3N7EGjsvQqDtY=
+SIZE (openal-soft-1.19.0.tar.bz2) = 575163
Index: patches/patch-Alc_ALc_c
===
RCS file: /cvs/ports/audio/openal/patches/patch-Alc_ALc_c,v
retrieving revision 1.1
diff -u -p -u -p -r1.1 patch-Alc_ALc_c
--- patches/patch-Alc_ALc_c 31 Dec 2017 18:46:26 -  1.1
+++ patches/patch-Alc_ALc_c 8 Sep 2018 13:42:50 -
@@ -1,35 +1,54 @@
-$OpenBSD: patch-Alc_ALc_c,v 1.1 2017/12/31 18:46:26 jca Exp $
-
-commit d1e98c36d375433cb11a7a74ce20c968491773aa
-Author: Chris Robinson 
-Date:   Sat Apr 30 17:14:55 2016 -0700
-
-Don't crash when there's no backend to probe
+$OpenBSD$
 
 Index: Alc/ALc.c
 --- Alc/ALc.c.orig
 +++ Alc/ALc.c
-@@ -1117,6 +1117,11 @@ static void alc_initconfig(void)
- V0(factory,init)();
- }
+@@ -79,7 +79,7 @@ static struct BackendInfo BackendList[] = {
+ { "solaris", ALCsolarisBackendFactory_getFactory },
+ #endif
+ #ifdef HAVE_SNDIO
+-{ "sndio", ALCsndioBackendFactory_getFactory },
++{ "sndio", SndioBackendFactory_getFactory },
+ #endif
+ #ifdef HAVE_OSS
+ { "oss", ALCossBackendFactory_getFactory },
+@@ -656,9 +656,9 @@ static const struct {
  
-+if(!PlaybackBackend.name)
-+WARN("No playback backend available!\n");
-+if(!CaptureBackend.name)
-+WARN("No capture backend available!\n");
-+
- if(ConfigValueStr(NULL, NULL, "excludefx", ))
- {
- 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)
+ DECL(AL_DEDICATED_GAIN),
+ 
+-DECL(AL_AUTOWAH_ATTACK_TIME),
+-DECL(AL_AUTOWAH_RELEASE_TIME),
+-DECL(AL_AUTOWAH_RESONANCE),
++DECL(AL_AUTOWAH_ATTACK_TIME),
++DECL(AL_AUTOWAH_RELEASE_TIME),
++DECL(AL_AUTOWAH_RESONANCE),
+ DECL(AL_AUTOWAH_PEAK_GAIN),
+ 
+ DECL(AL_NUM_RESAMPLERS_SOFT),
+@@ -1314,7 +1314,7 @@ static void ProbeDevices(al_string *list, struct Backe
+ if(backendinfo->getFactory)
  {
  ALCbackendFactory *factory = backendinfo->getFactory();
- V(factory,probe)(type);
+-V(factory,probe)(type);
++V(factory,probe)(type, list);
+ }
+ 
+ UnlockLists();
+@@ -1323,17 +1323,6 @@ static void ProbeAllDevicesList(void)
+ { ProbeDevices(, , ALL_DEVICE_PROBE); }
+ static void ProbeCaptureDeviceList(void)
+ { ProbeDevices(, , CAPTURE_DEVICE_PROBE); 
}
+-
+-static void AppendDevice(const ALCchar *name, al_string *devnames)
+-{
+-size_t len = strlen(name);
+-if(len > 0)
+-alstr_append_range(devnames, name, name+len+1);
+-}
+-void AppendAllDevicesList(const ALCchar *name)
+-{ AppendDevice(name, ); }
+-void AppendCaptureDeviceList(const ALCchar *name)
+-{ AppendDevice(name, ); }
+ 
+ 
+ /
Index: patches/patch-Alc_alcConfig_c
===
RCS file: patches/patch-Alc_alcConfig_c
diff -N patches/patch-Alc_alcConfig_c
--- patches/patch-Alc_alcConfig_c   15 Nov 2017 13:02:42 -  1.4
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,13 +0,0 @@
-$OpenBSD: patch-Alc_alcConfig_c,v 1.4