1 |
commit: 7133a4cc49d1299e0a90ebf19ea6d2a92ed6f8b5 |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Apr 2 12:03:58 2016 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Apr 2 12:04:07 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7133a4cc |
7 |
|
8 |
media-sound/xmms2: Add knob to disable valgrind at test runtime, bug #424377 |
9 |
|
10 |
When valgrind is installed in system but is not |
11 |
working we should still be able to run tests. |
12 |
|
13 |
Reported-by: Diego Elio Pettenò |
14 |
Bug: https://bugs.gentoo.org/424377 |
15 |
|
16 |
Package-Manager: portage-2.2.28 |
17 |
|
18 |
media-sound/xmms2/files/xmms2-0.8-rtvg.patch | 36 ++++++++++++++++++++++++++++ |
19 |
media-sound/xmms2/metadata.xml | 1 + |
20 |
media-sound/xmms2/xmms2-0.8-r2.ebuild | 9 ++++--- |
21 |
3 files changed, 43 insertions(+), 3 deletions(-) |
22 |
|
23 |
diff --git a/media-sound/xmms2/files/xmms2-0.8-rtvg.patch b/media-sound/xmms2/files/xmms2-0.8-rtvg.patch |
24 |
new file mode 100644 |
25 |
index 0000000..20be342 |
26 |
--- /dev/null |
27 |
+++ b/media-sound/xmms2/files/xmms2-0.8-rtvg.patch |
28 |
@@ -0,0 +1,36 @@ |
29 |
+Add knob to disable valgrind at test runtime. |
30 |
+ |
31 |
+When valgrind is installed in system but is not |
32 |
+working we should still be able to run tests. |
33 |
+ |
34 |
+Reported-by: Diego Elio Pettenò |
35 |
+Bug: https://bugs.gentoo.org/424377 |
36 |
+diff --git a/waftools/unittest.py b/waftools/unittest.py |
37 |
+index 4317287..6179dfd 100644 |
38 |
+--- a/waftools/unittest.py |
39 |
++++ b/waftools/unittest.py |
40 |
+@@ -64,7 +64,8 @@ def generate_coverage(bld): |
41 |
+ |
42 |
+ def configure(conf): |
43 |
+ conf.load("waf_unit_test") |
44 |
+- conf.find_program("valgrind", var="VALGRIND", mandatory=False) |
45 |
++ if conf.options.enable_valgrind is True: |
46 |
++ conf.find_program("valgrind", var="VALGRIND", mandatory=False) |
47 |
+ conf.find_program("lcov", var="LCOV", mandatory=False) |
48 |
+ conf.find_program("genhtml", var="GENHTML", mandatory=False) |
49 |
+ |
50 |
+diff --git a/wscript b/wscript |
51 |
+index 99c1fa3..a98d5e3 100644 |
52 |
+--- a/wscript |
53 |
++++ b/wscript |
54 |
+@@ -501,6 +501,10 @@ def options(opt): |
55 |
+ dest='ldconfig', help="Run ldconfig after install even if not root") |
56 |
+ opt.add_option('--without-ldconfig', action='store_false', |
57 |
+ dest='ldconfig', help="Don't run ldconfig after install") |
58 |
++ opt.add_option('--with-valgrind', action='store_true', default=None, |
59 |
++ dest='enable_valgrind', help="Run testsuite under valgrind (if present).") |
60 |
++ opt.add_option('--without-valgrind', action='store_false', default=None, |
61 |
++ dest='enable_valgrind', help="Don't run testsuite under valgrind.") |
62 |
+ |
63 |
+ opt.sub_options("src/xmms") |
64 |
+ for o in optional_subdirs + subdirs: |
65 |
|
66 |
diff --git a/media-sound/xmms2/metadata.xml b/media-sound/xmms2/metadata.xml |
67 |
index 099b501..acb8313 100644 |
68 |
--- a/media-sound/xmms2/metadata.xml |
69 |
+++ b/media-sound/xmms2/metadata.xml |
70 |
@@ -40,6 +40,7 @@ |
71 |
<flag name="phonehome">This client sends anonymous usage-statistics to the xmms2</flag> |
72 |
<flag name="server">Build xmms2 player daemon (otherwise only clients are built)</flag> |
73 |
<flag name="sid">Support for C64 SID</flag> |
74 |
+ <flag name="valgrind">Run unit tests under valgrind.</flag> |
75 |
<flag name="vocoder">Phase vocoder effect plugin</flag> |
76 |
<flag name="mlib-update">Enable building of xmms2-mlib-updater client</flag> |
77 |
<flag name="xml">Enable support for various XML based playlists and sources: RSS, XSPF</flag> |
78 |
|
79 |
diff --git a/media-sound/xmms2/xmms2-0.8-r2.ebuild b/media-sound/xmms2/xmms2-0.8-r2.ebuild |
80 |
index 4500c37..515550e 100644 |
81 |
--- a/media-sound/xmms2/xmms2-0.8-r2.ebuild |
82 |
+++ b/media-sound/xmms2/xmms2-0.8-r2.ebuild |
83 |
@@ -19,7 +19,7 @@ KEYWORDS="alpha amd64 ppc x86" |
84 |
IUSE="aac airplay +alsa ao asf avahi cdda curl cxx ffmpeg flac gvfs ices |
85 |
jack mac mlib-update mms +mad modplug mp3 mp4 musepack ofa oss |
86 |
perl phonehome pulseaudio python ruby |
87 |
-samba +server sid sndfile speex test +vorbis vocoder wavpack xml" |
88 |
+samba +server sid sndfile speex test valgrind +vorbis vocoder wavpack xml" |
89 |
|
90 |
RDEPEND="server? ( |
91 |
>=dev-db/sqlite-3.3.4 |
92 |
@@ -73,7 +73,8 @@ DEPEND="${RDEPEND} |
93 |
perl? ( dev-perl/Module-Build |
94 |
virtual/perl-Module-Metadata ) |
95 |
virtual/pkgconfig |
96 |
- test? ( dev-util/cunit ) |
97 |
+ test? ( dev-util/cunit |
98 |
+ valgrind? ( dev-util/valgrind ) ) |
99 |
" |
100 |
|
101 |
S="${WORKDIR}/${MY_P}" |
102 |
@@ -116,13 +117,14 @@ src_prepare() { |
103 |
epatch "${FILESDIR}/${P}"-ffmpeg2.patch #536232 |
104 |
epatch "${FILESDIR}/${P}"-cpython.patch |
105 |
epatch "${FILESDIR}/${P}"-modpug.patch #536046 |
106 |
- epatch "${FILESDIR}/${P}"-audio4-p1.patch |
107 |
+ epatch "${FILESDIR}/${P}"-audio4-p1.patch #540890 |
108 |
epatch "${FILESDIR}/${P}"-audio4-p2.patch |
109 |
epatch "${FILESDIR}/${P}"-audio4-p3.patch |
110 |
epatch "${FILESDIR}/${P}"-audio4-p4.patch |
111 |
epatch "${FILESDIR}/${P}"-audio4-p5.patch |
112 |
epatch "${FILESDIR}/${P}"-audio4-p6.patch |
113 |
epatch "${FILESDIR}/${P}"-audio4-p7.patch |
114 |
+ epatch "${FILESDIR}/${P}"-rtvg.patch #424377 |
115 |
|
116 |
if has_version dev-libs/libcdio-paranoia; then |
117 |
sed -i -e 's:cdio/cdda.h:cdio/paranoia/cdda.h:' src/plugins/cdda/cdda.c || die |
118 |
@@ -242,6 +244,7 @@ src_configure() { |
119 |
# pass them explicitely even if empty as we try to avoid magic deps |
120 |
waf_params+=" --with-optionals=${optionals:1}" # skip first ',' if yet |
121 |
waf_params+=" --with-plugins=${plugins:1}" |
122 |
+ waf_params+=" $(use_with valgrind)" |
123 |
|
124 |
CC="$(tc-getCC)" \ |
125 |
CPP="$(tc-getCPP)" \ |