summaryrefslogtreecommitdiff
path: root/media-sound/xmms2
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-03-20 00:40:44 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-03-20 00:40:44 +0000
commit4cbcc855382a06088e2f016f62cafdbcb7e40665 (patch)
tree356496503d52354aa6d9f2d36126302fed5f3a73 /media-sound/xmms2
parentfcc5224904648a8e6eb528d7603154160a20022f (diff)
gentoo resync : 20.03.2022
Diffstat (limited to 'media-sound/xmms2')
-rw-r--r--media-sound/xmms2/Manifest2
-rw-r--r--media-sound/xmms2/files/xmms2-0.8_p20201016-ffmpeg5.patch125
-rw-r--r--media-sound/xmms2/xmms2-0.8_p20201016-r2.ebuild237
3 files changed, 364 insertions, 0 deletions
diff --git a/media-sound/xmms2/Manifest b/media-sound/xmms2/Manifest
index c410b2dc0480..ed2f527b0f37 100644
--- a/media-sound/xmms2/Manifest
+++ b/media-sound/xmms2/Manifest
@@ -2,8 +2,10 @@ AUX xmms2-0.8-rtvg.patch 1358 BLAKE2B 1544ae0719b02ad94c19239d7ad3b16d3df3a29e1a
AUX xmms2-0.8_p20161122-cpp-client.patch 624 BLAKE2B fd08746e4ce3c83a1cfed7a6794e169f435da2a1fdf639ae2d948109a22526a5a68f03f1dfabeaabc022dda8b403d08b2cf3c6944429b1b748ee75ac69840caf SHA512 19af5f465c1e48a9ca780b6cad1348eb6fc315b05923f0d4ded7c6972e2cbb3213ad8adf994e13c80c1d69c47bee97660fccad85c9b98ab9752a0ff9f930ea7c
AUX xmms2-0.8_p20161122-faad.patch 629 BLAKE2B e2dc8964d1002ff55be736e6b0370f946e9d8dbdeaab8f9f50bebce210b431894174e80fbba8bc77c79f048c69d8ece85585395840a09fce6b58fdaaf404494f SHA512 7a40d77cefcc483e6ee24a672b30ddd9f763e642bbac6baf88c315ea4a1aea9c87212627fd641f6107f76ab3185a762129ed02c2f090b2264f89016fe4ff2d5f
AUX xmms2-0.8_p20161122-mac-4.patch 1215 BLAKE2B 746bcf75ce5b1f73ecb4023e776080674da5781d122f988ddb719ccdfb1da95fb632242004096a79861c0a9f0a3a49734a86bd8ac4c0541d3b3742cd722c8d44 SHA512 14b46640163f1d651e310d1bf08ec190a7449615c574952c19fa2c7f86215d83d3ee6d6cbe0f665a5fdd44ec44e44bc339a480ce753f16f2b49a4206dde1c12b
+AUX xmms2-0.8_p20201016-ffmpeg5.patch 3705 BLAKE2B 9726bb58d45e71d72386bb76dabb9fc22a9a9dc10ed587406754ad1c524a2867215fcd0cc06884a7a8e2bdb39a79e3b2ebe465cbb54d49cacb5aa6a98760be63 SHA512 b9e02481914e8a29662358b71cd05145d942cdaed62ef357669f3d31d2579f1e7e5c5b9f21534e26beaa1dfc1b9396f3ab696bcb64a6bc706f5a300fc5ea0467
DIST waf-2.0.22.tar.bz2 687244 BLAKE2B feea82e7e6aaba1187f368aa00025f206a7217196de9be7a97ca6aa8882823decd79db38dda4f1f25e81541eaa44edf029eea8d57e28f7d31b94d9ee93201ea9 SHA512 a3a275fd4c81c7b7385c2da001f3924d272105b8f33839265ebbb38708051b7cb13b9b9019e84325707d04513de0c13b032b1ad21458aec6586d10df4ed8d5f5
DIST xmms2-0.8_p20201016.tar.gz 1720185 BLAKE2B e1cad8ed2ece9d8ce905ffe86de53bb4010639d83fd15700eefccf190034577ff8666f3557bfb23741ed8400eba1e6246ef28ff21c4dbbe499239da945befc74 SHA512 0e73771f56c341e5dea15451457426958217de3ac19cad1924c11740f96feb69e385242a27a9cf9258841ed4e6538c12e135492f715bfae6976b31fb358508bf
DIST xmms2-s4-0.8_p20201016.tar.gz 184231 BLAKE2B 0676f89b743e265af01593c215c609ae48ea368d861fd28b022b4124a00852182686a46ebf90ac44a10343f86ba5c398c47fd85e2688971b2b4445f3c3843af5 SHA512 f510141ca792893feba2c00d9bc437f492fdce7c29b12c9a8432792ca5a1703cc7068e1a9f4641abd50b320fefb5867fb5bc58a58b0b0272cf75828c764f94ed
EBUILD xmms2-0.8_p20201016-r1.ebuild 5876 BLAKE2B c200ded0045be9be4ce10c1434f6f1bc104344f893e62187159bc77f23cc745c30b3f45ed828e7e2814b70ed7b6a482bcbdb00d22f963aa283c40970747c3954 SHA512 0ad122574b7fcb2ad60c5ee0a898612a0beef3d661c7267336d52a589dab269dccfcdeb00c2cfd153113f72455aa1d8f9dddd6d9f7e3ccff13b40768d60ea4cd
+EBUILD xmms2-0.8_p20201016-r2.ebuild 5913 BLAKE2B eff55cef1c431aa8ca7ae3ebd6f7638a8485cd05b2fef7ecc6fda38d6282908b8edec47d7269ff15ae1d85870480298713bde097eef5655c77f72c721d3d8232 SHA512 fb84b90330d0aac147b6c68d2a1fbd86e56128f503a28ed47c18e717f6f6b514d79e035568fd623751c64953157891f6c44f0cac771b8e450d50eb44e6547f0d
MISC metadata.xml 1529 BLAKE2B 0f5c762b0325e767ba28410bd6838960e84df8a8f30ceda76833809b21b4e109f01caa2c4c5e234aacd4697f9a0a43d8fc1012f62261b8a1e9e458e2530b9dfe SHA512 be88d429da72efc944841bbb11c85dd6e746201eae90c20cc588bb5c42958315fc23bb9388396e971f0bc2069d4eb6dd9189b9c8f4c7cf4f343ca491f9d744be
diff --git a/media-sound/xmms2/files/xmms2-0.8_p20201016-ffmpeg5.patch b/media-sound/xmms2/files/xmms2-0.8_p20201016-ffmpeg5.patch
new file mode 100644
index 000000000000..14f999643241
--- /dev/null
+++ b/media-sound/xmms2/files/xmms2-0.8_p20201016-ffmpeg5.patch
@@ -0,0 +1,125 @@
+Lazy migration from audio4 that's missing in ffmpeg5, may not be
+entirely right but tested to play at least .tta/.wma properly.
+
+Bug: https://bugs.gentoo.org/834398
+Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
+--- a/src/plugins/avcodec/avcodec.c
++++ b/src/plugins/avcodec/avcodec.c
+@@ -32,4 +32,5 @@
+ typedef struct {
+ AVCodecContext *codecctx;
++ AVPacket packet;
+
+ guchar *buffer;
+@@ -150,4 +151,5 @@
+ data->buffer_size = AVCODEC_BUFFER_SIZE;
+ data->codecctx = NULL;
++ data->packet.size = 0;
+
+ data->read_out_frame = av_frame_alloc ();
+@@ -155,6 +157,4 @@
+ xmms_xform_private_data_set (xform, data);
+
+- avcodec_register_all ();
+-
+ mimetype = xmms_xform_indata_get_str (xform,
+ XMMS_STREAM_TYPE_MIMETYPE);
+@@ -467,43 +467,35 @@
+ xmms_avcodec_internal_decode_some (xmms_avcodec_data_t *data)
+ {
+- int got_frame = 0;
+- gint bytes_read = 0;
+- AVPacket packet;
++ int rc = 0;
+
+- av_init_packet (&packet);
+- packet.data = data->buffer;
+- packet.size = data->buffer_length;
+-
+- /* clear buffers and reset fields to defaults */
+- av_frame_unref (data->read_out_frame);
+-
+- bytes_read = avcodec_decode_audio4 (
+- data->codecctx, data->read_out_frame, &got_frame, &packet);
+-
+- /* The DTS decoder of ffmpeg is buggy and always returns
+- * the input buffer length, get frame length from header */
+- /* FIXME: Is ^^^^ still true? */
+- if (!strcmp (data->codec_id, "dca") && bytes_read > 0) {
+- bytes_read = ((int)data->buffer[5] << 12) |
+- ((int)data->buffer[6] << 4) |
+- ((int)data->buffer[7] >> 4);
+- bytes_read = (bytes_read & 0x3fff) + 1;
++ if (data->packet.size == 0) {
++ av_init_packet (&data->packet);
++ data->packet.data = data->buffer;
++ data->packet.size = data->buffer_length;
++
++ rc = avcodec_send_packet(data->codecctx, &data->packet);
++ if (rc == AVERROR_EOF)
++ rc = 0;
++ }
++
++ if (rc == 0) {
++ rc = avcodec_receive_frame(data->codecctx, data->read_out_frame);
++ if (rc < 0) {
++ data->packet.size = 0;
++ data->buffer_length = 0;
++ if (rc == AVERROR(EAGAIN)) rc = 0;
++ else if (rc == AVERROR_EOF) rc = 1;
++ }
++ else
++ rc = 1;
+ }
+
+- if (bytes_read < 0 || bytes_read > data->buffer_length) {
++ if (rc < 0) {
++ data->packet.size = 0;
+ XMMS_DBG ("Error decoding data!");
+ return -1;
+ }
+
+- if (bytes_read < data->buffer_length) {
+- data->buffer_length -= bytes_read;
+- g_memmove (data->buffer,
+- data->buffer + bytes_read,
+- data->buffer_length);
+- } else {
+- data->buffer_length = 0;
+- }
+-
+- return got_frame ? 1 : 0;
++ return rc;
+ }
+
+--- a/src/plugins/avcodec/wscript
++++ b/src/plugins/avcodec/wscript
+@@ -2,5 +2,5 @@
+
+ ## Code fragments for configuration
+-avcodec_decode_audio4_fragment = """
++avcodec_send_packet_fragment = """
+ #ifdef HAVE_LIBAVCODEC_AVCODEC_H
+ # include "libavcodec/avcodec.h"
+@@ -10,9 +10,7 @@
+ int main(void) {
+ AVCodecContext *ctx;
+- AVFrame *frame;
+- int got_frame;
+ AVPacket *pkt;
+
+- avcodec_decode_audio4 (ctx, frame, &got_frame, pkt);
++ avcodec_send_packet (ctx, pkt);
+
+ return 0;
+@@ -44,7 +42,7 @@
+ # * ffmpeg: commit e4de716, lavc 53.40.0, release 0.9
+ # * libav: commit 0eea212, lavc 53.25.0, release 0.8
+- conf.check_cc(fragment=avcodec_decode_audio4_fragment, uselib="avcodec",
+- uselib_store="avcodec_decode_audio4",
+- msg="Checking for function avcodec_decode_audio4", mandatory=True)
++ conf.check_cc(fragment=avcodec_send_packet_fragment, uselib="avcodec",
++ uselib_store="avcodec_send_packet",
++ msg="Checking for function avcodec_send_packet", mandatory=True)
+
+ # non-mandatory function avcodec_free_frame since
diff --git a/media-sound/xmms2/xmms2-0.8_p20201016-r2.ebuild b/media-sound/xmms2/xmms2-0.8_p20201016-r2.ebuild
new file mode 100644
index 000000000000..7d7a6a230952
--- /dev/null
+++ b/media-sound/xmms2/xmms2-0.8_p20201016-r2.ebuild
@@ -0,0 +1,237 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+inherit multiprocessing optfeature perl-functions python-single-r1 toolchain-funcs
+
+XMMS2_COMMIT="46da10f0e20c53fd2b40843617ed182c0cba4ebb"
+S4_COMMIT="652ac581df7a0bca04334da397f8bb4f86eb7b59"
+WAF_VER="2.0.22"
+
+DESCRIPTION="X(cross)platform Music Multiplexing System, next generation of the XMMS player"
+HOMEPAGE="https://github.com/XMMS2"
+SRC_URI="
+ https://github.com/xmms2/xmms2-devel/archive/${XMMS2_COMMIT}.tar.gz -> ${P}.tar.gz
+ https://github.com/xmms2/s4/archive/${S4_COMMIT}.tar.gz -> ${PN}-s4-${PV}.tar.gz
+ https://waf.io/waf-${WAF_VER}.tar.bz2"
+S="${WORKDIR}/${PN}-devel-${XMMS2_COMMIT}"
+
+LICENSE="GPL-2+ LGPL-2.1+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~ppc ~riscv ~x86"
+
+# IUSE static map to be passed to --with-{optionals,plugins}=opt1,opt2,...
+# flag:opt = `usev flag opt`, opt = `usev opt`, :opt = `echo opt`
+XMMS2_OPTIONALS=(
+ cxx:xmmsclient++,xmmsclient++-glib :launcher mlib-update:medialib-updater
+ :nycli perl :pixmaps python server:s4 test:tests
+ # disabled: et,mdns,migrate-collections,ruby,sqlite2s4,vistest,xmmsclient-cf,xmmsclient-ecore
+)
+XMMS2_PLUGINS=(
+ aac:faad airplay alsa ao :asx cdda :cue curl :diskwrite :equalizer
+ ffmpeg:apefile,asf,avcodec,flv,tta :file flac fluidsynth:fluidsynth,mid1,midsquash
+ gme :html ices :icymetaint :id3v2 jack :karaoke :m3u mac +mad mms modplug
+ mp3:mpg123 :mp4 musepack :normalize :null :nulstripper ofa opus oss :pls
+ pulseaudio:pulse :replaygain samba sid sndfile speex tremor vocoder +vorbis
+ :wave wavpack :xml xml:rss,xspf zeroconf:daap
+ # disabled: coreaudio,gvfs,nms,sc68,sun,waveout
+)
+
+IUSE="
+ ${XMMS2_OPTIONALS[@]%:*}
+ ${XMMS2_PLUGINS[@]%:*}
+ +server valgrind"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+RESTRICT="!test? ( test ) !server? ( test )"
+
+COMMON_DEPEND="
+ dev-libs/glib:2
+ sys-libs/readline:=
+ server? (
+ aac? ( media-libs/faad2 )
+ airplay? ( dev-libs/openssl:= )
+ alsa? ( media-libs/alsa-lib )
+ ao? ( media-libs/libao )
+ cdda? (
+ dev-libs/libcdio-paranoia:=
+ dev-libs/libcdio:=
+ media-libs/libdiscid
+ )
+ curl? ( net-misc/curl )
+ ffmpeg? ( media-video/ffmpeg:= )
+ flac? ( media-libs/flac )
+ fluidsynth? ( media-sound/fluidsynth:= )
+ gme? ( media-libs/game-music-emu )
+ ices? (
+ media-libs/libogg
+ media-libs/libshout
+ media-libs/libvorbis
+ )
+ jack? ( virtual/jack )
+ mac? ( media-sound/mac )
+ mad? ( media-libs/libmad )
+ mms? (
+ media-libs/libmms
+ media-video/ffmpeg:=
+ )
+ modplug? ( media-libs/libmodplug )
+ mp3? ( media-sound/mpg123 )
+ musepack? ( media-sound/musepack-tools )
+ ofa? (
+ dev-libs/expat
+ media-libs/libofa
+ sci-libs/fftw:3.0=
+ )
+ opus? (
+ media-libs/libogg
+ media-libs/opus
+ media-libs/opusfile
+ )
+ pulseaudio? ( media-sound/pulseaudio )
+ samba? ( net-fs/samba )
+ sid? ( media-libs/libsidplay:2 )
+ sndfile? ( media-libs/libsndfile )
+ speex? (
+ media-libs/libogg
+ media-libs/speex
+ )
+ tremor? ( media-libs/tremor )
+ vocoder? (
+ media-libs/libsamplerate
+ sci-libs/fftw:3.0=
+ )
+ vorbis? ( media-libs/libvorbis )
+ wavpack? ( media-sound/wavpack )
+ xml? ( dev-libs/libxml2 )
+ zeroconf? (
+ net-dns/avahi[mdnsresponder-compat]
+ net-misc/curl
+ )
+ )
+ python? ( virtual/libcrypt:= )"
+RDEPEND="
+ ${COMMON_DEPEND}
+ perl? (
+ dev-lang/perl
+ dev-perl/glib-perl
+ virtual/perl-Carp
+ virtual/perl-IO
+ virtual/perl-Scalar-List-Utils
+ )
+ python? (
+ ${PYTHON_DEPS}
+ $(python_gen_cond_dep 'dev-python/pygobject[${PYTHON_USEDEP}]')
+ )"
+DEPEND="
+ ${COMMON_DEPEND}
+ cxx? ( dev-libs/boost )
+ test? ( dev-util/cunit )"
+BDEPEND="
+ ${PYTHON_DEPS}
+ virtual/pkgconfig
+ perl? ( dev-perl/Pod-Parser )
+ python? ( $(python_gen_cond_dep 'dev-python/cython[${PYTHON_USEDEP}]') )
+ test? ( valgrind? ( dev-util/valgrind ) )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.8-rtvg.patch
+ "${FILESDIR}"/${PN}-0.8_p20161122-mac-4.patch
+ "${FILESDIR}"/${PN}-0.8_p20161122-cpp-client.patch
+ "${FILESDIR}"/${PN}-0.8_p20161122-faad.patch
+ "${FILESDIR}"/${P}-ffmpeg5.patch
+)
+
+src_prepare() {
+ rmdir src/lib/s4 && mv ../s4-${S4_COMMIT} src/lib/s4 || die
+ mv ../waf-${WAF_VER}/waf{,lib} . || die
+
+ default
+
+ sed -e "s|/path/to/.*sf2|${EPREFIX}/usr/share/sounds/sf2/FluidR3_GM.sf2|" \
+ -i src/plugins/fluidsynth/fluidsynth.c || die
+}
+
+src_configure() {
+ local waf=(
+ ./waf configure
+ --prefix="${EPREFIX}"/usr
+ --libdir="${EPREFIX}"/usr/$(get_libdir)
+ --boost-includes="${ESYSROOT}"/usr/include # needed for prefix
+ --with-custom-version="%(version)s (git commit: ${XMMS2_COMMIT:0:8})"
+ --with-target-platform="${CHOST}"
+ )
+
+ xmms2_flag() {
+ local IFS=:
+ set -- ${1#+}
+
+ if [[ ${1} ]]; then
+ usev ${1} ,${2:-${1}}
+ else
+ echo ,${2}
+ fi
+ }
+
+ local flag optionals plugins
+
+ if use server; then
+ for flag in "${XMMS2_PLUGINS[@]}"; do
+ plugins+=$(xmms2_flag ${flag})
+ done
+ else
+ waf+=( --without-xmms2d )
+ fi
+
+ for flag in "${XMMS2_OPTIONALS[@]}"; do
+ optionals+=$(xmms2_flag ${flag})
+ done
+
+ waf+=(
+ # pass even if empty to avoid automagic
+ --with-optionals=${optionals:1}
+ --with-plugins=${plugins:1}
+ )
+
+ if use perl; then
+ perl_set_version
+ waf+=( --with-perl-archdir="${ARCH_LIB}" )
+ fi
+
+ if use valgrind; then
+ if valgrind true &>/dev/null; then
+ waf+=( --with-valgrind )
+ else
+ ewarn "valgrind was disabled due to failing a basic sanity check" #807271
+ fi
+ fi
+
+ tc-export AR CC CXX
+
+ echo "${waf[*]}"
+ "${waf[@]}" || die
+}
+
+src_compile() {
+ ./waf build -j$(makeopts_jobs) --verbose --notests || die
+}
+
+src_test() {
+ ./waf --alltests || die
+}
+
+src_install() {
+ ./waf install --destdir="${D}" --without-ldconfig --notests || die
+
+ einstalldocs
+
+ use python && python_optimize
+
+ # to avoid editing waftools/man.py (use find given not always installed)
+ find "${ED}" -name '*.gz' -exec gzip -d {} + || die
+}
+
+pkg_postinst() {
+ use fluidsynth && optfeature "the default MIDI soundfont" media-sound/fluid-soundfont
+}