From c743ee4e6e6efa0e6422da4ec756bd6f0d86d740 Mon Sep 17 00:00:00 2001 From: James Le Cuirot Date: Mon, 13 Apr 2020 22:47:58 +0100 Subject: media-sound/xmms2: Patch around faad plugin breakage since faad 2.9.0 Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: James Le Cuirot --- .../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 +++++++++++++++++++++ 3 files changed, 345 insertions(+), 324 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 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-65-gdbad