This is a rough diff to enable the EsounD and JACK output plugins
that are included with mpg123.  They are split out into subpackages,
and there are even pseudo-flavors do disable them since mpg123
itself has rather little in the way of dependencies.

I haven't actually tried to use these output plugins.  People who
have esd and jack setups can do that.

Is there any interest in this?  Is this a direction we want to take?


Index: Makefile
===================================================================
RCS file: /cvs/ports/audio/mpg123/Makefile,v
retrieving revision 1.40
diff -u -p -r1.40 Makefile
--- Makefile    22 Dec 2008 20:55:49 -0000      1.40
+++ Makefile    25 Dec 2008 18:12:46 -0000
@@ -1,8 +1,16 @@
 # $OpenBSD: Makefile,v 1.40 2008/12/22 20:55:49 naddy Exp $
 
-COMMENT=       MPEG-1/2 audio layer 1, 2, and 3 player
+SHARED_ONLY=   Yes
 
-DISTNAME=      mpg123-1.6.3
+COMMENT-main=  MPEG-1/2 audio layer 1, 2, and 3 player
+COMMENT-esd=   EsounD output plugin for mpg123
+COMMENT-jack=  JACK output plugin for mpg123
+
+VERSION=       1.6.3
+DISTNAME=      mpg123-${VERSION}
+PKGNAME-main=  mpg123-${VERSION}p0
+PKGNAME-esd=   mpg123-esd-${VERSION}
+PKGNAME-jack=  mpg123-jack-${VERSION}
 SHARED_LIBS=   mpg123  0.1     # .11.3
 CATEGORIES=    audio
 HOMEPAGE=      http://www.mpg123.de/
@@ -17,6 +25,17 @@ PERMIT_DISTFILES_FTP=        Yes
 
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=mpg123/}
 
+PSEUDO_FLAVORS=        no_esd no_jack
+FLAVOR?=
+
+MULTI_PACKAGES=        -main
+.if ${FLAVOR:L:Mno_esd}
+MULTI_PACKAGES+=-esd
+.endif
+.if ${FLAVOR:L:Mno_jack}
+MULTI_PACKAGES+=-jack
+.endif
+
 WANTLIB=       c m sndio
 LIB_DEPENDS=   ltdl::devel/libtool,-ltdl
 
@@ -25,7 +44,7 @@ AUTOCONF_VERSION=2.62
 AUTOMAKE_VERSION=1.9
 CONFIGURE_STYLE=autoconf automake
 CONFIGURE_ARGS=        ${CONFIGURE_SHARED} --enable-static \
-               --with-audio=sndio \
+               --with-audio=`echo ${OUTPUTS} | tr ' ' ,` \
                --with-optimization=0
 CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
                LDFLAGS="-L${WRKBUILD}/src/libmpg123/.libs -L${LOCALBASE}/lib"
@@ -37,6 +56,22 @@ CONFIGURE_ARGS+=--with-cpu=generic_nofpu
 CONFIGURE_ARGS+=--with-cpu=x86
 .else
 CONFIGURE_ARGS+=--with-cpu=generic_fpu
+.endif
+
+OUTPUTS=       sndio
+
+.if ${MULTI_PACKAGES:M-esd}
+OUTPUTS+=              esd
+LIB_DEPENDS-esd=       esd.>=2::audio/esound
+RUN_DEPENDS-esd=       :mpg123-${VERSION}:audio/mpg123
+WANTLIB-esd=           audiofile m sndio
+.endif
+
+.if ${MULTI_PACKAGES:M-jack}
+OUTPUTS+=              jack
+LIB_DEPENDS-jack=      jack.>=0::audio/jack
+RUN_DEPENDS-jack=      :mpg123-${VERSION}:audio/mpg123
+WANTLIB-jack=          m
 .endif
 
 post-extract:
