Re: FLAC/Ogg/Vorbis support for audio/libsndfile (Was Re: [NEW] audio/mumble)

2012-04-19 Thread David Coppa
On Thu, Apr 19, 2012 at 4:13 PM, Christian Weisgerber
 wrote:
> David Coppa  wrote:
>
>> By popular demand :), here's the diff to enable external libraries
>> (FLAC, Ogg, Vorbis) support for audio/libsndfile.
>
> I'll be unpopular and say that I dislike this.  The kitchen sink
> approach in the audio area where everything depends on everything
> else is terrible.
>
> What are we going to do about the inter-library dependencies?  Are
> we going to make sure that all instances of -lsndfile in ports are
> replaced by "-lsndfile -lFLAC -lvorbis -logg -lm"?  Are we going
> to ignore this and rely on ldd(1) pulling in whatever is required?
> (Won't work for static linking, but do we care?)

This is more or less the reason of the hack (using oggdec to convert
oggs to wavs) I've done for my wip port of audio/mumble (see the other
thread on ports@). Do you think is it reasonable (even if a bit ugly)?

ciao
David



Re: FLAC/Ogg/Vorbis support for audio/libsndfile (Was Re: [NEW] audio/mumble)

2012-04-19 Thread Christian Weisgerber
David Coppa  wrote:

> By popular demand :), here's the diff to enable external libraries
> (FLAC, Ogg, Vorbis) support for audio/libsndfile.

I'll be unpopular and say that I dislike this.  The kitchen sink
approach in the audio area where everything depends on everything
else is terrible.

What are we going to do about the inter-library dependencies?  Are
we going to make sure that all instances of -lsndfile in ports are
replaced by "-lsndfile -lFLAC -lvorbis -logg -lm"?  Are we going
to ignore this and rely on ldd(1) pulling in whatever is required?
(Won't work for static linking, but do we care?)

-- 
Christian "naddy" Weisgerber  na...@mips.inka.de



Re: FLAC/Ogg/Vorbis support for audio/libsndfile (Was Re: [NEW] audio/mumble)

2012-04-18 Thread David Coppa
On Tue, 17 Apr 2012, Stuart Henderson wrote:

> makes sense to me, I'll try and test some things when I get my
> workstation updated - I would however also suggest bumping the library
> major of libsndfile.

You're completely right. Apparently, after a long day, I can forget
obvious things :-)

Updated diff following...

Index: audio/jack/Makefile
===
RCS file: /cvs/ports/audio/jack/Makefile,v
retrieving revision 1.20
diff -u -p -r1.20 Makefile
--- audio/jack/Makefile 24 Jan 2012 08:03:52 -  1.20
+++ audio/jack/Makefile 18 Apr 2012 07:22:45 -
@@ -7,6 +7,7 @@ COMMENT =   low latency sound server
 V =0.121.3
 DISTNAME = jack-audio-connection-kit-${V}
 PKGNAME =  jack-${V}
+REVISION = 0
 
 SHARED_LIBS += jack0.0 # 0.28
 SHARED_LIBS += jackserver  0.0 # 0.28
@@ -22,8 +23,8 @@ PERMIT_PACKAGE_FTP =  Yes
 PERMIT_DISTFILES_CDROM =Yes
 PERMIT_DISTFILES_FTP = Yes
 
-WANTLIB += c celt0 m pthread readline samplerate sndfile sndio
-WANTLIB += termcap
+WANTLIB += FLAC c celt0 m ogg pthread readline samplerate
+WANTLIB += sndfile sndio termcap vorbis vorbisenc
 
 MASTER_SITES = ${HOMEPAGE}downloads/
 
Index: audio/libsamplerate/Makefile
===
RCS file: /cvs/ports/audio/libsamplerate/Makefile,v
retrieving revision 1.15
diff -u -p -r1.15 Makefile
--- audio/libsamplerate/Makefile15 Nov 2010 00:22:47 -  1.15
+++ audio/libsamplerate/Makefile18 Apr 2012 07:22:45 -
@@ -3,7 +3,7 @@
 COMMENT=   audio sample rate conversion library
 
 DISTNAME=  libsamplerate-0.1.7
