diff options
author | 2019-10-21 20:38:16 +0100 | |
---|---|---|
committer | 2019-10-21 20:40:19 +0100 | |
commit | b1ef17dd9baa1e727b3e0600f567ec0aff2a57de (patch) | |
tree | fd9e4932d7c1729346174dc0a106e04b71b2e742 | |
parent | add ebuild with support for perl 5.28 (diff) | |
download | squeezebox-b1ef17dd9baa1e727b3e0600f567ec0aff2a57de.tar.gz squeezebox-b1ef17dd9baa1e727b3e0600f567ec0aff2a57de.tar.bz2 squeezebox-b1ef17dd9baa1e727b3e0600f567ec0aff2a57de.zip |
media-sound/squeezelite: revbump to 1.9.4
. use EAPI 7
. follow upstream's latest approach for some of the build options
Signed-off-by: Paul Healy <lmiphay@gmail.com>
Signed-off-by: Stuart Hickinbottom <stuart@hickinbottom.com>
4 files changed, 277 insertions, 8 deletions
diff --git a/media-sound/squeezelite/Manifest b/media-sound/squeezelite/Manifest index cbcf6e8..48af241 100644 --- a/media-sound/squeezelite/Manifest +++ b/media-sound/squeezelite/Manifest @@ -1,8 +1,11 @@ -AUX squeezelite-1.8.7.1007-gentoo-makefile.patch 654 SHA256 61cc14bec1f8587e938666bcd953042dfe695daa09e1028e3fe4f8a773bb9521 SHA512 4e00d9051a34faca1697ce6a9f8c66e03cd279323c1b0b6af9a8d52df2e5d29e1b0d567060f51a4f76dbf1e1ffe0fc9f1d95751f904f82b21dde201e5342f481 WHIRLPOOL 1077dd822f9b6ac05dd5c20486287e6185a3805cdcd872661d42f76b15672fea463d05577b8f71df96162bb15d01d3336d81bb56bb47fcf56d60cfe6a7a1a46f -AUX squeezelite-1.8.7.1007-gentoo-optional-codecs-decode.patch 2217 SHA256 9510bdc03cc390ae50ac126da83d0d107317b3f51ed7ad457bdb11198870828c SHA512 dfb5863bd02a9502ee3ca5f96edd1d572a9ab38c2ccddaaddb826203eb88785491ac09be8d01d5dc2ef7d2f1b8e0b3bbcb13c3ad506763db71d6e56831b82284 WHIRLPOOL 9bac4e7872fa98e027bccf4079f3e2ba8205cfee14ef37a1fc849f52d1b341b273201ea9ca1f704b5793e6a283b9a8e47d5bc71280ace2cad8bdef04ac727bbe -AUX squeezelite-1.8.7.1007-gentoo-optional-codecs.patch 1789 SHA256 af584864a5188a110c83f75a5d893845ee828c2e4b5f9e0c75bfb9c3c1d4992d SHA512 5adc75cf66b07fcee0faf6e9f8d46623ec76ae0c091fad975ab0acbaa25da9648806d7c3cb3e55e9eef8ad5088b8f2d95c70b0d85966316035f7a5711c8a0a43 WHIRLPOOL 01ab0334f311a0c622d74c8084c62abf5444afcc582975706cd9483a9664039f5249d475f64dd201f27fab89429bfc28e656dc559921c6de6a53d0281e59ef6c -AUX squeezelite.conf.d 1126 SHA256 ff7e8d51d80c34ea393e1743dd56983acf7e577ac8858a566634df651ec5eca7 SHA512 ff552fcbbbf2b2291958fa1c61057f54ba0d9b19620666036dd1e19897b5d7bcc543c40699c3ee53b2eec7a38b9cf46cb9205c2048f7d5488c23085d9904f114 WHIRLPOOL ad4cdd8847182724cdb73fbe8f52c48fc87ec0f8a3d832d900c210fd0778d1bf59e7d66985f70242b01a1b376c4dbf80a946cb67060a006a18a20cf491c23255 -AUX squeezelite.init.d 587 SHA256 76fece46865196193bcb4eac628c16e863262a0b54f72e71762f44e9b00627d4 SHA512 38f69c55cda7f58e66cf913718ab245a9f08545e223d6d5b3f6ebd6185df0a35338dc7607b6318fa85787c8b7a606500f79e755a624e2be95138a79d4878f3e4 WHIRLPOOL c41e8a5d7747ce1592fb88061f8221ceab2b5e53626ca048d0d2a6c4759d2c2a2ed5d852ca5d55fa362c57df9a17f24ff81c768887127af23c60686f9379a473 -EBUILD squeezelite-1.8.7.1007.ebuild 2970 SHA256 f2c09649ce4c39008b55dc001c788a275648742d05cbfec5e5c8e296bb84734d SHA512 ee4799317e42ed0430ff6c855032cbafa2b44d4937575e17c2ab1f33e4748604662325ec29fe6ae07b484562f0ed2a375e585791d896ddaad2eb33652b0f1390 WHIRLPOOL 6c1b6c15330aedb9c7611e839d1e1caabce2ac16b19190ed7a83a9696413289262d4ac56fbe5b7dbbf62302840d32c802f3f0f84d88e528cb0dc96aec9990304 -MISC ChangeLog 1467 SHA256 e8a7c9b3924a1ffd4fbf0d5c87639d8826d44530d05d1ebf7e3e12191ddc6f9b SHA512 6b9316ef22849d2d21bade6e49acdb6e8d6b9e3b9f1ccc9d1aad58dd575308877a56ef11d4e044891e5328cf5b926a35d269f7604880065831f73e9ea2d170f0 WHIRLPOOL 5febea8474ff8317e2557f228c6ace0058fcd62da6fef8ba18a9e00a6f2ffd73986cd3a6de3c09248f4097d1b902d16d3a64a0ba96797aa128635521f2f4a615 -MISC metadata.xml 1899 SHA256 92ebf84b54e9d7533fa806ee61ea51567bf8a71915723aa3df98f869f9260ab4 SHA512 70ccf0c46982b5eeb33f291797e5c5131fb2b5819566f00290e3fccc0c952ca6036bc0042d5cdbe86c3a0285c1c24a3003fa5bffa92772fd94c7e58799a13df5 WHIRLPOOL 0706ada6d875bc114575ccdb2b4e9787db4e6701a56b20b93ecb117f1b02faf5fe04c8d74ab2a1e9a7fba22431c89e89295c582df1dcc483b836374c1ad82034 +AUX squeezelite-1.8.7.1007-gentoo-makefile.patch 654 BLAKE2B 6eca55601ec97f14041adc196f8c0ce0061881633b70e7304fa36c9babd200d47f39b59f742e6b1b5a74a407baa826373d6cfd24c33f8283312cd04f059174fa SHA512 4e00d9051a34faca1697ce6a9f8c66e03cd279323c1b0b6af9a8d52df2e5d29e1b0d567060f51a4f76dbf1e1ffe0fc9f1d95751f904f82b21dde201e5342f481 +AUX squeezelite-1.8.7.1007-gentoo-optional-codecs-decode.patch 2217 BLAKE2B 3685afda78ab2f56ee638be327d04916a36a7bb268222843c9969777cd0ceb218b3b7043755edd4eb3ed6db699ff11bc67feecfba82997d1b818181e19730386 SHA512 dfb5863bd02a9502ee3ca5f96edd1d572a9ab38c2ccddaaddb826203eb88785491ac09be8d01d5dc2ef7d2f1b8e0b3bbcb13c3ad506763db71d6e56831b82284 +AUX squeezelite-1.8.7.1007-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 1126 BLAKE2B c0b8d29427031196dd61823c93525b88d544d216bb00728693faf438bde2ff9caf2ae9259d8e4c21f8e87aed78cb6a2e8dd4a3a38e847298b2cc8459589be4ab SHA512 ff552fcbbbf2b2291958fa1c61057f54ba0d9b19620666036dd1e19897b5d7bcc543c40699c3ee53b2eec7a38b9cf46cb9205c2048f7d5488c23085d9904f114 +AUX squeezelite.init.d 587 BLAKE2B 223e3a0c0d90fcce71f8d42a97ffb8ac2cd9f0c18a7b37b0e74d8092298dbcd16ade06cd841f9722c3696e2e215b9e5d4acfc26ef6c824fe489d9b0d468de89f SHA512 38f69c55cda7f58e66cf913718ab245a9f08545e223d6d5b3f6ebd6185df0a35338dc7607b6318fa85787c8b7a606500f79e755a624e2be95138a79d4878f3e4 +EBUILD squeezelite-1.8.7.1007.ebuild 2970 BLAKE2B cbfe7ea6752545c5780f33ce265d839a54103c9b807cd1977e304c670b8e925cbf19adc4b4f500116283ca96a55b4260cf2c9763ed96dd468b73c0f3dc06a287 SHA512 ee4799317e42ed0430ff6c855032cbafa2b44d4937575e17c2ab1f33e4748604662325ec29fe6ae07b484562f0ed2a375e585791d896ddaad2eb33652b0f1390 +EBUILD squeezelite-1.9.4.1182.ebuild 3271 BLAKE2B 078551cf813f792c23edca7e6b71c589ead9a1c1e4bd0e8cefea9011cdc7388c95fbe306eca189ba87896713995f308621f9caa302e5b0ac61601c9215c8cc01 SHA512 27438f396d9fa4e910714b8da4a961f42a9d879be851ca0cd23e686e84660c5bfeec50cd72455884ca4e73df4b709081b1c00e0dbfe17982112b2024cf952462 +MISC ChangeLog 1467 BLAKE2B 3a1fa460ede28f18e982492ffcc4f2aafb823b1333162662cd2abf6b95554b33bfabd9dfb33243af06f09b54be341441e78a31dad52808c55e1e15e178c0e873 SHA512 6b9316ef22849d2d21bade6e49acdb6e8d6b9e3b9f1ccc9d1aad58dd575308877a56ef11d4e044891e5328cf5b926a35d269f7604880065831f73e9ea2d170f0 +MISC metadata.xml 1899 BLAKE2B 308dcc748961294fd8be29fc92170640ffc5e2c0607953fc1df7f5fb8c4d22ee38f2142b6541cf2c1ad049dddc9394b617f2ff263243cac4829a95ad4b8a6ac0 SHA512 70ccf0c46982b5eeb33f291797e5c5131fb2b5819566f00290e3fccc0c952ca6036bc0042d5cdbe86c3a0285c1c24a3003fa5bffa92772fd94c7e58799a13df5 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..373338e --- /dev/null +++ b/media-sound/squeezelite/squeezelite-1.9.4.1182.ebuild @@ -0,0 +1,129 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +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" + +PATCHES=( + "${FILESDIR}/${P}-gentoo-optional-codecs.patch" + "${FILESDIR}/${P}-gentoo-optional-codecs-decode.patch" +) + +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 +} + +# The squeezelite Makefile now enables (some) functionality based on the +# content of the OPTS variable +append_opt() { + export OPTS+=" $1" + einfo "$2" +} + +src_compile() { + + if use dsd; then + append_opt "-DDSD" "dsd support enabled via dsd2pcm" + fi + + if use ffmpeg; then + append_opt "-DFFMPEG" "alac and wma support enabled via ffmpeg" + fi + + # Other build options we currently don't expose as USE flags: + # ALAC (see ffmpeg use) + # LINKALL + + if use resample; then + append_opt "-DRESAMPLE" "resample support enabled via soxr" + fi + + if use visexport; then + append_opt "-DVISEXPORT" "audio data export to jivelite support enabled" + fi + + # Yet more build options we currently don't expose as USE flags: + # IR + # GPIO + # RPI + # NO_FAAD + # SSL + # NOSSLSYM + # OPUS + + # 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 + append-cflags "-DSL_NO_AAC" + einfo "AAC support disabled; add 'aac' USE flag if you need it" + fi + + # Build it + emake OPTS="${OPTS}" || die "emake failed" +} + +src_install() { + dobin squeezelite + 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." +} |