Gentoo Archives: gentoo-commits

From: Andrew Savchenko <bircoph@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/oprofile/files/, dev-util/oprofile/
Date: Sat, 05 Sep 2020 11:05:36
Message-Id: 1599303918.44046f58059e057b3cddd7ce286cd71e6de81955.bircoph@gentoo
1 commit: 44046f58059e057b3cddd7ce286cd71e6de81955
2 Author: Andrew Savchenko <bircoph <AT> gentoo <DOT> org>
3 AuthorDate: Sat Sep 5 10:59:57 2020 +0000
4 Commit: Andrew Savchenko <bircoph <AT> gentoo <DOT> org>
5 CommitDate: Sat Sep 5 11:05:18 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=44046f58
7
8 dev-util/oprofile: fix build with musl
9
10 Package-Manager: Portage-3.0.3, Repoman-3.0.0
11 Signed-off-by: Andrew Savchenko <bircoph <AT> gentoo.org>
12
13 dev-util/oprofile/files/musl.patch | 23 +++++++++++++++++++++++
14 dev-util/oprofile/oprofile-1.4.0.ebuild | 3 ++-
15 2 files changed, 25 insertions(+), 1 deletion(-)
16
17 diff --git a/dev-util/oprofile/files/musl.patch b/dev-util/oprofile/files/musl.patch
18 new file mode 100644
19 index 00000000000..985eeece7bd
20 --- /dev/null
21 +++ b/dev-util/oprofile/files/musl.patch
22 @@ -0,0 +1,23 @@
23 +--- oprofile-1.4.0/pe_profiling/operf.cpp.orig 2016-08-08 18:03:27.000000000 +0300
24 ++++ oprofile-1.4.0/pe_profiling/operf.cpp 2020-09-05 12:45:55.237558495 +0300
25 +@@ -860,9 +860,9 @@
26 + {
27 + if (remove(fpath)) {
28 + perror("sample data removal error");
29 +- return FTW_STOP;
30 ++ return 1;
31 + } else {
32 +- return FTW_CONTINUE;
33 ++ return 0;
34 + }
35 + }
36 +
37 +@@ -897,7 +897,7 @@
38 + return;
39 +
40 + if (!operf_options::append) {
41 +- int flags = FTW_DEPTH | FTW_ACTIONRETVAL;
42 ++ int flags = FTW_DEPTH;
43 + errno = 0;
44 + if (nftw(previous_sampledir.c_str(), __delete_old_previous_sample_data, 32, flags) !=0 &&
45 + errno != ENOENT) {
46
47 diff --git a/dev-util/oprofile/oprofile-1.4.0.ebuild b/dev-util/oprofile/oprofile-1.4.0.ebuild
48 index e881632d5f3..485fdf66c1f 100644
49 --- a/dev-util/oprofile/oprofile-1.4.0.ebuild
50 +++ b/dev-util/oprofile/oprofile-1.4.0.ebuild
51 @@ -20,7 +20,7 @@ BDEPEND="
52 CDEPEND="
53 >=dev-libs/popt-1.7-r1
54 sys-libs/binutils-libs:=
55 - >=sys-libs/glibc-2.3.2-r1
56 + elibc_glibc? ( >=sys-libs/glibc-2.3.2-r1 )
57 ppc64? ( dev-libs/libpfm )
58 "
59 DEPEND="${CDEPEND}
60 @@ -46,6 +46,7 @@ pkg_setup() {
61 }
62
63 src_prepare() {
64 + eapply "${FILESDIR}/musl.patch"
65 # bug 723092
66 sed -i 's/==/=/g' configure.ac || die