-REVISION=  0
+REVISION=  1
 SHARED_LIBS=   samplerate  2.0 # .1.3
 CATEGORIES=audio
 
@@ -17,7 +17,7 @@ PERMIT_DISTFILES_FTP= Yes
 
 MASTER_SITES=  ${HOMEPAGE}
 
-WANTLIB=   c m sndfile>=1
+WANTLIB=   FLAC c m ogg sndfile>=1 vorbis vorbisenc
 
 LIB_DEPENDS=   audio/libsndfile
 
Index: audio/libsndfile/Makefile
===
RCS file: /cvs/ports/audio/libsndfile/Makefile,v
retrieving revision 1.22
diff -u -p -r1.22 Makefile
--- audio/libsndfile/Makefile   13 Jul 2011 22:24:05 -  1.22
+++ audio/libsndfile/Makefile   18 Apr 2012 07:22:45 -
@@ -3,9 +3,10 @@
 COMMENT=   library to handle various audio file formats
 
 DISTNAME=  libsndfile-1.0.25
+REVISION=  0
 CATEGORIES=audio
 HOMEPAGE=  http://www.mega-nerd.com/libsndfile/
-SHARED_LIBS += sndfile  3.3  # .1.25
+SHARED_LIBS += sndfile  4.0  # .1.25
 
 # LGPLv2.1
 PERMIT_PACKAGE_CDROM=  Yes
@@ -15,13 +16,16 @@ PERMIT_DISTFILES_FTP=   Yes
 
 MASTER_SITES=  ${HOMEPAGE}files/
 
-WANTLIB=   c m sndio
+WANTLIB=   FLAC c m ogg sndio vorbis vorbisenc
+
+LIB_DEPENDS=   audio/flac \
+   audio/libogg \
+   audio/libvorbis
 
 USE_LIBTOOL=   Yes
 CONFIGURE_STYLE=gnu
 CONFIGURE_ARGS=${CONFIGURE_SHARED} \
--disable-alsa \
-   --disable-external-libs \
--disable-octave \
--disable-sqlite
 MODGNU_CONFIG_GUESS_DIRS=${WRKSRC}/Cfg
Index: audio/pulseaudio/Makefile
===
RCS file: /cvs/ports/audio/pulseaudio/Makefile,v
retrieving revision 1.17
diff -u -p -r1.17 Makefile
--- audio/pulseaudio/Makefile   23 Jan 2012 14:39:39 -  1.17
+++ audio/pulseaudio/Makefile   18 Apr 2012 07:22:46 -
@@ -6,7 +6,7 @@ COMMENT=cross-platform networked sound
 
 VERSION=   1.1
 DISTNAME=  pulseaudio-${VERSION}
-REVISION=  2
+REVISION=  3
 
 SHARED_LIBS +=  pulse1.0  # .13.4
 SHARED_LIBS +=  pulse-simple 0.0  # .0.3
@@ -25,8 +25,8 @@ PERMIT_PACKAGE_FTP=   Yes
 PERMIT_DISTFILES_CDROM=Yes
 PERMIT_DISTFILES_FTP=  Yes
 
-WANTLIB += c crypto execinfo gdbm glib-2.0 json ltdl m ossaudio
-WANTLIB += pcre pthread sndfile speexdsp ssl
+WANTLIB += FLAC c crypto execinfo gdbm glib-2.0 json ltdl m ogg
+WANTLIB += ossaudio pcre pthread sndfile speexdsp ssl vorbis vorbisenc
 
 MASTER_SITES=  http://freedesktop.org/software/pulseaudio/releases/
 TAR=   ${LOCALBASE}/bin/gtar
