diff options
author | Paul Healy <lmiphay@gmail.com> | 2019-08-12 20:49:05 +0100 |
---|---|---|
committer | Paul Healy <lmiphay@gmail.com> | 2019-08-12 20:49:05 +0100 |
commit | 28d6c70a73c10dd159bd6fe16379a98212eb959d (patch) | |
tree | 536185c370950fbbf9299db44651fc06f0cb8715 | |
parent | revbump homeassistant (diff) | |
download | lmiphay-28d6c70a73c10dd159bd6fe16379a98212eb959d.tar.gz lmiphay-28d6c70a73c10dd159bd6fe16379a98212eb959d.tar.bz2 lmiphay-28d6c70a73c10dd159bd6fe16379a98212eb959d.zip |
revbump squeezelite; fixes #7
Signed-off-by: Paul Healy <lmiphay@gmail.com>
4 files changed, 256 insertions, 0 deletions
diff --git a/media-sound/squeezelite/Manifest b/media-sound/squeezelite/Manifest index 7b6be35..24c3ad0 100644 --- a/media-sound/squeezelite/Manifest +++ b/media-sound/squeezelite/Manifest @@ -11,6 +11,8 @@ AUX squeezelite-1.8.7.1007-gentoo-optional-codecs-decode.patch 2217 BLAKE2B 3685 AUX squeezelite-1.8.7.1007-gentoo-optional-codecs.patch 1789 BLAKE2B 33fa43d44a7c2a612863c317a6244dfe0199e496dea349822991093bece435bfa4c25349f69d263fa53828058693b1b632cd216ca5fe1243a78238457e195174 SHA512 5adc75cf66b07fcee0faf6e9f8d46623ec76ae0c091fad975ab0acbaa25da9648806d7c3cb3e55e9eef8ad5088b8f2d95c70b0d85966316035f7a5711c8a0a43 AUX squeezelite-1.9.0.1105-gentoo-optional-codecs-decode.patch 1991 BLAKE2B 790e0d25406a31000ba3b49982956b665ee53dd39eef31b1d8205438ff2f452e12918cc0579862b5c90dd21c456a65e0e9a260f819f69550aace8e35be2c4a68 SHA512 3063d38af9be4b2ea8113444bdbabaff1c034f121b3ef11be530e3ede5ec4496c51f3b58e508ec44b433949a1e645c3b644deb73c78a345683365d0af48075d4 AUX squeezelite-1.9.0.1105-gentoo-optional-codecs.patch 1789 BLAKE2B 33fa43d44a7c2a612863c317a6244dfe0199e496dea349822991093bece435bfa4c25349f69d263fa53828058693b1b632cd216ca5fe1243a78238457e195174 SHA512 5adc75cf66b07fcee0faf6e9f8d46623ec76ae0c091fad975ab0acbaa25da9648806d7c3cb3e55e9eef8ad5088b8f2d95c70b0d85966316035f7a5711c8a0a43 +AUX squeezelite-1.9.4.1182-gentoo-optional-codecs-decode.patch 2205 BLAKE2B 8777f44e4ac3e65eb5da6acc58b9fab47503f895102feb82df98ed3abcbd4272d890c706b8c216d64e05c8a410ffb8a0570e4a9a25c2681e210b895446e05491 SHA512 aa058c8fbbfabdf1ad87fac355a8a29bb2ec4da4b570489ce50a1bd8dcbf9e58096c5ea7c25046ba9ed3fa0e54671b4987b63732ef7269171acd150decf33eb4 +AUX squeezelite-1.9.4.1182-gentoo-optional-codecs.patch 1789 BLAKE2B 33fa43d44a7c2a612863c317a6244dfe0199e496dea349822991093bece435bfa4c25349f69d263fa53828058693b1b632cd216ca5fe1243a78238457e195174 SHA512 5adc75cf66b07fcee0faf6e9f8d46623ec76ae0c091fad975ab0acbaa25da9648806d7c3cb3e55e9eef8ad5088b8f2d95c70b0d85966316035f7a5711c8a0a43 AUX squeezelite.conf.d 450 BLAKE2B 5f33c0e97795965ce719999d9fe7d688cf04e2291a4302b21c8e909d07d40dba9210bacdc5041ee1fa482d14362cfdbc3e276d3789e1d1d93456f33509cfe0f7 SHA512 7aa116553cba1d370233db1b9500c73738c54995c739167c1a54a4ddcb3616bec536280f057a2ca5a17b53b4a9ebe4baabb42bfb449eb1d7bff8d18c82a85d3c AUX squeezelite.init.d 593 BLAKE2B 7ac5449c3a5b830253c7e7ba619eb8c70f074f0dc67e01dbeaa09917b84b48d7fd1d1418f4cbe17e4b5f167f3bd06c54ab7045ebf6c8c5d38b73341e3a70adfc SHA512 303e48c4446135d2d7c0cdd24176114af543d372bbd7b281ccdd01e9cab7cf670b7aada94310a342c8d24f8ac3987d4aa1a211755a5ddab4a86840c043a89ce8 EBUILD squeezelite-1.8.4.743-r1.ebuild 3303 BLAKE2B 62f88a61ea17c5951e33f69fa81e4c89d13caee7154bc16c6ccae99fe03311e520b5dec97c5af0c6c86322f8877d762ba82055ab112e1f4214a18f8041bfda4c SHA512 1f7f1f61deaecff8f3cc2352913ed64d8c7157acdc9cd994aafcea935e35b4a2e264ce79777fd9dd0179ac4ae9e08f6c14a3945ac3e4e3fb3df7507d0a39c3b7 @@ -19,3 +21,4 @@ EBUILD squeezelite-1.8.7.1007-r1.ebuild 3003 BLAKE2B a9d0a1f29ff453b1f0ac0c6ccaa EBUILD squeezelite-1.8.7.1007.ebuild 2970 BLAKE2B cbfe7ea6752545c5780f33ce265d839a54103c9b807cd1977e304c670b8e925cbf19adc4b4f500116283ca96a55b4260cf2c9763ed96dd468b73c0f3dc06a287 SHA512 ee4799317e42ed0430ff6c855032cbafa2b44d4937575e17c2ab1f33e4748604662325ec29fe6ae07b484562f0ed2a375e585791d896ddaad2eb33652b0f1390 EBUILD squeezelite-1.8.ebuild 2841 BLAKE2B ae3ea8b092818405fb842467a32b723648ab0602660d30976187c0c4dbf4f08e77b98b64623ce7aca1ce88d0b23572940051ac1278e79c9041303cea8cb9b7f9 SHA512 57ddd0e68921cab0fbf8ab2e2e34d4d968cbc140a221c075a67577f87c72090510c6a3a22d3cfe77efebd4a9d30c50af571a32ad737ef45baf3fd8db5b689fee EBUILD squeezelite-1.9.0.1105.ebuild 2969 BLAKE2B 99512e3fd321cc9b7c23f3be897943c37f78a5a0e111c29a345765ca7236771d0951df9255dc10a883d66b91f0399a4437d29df20ea9806cc7317b7c94153ad8 SHA512 9c9deca4d37fb57b2d0a5888bfacbcc4470a25394315d5da6b1b423edbdb9aa1d4ac723f38b41e22008c4b33ed55f6073aec01efb34f014802811e5903bf470d +EBUILD squeezelite-1.9.4.1182.ebuild 2969 BLAKE2B 0ef6ff9c25953cc426b856325ccac1a20134e5c589d5f88ed1ecd3567fccec9dd3a01fb44d0ee0328e1cdd87059969e1247da332a256a47b70a62ed1d3cea3ea SHA512 a7a9936d8ef17f7d923b89dba9473b6fb94d2ad9ac306087475a55254a4e17b4bdcd27ae2365f9a2fb720ee2c87ca11bb005f8ce9cd7e9f69f3cbc150318794c diff --git a/media-sound/squeezelite/files/squeezelite-1.9.4.1182-gentoo-optional-codecs-decode.patch b/media-sound/squeezelite/files/squeezelite-1.9.4.1182-gentoo-optional-codecs-decode.patch new file mode 100644 index 0000000..19c25c3 --- /dev/null +++ b/media-sound/squeezelite/files/squeezelite-1.9.4.1182-gentoo-optional-codecs-decode.patch @@ -0,0 +1,42 @@ +diff --git a/decode.c b/decode.c +index dda7fa4..7403810 100644 +--- a/decode.c ++++ b/decode.c +@@ -172,25 +172,35 @@ void decode_init(log_level level, const char *include_codecs, const char *exclud + if (!strstr(exclude_codecs, "aac") && (!include_codecs || (order_codecs = strstr(include_codecs, "aac")))) + sort_codecs((include_codecs ? order_codecs - include_codecs : i), register_faad()); + #endif ++#ifndef SL_NO_OGG + if (!strstr(exclude_codecs, "ogg") && (!include_codecs || (order_codecs = strstr(include_codecs, "ogg")))) + sort_codecs((include_codecs ? order_codecs - include_codecs : i), register_vorbis()); ++#endif + #if OPUS + if (!strstr(exclude_codecs, "ops") && (!include_codecs || (order_codecs = strstr(include_codecs, "ops")))) + sort_codecs((include_codecs ? order_codecs - include_codecs : i), register_opus()); + #endif ++#ifndef SL_NO_FLAC + if (!strstr(exclude_codecs, "flac") && (!include_codecs || (order_codecs = strstr(include_codecs, "flac")))) + sort_codecs((include_codecs ? order_codecs - include_codecs : i), register_flac()); ++#endif + if (!strstr(exclude_codecs, "pcm") && (!include_codecs || (order_codecs = strstr(include_codecs, "pcm")))) + sort_codecs((include_codecs ? order_codecs - include_codecs : i), register_pcm()); + + // try mad then mpg for mp3 unless command line option passed ++#ifndef SL_NO_MAD + if (!(strstr(exclude_codecs, "mp3") || strstr(exclude_codecs, "mad")) && + (!include_codecs || (order_codecs = strstr(include_codecs, "mp3")) || (order_codecs = strstr(include_codecs, "mad")))) + sort_codecs((include_codecs ? order_codecs - include_codecs : i), register_mad()); +- else if (!(strstr(exclude_codecs, "mp3") || strstr(exclude_codecs, "mpg")) && ++#endif ++#ifndef SL_NO_MPG123 ++#ifndef SL_NO_MAD ++ else ++#endif ++ if (!(strstr(exclude_codecs, "mp3") || strstr(exclude_codecs, "mpg")) && + (!include_codecs || (order_codecs = strstr(include_codecs, "mp3")) || (order_codecs = strstr(include_codecs, "mpg")))) + sort_codecs((include_codecs ? order_codecs - include_codecs : i), register_mpg()); +- ++#endif + LOG_DEBUG("include codecs: %s exclude codecs: %s", include_codecs ? include_codecs : "", exclude_codecs); + + mutex_create(decode.mutex); diff --git a/media-sound/squeezelite/files/squeezelite-1.9.4.1182-gentoo-optional-codecs.patch b/media-sound/squeezelite/files/squeezelite-1.9.4.1182-gentoo-optional-codecs.patch new file mode 100644 index 0000000..c67a1a7 --- /dev/null +++ b/media-sound/squeezelite/files/squeezelite-1.9.4.1182-gentoo-optional-codecs.patch @@ -0,0 +1,95 @@ +diff --git a/faad.c b/faad.c +index 96d33ca..f994cf3 100644 +--- a/faad.c ++++ b/faad.c +@@ -20,6 +20,8 @@ + + #include "squeezelite.h" + ++#ifndef SL_NO_AAC ++ + #include <neaacdec.h> + + #define WRAPBUF_LEN 2048 +@@ -640,3 +642,5 @@ struct codec *register_faad(void) { + LOG_INFO("using faad to decode aac"); + return &ret; + } ++ ++#endif +diff --git a/flac.c b/flac.c +index a5c7b3b..6240d84 100644 +--- a/flac.c ++++ b/flac.c +@@ -20,6 +20,8 @@ + + #include "squeezelite.h" + ++#ifndef SL_NO_FLAC ++ + #include <FLAC/stream_decoder.h> + + struct flac { +@@ -286,3 +288,5 @@ struct codec *register_flac(void) { + LOG_INFO("using flac to decode flc"); + return &ret; + } ++ ++#endif +diff --git a/mad.c b/mad.c +index 30e2498..b667900 100644 +--- a/mad.c ++++ b/mad.c +@@ -20,6 +20,8 @@ + + #include "squeezelite.h" + ++#ifndef SL_NO_MAD ++ + #include <mad.h> + + #define MAD_DELAY 529 +@@ -412,3 +414,5 @@ struct codec *register_mad(void) { + LOG_INFO("using mad to decode mp3"); + return &ret; + } ++ ++#endif +diff --git a/mpg.c b/mpg.c +index f3074f2..bcf79d6 100644 +--- a/mpg.c ++++ b/mpg.c +@@ -20,6 +20,8 @@ + + #include "squeezelite.h" + ++#ifndef SL_NO_MAD ++ + #include <mpg123.h> + + #define READ_SIZE 512 +@@ -274,3 +276,5 @@ struct codec *register_mpg(void) { + LOG_INFO("using mpg to decode mp3"); + return &ret; + } ++ ++#endif +diff --git a/vorbis.c b/vorbis.c +index 0809bee..7f258f3 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: + // NOTE: works with Tremor version here: http://svn.xiph.org/trunk/Tremor, not vorbisidec.1.0.2 currently in ubuntu + +@@ -329,3 +331,5 @@ struct codec *register_vorbis(void) { + LOG_INFO("using vorbis to decode ogg"); + return &ret; + } ++ ++#endif diff --git a/media-sound/squeezelite/squeezelite-1.9.4.1182.ebuild b/media-sound/squeezelite/squeezelite-1.9.4.1182.ebuild new file mode 100644 index 0000000..6322209 --- /dev/null +++ b/media-sound/squeezelite/squeezelite-1.9.4.1182.ebuild @@ -0,0 +1,116 @@ +# Copyright 1999-2019 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit eutils user flag-o-matic git-r3 + +DESCRIPTION="Lightweight headless squeezebox client emulator" +HOMEPAGE="https://github.com/ralph-irving/squeezelite" + +EGIT_REPO_URI="https://github.com/ralph-irving/squeezelite.git" +EGIT_COMMIT="3033dbacbf945e177d27c85bcee31eb0d859c20c" +# see VERSION #def in squeezelite.h + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="aac dsd ffmpeg flac mad mpg123 pulseaudio resample visexport vorbis" + +# ffmpeg provides alac and wma codecs +DEPEND="media-libs/alsa-lib + flac? ( media-libs/flac ) + ffmpeg? ( media-video/ffmpeg ) + vorbis? ( media-libs/libvorbis ) + mad? ( media-libs/libmad ) + mpg123? ( media-sound/mpg123 ) + aac? ( media-libs/faad2 ) + resample? ( media-libs/soxr ) + visexport? ( media-sound/jivelite ) + pulseaudio? ( media-plugins/alsa-plugins[pulseaudio] ) +" +RDEPEND="${DEPEND} + media-sound/alsa-utils" + +pkg_setup() { + enewgroup squeezelite + if use pulseaudio ; then + enewuser squeezelite -1 -1 "/dev/null" "squeezelite" + else + enewuser squeezelite -1 -1 "/dev/null" "squeezelite,audio" + fi +} + +src_prepare () { + epatch "${FILESDIR}/${P}-gentoo-optional-codecs.patch" + epatch "${FILESDIR}/${P}-gentoo-optional-codecs-decode.patch" + eapply_user +} + +src_compile() { + export OPTS="" + + if use dsd; then + OPTS+=" -DDSD" + einfo "dsd support enabled via dsd2pcm" + fi + + if use ffmpeg; then + OPTS+=" -DFFMPEG" + einfo "alac and wma support enabled via ffmpeg" + fi + + if use resample; then + OPTS+=" -DRESAMPLE" + einfo "resample support enabled via soxr" + fi + + if use visexport; then + OPTS+=" -DVISEXPORT" + einfo "audio data export to jivelite support enabled" + fi + + # Configure other optional codec support; this is added to the original + # source via a patch in this ebuild at present. + if ! use flac; then + append-cflags "-DSL_NO_FLAC" + einfo "FLAC support disabled; add 'flac' USE flag if you need it" + fi + if ! use vorbis; then + append-cflags "-DSL_NO_OGG" + einfo "Ogg/Vorbis support disabled; add 'vorbis' USE flag if you need it" + fi + if ! use mad; then + append-cflags "-DSL_NO_MAD" + fi + if ! use mpg123; then + append-cflags "-DSL_NO_MPG123" + fi + if ! use mad && ! use mpg123; then + einfo "MP3 support disabled; add 'mad' (recommended)" + einfo " or 'mpg123' USE flag if you need it" + fi + if ! use aac; then + OPTS+=" -DNO_FAAD" + einfo "AAC support disabled; add 'aac' USE flag if you need it" + fi + + # Build it + emake || die "emake failed" +} + +src_install() { + dobin squeezelite + dobin ${FILESDIR}/pasqueezelite + dodoc LICENSE.txt + + newconfd "${FILESDIR}/${PN}.conf.d" "${PN}" + newinitd "${FILESDIR}/${PN}.init.d" "${PN}" +} + +pkg_postinst() { + elog "If you want start Squeezelite automatically on system boot:" + elog " rc-update add squeezelite default" + elog "Edit /etc/cond.d/squeezelite to customise -- in particular" + elog "you may want to set the audio device to be used." +} |