From 38423c67c8a23f6a1bc42038193182e2da3116eb Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 25 Apr 2020 11:37:10 +0100 Subject: gentoo resync : 25.04.2020 --- media-sound/xmms2/Manifest | 3 +- .../xmms2/files/xmms2-0.8_p20161122-faad.patch | 18 ++ media-sound/xmms2/xmms2-0.8_p20161122-r6.ebuild | 324 -------------------- media-sound/xmms2/xmms2-0.8_p20161122-r7.ebuild | 327 +++++++++++++++++++++ 4 files changed, 347 insertions(+), 325 deletions(-) create mode 100644 media-sound/xmms2/files/xmms2-0.8_p20161122-faad.patch delete mode 100644 media-sound/xmms2/xmms2-0.8_p20161122-r6.ebuild create mode 100644 media-sound/xmms2/xmms2-0.8_p20161122-r7.ebuild (limited to 'media-sound/xmms2') diff --git a/media-sound/xmms2/Manifest b/media-sound/xmms2/Manifest index 9dfb8d4b48e4..9cfbd0e7157b 100644 --- a/media-sound/xmms2/Manifest +++ b/media-sound/xmms2/Manifest @@ -3,6 +3,7 @@ AUX xmms2-0.8-rtvg.patch 1539 BLAKE2B b359db6f477f0ca6a8e528645f731ccb33ec13067f AUX xmms2-0.8DrO_o-waflib-fix-perl.patch 1693 BLAKE2B 6057da2c8493ea7887ea03322d16d45ca0726174e7deb1a64f76b289fdeaba02c7659944803a23d7a32a0a74de7a39de1404d5566b43dd3306004a29876af038 SHA512 0f7f86cebd0ff75ed53366776f8c93abb54adf5942f53d7424183a4bd6913b73493882d4d3caadba6a959ddf22da0a22fa53d0fc18ce5b8508eb5670482e8c92 AUX xmms2-0.8_p20161122-be-hash.patch 1075 BLAKE2B 7c9678016751b207a5ef48c0f7963bc0a2e3e99fb461e52b5745bc5e2dde6c329bb358e58802c127aef96d5912e22a7df7a64f719286e9cf7787703765c4b18f SHA512 051e22907315bb6bda201497e1c2ef84d919fc7d39aefac187b3616c5f6c41e768cdd79cfe197fbadfdda3863f9e9c96b5f72fa07d5e1655451328cde8ba5781 AUX xmms2-0.8_p20161122-cpp-client.patch 2326 BLAKE2B a59da287dafafe8a3a177c11673eb7de5918fc6efef2e32c707832d7ea202091493e41f907f3e2dc370cd34d990571eed1d274fddf05f715dff7462973fb802f SHA512 095f2878afe9616bc7982037c0a9b0cc610164e04d116d40fe138df0280160680c19f6bf5c2f9aed6e9d31d42ee2f310570aefae28872ee15496f886d20ee2e9 +AUX xmms2-0.8_p20161122-faad.patch 724 BLAKE2B d7e11332341c2e1d4b19e31b19db9f577a41aee9172e886d885ae6a9518383c861537f6cc2eba2314839a000a2216828a176de9095ec45050b8621da9db9aa88 SHA512 2bed6ce756c0bbf21413485b336e4e33d8dc261c214c51bc6a0c7d310ae6e885526b8f243763f6c3ec665024e94acc55a46b26dcadf9a9cc0b5bf77b9306c1ed AUX xmms2-0.8_p20161122-gcc-10.patch 222 BLAKE2B a198b2e69081253f299ff1c7f94f0a2d3572a31caf4b7ec7de20e8d9a9bc404c58a98b31f0da6560034fe09599ae2e9f03b97728f45ad2fc30061b384c9fb13d SHA512 44685777b04e46e236104a74e654162a85b5c76c9838572921cc78b4775a7c2d5127566202415bfab10bb17261e242b034dde8aaf44024b66daa55a150ed1352 AUX xmms2-0.8_p20161122-mac-4.patch 1632 BLAKE2B 5bc5c7d499df5faee2fc6b4307af18269b784360bbbcaef33b1db4b880704f88e8dad06168e3737a43fcdb71ba722da1ffb5ba77f3f61ecf07674e1ad0988f5a SHA512 d2fe5f9a0c59205c787386e7b219c3fa9a334c30787b9a343214cc1c4dbf9f5d47f5dad9b2efd7deac1e96a227c827cc66198215a89b0e788c9d856cff51b16b AUX xmms2-0.8_p20161122-perl-no-local.patch 697 BLAKE2B 86ab6bb3594fd45e9a9bdbd07d85d3740ed206eea24652161c7fbbdf620c98a6b002b646aba65a3f017e263bb82d6dc7b933fb53540012c2005d65dd2e667b06 SHA512 eb5afb39409c7c199a844d9452ab829a653d2a1ce8f5d9f1361fa995e851914d5a962d25d8116947a265fabc649f8560aa1947a24cf45d954da7743954fc3cd7 @@ -10,5 +11,5 @@ AUX xmms2-0.8_p20161122-tarball.patch 2764 BLAKE2B 1d6ea9bc40db3145460a8ef06c732 DIST waf-2.0.19.tar.bz2 682213 BLAKE2B 0bd2e31827ac65e0565abc09df37a42193ff37b50b6d0244f8b10ba7f308b4ba31ba864742d8c8d4005b86e611223dc4315cf70c0dbbf6b7db8f02e4f551fbb2 SHA512 ae7f3973c79e44313b4894c75763ad43ccd2be88e0d351d7f606ce495c5a464a379c85c076ebd8ba577fc88918af2bbb39bbec1049f25f02c14d98388e012c59 DIST xmms2-0.8DrO_o-949-gca15e830.tar.bz2 1928653 BLAKE2B f34abf0c68f4574593eb706744cc4354bc9b679d005bcaf4a9f03ef90fcb14935428c73d3d74565c41a70efcfa6541af15a455d091b6d17e7ca613229c1c1390 SHA512 affd7fdd259cdb952e972b62f24ab8eb6afd2c87786254a7ae81adffdcfe1454dcf2fb95811a8b90db74dba84918526fd8c920e11582b36aa48725f293c73edb EBUILD xmms2-0.8_p20161122-r5.ebuild 7807 BLAKE2B 7226cdca97888fc127daa09523d28254f891ca164d3a536121f1ff03b5cfd5eb1413e7a6c32d6c8c3b57431aff3c6b9ae8ed0251f9a9271086d17f133cf330a9 SHA512 2ac2878fac8d408723a932370fbad67fb80e52e24377da52ebd419a2bcf2ff198661745baa8a973a28dc36f2b58eea90c0802bc8ffe047833abdabc13e307bcb -EBUILD xmms2-0.8_p20161122-r6.ebuild 8100 BLAKE2B 598bacb75a8b87239b3d18b82373d31e5cc480caec47737bb3f1414c8922156b66ce6cbdf0b11f6b3e9bd422d2d28f0fbe91bae2a6b83a7b5e4940f62709767f SHA512 9229b5c821fce1f0add8fc5f455c94f83aed2749817c78c11e50f521c7dc32e2cd8bb8fc0929e6f288e36e571df299607330447455fd2cced5bacc3f86e928ba +EBUILD xmms2-0.8_p20161122-r7.ebuild 8165 BLAKE2B bbc7b4da88dde76b360e50e24cba271d9873b1f1b3932456754ff82975f3336569f787f1388a63c67f81a3fbaf5064e14669ce249818d50a5a2c392067f5360f SHA512 d75f76538907d9712d187b8c0356545d914e6d6c546c06a0a9fe3670649d4b55916cf30fec65fe9991bde6d97fd6110eb31fd982540ffe9b5f2b76578045c1b4 MISC metadata.xml 2494 BLAKE2B 47ddee51380c99b03e6a449347f68e0f38742c7310d6e128b741abb13c4ce8126cb7177854c05c7a9e22ede612be2aa0befe7fbc69b918d17366a31005ed392e SHA512 f5c30541d2f5f484ced87780f72b2ce02d8f1a5e9cdfd437a870e6a1f53f1b9f71bf266935a20dc6f1f6d2417636dfa6dfe27c947eeddca1d746ad72e0b3c8ae diff --git a/media-sound/xmms2/files/xmms2-0.8_p20161122-faad.patch b/media-sound/xmms2/files/xmms2-0.8_p20161122-faad.patch new file mode 100644 index 000000000000..00aa5d770823 --- /dev/null +++ b/media-sound/xmms2/files/xmms2-0.8_p20161122-faad.patch @@ -0,0 +1,18 @@ +This line has stopped working since security fixes in the faad 2.9.0 +release. XMMS2 upstream were informed via IRC but have yet to act on +it. I've run XMMS2 with this patch for months without issue. + +-- Chewi + +diff --git a/src/plugins/faad/faad.c b/src/plugins/faad/faad.c +index 50835d27..7074e1b5 100644 +--- a/src/plugins/faad/faad.c ++++ b/src/plugins/faad/faad.c +@@ -242,7 +242,6 @@ xmms_faad_init (xmms_xform_t *xform) + * and durations calculations... So we cheat and tell libfaad2 we're feeding + * it frame 1. + */ +- NeAACDecPostSeekReset (data->decoder, 1); + + /* FIXME: Because for HE AAC files some versions of libfaad return the wrong + * samplerate in init, we have to do one read and let it decide the real diff --git a/media-sound/xmms2/xmms2-0.8_p20161122-r6.ebuild b/media-sound/xmms2/xmms2-0.8_p20161122-r6.ebuild deleted file mode 100644 index 691654060525..000000000000 --- a/media-sound/xmms2/xmms2-0.8_p20161122-r6.ebuild +++ /dev/null @@ -1,324 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{6,7,8} ) -USE_RUBY="ruby23 ruby24 ruby25" - -inherit eutils multiprocessing perl-functions python-single-r1 ruby-single toolchain-funcs - -# generated as 'python2 ./utils/gen-tarball.py' from clean git tree -MY_P="${P%_p*}DrO_o-949-gca15e830" -WAF_VER="2.0.19" - -DESCRIPTION="X(cross)platform Music Multiplexing System. Next generation of the XMMS player" -HOMEPAGE="https://xmms2.org/wiki/Main_Page" -#SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.bz2" -SRC_URI="https://dev.gentoo.org/~slyfox/distfiles/${MY_P}.tar.bz2 - https://waf.io/waf-${WAF_VER}.tar.bz2" -LICENSE="GPL-2 LGPL-2.1" - -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~ppc ~x86" - -IUSE="aac airplay +alsa ao asf cdda curl cxx ffmpeg flac fluidsynth ices -jack mac mlib-update mms +mad modplug mp3 mp4 musepack ofa opus oss -perl phonehome pulseaudio python ruby samba +server sid sndfile speex -test valgrind +vorbis vocoder wavpack xml zeroconf" - -RDEPEND="server? ( - >=dev-db/sqlite-3.3.4 - - aac? ( >=media-libs/faad2-2.0 ) - airplay? ( dev-libs/openssl:0= ) - alsa? ( media-libs/alsa-lib ) - ao? ( media-libs/libao ) - cdda? ( dev-libs/libcdio-paranoia - >=media-libs/libdiscid-0.1.1 - >=media-sound/cdparanoia-3.9.8 ) - curl? ( >=net-misc/curl-7.15.1 ) - ffmpeg? ( virtual/ffmpeg ) - flac? ( media-libs/flac ) - fluidsynth? ( media-sound/fluidsynth ) - ices? ( media-libs/libogg - media-libs/libshout - media-libs/libvorbis ) - jack? ( virtual/jack ) - mac? ( media-sound/mac ) - mms? ( virtual/ffmpeg - >=media-libs/libmms-0.3 ) - modplug? ( media-libs/libmodplug ) - mad? ( media-libs/libmad ) - mp3? ( >=media-sound/mpg123-1.5.1 ) - musepack? ( media-sound/musepack-tools ) - ofa? ( media-libs/libofa ) - opus? ( media-libs/opus - media-libs/opusfile ) - pulseaudio? ( media-sound/pulseaudio ) - samba? ( >=net-fs/samba-4.2 ) - sid? ( media-sound/sidplay - media-libs/resid ) - sndfile? ( media-libs/libsndfile ) - speex? ( media-libs/speex - media-libs/libogg ) - vorbis? ( media-libs/libvorbis ) - vocoder? ( sci-libs/fftw:3.0= media-libs/libsamplerate ) - wavpack? ( media-sound/wavpack ) - xml? ( dev-libs/libxml2 ) - zeroconf? ( net-dns/avahi[mdnsresponder-compat] ) - ) - - >=dev-libs/glib-2.12.9 - cxx? ( >=dev-libs/boost-1.32 ) - perl? ( >=dev-lang/perl-5.8.8 ) - python? ( ${PYTHON_DEPS} ) - ruby? ( ${RUBY_DEPS} ) -" - -DEPEND="${RDEPEND} - dev-lang/python - virtual/pkgconfig - perl? ( dev-perl/Module-Build - virtual/perl-Module-Metadata ) - python? ( >=dev-python/cython-0.15.1 ) - test? ( dev-util/cunit - valgrind? ( dev-util/valgrind ) ) -" - -RESTRICT="!test? ( test )" - -REQUIRED_USE="${PYTHON_REQUIRED_USE}" - -S="${WORKDIR}/${MY_P}" - -PATCHES=( - # needs port - #epatch "${FILESDIR}/${PN}"-0.8DrO_o-waflib-fix-perl.patch #578778 - - "${FILESDIR}/${PN}"-0.8-ffmpeg2.patch #536232 - - "${FILESDIR}/${PN}"-0.8-rtvg.patch #424377 - - # required to build tarball from git tree - "${FILESDIR}/${P}"-tarball.patch - - # fix hash to be the same on LE/BE platforms - "${FILESDIR}/${P}"-be-hash.patch - - # handle mac-3 -> -4 API change - "${FILESDIR}/${P}"-mac-4.patch - - # C++ client dangling reference: https://github.com/xmms2/xmms2-devel/pull/5 - "${FILESDIR}/${P}"-cpp-client.patch - - # gcc-10 stopped putting globals into common section - "${FILESDIR}/${P}"-gcc-10.patch -) - -pkg_setup() { - # used both for building xmms2 and - # optionally linking client library - # against python - python-single-r1_pkg_setup -} - -# use_enable() is taken as proto -# $1 - useflag -# $2 - xmms2 option/plugin name (equals to $1 if not set) - -xmms2_flag() { - [[ -z $1 ]] && eerror "!!! empty arg. usage: xmms2_flag []." - - local UWORD=${2:-$1} - - case $1 in - ENABLED) - echo ",${UWORD}" - ;; - DISABLED) - ;; - *) - use $1 && echo ",${UWORD}" - ;; - esac -} - -src_prepare() { - mv "${WORKDIR}/waf-${WAF_VER}"/{waf,waflib/} . || die - default -} - -src_configure() { - # ./configure alike options. - local waf_params=( - --prefix=/usr - --libdir=/usr/$(get_libdir) - --with-target-platform="${CHOST}" - --mandir=/usr/share/man - --infodir=/usr/share/info - --datadir=/usr/share - --sysconfdir=/etc - --localstatedir=/var/lib - ) - - local optionals="" - local plugins="" - if ! use server ; then - waf_params+=( --without-xmms2d ) - else - # some fun static mappings: - local option_map=( # USE # sorted xmms2 option flag (same, as USE if empty) - "phonehome et" - "ENABLED launcher" - "mlib-update medialib-updater" - "ENABLED nycli" - " perl" - "ENABLED pixmaps" - " python" - " ruby" - "DISABLED tests" - "DISABLED vistest" - "cxx xmmsclient++" - "cxx xmmsclient++-glib" - "DISABLED xmmsclient-cf" - "DISABLED xmmsclient-ecore" # not in tree - - "test tests" - ) - - local plugin_map=( # USE # sorted xmms2 plugin flag (same, as USE if empty) - " alsa" - " airplay" - " ao" - "ffmpeg apefile" - "ffmpeg avcodec" - " asf" - "ENABLED asx" - " cdda" - "DISABLED coreaudio" # MacOS only? - " curl" - "ENABLED cue" - "zeroconf daap" - "ENABLED diskwrite" - "ENABLED equalizer" - "aac faad" - "ENABLED file" - " flac" - " fluidsynth" - "ffmpeg flv" - "ffmpeg tta" - "DISABLED gme" # not in tree - "DISABLED gvfs" # obsolete #647604 - "ENABLED html" - " ices" - "ENABLED icymetaint" - "ENABLED id3v2" - " jack" - "ENABLED karaoke" - "ENABLED m3u" - " mac" - " mms" - " mad" - "ENABLED midsquash" - " mp4" # bug #387961 (aac, mp3, ape can sit there) - "mp3 mpg123" - " modplug" - " musepack" - "DISABLED nms" # not in tree - "ENABLED normalize" - "ENABLED null" - "ENABLED nulstripper" - " ofa" - " opus" - " oss" - "ENABLED pls" - "pulseaudio pulse" - "ENABLED replaygain" - "xml rss" - " samba" - "DISABLED sc68" #not in tree - " sid" - " sndfile" - " speex" - "DISABLED sun" # {Open,Net}BSD only - "DISABLED tremor" # not in tree - " vorbis" - " vocoder" - "ffmpeg tta" - "ENABLED wave" - "DISABLED waveout" # windows only - " wavpack" - "xml xspf" - "ENABLED xml" - ) - - local option - for option in "${option_map[@]}"; do - optionals+=$(xmms2_flag $option) - done - - local plugin - for plugin in "${plugin_map[@]}"; do - plugins+=$(xmms2_flag $plugin) - done - - if use perl; then - perl_set_version - waf_params+=( --with-perl-archdir="${ARCH_LIB}" ) - fi - fi # ! server - - # pass them explicitely even if empty as we try to avoid magic deps - waf_params+=( - --with-optionals="${optionals:1}" # skip first ',' if yet - --with-plugins="${plugins:1}" - $(use_with valgrind) - ) - - CC="$(tc-getCC)" \ - CPP="$(tc-getCPP)" \ - AR="$(tc-getAR)" \ - RANLIB="$(tc-getRANLIB)" \ - CXX="$(tc-getCXX)" \ - ./waf configure "${waf_params[@]}" || die "'waf configure' failed" -} - -src_compile() { - # waf is very keen to run tests in build phase (bug #424377) but - # it does not bother running tests twice, so the hack below works: - ./waf --verbose build || ./waf --verbose build || die "waf build failed" -} - -src_test() { - # rerun tests - ./waf --alltests || die "waf --alltests failed" -} - -src_install() { - ./waf --without-ldconfig --destdir="${D}" install || die "'waf install' failed" - dodoc AUTHORS TODO - - python_optimize - - # waftools/man.py always compresses man pages with gzip. - # to avoid code changed let's just un-gzip manpages - local m - for m in "${ED}"/usr/share/man/man1/*.gz; do - einfo "Uncompressing '${m#${ED}}' back." - gzip -d "${m}" || die - done -} - -pkg_postinst() { - elog "This version is built on experimental development code" - elog "If you encounter any errors report them at https://bugs.xmms2.org" - elog "and visit #xmms2 at irc://irc.freenode.net" - if use phonehome ; then - einfo "" - einfo "The phone-home client xmms2-et was activated" - einfo "This client sends anonymous usage-statistics to the xmms2" - einfo "developers which may help finding bugs" - einfo "Disable the phonehome useflag if you don't like that" - fi -} diff --git a/media-sound/xmms2/xmms2-0.8_p20161122-r7.ebuild b/media-sound/xmms2/xmms2-0.8_p20161122-r7.ebuild new file mode 100644 index 000000000000..88101be578c0 --- /dev/null +++ b/media-sound/xmms2/xmms2-0.8_p20161122-r7.ebuild @@ -0,0 +1,327 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6,7,8} ) +USE_RUBY="ruby23 ruby24 ruby25" + +inherit eutils multiprocessing perl-functions python-single-r1 ruby-single toolchain-funcs + +# generated as 'python2 ./utils/gen-tarball.py' from clean git tree +MY_P="${P%_p*}DrO_o-949-gca15e830" +WAF_VER="2.0.19" + +DESCRIPTION="X(cross)platform Music Multiplexing System. Next generation of the XMMS player" +HOMEPAGE="https://xmms2.org/wiki/Main_Page" +#SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.bz2" +SRC_URI="https://dev.gentoo.org/~slyfox/distfiles/${MY_P}.tar.bz2 + https://waf.io/waf-${WAF_VER}.tar.bz2" +LICENSE="GPL-2 LGPL-2.1" + +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~ppc ~x86" + +IUSE="aac airplay +alsa ao asf cdda curl cxx ffmpeg flac fluidsynth ices +jack mac mlib-update mms +mad modplug mp3 mp4 musepack ofa opus oss +perl phonehome pulseaudio python ruby samba +server sid sndfile speex +test valgrind +vorbis vocoder wavpack xml zeroconf" + +RDEPEND="server? ( + >=dev-db/sqlite-3.3.4 + + aac? ( >=media-libs/faad2-2.0 ) + airplay? ( dev-libs/openssl:0= ) + alsa? ( media-libs/alsa-lib ) + ao? ( media-libs/libao ) + cdda? ( dev-libs/libcdio-paranoia + >=media-libs/libdiscid-0.1.1 + >=media-sound/cdparanoia-3.9.8 ) + curl? ( >=net-misc/curl-7.15.1 ) + ffmpeg? ( virtual/ffmpeg ) + flac? ( media-libs/flac ) + fluidsynth? ( media-sound/fluidsynth ) + ices? ( media-libs/libogg + media-libs/libshout + media-libs/libvorbis ) + jack? ( virtual/jack ) + mac? ( media-sound/mac ) + mms? ( virtual/ffmpeg + >=media-libs/libmms-0.3 ) + modplug? ( media-libs/libmodplug ) + mad? ( media-libs/libmad ) + mp3? ( >=media-sound/mpg123-1.5.1 ) + musepack? ( media-sound/musepack-tools ) + ofa? ( media-libs/libofa ) + opus? ( media-libs/opus + media-libs/opusfile ) + pulseaudio? ( media-sound/pulseaudio ) + samba? ( >=net-fs/samba-4.2 ) + sid? ( media-sound/sidplay + media-libs/resid ) + sndfile? ( media-libs/libsndfile ) + speex? ( media-libs/speex + media-libs/libogg ) + vorbis? ( media-libs/libvorbis ) + vocoder? ( sci-libs/fftw:3.0= media-libs/libsamplerate ) + wavpack? ( media-sound/wavpack ) + xml? ( dev-libs/libxml2 ) + zeroconf? ( net-dns/avahi[mdnsresponder-compat] ) + ) + + >=dev-libs/glib-2.12.9 + cxx? ( >=dev-libs/boost-1.32 ) + perl? ( >=dev-lang/perl-5.8.8 ) + python? ( ${PYTHON_DEPS} ) + ruby? ( ${RUBY_DEPS} ) +" + +DEPEND="${RDEPEND} + dev-lang/python + virtual/pkgconfig + perl? ( dev-perl/Module-Build + virtual/perl-Module-Metadata ) + python? ( >=dev-python/cython-0.15.1 ) + test? ( dev-util/cunit + valgrind? ( dev-util/valgrind ) ) +" + +RESTRICT="!test? ( test )" + +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +S="${WORKDIR}/${MY_P}" + +PATCHES=( + # needs port + #epatch "${FILESDIR}/${PN}"-0.8DrO_o-waflib-fix-perl.patch #578778 + + "${FILESDIR}/${PN}"-0.8-ffmpeg2.patch #536232 + + "${FILESDIR}/${PN}"-0.8-rtvg.patch #424377 + + # required to build tarball from git tree + "${FILESDIR}/${P}"-tarball.patch + + # fix hash to be the same on LE/BE platforms + "${FILESDIR}/${P}"-be-hash.patch + + # handle mac-3 -> -4 API change + "${FILESDIR}/${P}"-mac-4.patch + + # C++ client dangling reference: https://github.com/xmms2/xmms2-devel/pull/5 + "${FILESDIR}/${P}"-cpp-client.patch + + # gcc-10 stopped putting globals into common section + "${FILESDIR}/${P}"-gcc-10.patch + + # fix required since faad 2.9.0 + "${FILESDIR}/${P}"-faad.patch +) + +pkg_setup() { + # used both for building xmms2 and + # optionally linking client library + # against python + python-single-r1_pkg_setup +} + +# use_enable() is taken as proto +# $1 - useflag +# $2 - xmms2 option/plugin name (equals to $1 if not set) + +xmms2_flag() { + [[ -z $1 ]] && eerror "!!! empty arg. usage: xmms2_flag []." + + local UWORD=${2:-$1} + + case $1 in + ENABLED) + echo ",${UWORD}" + ;; + DISABLED) + ;; + *) + use $1 && echo ",${UWORD}" + ;; + esac +} + +src_prepare() { + mv "${WORKDIR}/waf-${WAF_VER}"/{waf,waflib/} . || die + default +} + +src_configure() { + # ./configure alike options. + local waf_params=( + --prefix=/usr + --libdir=/usr/$(get_libdir) + --with-target-platform="${CHOST}" + --mandir=/usr/share/man + --infodir=/usr/share/info + --datadir=/usr/share + --sysconfdir=/etc + --localstatedir=/var/lib + ) + + local optionals="" + local plugins="" + if ! use server ; then + waf_params+=( --without-xmms2d ) + else + # some fun static mappings: + local option_map=( # USE # sorted xmms2 option flag (same, as USE if empty) + "phonehome et" + "ENABLED launcher" + "mlib-update medialib-updater" + "ENABLED nycli" + " perl" + "ENABLED pixmaps" + " python" + " ruby" + "DISABLED tests" + "DISABLED vistest" + "cxx xmmsclient++" + "cxx xmmsclient++-glib" + "DISABLED xmmsclient-cf" + "DISABLED xmmsclient-ecore" # not in tree + + "test tests" + ) + + local plugin_map=( # USE # sorted xmms2 plugin flag (same, as USE if empty) + " alsa" + " airplay" + " ao" + "ffmpeg apefile" + "ffmpeg avcodec" + " asf" + "ENABLED asx" + " cdda" + "DISABLED coreaudio" # MacOS only? + " curl" + "ENABLED cue" + "zeroconf daap" + "ENABLED diskwrite" + "ENABLED equalizer" + "aac faad" + "ENABLED file" + " flac" + " fluidsynth" + "ffmpeg flv" + "ffmpeg tta" + "DISABLED gme" # not in tree + "DISABLED gvfs" # obsolete #647604 + "ENABLED html" + " ices" + "ENABLED icymetaint" + "ENABLED id3v2" + " jack" + "ENABLED karaoke" + "ENABLED m3u" + " mac" + " mms" + " mad" + "ENABLED midsquash" + " mp4" # bug #387961 (aac, mp3, ape can sit there) + "mp3 mpg123" + " modplug" + " musepack" + "DISABLED nms" # not in tree + "ENABLED normalize" + "ENABLED null" + "ENABLED nulstripper" + " ofa" + " opus" + " oss" + "ENABLED pls" + "pulseaudio pulse" + "ENABLED replaygain" + "xml rss" + " samba" + "DISABLED sc68" #not in tree + " sid" + " sndfile" + " speex" + "DISABLED sun" # {Open,Net}BSD only + "DISABLED tremor" # not in tree + " vorbis" + " vocoder" + "ffmpeg tta" + "ENABLED wave" + "DISABLED waveout" # windows only + " wavpack" + "xml xspf" + "ENABLED xml" + ) + + local option + for option in "${option_map[@]}"; do + optionals+=$(xmms2_flag $option) + done + + local plugin + for plugin in "${plugin_map[@]}"; do + plugins+=$(xmms2_flag $plugin) + done + + if use perl; then + perl_set_version + waf_params+=( --with-perl-archdir="${ARCH_LIB}" ) + fi + fi # ! server + + # pass them explicitely even if empty as we try to avoid magic deps + waf_params+=( + --with-optionals="${optionals:1}" # skip first ',' if yet + --with-plugins="${plugins:1}" + $(use_with valgrind) + ) + + CC="$(tc-getCC)" \ + CPP="$(tc-getCPP)" \ + AR="$(tc-getAR)" \ + RANLIB="$(tc-getRANLIB)" \ + CXX="$(tc-getCXX)" \ + ./waf configure "${waf_params[@]}" || die "'waf configure' failed" +} + +src_compile() { + # waf is very keen to run tests in build phase (bug #424377) but + # it does not bother running tests twice, so the hack below works: + ./waf --verbose build || ./waf --verbose build || die "waf build failed" +} + +src_test() { + # rerun tests + ./waf --alltests || die "waf --alltests failed" +} + +src_install() { + ./waf --without-ldconfig --destdir="${D}" install || die "'waf install' failed" + dodoc AUTHORS TODO + + python_optimize + + # waftools/man.py always compresses man pages with gzip. + # to avoid code changed let's just un-gzip manpages + local m + for m in "${ED}"/usr/share/man/man1/*.gz; do + einfo "Uncompressing '${m#${ED}}' back." + gzip -d "${m}" || die + done +} + +pkg_postinst() { + elog "This version is built on experimental development code" + elog "If you encounter any errors report them at https://bugs.xmms2.org" + elog "and visit #xmms2 at irc://irc.freenode.net" + if use phonehome ; then + einfo "" + einfo "The phone-home client xmms2-et was activated" + einfo "This client sends anonymous usage-statistics to the xmms2" + einfo "developers which may help finding bugs" + einfo "Disable the phonehome useflag if you don't like that" + fi +} -- cgit v1.2.3