Index: audio/speech-dispatcher/Makefile
===
RCS file: /cvs/ports/audio/speech-dispatcher/Makefile,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 Makefile
--- audio/speech-dispatcher/Makefile20 Oct 2011 11:28:27 -  1.1.1.1
+++ audio/speech-dispatcher/Makefile18 Apr 2012 07:22:47 -
@@ -4,6 +4,8 @@ COMMENT=common interface to speech synt
 
 DISTNAME=  speech-dispatcher-0.7.1
 
+REVISION=  0
+
 SHARED_LIBS +=  sdaudio  0.0  # 2.4
 SHARED_LIBS +=  speechd  0.0 

Re: FLAC/Ogg/Vorbis support for audio/libsndfile (Was Re: [NEW] audio/mumble)

2012-04-17 Thread Brad Smith

On Mon, 16 Apr 2012, Pascal Stumpf wrote:

I now remember why I've gone down this route. There's no way to enable
just ogg support. The only option with libsndfile's configure is
"--enable-external-libs" which will enable (and require) FLAC, Ogg,
Speex and Vorbis: frankly, it's a bit overkill imo...


Having Ogg support without Vorbis support makes no sense. Vorbis is the
codec used in the vast majority of Ogg files. It would be pretty useless
to have libsndfile be able to access the container but not be able to
encode/decode the audio within it.

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



FLAC/Ogg/Vorbis support for audio/libsndfile (Was Re: [NEW] audio/mumble)

2012-04-17 Thread David Coppa
On Tue, 17 Apr 2012, Stuart Henderson wrote:

> On 2012/04/17 13:28, David Coppa wrote:
> > On Mon, 16 Apr 2012, Pascal Stumpf wrote:
> > 
> > > Decoding .ogg files at build/configure time is a bit ugly; have you
> > > looked at adding vorbis support to our libsndfile?
> > 
> > I now remember why I've gone down this route. There's no way to enable
> > just ogg support. The only option with libsndfile's configure is
> > "--enable-external-libs" which will enable (and require) FLAC, Ogg, 
> > Speex and Vorbis: frankly, it's a bit overkill imo...
> 
> you're going to pull in both Ogg & Vorbis anyway, and FLAC and Speex
> aren't exactly onerous dependencies for software dealing with audio
> anyway (and might be useful for other things too)

By popular demand :), here's the diff to enable external libraries
(FLAC, Ogg, Vorbis) support for audio/libsndfile.

The diff also contains adjustments to WANTLIB and version bumps for
those ports that depend on libsndfile (where and if needed)

ciao,
david

Index: audio/jack/Makefile
===
RCS file: /cvs/ports/audio/jack/Makefile,v
retrieving revision 1.20
diff -u -p -r1.20 Makefile
--- audio/jack/Makefile 24 Jan 2012 08:03:52 -  1.20
+++ audio/jack/Makefile 17 Apr 2012 19:55:23 -
@@ -7,6 +7,7 @@ COMMENT =   low latency sound server
 V =0.121.3
 DISTNAME = jack-audio-connection-kit-${V}
 PKGNAME =  jack-${V}
+REVISION = 0
 
 SHARED_LIBS += jack0.0 # 0.28
 SHARED_LIBS += jackserver  0.0 # 0.28
@@ -22,8 +23,8 @@ PERMIT_PACKAGE_FTP =  Yes
 PERMIT_DISTFILES_CDROM =Yes
 PERMIT_DISTFILES_FTP = Yes
 
-WANTLIB += c celt0 m pthread readline samplerate sndfile sndio
-WANTLIB += termcap
+WANTLIB += FLAC c celt0 m ogg pthread readline samplerate
+WANTLIB += sndfile sndio termcap vorbis vorbisenc
 
 MASTER_SITES = ${HOMEPAGE}downloads/
 
