From 02888a7505960f5cbe448fbf86de8390165ceeae Mon Sep 17 00:00:00 2001 From: Ionen Wolkens Date: Thu, 19 Aug 2021 16:43:26 -0400 Subject: media-sound/xmms2: add 0.8_p20201016, modernize This ebuild has some accumulated history, this is an attempt to simplify it and remove obsolete baggage. Hopefully no regressions. Several changes, but for the more notable ones: * bump to latest xmms2-devel/s4 snapshots and latest waf, no real changes since 2016 but upstreams a few fixes * use github directly rather than generate a tarball * remove upstreamed patches: be-hash + gcc-10 (thanks slyfox) * remove unnecessary patches: tarball + ffmpeg2 * don't run tests at compile time by using --notests, and also add a valgrind check to accommodate tinderboxes (bug #807271) * use makeopts for build, multiprocessing.eclass was there but unused * replace hard dev-lang/python dep so it doesn't pull wrong slots * entire DEPEND moved to BDEPEND except cunit * several other *DEPEND updates after a full review * use ffmpeg ebuild style static mappings (allows using them in IUSE) * move "optionals" outside of the server block so client-only features like perl/python can be used with USE=-server * drop ruby support, nothing in the tree uses these bindings, using ruby27/30 triggers severe warnings, and previous ruby-single only builds bindings for current "any" ruby ignoring RUBY_TARGETS (if someone needs, say so and will look into proper ruby-ng support) * add IUSE=tremor and IUSE=gme, available in the tree and works * make IUSE=alsa non-default, this should be handled by profile/global * IUSE=mp4 was a no-op and always enabled for good reasons, removed * install s4 cli tool to manipulate xmms2's database * enable mid1 with fluidsynth so it can actually load .mid/rmi files * set default soundfont so it can work out of the box with optfeature * remove xmms2-et/phonehome, little point with an inactive upstream (open to re-adding if someone, or the devs, actually want it) * fix prefix, previously broken due to complete lack of ${EPREFIX} and also needed an additional fix to find boost includes Closes: https://bugs.gentoo.org/807271 Signed-off-by: Ionen Wolkens --- media-sound/xmms2/Manifest | 3 + media-sound/xmms2/metadata.xml | 2 + media-sound/xmms2/xmms2-0.8_p20201016.ebuild | 236 +++++++++++++++++++++++++++ 3 files changed, 241 insertions(+) create mode 100644 media-sound/xmms2/xmms2-0.8_p20201016.ebuild diff --git a/media-sound/xmms2/Manifest b/media-sound/xmms2/Manifest index a2ed2cb69e18..0ae44e63d98d 100644 --- a/media-sound/xmms2/Manifest +++ b/media-sound/xmms2/Manifest @@ -1,2 +1,5 @@ DIST waf-2.0.19.tar.bz2 682213 BLAKE2B 0bd2e31827ac65e0565abc09df37a42193ff37b50b6d0244f8b10ba7f308b4ba31ba864742d8c8d4005b86e611223dc4315cf70c0dbbf6b7db8f02e4f551fbb2 SHA512 ae7f3973c79e44313b4894c75763ad43ccd2be88e0d351d7f606ce495c5a464a379c85c076ebd8ba577fc88918af2bbb39bbec1049f25f02c14d98388e012c59 +DIST waf-2.0.22.tar.bz2 687244 BLAKE2B feea82e7e6aaba1187f368aa00025f206a7217196de9be7a97ca6aa8882823decd79db38dda4f1f25e81541eaa44edf029eea8d57e28f7d31b94d9ee93201ea9 SHA512 a3a275fd4c81c7b7385c2da001f3924d272105b8f33839265ebbb38708051b7cb13b9b9019e84325707d04513de0c13b032b1ad21458aec6586d10df4ed8d5f5 DIST xmms2-0.8DrO_o-949-gca15e830.tar.bz2 1928653 BLAKE2B f34abf0c68f4574593eb706744cc4354bc9b679d005bcaf4a9f03ef90fcb14935428c73d3d74565c41a70efcfa6541af15a455d091b6d17e7ca613229c1c1390 SHA512 affd7fdd259cdb952e972b62f24ab8eb6afd2c87786254a7ae81adffdcfe1454dcf2fb95811a8b90db74dba84918526fd8c920e11582b36aa48725f293c73edb +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 diff --git a/media-sound/xmms2/metadata.xml b/media-sound/xmms2/metadata.xml index 9fea8b66ca33..c5c80b3e379d 100644 --- a/media-sound/xmms2/metadata.xml +++ b/media-sound/xmms2/metadata.xml @@ -34,12 +34,14 @@ Support for airplay format Support for Monkey's Audio (APE) format with help of bundled libasf Enable fluidsynth support (MIDI) + Support for various game audio formats using media-libs/game-music-emu Icecast source output plugin Support for Monkey's Audio (APE) format with help of media-sound/mac Support for Open Fingerprint Architecture (OFA) This client sends anonymous usage-statistics to the xmms2 Build xmms2 player daemon (otherwise only clients are built) Support for C64 SID + Support Vorbis using an alternate fixed-point decoder with media-libs/tremor Run unit tests under valgrind. Phase vocoder effect plugin Enable building of xmms2-mlib-updater client diff --git a/media-sound/xmms2/xmms2-0.8_p20201016.ebuild b/media-sound/xmms2/xmms2-0.8_p20201016.ebuild new file mode 100644 index 000000000000..f8e7fd9c8134 --- /dev/null +++ b/media-sound/xmms2/xmms2-0.8_p20201016.ebuild @@ -0,0 +1,236 @@ +# Copyright 1999-2021 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 ~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 asf :asx cdda :cue curl :diskwrite :equalizer + ffmpeg:apefile,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? ( virtual/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 +) + +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 || 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 "for the default MIDI soundfont" media-sound/fluid-soundfont +} -- cgit v1.2.3-65-gdbad