summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--media-sound/.gitignore1
-rw-r--r--media-sound/squeezelite/ChangeLog13
-rw-r--r--media-sound/squeezelite/Manifest7
-rw-r--r--media-sound/squeezelite/files/squeezelite-0.7_alpha_p2-gentoo-makefile.patch20
-rw-r--r--media-sound/squeezelite/files/squeezelite-0.7_alpha_p2-gentoo-optional-codecs.patch154
-rw-r--r--media-sound/squeezelite/files/squeezelite.conf.d23
-rwxr-xr-xmedia-sound/squeezelite/files/squeezelite.init.d32
-rw-r--r--media-sound/squeezelite/metadata.xml35
-rw-r--r--media-sound/squeezelite/squeezelite-0.7_alpha_p2.ebuild73
9 files changed, 358 insertions, 0 deletions
diff --git a/media-sound/.gitignore b/media-sound/.gitignore
new file mode 100644
index 0000000..b25c15b
--- /dev/null
+++ b/media-sound/.gitignore
@@ -0,0 +1 @@
+*~
diff --git a/media-sound/squeezelite/ChangeLog b/media-sound/squeezelite/ChangeLog
new file mode 100644
index 0000000..f6a6a27
--- /dev/null
+++ b/media-sound/squeezelite/ChangeLog
@@ -0,0 +1,13 @@
+# ChangeLog for media-sound/squeezelite
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+*squeezelite-0.7_alpha_p2 (21 Dec 2012)
+
+ 21 Dec 2012; Stuart Hickinbottom <stuart@hickinbottom.com>
+ +squeezelite-0.7_alpha_p2.ebuild,
+ +files/squeezelite-0.7_alpha_p2-gentoo-makefile.patch,
+ +files/squeezelite-0.7_alpha_p2-gentoo-optional-codecs.patch,
+ +files/squeezelite.conf.d, +files/squeezelite.init.d, +metadata.xml:
+ Added ebuild for Squeezelite, a small headless Squeezebox emulator.
+
diff --git a/media-sound/squeezelite/Manifest b/media-sound/squeezelite/Manifest
new file mode 100644
index 0000000..4edace5
--- /dev/null
+++ b/media-sound/squeezelite/Manifest
@@ -0,0 +1,7 @@
+AUX squeezelite-0.7_alpha_p2-gentoo-makefile.patch 766 SHA256 579a342fccd7e21572b4d3548305e15bd713a2983525cc25df5f14d2d1a717d9 SHA512 5cb64b288793e3ce556d95cbc8bd807a623e9a8b1e5db41b8bb45f726ab875b584f7846a5c634a228d4d6333aee353e017fda571cc81c5bd9f6c2b3218db604c WHIRLPOOL 5b05ad99361dc4bc85a53d5083171aac752b50edec6b38d677c0731854578f162bd9ebc501dfb85c2ed75f3305d070184e6bf6e70e8ab47f2159e5837bf74278
+AUX squeezelite-0.7_alpha_p2-gentoo-optional-codecs.patch 3906 SHA256 cd6687eb241cda6b049d75e04b3a3139a2550465f3976e973570bd0ad5ba9b0d SHA512 00b6bb86993b444ba002686a741e8cc32e01e9d804680f2778aa3ddf99505c302018d8c06050955c0e713dd6d2233d948d64a28893215cfbb19dd048f685fc61 WHIRLPOOL 74663d83d3ac91662ed4cadfc77a4b30beea54c9f2a3839761b23779c08bcfb1994d96aae3e6775b31653b1a9c798e36d14a2ed2699d7c3f663b310b0fabf98b
+AUX squeezelite.conf.d 903 SHA256 7e8819305991509e271f693741b8990c3db97065db3891472ba9eb19e5c2143a SHA512 813f1f29dab07a6ca74222996d67a48088748622c50324e1027b62dd371a0ad53f32c5e9dc1bcb5f1748744930453029266f29079ae7c85da67ea44e792a0f7f WHIRLPOOL 3faa95b2e79de80275832c78cc92eeba936cb3e59d9e0598a131f0149c0e043a1364a6516b929b4dc43f11738c61921ceba24a87105742b07305727e52188a24
+AUX squeezelite.init.d 604 SHA256 189b31e2d613bb8330f1314fcfc34aa90ab0f0c9f5fe84930bb64223acba3020 SHA512 ed45db42fcb25622bb56ffcdc00545f9d604949e12ee08951ca3b9c377430562d53a8d7cb343dfce4ad3b9ca0dfb659070bdfee5b4db0ba86d88a271933d2d4f WHIRLPOOL 4e71775feed5b518f3421d38155f0250c4e3edc1b72fbe8509c1df29dad0b1a749fedc21dfe299b388dde33fb284a41628df774979574ca7d444f5dc6cbfeea3
+DIST 866fcc7c7e14f354da27fd64f50069e762abd835.zip 127144 SHA256 7c5f87a6dd4609f8f48a7404bbb6c96168a1b637d92c4715786fa886a251dd6e SHA512 1e0cc4f90ebf0da8aa4193be43cb138cf0cc34850fcbbc0455dc7a8cb37bb4290a5a49943bce89d1b0e5657b5a25ae24063b884d6683d38ee70917a16e7667e1 WHIRLPOOL 54c4f9f5797b45058b1f068ba65353df9ae5a3cc5573f03d2a64a26e0bdd893f8dfcf8dc2de3e1c13802bac93f1ccb49fd4e68738c4549a75e0990bab812da34
+EBUILD squeezelite-0.7_alpha_p2.ebuild 1925 SHA256 33182a19db859d7eeec8c9efeab07ef86f73eb0df5459558da7c7b2bf8120591 SHA512 b4f70bfaa432fd60cc9e757ff60b56219a4f263a1813c4cd3957c617f7465af5a7d8a08f48b5399aef0e7735dc437cc5b958169a8c23443d41b62a4608999ef0 WHIRLPOOL f2816c25a5cf14c3395e50e68bead0b0aa36c7aa48d5d6ab4a99d6ffbc1ee41148565122fe5de29a1154600116664082868c5b72ab37f6ddfb359ccfd18bb7f6
+MISC metadata.xml 1652 SHA256 e43ac5a13b31075363db76645071cf9fca1cc4ea47f72dfac52cd0d1f233882c SHA512 3bdfca19af0312743d6a4954aceb15502efd3d353b48e979aa44280840c2b82c278757659b59457b2e3d0dcc5f54a72fffd8c51d0e08fc935a8ffbe7a79ecdf9 WHIRLPOOL 66fa4ea466043c6bf0514d8a0d07eb652d3ffe5d6a5d601a758f463e8265a2dedde883bf3eecd102a89062f1574c311e6c65a1dbb37386a1d5bc829eda5e1ed6
diff --git a/media-sound/squeezelite/files/squeezelite-0.7_alpha_p2-gentoo-makefile.patch b/media-sound/squeezelite/files/squeezelite-0.7_alpha_p2-gentoo-makefile.patch
new file mode 100644
index 0000000..302db6f
--- /dev/null
+++ b/media-sound/squeezelite/files/squeezelite-0.7_alpha_p2-gentoo-makefile.patch
@@ -0,0 +1,20 @@
+diff --git a/Makefile b/Makefile
+index d1aaf3c..038ab84 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,10 +1,12 @@
+-CFLAGS = -Wall -fPIC -O2
+-LDFLAGS = -lasound -lpthread -ldl -lrt
++MYLIBS = -lasound -lpthread -ldl -lrt
+
+ all: squeezelite
+
++clean:
++ rm *.o squeezelite 2>/dev/null || true
++
+ squeezelite: main.o slimproto.o utils.o output.o buffer.o stream.o decode.o flac.o pcm.o mad.o vorbis.o faad.o
+- $(CC) $(CFLAGS) main.o slimproto.o utils.o output.o buffer.o stream.o decode.o flac.o pcm.o mad.o vorbis.o faad.o $(LDFLAGS) -o squeezelite
++ $(CC) $(CFLAGS) main.o slimproto.o utils.o output.o buffer.o stream.o decode.o flac.o pcm.o mad.o vorbis.o faad.o $(LDFLAGS) $(MYLIBS) -o squeezelite
+
+ main.o: main.c squeezelite.h
+ $(CC) $(CFLAGS) -c main.c -o main.o
diff --git a/media-sound/squeezelite/files/squeezelite-0.7_alpha_p2-gentoo-optional-codecs.patch b/media-sound/squeezelite/files/squeezelite-0.7_alpha_p2-gentoo-optional-codecs.patch
new file mode 100644
index 0000000..99653d0
--- /dev/null
+++ b/media-sound/squeezelite/files/squeezelite-0.7_alpha_p2-gentoo-optional-codecs.patch
@@ -0,0 +1,154 @@
+diff --git a/Makefile b/Makefile
+index 038ab84..f3385d3 100644
+--- a/Makefile
++++ b/Makefile
+@@ -9,37 +9,37 @@ squeezelite: main.o slimproto.o utils.o output.o buffer.o stream.o decode.o flac
+ $(CC) $(CFLAGS) main.o slimproto.o utils.o output.o buffer.o stream.o decode.o flac.o pcm.o mad.o vorbis.o faad.o $(LDFLAGS) $(MYLIBS) -o squeezelite
+
+ main.o: main.c squeezelite.h
+- $(CC) $(CFLAGS) -c main.c -o main.o
++ $(CC) $(CPPFLAGS) $(CFLAGS) -c main.c -o main.o
+
+ slimproto.o: slimproto.c squeezelite.h slimproto.h
+- $(CC) $(CFLAGS) -c slimproto.c -o slimproto.o
++ $(CC) $(CPPFLAGS) $(CFLAGS) -c slimproto.c -o slimproto.o
+
+ utils.o: utils.c squeezelite.h
+- $(CC) $(CFLAGS) -c utils.c -o utils.o
++ $(CC) $(CPPFLAGS) $(CFLAGS) -c utils.c -o utils.o
+
+ output.o: output.c squeezelite.h
+- $(CC) $(CFLAGS) -c output.c -o output.o
++ $(CC) $(CPPFLAGS) $(CFLAGS) -c output.c -o output.o
+
+ buffer.o: buffer.c squeezelite.h
+- $(CC) $(CFLAGS) -c buffer.c -o buffer.o
++ $(CC) $(CPPFLAGS) $(CFLAGS) -c buffer.c -o buffer.o
+
+ stream.o: stream.c squeezelite.h
+- $(CC) $(CFLAGS) -c stream.c -o stream.o
++ $(CC) $(CPPFLAGS) $(CFLAGS) -c stream.c -o stream.o
+
+ decode.o: decode.c squeezelite.h
+- $(CC) $(CFLAGS) -c decode.c -o decode.o
++ $(CC) $(CPPFLAGS) $(CFLAGS) -c decode.c -o decode.o
+
+ flac.o: flac.c squeezelite.h
+- $(CC) $(CFLAGS) -c flac.c -o flac.o
++ $(CC) $(CPPFLAGS) $(CFLAGS) -c flac.c -o flac.o
+
+ pcm.o: pcm.c squeezelite.h
+- $(CC) $(CFLAGS) -c pcm.c -o pcm.o
++ $(CC) $(CPPFLAGS) $(CFLAGS) -c pcm.c -o pcm.o
+
+ mad.o: mad.c squeezelite.h
+- $(CC) $(CFLAGS) -c mad.c -o mad.o
++ $(CC) $(CPPFLAGS) $(CFLAGS) -c mad.c -o mad.o
+
+ vorbis.o: vorbis.c squeezelite.h
+- $(CC) $(CFLAGS) -c vorbis.c -o vorbis.o
++ $(CC) $(CPPFLAGS) $(CFLAGS) -c vorbis.c -o vorbis.o
+
+ faad.o: faad.c squeezelite.h
+- $(CC) $(CFLAGS) -c faad.c -o faad.o
++ $(CC) $(CPPFLAGS) $(CFLAGS) -c faad.c -o faad.o
+diff --git a/decode.c b/decode.c
+index 9839d2e..340f580 100644
+--- a/decode.c
++++ b/decode.c
+@@ -95,11 +95,19 @@ void decode_init(log_level level, const char *opt) {
+ // register codecs
+ // alc,wma,wmap,wmal,aac,spt,ogg,ogf,flc,aif,pcm,mp3
+ int i = 0;
++#ifndef SL_NO_AAC
+ if (!opt || !strcmp(opt, "aac")) codecs[i++] = register_faad();
++#endif
++#ifndef SL_NO_OGG
+ if (!opt || !strcmp(opt, "ogg")) codecs[i++] = register_vorbis();
++#endif
++#ifndef SL_NO_FLAC
+ if (!opt || !strcmp(opt, "flac")) codecs[i++] = register_flac();
++#endif
+ if (!opt || !strcmp(opt, "pcm")) codecs[i++] = register_pcm();
++#ifndef SL_NO_MP3
+ if (!opt || !strcmp(opt, "mp3")) codecs[i++] = register_mad();
++#endif
+
+ pthread_attr_t attr;
+ pthread_attr_init(&attr);
+diff --git a/faad.c b/faad.c
+index 40b18a0..71cc77f 100644
+--- a/faad.c
++++ b/faad.c
+@@ -20,6 +20,8 @@
+
+ #include "squeezelite.h"
+
++#ifndef SL_NO_AAC
++
+ #include <neaacdec.h>
+ #include <dlfcn.h>
+
+@@ -569,3 +571,5 @@ struct codec *register_faad(void) {
+
+ return &ret;
+ }
++
++#endif
+diff --git a/flac.c b/flac.c
+index 07e9c55..020a8eb 100644
+--- a/flac.c
++++ b/flac.c
+@@ -20,6 +20,8 @@
+
+ #include "squeezelite.h"
+
++#ifndef SL_NO_FLAC
++
+ #include <FLAC/stream_decoder.h>
+ #include <dlfcn.h>
+
+@@ -212,3 +214,5 @@ struct codec *register_flac(void) {
+
+ return &ret;
+ }
++
++#endif
+diff --git a/mad.c b/mad.c
+index 842ec77..3ae14c7 100644
+--- a/mad.c
++++ b/mad.c
+@@ -20,6 +20,8 @@
+
+ #include "squeezelite.h"
+
++#ifndef SL_NO_MP3
++
+ #include <mad.h>
+ #include <dlfcn.h>
+
+@@ -298,3 +300,5 @@ struct codec *register_mad(void) {
+
+ return &ret;
+ }
++
++#endif
+diff --git a/vorbis.c b/vorbis.c
+index 3aa820e..5ecc024 100644
+--- a/vorbis.c
++++ b/vorbis.c
+@@ -20,6 +20,8 @@
+
+ #include "squeezelite.h"
+
++#ifndef SL_NO_OGG
++
+ // automatically select between floating point (preferred) and fixed point libraries:
+ #define LIBVORBIS "libvorbisfile.so.3"
+ #define LIBTREMOR "libvorbisidec.so.1"
+@@ -236,3 +238,5 @@ struct codec *register_vorbis(void) {
+
+ return &ret;
+ }
++
++#endif
diff --git a/media-sound/squeezelite/files/squeezelite.conf.d b/media-sound/squeezelite/files/squeezelite.conf.d
new file mode 100644
index 0000000..0bfe98f
--- /dev/null
+++ b/media-sound/squeezelite/files/squeezelite.conf.d
@@ -0,0 +1,23 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+# Configuration for /etc/init.d/squeezelite
+
+# IP address of Logitech Media Server; leave this blank to try to
+# locate the server via auto-discovery.
+SL_SERVERIP=""
+
+# User that Squeezelite should run as. The dedicated 'squeezelite'
+# user is preferred to avoid running with high privilege. This user
+# should be a member of the 'audio' group to allow access to the audio
+# hardware. Running as the 'root' user allows the sound output thread
+# to run at a very high priority -- this can help avoid gaps in
+# playback, but could be a potential security problem if there are
+# exploitable vulnerabilities in Squeezelite.
+SL_USER=squeezelite
+
+# Any other switches to pass to Squeezelite. See 'squeezelite -h' for
+# a description of all possible switches.
+SL_OPTS=""
diff --git a/media-sound/squeezelite/files/squeezelite.init.d b/media-sound/squeezelite/files/squeezelite.init.d
new file mode 100755
index 0000000..7d07b1d
--- /dev/null
+++ b/media-sound/squeezelite/files/squeezelite.init.d
@@ -0,0 +1,32 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+depend() {
+ need net
+ use alsasound
+ after bootmisc
+}
+
+start() {
+ ebegin "Starting squeezelite"
+ start-stop-daemon \
+ --start \
+ --exec /usr/bin/squeezelite \
+ --pidfile /var/run/squeezelite.pid \
+ --make-pidfile \
+ --user ${SL_USER} \
+ --background \
+ ${SL_OPTS} ${SL_SERVERIP}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping squeezelite"
+ start-stop-daemon \
+ --stop \
+ --exec /usr/bin/squeezelite \
+ --pidfile /var/run/squeezelite.pid
+ eend $?
+}
diff --git a/media-sound/squeezelite/metadata.xml b/media-sound/squeezelite/metadata.xml
new file mode 100644
index 0000000..ffd1107
--- /dev/null
+++ b/media-sound/squeezelite/metadata.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>stuart@hickinbottom.com</email>
+ <name>Stuart Hickinbottom</name>
+ </maintainer>
+ <longdescription lang="en">
+ Squeezelite is a small headless Logitech Squeezebox emulator for
+ Linux using ALSA audio output. It is aimed at supporting high
+ quality audio including USB DAC-based output at multiple sample
+ rates including 44.1/48/88.2/96/176.4/192k.
+
+ Squeezelite can act as a player for an instance of the Logitech
+ Media Server that is running on the same machine, or can act as a
+ player for an instance of the server that is running on a remote
+ machine. Logitech Media Server for Gentoo is provided by
+ <pkg>media-sound/logitechmediaserver-bin</pkg>.
+ </longdescription>
+ <upstream>
+ <maintainer>
+ <email>triode1@btinternet.com</email>
+ <name>Adrian Smith</name>
+ </maintainer>
+ <doc>https://code.google.com/p/squeezelite</doc>
+ <bugs-to>https://code.google.com/p/squeezelite/issues/list</bugs-to>
+ <remote-id type="google-code">squeezelite</remote-id>
+ </upstream>
+ <use>
+ <flag name='mp3'>Supports streaming MP3 from the server, utilising <pkg>media-libs/libmad</pkg></flag>
+ <flag name='flac'>Supports streaming FLAC from the server, utilising <pkg>media-libs/flac</pkg></flag>
+ <flag name='vorbis'>Supports streaming Ogg/Vorbis from the server, utilising <pkg>media-libs/libvorbis</pkg></flag>
+ <flag name='aac'>Supports streaming AAC from the server, utilising <pkg>media-libs/faad2</pkg></flag>
+ </use>
+</pkgmetadata>
diff --git a/media-sound/squeezelite/squeezelite-0.7_alpha_p2.ebuild b/media-sound/squeezelite/squeezelite-0.7_alpha_p2.ebuild
new file mode 100644
index 0000000..b92d022
--- /dev/null
+++ b/media-sound/squeezelite/squeezelite-0.7_alpha_p2.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+inherit eutils flag-o-matic
+
+DESCRIPTION="Squeezelite is a small headless Squeezebox emulator for Linux using ALSA audio output"
+HOMEPAGE="https://code.google.com/p/squeezelite"
+SRC_URI="https://squeezelite.googlecode.com/archive/866fcc7c7e14f354da27fd64f50069e762abd835.zip"
+S="${WORKDIR}/squeezelite-866fcc7c7e14"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="flac vorbis mp3 aac"
+
+DEPEND="media-libs/alsa-lib
+ flac? ( media-libs/flac )
+ vorbis? ( media-libs/libvorbis )
+ mp3? ( media-libs/libmad )
+ aac? ( media-libs/faad2 )
+"
+RDEPEND="${DEPEND}
+ media-sound/alsa-utils"
+
+pkg_setup() {
+ # Create the user and group if not already present
+ enewuser squeezelite -1 -1 "/dev/null" audio
+}
+
+src_prepare () {
+ epatch "${FILESDIR}/${P}-gentoo-makefile.patch"
+ epatch "${FILESDIR}/${P}-gentoo-optional-codecs.patch"
+}
+
+src_compile() {
+
+ # Configure optional codec support; this is added to the original
+ # source via a patch in this ebuild at present.
+ if ! use flac; then
+ append-cppflags "-DSL_NO_FLAC"
+ einfo "FLAC support disabled; add 'flac' USE flag if you need it"
+ fi
+ if ! use vorbis; then
+ append-cppflags "-DSL_NO_OGG"
+ einfo "Ogg/Vorbis support disabled; add 'vorbis' USE flag if you need it"
+ fi
+ if ! use mp3; then
+ append-cppflags "-DSL_NO_MP3"
+ einfo "MP3 support disabled; add 'mp3' USE flag if you need it"
+ fi
+ if ! use aac; then
+ append-cppflags "-DSL_NO_AAC"
+ einfo "AAC support disabled; add 'aac' USE flag if you need it"
+ fi
+
+ emake || die "emake failed"
+}
+
+src_install() {
+ dobin squeezelite
+ dodoc LICENSE.txt
+
+ newconfd "${FILESDIR}/${PN}.conf.d" "${PN}"
+ newinitd "${FILESDIR}/${PN}.init.d" "${PN}"
+
+ # need init.d script
+ # need default conf.d script
+ # need a post-install notice to edit /etc/conf.d/squeezelite to
+ # configure the audio device
+}