Index: audio/libsamplerate/Makefile
===
RCS file: /cvs/ports/audio/libsamplerate/Makefile,v
retrieving revision 1.15
diff -u -p -r1.15 Makefile
--- audio/libsamplerate/Makefile15 Nov 2010 00:22:47 -  1.15
+++ audio/libsamplerate/Makefile17 Apr 2012 19:55:25 -
@@ -3,7 +3,7 @@
 COMMENT=   audio sample rate conversion library
 
 DISTNAME=  libsamplerate-0.1.7
-REVISION=  0
+REVISION=  1
 SHARED_LIBS=   samplerate  2.0 # .1.3
 CATEGORIES=audio
 
@@ -17,7 +17,7 @@ PERMIT_DISTFILES_FTP= Yes
 
 MASTER_SITES=  ${HOMEPAGE}
 
-WANTLIB=   c m sndfile>=1
+WANTLIB=   FLAC c m ogg sndfile>=1 vorbis vorbisenc
 
 LIB_DEPENDS=   audio/libsndfile
 
Index: audio/libsndfile/Makefile
===
RCS file: /cvs/ports/audio/libsndfile/Makefile,v
retrieving revision 1.22
diff -u -p -r1.22 Makefile
--- audio/libsndfile/Makefile   13 Jul 2011 22:24:05 -  1.22
+++ audio/libsndfile/Makefile   17 Apr 2012 19:55:25 -
@@ -3,6 +3,7 @@
 COMMENT=   library to handle various audio file formats
 
 DISTNAME=  libsndfile-1.0.25
+REVISION=  0
 CATEGORIES=audio
 HOMEPAGE=  http://www.mega-nerd.com/libsndfile/
 SHARED_LIBS += sndfile  3.3  # .1.25
@@ -15,13 +16,16 @@ PERMIT_DISTFILES_FTP=   Yes
 
 MASTER_SITES=  ${HOMEPAGE}files/
 
-WANTLIB=   c m sndio
+WANTLIB=   FLAC c m ogg sndio vorbis vorbisenc
+
+LIB_DEPENDS=   audio/flac \
+   audio/libogg \
+   audio/libvorbis
 
 USE_LIBTOOL=   Yes
 CONFIGURE_STYLE=gnu
 CONFIGURE_ARGS=${CONFIGURE_SHARED} \
--disable-alsa \
-   --disable-external-libs \
--disable-octave \
--disable-sqlite
 MODGNU_CONFIG_GUESS_DIRS=${WRKSRC}/Cfg
Index: audio/pulseaudio/Makefile
===
RCS file: /cvs/ports/audio/pulseaudio/Makefile,v
retrieving revision 1.17
diff -u -p -r1.17 Makefile
--- audio/pulseaudio/Makefile   23 Jan 2012 14:39:39 -  1.17
+++ audio/pulseaudio/Makefile   17 Apr 2012 19:55:25 -
@@ -6,7 +6,7 @@ COMMENT=cross-platform networked sound
 
 VERSION=   1.1
 DISTNAME=  pulseaudio-${VERSION}
-REVISION=  2
+REVISION=  3
 
 SHARED_LIBS +=  pulse1.0  # .13.4
 SHARED_LIBS +=  pulse-simple 0.0  # .0.3
@@ -25,8 +25,8 @@ PERMIT_PACKAGE_FTP=   Yes
 PERMIT_DISTFILES_CDROM=Yes
 PERMIT_DISTFILES_FTP=  Yes
 
-WANTLIB += c crypto execinfo gdbm glib-2.0 json ltdl m ossaudio
-WANTLIB += pcre pthread sndfile speexdsp ssl
+WANTLIB += FLAC c crypto execinfo gdbm glib-2.0 json ltdl m ogg
+WANTLIB += ossaudio pcre pthread sndfile speexdsp ssl vorbis vorbisenc
 
 MASTER_SITES=  http://freedesktop.org/software/pulseaudio/releases/
 TAR=   ${LOCALBASE}/bin/gtar
Index