Index: pkg/DESCR
===================================================================
RCS file: pkg/DESCR
diff -N pkg/DESCR
--- pkg/DESCR   11 Nov 2008 20:35:49 -0000      1.5
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,2 +0,0 @@
-mpg123 is a fast command-line MPEG audio player.  It supports
-MPEG 1.0/2.0/2.5 layers 1, 2, and 3 (commonly known as MP3).
Index: pkg/DESCR-esd
===================================================================
RCS file: pkg/DESCR-esd
diff -N pkg/DESCR-esd
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ pkg/DESCR-esd       25 Dec 2008 18:12:46 -0000
@@ -0,0 +1 @@
+mpg123 output plugin for the Enlightened Sound Daemon.
Index: pkg/DESCR-jack
===================================================================
RCS file: pkg/DESCR-jack
diff -N pkg/DESCR-jack
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ pkg/DESCR-jack      25 Dec 2008 18:12:46 -0000
@@ -0,0 +1 @@
+mpg123 output plugin for the JACK audio server.
Index: pkg/DESCR-main
===================================================================
RCS file: pkg/DESCR-main
diff -N pkg/DESCR-main
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ pkg/DESCR-main      25 Dec 2008 18:12:46 -0000
@@ -0,0 +1,2 @@
+mpg123 is a fast command-line MPEG audio player.  It supports
+MPEG 1.0/2.0/2.5 layers 1, 2, and 3 (commonly known as MP3).
Index: pkg/PFRAG.shared
===================================================================
RCS file: pkg/PFRAG.shared
diff -N pkg/PFRAG.shared
--- pkg/PFRAG.shared    11 Nov 2008 20:35:49 -0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,9 +0,0 @@
-...@comment $OpenBSD: PFRAG.shared,v 1.1 2008/11/11 20:35:49 naddy Exp $
-...@lib lib/libmpg123.so.${LIBmpg123_VERSION}
-lib/mpg123/
-...@comment lib/mpg123/output_dummy.a
-lib/mpg123/output_dummy.la
-lib/mpg123/output_dummy.so
-...@comment lib/mpg123/output_sndio.a
-lib/mpg123/output_sndio.la
-lib/mpg123/output_sndio.so
Index: pkg/PLIST
===================================================================
RCS file: pkg/PLIST
diff -N pkg/PLIST
--- pkg/PLIST   11 Nov 2008 20:35:49 -0000      1.5
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,9 +0,0 @@
-...@comment $OpenBSD: PLIST,v 1.5 2008/11/11 20:35:49 naddy Exp $
-%%SHARED%%
-...@bin bin/mpg123
-include/mpg123.h
-lib/libmpg123.a
-lib/libmpg123.la
-lib/pkgconfig/
-lib/pkgconfig/libmpg123.pc
-...@man man/man1/mpg123.1
Index: pkg/PLIST-esd
===================================================================
RCS file: pkg/PLIST-esd
diff -N pkg/PLIST-esd
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ pkg/PLIST-esd       25 Dec 2008 18:12:46 -0000
@@ -0,0 +1,4 @@
+...@comment $OpenBSD$
+...@comment lib/mpg123/output_esd.a
+lib/mpg123/output_esd.la
+lib/mpg123/output_esd.so
Index: pkg/PLIST-jack
===================================================================
RCS file: pkg/PLIST-jack
diff -N pkg/PLIST-jack
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ pkg/PLIST-jack      25 Dec 2008 18:12:46 -0000
@@ -0,0 +1,4 @@
+...@comment $OpenBSD$
+...@comment lib/mpg123/output_jack.a
+lib/mpg123/output_jack.la
+lib/mpg123/output_jack.so
Index: pkg/PLIST-main
===================================================================
RCS file: pkg/PLIST-main
diff -N pkg/PLIST-main
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ pkg/PLIST-main      25 Dec 2008 18:12:46 -0000
@@ -0,0 +1,16 @@
+...@comment $OpenBSD: PLIST,v 1.5 2008/11/11 20:35:49 naddy Exp $
+...@bin bin/mpg123
+include/mpg123.h
+lib/libmpg123.a
+lib/libmpg123.la
+...@lib lib/libmpg123.so.${LIBmpg123_VERSION}
+lib/mpg123/
+...@comment lib/mpg123/output_dummy.a
+lib/mpg123/output_dummy.la
+lib/mpg123/output_dummy.so
+...@comment lib/mpg123/output_sndio.a
+lib/mpg123/output_sndio.la
+lib/mpg123/output_sndio.so
+lib/pkgconfig/
+lib/pkgconfig/libmpg123.pc
+...@man man/man1/mpg123.1
-- 
Christian "naddy" Weisgerber                          na...@mips.inka.de

Reply via email to