diff options
author | Tim Harder <radhermit@gentoo.org> | 2011-12-04 22:18:43 +0000 |
---|---|---|
committer | Tim Harder <radhermit@gentoo.org> | 2011-12-04 22:18:43 +0000 |
commit | 37a6f40f1cbcff8bc107c289f4baf2e7f18123d8 (patch) | |
tree | e5cc84c53a10f50db045dd9dd96bad5e78244b0d /media-sound/squeezeslave | |
parent | arm stable, bug #392245 (diff) | |
download | gentoo-2-37a6f40f1cbcff8bc107c289f4baf2e7f18123d8.tar.gz gentoo-2-37a6f40f1cbcff8bc107c289f4baf2e7f18123d8.tar.bz2 gentoo-2-37a6f40f1cbcff8bc107c289f4baf2e7f18123d8.zip |
Version bump to new snapshot. Simplify init script using baselayout-2 enhancements.
(Portage version: 2.2.0_alpha79/cvs/Linux x86_64)
Diffstat (limited to 'media-sound/squeezeslave')
4 files changed, 155 insertions, 16 deletions
diff --git a/media-sound/squeezeslave/ChangeLog b/media-sound/squeezeslave/ChangeLog index ddce304be8cd..8423bf8dea3a 100644 --- a/media-sound/squeezeslave/ChangeLog +++ b/media-sound/squeezeslave/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for media-sound/squeezeslave # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/squeezeslave/ChangeLog,v 1.2 2011/10/19 05:00:29 radhermit Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-sound/squeezeslave/ChangeLog,v 1.3 2011/12/04 22:18:43 radhermit Exp $ + +*squeezeslave-1.1_p309 (04 Dec 2011) + + 04 Dec 2011; Tim Harder <radhermit@gentoo.org> +squeezeslave-1.1_p309.ebuild, + +files/squeezeslave-1.1_p309-ffmpeg.patch, files/squeezeslave.initd: + Version bump to new snapshot. Simplify init script using baselayout-2 + enhancements. *squeezeslave-1.1_p286 (19 Oct 2011) diff --git a/media-sound/squeezeslave/files/squeezeslave-1.1_p309-ffmpeg.patch b/media-sound/squeezeslave/files/squeezeslave-1.1_p309-ffmpeg.patch new file mode 100644 index 000000000000..70a88dde4348 --- /dev/null +++ b/media-sound/squeezeslave/files/squeezeslave-1.1_p309-ffmpeg.patch @@ -0,0 +1,95 @@ +--- squeezeslave-1.1_p309/src/slimaudio/slimaudio_decoder_aac.c.orig ++++ squeezeslave-1.1_p309/src/slimaudio/slimaudio_decoder_aac.c +@@ -28,6 +28,10 @@ + #include <libavcodec/avcodec.h> + #include <libavformat/avformat.h> + ++#ifndef CODEC_TYPE_AUDIO ++#define CODEC_TYPE_AUDIO AVMEDIA_TYPE_AUDIO ++#endif ++ + #include "slimproto/slimproto.h" + #include "slimaudio/slimaudio.h" + +@@ -96,11 +100,6 @@ + } + + int slimaudio_decoder_aac_process(slimaudio_t *audio) { +-// unsigned char data[AUDIO_CHUNK_SIZE]; +-// int buffer[AUDIO_CHUNK_SIZE/2]; +-// int i; +- +-// unsigned char *ptr = data; + char streamformat[16]; + int out_size; + int len = 0; +@@ -148,18 +147,6 @@ + + DEBUGF ("aac: play audioStream: %d\n", audioStream); + +- AVInputFormat* pAVInputFormat = av_find_input_format(streamformat); +- if( !pAVInputFormat ) +- { +- DEBUGF("aac: probe failed\n"); +- return -1; +- } +- else +- { +- DEBUGF("aac: probe ok name:%s lname:%s\n", pAVInputFormat->name, pAVInputFormat->long_name); +- pAVInputFormat->flags |= AVFMT_NOFILE; +- } +- + inbuf = av_malloc(AUDIO_INBUF_SIZE + FF_INPUT_BUFFER_PADDING_SIZE); + if ( !inbuf ) + { +@@ -167,23 +154,35 @@ + return -1; + } + +- ByteIOContext ByteIOCtx; ++ AVIOContext *AVIOCtx; + +- iRC = init_put_byte( &ByteIOCtx, inbuf, AUDIO_CHUNK_SIZE, 0, audio, av_read_data, NULL, NULL ) ; +- if( iRC < 0) ++ AVIOCtx = avio_alloc_context(inbuf, AUDIO_CHUNK_SIZE, 0, audio, av_read_data, NULL, NULL); ++ if ( AVIOCtx == NULL ) + { +- DEBUGF("aac: init_put_byte failed:%d\n", iRC); ++ DEBUGF("aac: avio_alloc_context failed.\n"); + return -1; + } + else + { +- ByteIOCtx.is_streamed = 1; ++ AVIOCtx->is_streamed = 1; ++ } ++ ++ AVInputFormat* pAVInputFormat = av_find_input_format(streamformat); ++ if( !pAVInputFormat ) ++ { ++ DEBUGF("aac: probe failed\n"); ++ return -1; ++ } ++ else ++ { ++ DEBUGF("aac: probe ok name:%s lname:%s\n", pAVInputFormat->name, pAVInputFormat->long_name); ++ pAVInputFormat->flags |= AVFMT_NOFILE; + } + + AVFormatContext* pFormatCtx; + AVCodecContext *pCodecCtx; + +- iRC = av_open_input_stream(&pFormatCtx, &ByteIOCtx, "", pAVInputFormat, NULL); ++ iRC = av_open_input_stream(&pFormatCtx, AVIOCtx, "", pAVInputFormat, NULL); + + if (iRC < 0) + { +@@ -261,7 +260,7 @@ + eos=true; + } + +- if ( url_feof(pFormatCtx->pb) ) ++ if ( pFormatCtx->pb->eof_reached ) + { + DEBUGF("aac: url_feof\n"); + eos=true; diff --git a/media-sound/squeezeslave/files/squeezeslave.initd b/media-sound/squeezeslave/files/squeezeslave.initd index ea9f1f755f7a..efa5c140dbff 100644 --- a/media-sound/squeezeslave/files/squeezeslave.initd +++ b/media-sound/squeezeslave/files/squeezeslave.initd @@ -1,23 +1,14 @@ #!/sbin/runscript # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/squeezeslave/files/squeezeslave.initd,v 1.1 2011/08/09 08:01:28 radhermit Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-sound/squeezeslave/files/squeezeslave.initd,v 1.2 2011/12/04 22:18:43 radhermit Exp $ + +command="/usr/bin/${SVCNAME}" +command_args="--daemonize ${SS_LOG} --mac ${SS_MAC} --retry ${SBS_HOST} ${SS_OPTS}" +pidfile="/var/run/${SVCNAME}.pid" +start_stop_daemon_args="--background --quiet --make-pidfile" depend() { need net use squeezeboxserver } - -start() { - ebegin "Starting squeezeslave" - start-stop-daemon --start --quiet --background --pidfile /var/run/squeezeslave.pid \ - --make-pidfile --exec /usr/bin/squeezeslave -- \ - --daemonize "${SS_LOG}" --mac ${SS_MAC} --retry ${SBS_HOST} ${SS_OPTS} - eend $? "Failed to start squeezeslave" -} - -stop() { - ebegin "Stopping squeezeslave" - start-stop-daemon --stop --pid /var/run/squeezeslave.pid - eend $? "Failed to stop squeezeslave" -} diff --git a/media-sound/squeezeslave/squeezeslave-1.1_p309.ebuild b/media-sound/squeezeslave/squeezeslave-1.1_p309.ebuild new file mode 100644 index 000000000000..f196184c5a34 --- /dev/null +++ b/media-sound/squeezeslave/squeezeslave-1.1_p309.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-sound/squeezeslave/squeezeslave-1.1_p309.ebuild,v 1.1 2011/12/04 22:18:43 radhermit Exp $ + +EAPI="4" + +inherit eutils toolchain-funcs + +DESCRIPTION="A lightweight streaming audio player for squeezeboxserver" +HOMEPAGE="http://squeezeslave.googlecode.com" +SRC_URI="http://dev.gentoo.org/~radhermit/distfiles/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="aac +alsa display wma zones" + +RDEPEND="media-libs/libmad + media-libs/flac + media-libs/libvorbis + media-libs/libogg + media-libs/portaudio[alsa?] + aac? ( virtual/ffmpeg ) + wma? ( virtual/ffmpeg ) + display? ( app-misc/lirc )" +DEPEND="${RDEPEND} + app-arch/xz-utils + dev-util/pkgconfig" + +src_prepare() { + for i in display aac wma zones ; do + ! use $i && sed -i -e "/$i/Id" Makefile + done + + epatch "${FILESDIR}"/${P}-ffmpeg.patch + + tc-export CC AR RANLIB +} + +src_install() { + dobin bin/${PN} + dodoc ChangeLog TODO + + newconfd "${FILESDIR}"/${PN}.confd ${PN} + newinitd "${FILESDIR}"/${PN}.initd ${PN} +} |