diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2016-04-02 13:03:58 +0100 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2016-04-02 13:04:07 +0100 |
commit | 7133a4cc49d1299e0a90ebf19ea6d2a92ed6f8b5 (patch) | |
tree | a6cca52184bab4efefd99a5d863e58f16d8998a8 /media-sound/xmms2 | |
parent | dev-libs/libcec: Version bump, EAPI=6, Fix 576746 (diff) | |
download | gentoo-7133a4cc49d1299e0a90ebf19ea6d2a92ed6f8b5.tar.gz gentoo-7133a4cc49d1299e0a90ebf19ea6d2a92ed6f8b5.tar.bz2 gentoo-7133a4cc49d1299e0a90ebf19ea6d2a92ed6f8b5.zip |
media-sound/xmms2: Add knob to disable valgrind at test runtime, bug #424377
When valgrind is installed in system but is not
working we should still be able to run tests.
Reported-by: Diego Elio Pettenò
Bug: https://bugs.gentoo.org/424377
Package-Manager: portage-2.2.28
Diffstat (limited to 'media-sound/xmms2')
-rw-r--r-- | media-sound/xmms2/files/xmms2-0.8-rtvg.patch | 36 | ||||
-rw-r--r-- | media-sound/xmms2/metadata.xml | 1 | ||||
-rw-r--r-- | media-sound/xmms2/xmms2-0.8-r2.ebuild | 9 |
3 files changed, 43 insertions, 3 deletions
diff --git a/media-sound/xmms2/files/xmms2-0.8-rtvg.patch b/media-sound/xmms2/files/xmms2-0.8-rtvg.patch new file mode 100644 index 000000000000..20be34273883 --- /dev/null +++ b/media-sound/xmms2/files/xmms2-0.8-rtvg.patch @@ -0,0 +1,36 @@ +Add knob to disable valgrind at test runtime. + +When valgrind is installed in system but is not +working we should still be able to run tests. + +Reported-by: Diego Elio Pettenò +Bug: https://bugs.gentoo.org/424377 +diff --git a/waftools/unittest.py b/waftools/unittest.py +index 4317287..6179dfd 100644 +--- a/waftools/unittest.py ++++ b/waftools/unittest.py +@@ -64,7 +64,8 @@ def generate_coverage(bld): + + def configure(conf): + conf.load("waf_unit_test") +- conf.find_program("valgrind", var="VALGRIND", mandatory=False) ++ if conf.options.enable_valgrind is True: ++ conf.find_program("valgrind", var="VALGRIND", mandatory=False) + conf.find_program("lcov", var="LCOV", mandatory=False) + conf.find_program("genhtml", var="GENHTML", mandatory=False) + +diff --git a/wscript b/wscript +index 99c1fa3..a98d5e3 100644 +--- a/wscript ++++ b/wscript +@@ -501,6 +501,10 @@ def options(opt): + dest='ldconfig', help="Run ldconfig after install even if not root") + opt.add_option('--without-ldconfig', action='store_false', + dest='ldconfig', help="Don't run ldconfig after install") ++ opt.add_option('--with-valgrind', action='store_true', default=None, ++ dest='enable_valgrind', help="Run testsuite under valgrind (if present).") ++ opt.add_option('--without-valgrind', action='store_false', default=None, ++ dest='enable_valgrind', help="Don't run testsuite under valgrind.") + + opt.sub_options("src/xmms") + for o in optional_subdirs + subdirs: diff --git a/media-sound/xmms2/metadata.xml b/media-sound/xmms2/metadata.xml index 099b50138aa5..acb83130968b 100644 --- a/media-sound/xmms2/metadata.xml +++ b/media-sound/xmms2/metadata.xml @@ -40,6 +40,7 @@ <flag name="phonehome">This client sends anonymous usage-statistics to the xmms2</flag> <flag name="server">Build xmms2 player daemon (otherwise only clients are built)</flag> <flag name="sid">Support for C64 SID</flag> + <flag name="valgrind">Run unit tests under valgrind.</flag> <flag name="vocoder">Phase vocoder effect plugin</flag> <flag name="mlib-update">Enable building of xmms2-mlib-updater client</flag> <flag name="xml">Enable support for various XML based playlists and sources: RSS, XSPF</flag> diff --git a/media-sound/xmms2/xmms2-0.8-r2.ebuild b/media-sound/xmms2/xmms2-0.8-r2.ebuild index 4500c37e84e4..515550e1f20a 100644 --- a/media-sound/xmms2/xmms2-0.8-r2.ebuild +++ b/media-sound/xmms2/xmms2-0.8-r2.ebuild @@ -19,7 +19,7 @@ KEYWORDS="alpha amd64 ppc x86" IUSE="aac airplay +alsa ao asf avahi cdda curl cxx ffmpeg flac gvfs ices jack mac mlib-update mms +mad modplug mp3 mp4 musepack ofa oss perl phonehome pulseaudio python ruby -samba +server sid sndfile speex test +vorbis vocoder wavpack xml" +samba +server sid sndfile speex test valgrind +vorbis vocoder wavpack xml" RDEPEND="server? ( >=dev-db/sqlite-3.3.4 @@ -73,7 +73,8 @@ DEPEND="${RDEPEND} perl? ( dev-perl/Module-Build virtual/perl-Module-Metadata ) virtual/pkgconfig - test? ( dev-util/cunit ) + test? ( dev-util/cunit + valgrind? ( dev-util/valgrind ) ) " S="${WORKDIR}/${MY_P}" @@ -116,13 +117,14 @@ src_prepare() { epatch "${FILESDIR}/${P}"-ffmpeg2.patch #536232 epatch "${FILESDIR}/${P}"-cpython.patch epatch "${FILESDIR}/${P}"-modpug.patch #536046 - epatch "${FILESDIR}/${P}"-audio4-p1.patch + epatch "${FILESDIR}/${P}"-audio4-p1.patch #540890 epatch "${FILESDIR}/${P}"-audio4-p2.patch epatch "${FILESDIR}/${P}"-audio4-p3.patch epatch "${FILESDIR}/${P}"-audio4-p4.patch epatch "${FILESDIR}/${P}"-audio4-p5.patch epatch "${FILESDIR}/${P}"-audio4-p6.patch epatch "${FILESDIR}/${P}"-audio4-p7.patch + epatch "${FILESDIR}/${P}"-rtvg.patch #424377 if has_version dev-libs/libcdio-paranoia; then sed -i -e 's:cdio/cdda.h:cdio/paranoia/cdda.h:' src/plugins/cdda/cdda.c || die @@ -242,6 +244,7 @@ src_configure() { # pass them explicitely even if empty as we try to avoid magic deps waf_params+=" --with-optionals=${optionals:1}" # skip first ',' if yet waf_params+=" --with-plugins=${plugins:1}" + waf_params+=" $(use_with valgrind)" CC="$(tc-getCC)" \ CPP="$(tc-getCPP)" \ |