From fb1b7fa7e3734f0ecadee0b51b4454612ec0f497 Mon Sep 17 00:00:00 2001 From: bjs Date: Fri, 23 Nov 2007 00:18:41 +0000 Subject: [PATCH] Import rtunes CVS snapshot (v0.6 plus a few bug fixes). The makefiles for this should really be rewritten to use libtool; using two makefiles for two different platforms isn't the way we tend to do things around here ... ;) Blurb: Rtunes streams files containing Apple Lossless audio data to an Apple AirPort Express device. If a '-' is given as the file(s) argument, rtunes expects raw PCM audio data on stdin and encodes it to the Apple Lossless format prior to streaming it. With this method it is possible to stream audio data from any source that can output raw PCM audio data on stdout. NOTE: the patch and mplayer helper library for this package are untested; it is installed merely as a convenience. --- audio/rtunes/DESCR | 9 ++++ audio/rtunes/Makefile | 78 ++++++++++++++++++++++++++++++++++ audio/rtunes/PLIST | 10 +++++ audio/rtunes/distinfo | 13 ++++++ audio/rtunes/files/rtunes.conf | 11 +++++ audio/rtunes/patches/patch-aa | 13 ++++++ audio/rtunes/patches/patch-ab | 10 +++++ audio/rtunes/patches/patch-ac | 33 ++++++++++++++ audio/rtunes/patches/patch-ad | 25 +++++++++++ audio/rtunes/patches/patch-ae | 53 +++++++++++++++++++++++ audio/rtunes/patches/patch-af | 18 ++++++++ audio/rtunes/patches/patch-ag | 13 ++++++ audio/rtunes/patches/patch-ah | 44 +++++++++++++++++++ 13 files changed, 330 insertions(+) create mode 100644 audio/rtunes/DESCR create mode 100644 audio/rtunes/Makefile create mode 100644 audio/rtunes/PLIST create mode 100644 audio/rtunes/distinfo create mode 100644 audio/rtunes/files/rtunes.conf create mode 100644 audio/rtunes/patches/patch-aa create mode 100644 audio/rtunes/patches/patch-ab create mode 100644 audio/rtunes/patches/patch-ac create mode 100644 audio/rtunes/patches/patch-ad create mode 100644 audio/rtunes/patches/patch-ae create mode 100644 audio/rtunes/patches/patch-af create mode 100644 audio/rtunes/patches/patch-ag create mode 100644 audio/rtunes/patches/patch-ah diff --git a/audio/rtunes/DESCR b/audio/rtunes/DESCR new file mode 100644 index 000000000000..3ecf82e4b181 --- /dev/null +++ b/audio/rtunes/DESCR @@ -0,0 +1,9 @@ +Rtunes streams files containing Apple Lossless audio data to +an Apple AirPort Express device. If a '-' is given as the +file(s) argument, rtunes expects raw PCM audio data on stdin +and encodes it to the Apple Lossless format prior to streaming +it. With this method it is possible to stream audio data from +any source that can output raw PCM audio data on stdout. + +NOTE: the patch and mplayer helper library for this package are +untested; it is installed merely as a convenience. diff --git a/audio/rtunes/Makefile b/audio/rtunes/Makefile new file mode 100644 index 000000000000..761c23e43d7b --- /dev/null +++ b/audio/rtunes/Makefile @@ -0,0 +1,78 @@ +# $NetBSD$ +# + +DISTNAME= rtunes-snap-20071122 +CATEGORIES= audio +MASTER_SITES= ${MASTER_SITE_LOCAL} +EXTRACT_SUFX= .tar.bz2 + + +MAINTAINER= bjs@NetBSD.org +HOMEPAGE= http://www.nazgul.ch/dev.html +COMMENT= Streams audio to an Apple AirPort Express device + +PKG_DESTDIR_SUPPORT= user-destdir + +NO_CONFIGURE= yes +USE_TOOLS+= yacc lex + +.include "../../mk/bsd.prefs.mk" + +### +### XXX this dual-makefile, non-libtoolized package really needs to be +### reworked for proper multi-platform support, but I do not have +### time as of now. +### +.if ${OPSYS} == "Linux" +USE_TOOLS+= gmake +MAKE_ENV+= MAKE=${GMAKE:Q} +.else +USE_BSD_MAKEFILE= yes +MAKE_ENV+= MKPRIVATELIB=yes +.endif + +EGDIR= ${PREFIX}/share/examples/rtunes +CONF_FILES= ${EGDIR}/${RTUNES_CONF:T} \ + ${PKG_SYSCONFDIR}/${RTUNES_CONF:T} +RTUNES_CONF= ${WRKDIR}/rtunes.conf + + +INSTALLATION_DIRS_FROM_PLIST= yes + + +SUBST_CLASSES+= doc +SUBST_FILES.doc= librtunes/README +SUBST_STAGE.doc= post-extract +SUBST_VARS.doc= PREFIX + +post-extract: + cp ${FILESDIR}/${RTUNES_CONF:T} ${WRKDIR}/${RTUNES_CONF:T} + +.if defined(RTUNES_SERVER) && !empty(RTUNES_SERVER) +pre-build: prepare-rtunes-conf +.endif + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/rtunes/rtunes \ + ${DESTDIR}${PREFIX}/bin/rtunes + ${INSTALL_MAN} ${WRKSRC}/rtunes/rtunes.1 \ + ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1 + ${INSTALL_MAN} ${WRKSRC}/rtunes/rtunes.conf.5 \ + ${DESTDIR}${PREFIX}/${PKGMANDIR}/man5 + ${INSTALL_DATA} ${WRKSRC}/librtunes/librtunes.a \ + ${DESTDIR}${PREFIX}/lib + + ${INSTALL_DATA_DIR} ${DESTDIR}${EGDIR} + ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/doc/rtunes + ${INSTALL_DATA} ${WRKDIR}/rtunes.conf ${DESTDIR}${EGDIR} + ${INSTALL_DATA} ${WRKSRC}/librtunes/mplayer.diff ${DESTDIR}${EGDIR} + ${INSTALL_DATA} ${WRKSRC}/librtunes/README \ + ${DESTDIR}${PREFIX}/share/doc/rtunes + +.PHONY: prepare-rtunes-conf +prepare-rtunes-conf: + ${RUN} ${ECHO_MSG} "stream to ${RTUNES_SERVER}" >> ${RTUNES_CONF:Q} + +.include "../../security/openssl/buildlink3.mk" + +.include "../../mk/bsd.pkg.mk" diff --git a/audio/rtunes/PLIST b/audio/rtunes/PLIST new file mode 100644 index 000000000000..0d819cd191c8 --- /dev/null +++ b/audio/rtunes/PLIST @@ -0,0 +1,10 @@ +@comment $NetBSD$ +bin/rtunes +lib/librtunes.a +man/man1/rtunes.1 +man/man5/rtunes.conf.5 +share/doc/rtunes/README +share/examples/rtunes/mplayer.diff +share/examples/rtunes/rtunes.conf +@dirrm share/examples/rtunes +@dirrm share/doc/rtunes diff --git a/audio/rtunes/distinfo b/audio/rtunes/distinfo new file mode 100644 index 000000000000..0643f0716331 --- /dev/null +++ b/audio/rtunes/distinfo @@ -0,0 +1,13 @@ +$NetBSD$ + +SHA1 (rtunes-snap-20071122.tar.bz2) = 8de9a4e7811785bf2fa05f1da85319942a38c000 +RMD160 (rtunes-snap-20071122.tar.bz2) = 8442a8f90a1a94bdeb61fb8bf1d94bcd861169ab +Size (rtunes-snap-20071122.tar.bz2) = 17785 bytes +SHA1 (patch-aa) = 6f4daa1a3adbc8f78f19d3224ecdaedebc4dffc5 +SHA1 (patch-ab) = de448ef28337874aef3704f013b0c8e914f6cdb4 +SHA1 (patch-ac) = 323085981da113f9cc118895af14a60b2ce6fba1 +SHA1 (patch-ad) = 199a0844ce3e62f53e5f34df00af3eb26ab8cbb6 +SHA1 (patch-ae) = 45afb27cd512e77aee74c4da1607f85fd5d15ee1 +SHA1 (patch-af) = 3a4b8e29943e29bf0b94028e3777b07e79a1b9b7 +SHA1 (patch-ag) = e5fb147e809875404a1cd239751b7d8667e0b927 +SHA1 (patch-ah) = 7c04858f66bce0e9def8689b4ecf0f1a5d2c3948 diff --git a/audio/rtunes/files/rtunes.conf b/audio/rtunes/files/rtunes.conf new file mode 100644 index 000000000000..459430f607cd --- /dev/null +++ b/audio/rtunes/files/rtunes.conf @@ -0,0 +1,11 @@ +# $NetBSD$ + +# This configuration file is very simple: It contains one line specifying +# the host to stream to, e.g. +# +# stream to your-raop-device.yourdomain.tld +# +# If you set the RTUNES_SERVER variable at build-time, pkgsrc +# has configured this file accordingly. If not, please add one to this +# file now. + diff --git a/audio/rtunes/patches/patch-aa b/audio/rtunes/patches/patch-aa new file mode 100644 index 000000000000..f7a7e47ae947 --- /dev/null +++ b/audio/rtunes/patches/patch-aa @@ -0,0 +1,13 @@ +$NetBSD$ + +--- rtunes/rtsp.c.orig 2006-09-17 08:14:05.000000000 -0400 ++++ rtunes/rtsp.c +@@ -207,7 +207,7 @@ rtsp_Announce(void) + len_header = snprintf(header, sizeof(header), + "%s" + "Content-Type: application/sdp\r\n" +- "Content-Length: %ld\r\n" ++ "Content-Length: %zd\r\n" + "\r\n", + rtsp_execreq("ANNOUNCE"), len_body); + diff --git a/audio/rtunes/patches/patch-ab b/audio/rtunes/patches/patch-ab new file mode 100644 index 000000000000..4eda86d9f243 --- /dev/null +++ b/audio/rtunes/patches/patch-ab @@ -0,0 +1,10 @@ +$NetBSD$ + +--- Makefile.orig 2006-05-06 04:24:03.000000000 -0400 ++++ Makefile +@@ -1,4 +1,3 @@ +-SUBDIR+= rtunes +-SUBDIR+= librtunes ++SUBDIR+= rtunes .WAIT librtunes + + .include diff --git a/audio/rtunes/patches/patch-ac b/audio/rtunes/patches/patch-ac new file mode 100644 index 000000000000..4d407d2c8c74 --- /dev/null +++ b/audio/rtunes/patches/patch-ac @@ -0,0 +1,33 @@ +$NetBSD$ + +--- rtunes/Makefile.orig 2006-05-06 18:49:18.000000000 -0400 ++++ rtunes/Makefile +@@ -2,25 +2,15 @@ + + PROG= rtunes +-SRCS= rtunes.c cipher.c mp4.c rtsp.c sys.c parse.y scan.l +- +-OS!= uname -s +-.if ${OS} != "OpenBSD" +-YFLAGS= -d +-SRCS+= y.tab.h +-y.tab.h: parse.y +-.endif ++SRCS= rtunes.c cipher.c mp4.c rtsp.c sys.c parse.c scan.l + + CFLAGS+= -Wall -Wstrict-prototypes -ansi + LDADD+= -lcrypto + LINTFLAGS+= -u ++NOGCCERROR= # defined ++YHEADER= # defined + + CLEANFILES+= y.tab.h + +-PIPE= -pipe +- + MAN= rtunes.1 rtunes.conf.5 +-MANDIR= /usr/local/man/cat +- +-BINDIR= /usr/local/bin + + .include diff --git a/audio/rtunes/patches/patch-ad b/audio/rtunes/patches/patch-ad new file mode 100644 index 000000000000..7b4ef03b47fd --- /dev/null +++ b/audio/rtunes/patches/patch-ad @@ -0,0 +1,25 @@ +$NetBSD$ + +--- librtunes/README.orig 2007-02-07 14:49:33.000000000 -0500 ++++ librtunes/README +@@ -19,16 +19,16 @@ Do the following steps to build MPlayer + + * build rtunes + * apply mplayer.diff to the MPlayer source directory +- * copy librtunes.a to your system library directory (e.g. /usr/lib) ++ * copy librtunes.a to your system library directory (e.g. @PREFIX@) + * build mplayer + +-Note: This works also for the OpenBSD port. Just use the MPlayer source in +- the ports working directory after doing a `make patch`. ++Note: This works also for the pkgsrc package. Just use the MPlayer source in ++ the appropriate ${WRKSRC} directory after invoking `make patch`. + + Usage + ----- + +-Now MPlayer should include rtunes support. Check if it worked by: ++Now MPlayer should include rtunes support. Check if it works by: + + mplayer -ao help + diff --git a/audio/rtunes/patches/patch-ae b/audio/rtunes/patches/patch-ae new file mode 100644 index 000000000000..682e2e9a9032 --- /dev/null +++ b/audio/rtunes/patches/patch-ae @@ -0,0 +1,53 @@ +$NetBSD$ + +--- librtunes/mplayer.diff.orig 2007-02-07 14:49:34.000000000 -0500 ++++ librtunes/mplayer.diff +@@ -1,6 +1,6 @@ +-diff -urN MPlayer-1.0pre8/Makefile MPlayer-1.0pre8-rtunes/Makefile +---- MPlayer-1.0pre8/Makefile Sun Jun 11 20:35:47 2006 +-+++ MPlayer-1.0pre8-rtunes/Makefile Wed Feb 7 20:26:10 2007 ++diff -urN Makefile Makefile.orig ++--- Makefile.orig Sun Jun 11 20:35:47 2006 +++++ Makefile Wed Feb 7 20:26:10 2007 + @@ -105,6 +105,8 @@ + $(X264_LIB) \ + $(MUSEPACK_LIB) \ +@@ -18,9 +18,9 @@ diff -urN MPlayer-1.0pre8/Makefile MPlay + libmpcodecs \ + libavutil \ + libavcodec \ +-diff -urN MPlayer-1.0pre8/libao2/Makefile MPlayer-1.0pre8-rtunes/libao2/Makefile +---- MPlayer-1.0pre8/libao2/Makefile Sun Jun 11 20:35:42 2006 +-+++ MPlayer-1.0pre8-rtunes/libao2/Makefile Wed Feb 7 19:42:13 2007 ++diff -urN libao2/Makefile libao2/Makefile.orig ++--- libao2/Makefile.orig Sun Jun 11 20:35:42 2006 +++++ libao2/Makefile Wed Feb 7 19:42:13 2007 + @@ -6,6 +6,7 @@ + ao_mpegpes.c \ + ao_null.c \ +@@ -29,9 +29,9 @@ diff -urN MPlayer-1.0pre8/libao2/Makefil + $(OPTIONAL_SRCS) \ + + OBJS=$(SRCS:.c=.o) +-diff -urN MPlayer-1.0pre8/libao2/ao_rtunes.c MPlayer-1.0pre8-rtunes/libao2/ao_rtunes.c +---- MPlayer-1.0pre8/libao2/ao_rtunes.c Thu Jan 1 01:00:00 1970 +-+++ MPlayer-1.0pre8-rtunes/libao2/ao_rtunes.c Wed Feb 7 19:45:43 2007 ++diff -urN libao2/ao_rtunes.c libao2/ao_rtunes.c.orig ++--- libao2/ao_rtunes.c.orig Thu Jan 1 01:00:00 1970 +++++ libao2/ao_rtunes.c Wed Feb 7 19:45:43 2007 + @@ -0,0 +1,142 @@ + +#include "config.h" + + +@@ -175,9 +175,9 @@ diff -urN MPlayer-1.0pre8/libao2/ao_rtun + +{ + + return (0.0); + +} +-diff -urN MPlayer-1.0pre8/libao2/audio_out.c MPlayer-1.0pre8-rtunes/libao2/audio_out.c +---- MPlayer-1.0pre8/libao2/audio_out.c Sun Jun 11 20:35:42 2006 +-+++ MPlayer-1.0pre8-rtunes/libao2/audio_out.c Wed Feb 7 19:47:07 2007 ++diff -urN libao2/audio_out.c libao2/audio_out.c.orig ++--- libao2/audio_out.c.orig Sun Jun 11 20:35:42 2006 +++++ libao2/audio_out.c Wed Feb 7 19:47:07 2007 + @@ -68,6 +68,7 @@ + extern ao_functions_t audio_out_mpegpes; + extern ao_functions_t audio_out_pcm; diff --git a/audio/rtunes/patches/patch-af b/audio/rtunes/patches/patch-af new file mode 100644 index 000000000000..dcffda23ecd6 --- /dev/null +++ b/audio/rtunes/patches/patch-af @@ -0,0 +1,18 @@ +$NetBSD$ + +--- libbsd/GNUmakefile.orig 2006-05-06 10:15:59.000000000 -0400 ++++ libbsd/GNUmakefile +@@ -5,10 +5,10 @@ libbsd.a: strlcpy.o strlcat.o arc4random + ranlib libbsd.a + + strlcpy.o: strlcpy.c +- cc ${CCFLAGS} strlcpy.c ++ %{CC} ${CCFLAGS} strlcpy.c + strlcat.o: strlcat.c +- cc ${CCFLAGS} strlcat.c ++ %{CC} ${CCFLAGS} strlcat.c + arc4random.o: arc4random.c +- cc ${CCFLAGS} arc4random.c ++ %{CC} ${CCFLAGS} arc4random.c + clean: + rm -f libbsd.a *.o diff --git a/audio/rtunes/patches/patch-ag b/audio/rtunes/patches/patch-ag new file mode 100644 index 000000000000..9edd9f7ecf88 --- /dev/null +++ b/audio/rtunes/patches/patch-ag @@ -0,0 +1,13 @@ +$NetBSD$ + +--- librtunes/GNUmakefile.orig 2006-05-21 14:03:08.000000000 -0400 ++++ librtunes/GNUmakefile +@@ -6,7 +6,7 @@ librtunes.a: rtunes.o ${RT}/cipher.o ${R + ar -r librtunes.a rtunes.o ${RT}/cipher.o ${RT}/mp4.o ${RT}/rtsp.o ${RT}/sys.o ${LB}/arc4random.o ${LB}/strlcat.o ${LB}/strlcpy.o + + rtunes.o: rtunes.c +- cc ${CCFLAGS} rtunes.c ++ ${CC} ${CCFLAGS} rtunes.c + + clean: + rm -f librtunes.a *.o diff --git a/audio/rtunes/patches/patch-ah b/audio/rtunes/patches/patch-ah new file mode 100644 index 000000000000..dc134d0bfba5 --- /dev/null +++ b/audio/rtunes/patches/patch-ah @@ -0,0 +1,44 @@ +$NetBSD$ + +--- rtunes/GNUmakefile.orig 2006-05-06 10:02:13.000000000 -0400 ++++ rtunes/GNUmakefile +@@ -3,31 +3,31 @@ + CCFLAGS = -O2 -pipe -Wall -Wstrict-prototypes -c + + rtunes: rtunes.o cipher.o mp4.o rtsp.o sys.o parse.o scan.o +- cc -L../libbsd -o rtunes rtunes.o cipher.o mp4.o rtsp.o sys.o parse.o scan.o -lbsd -lcrypto ++ ${CC} -L../libbsd -o rtunes rtunes.o cipher.o mp4.o rtsp.o sys.o parse.o scan.o -lbsd -lcrypto + strip rtunes + + rtunes.o: rtunes.c +- cc ${CCFLAGS} rtunes.c ++ ${CC} ${CCFLAGS} rtunes.c + + cipher.o: cipher.c +- cc ${CCFLAGS} cipher.c ++ ${CC} ${CCFLAGS} cipher.c + + mp4.o: mp4.c +- cc ${CCFLAGS} mp4.c ++ ${CC} ${CCFLAGS} mp4.c + + rtsp.o: rtsp.c +- cc ${CCFLAGS} rtsp.c ++ ${CC} ${CCFLAGS} rtsp.c + + sys.o: sys.c +- cc ${CCFLAGS} sys.c ++ ${CC} ${CCFLAGS} sys.c + + parse.o: parse.y + yacc -d parse.y +- cc ${CCFLAGS} -o parse.o y.tab.c ++ ${CC} ${CCFLAGS} -o parse.o y.tab.c + + scan.o: scan.l + lex scan.l +- cc ${CCFLAGS} -o scan.o lex.yy.c ++ ${CC} ${CCFLAGS} -o scan.o lex.yy.c + + clean: + rm -f rtunes y.tab.c y.tab.h lex.yy.c *.o -- 2.41.0