Diff oprofile-1.3.0 with a oprofile-1.4.0

/usr/portage/dev-util/oprofile/oprofile-1.4.0.ebuild 2021-05-04 10:09:00.000000000 +0300
1
# Copyright 1999-2020 Gentoo Authors
1
# Copyright 1999-2021 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI=6
5
inherit autotools java-pkg-opt-2 linux-info user
4
EAPI=7
5
inherit autotools java-pkg-opt-2 linux-info
6 6

  
7 7
DESCRIPTION="A transparent low-overhead system-wide profiler"
8 8
HOMEPAGE="http://oprofile.sourceforge.net"
......
10 10

  
11 11
LICENSE="GPL-2"
12 12
SLOT="0"
13
KEYWORDS="~alpha amd64 arm ~hppa ~mips ppc ppc64 ~sparc x86"
14
IUSE="java pch"
13
KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~sparc x86"
14
IUSE="apidoc java pch static-libs"
15 15

  
16
RDEPEND=">=dev-libs/popt-1.7-r1
16
BDEPEND="
17
	apidoc? ( app-doc/doxygen[dot] )
18
	java? ( >=virtual/jdk-1.8:= )
19
"
20
CDEPEND="
21
	>=dev-libs/popt-1.7-r1
17 22
	sys-libs/binutils-libs:=
18
	>=sys-libs/glibc-2.3.2-r1
19
	java? ( >=virtual/jdk-1.5:= )
20
	ppc64? ( dev-libs/libpfm )"
21
DEPEND="${RDEPEND}
22
	>=sys-kernel/linux-headers-2.6.31"
23
	elibc_glibc? ( >=sys-libs/glibc-2.3.2-r1 )
24
	ppc64? ( dev-libs/libpfm )
25
"
26
DEPEND="${CDEPEND}
27
	>=sys-kernel/linux-headers-2.6.31
28
"
29
RDEPEND="${CDEPEND}
30
	acct-user/oprofile
31
	acct-group/oprofile
32
"
23 33

  
24 34
CONFIG_CHECK="PERF_EVENTS"
25 35
ERROR_PERF_EVENTS="CONFIG_PERF_EVENTS is mandatory for ${PN} to work."
......
32 42
		echo
33 43
	fi
34 44

  
35
	# Required for JIT support, see README_PACKAGERS
36
	enewgroup ${PN}
37
	enewuser ${PN} -1 -1 -1 ${PN}
38

  
39 45
	use java && java-pkg_init
40 46
}
41 47

  
42 48
src_prepare() {
43
	eapply "${FILESDIR}/binutils-2.34.patch"
49
	eapply "${FILESDIR}/musl.patch"
50
	# bug 723092
51
	sed -i 's/==/=/g' configure.ac || die
52

  
44 53
	java-pkg-opt-2_src_prepare
45 54
	eautoreconf
46 55
}
47 56

  
48 57
src_configure() {
58
	local jh=""
59
	use java && jh="$(java-config -O)"
49 60
	econf \
50 61
		--disable-werror \
51 62
		$(use_enable pch) \
52
		$(use_with java java ${JAVA_HOME})
63
		$(use_with java java "${jh}")
64
}
65

  
66
src_compile() {
67
	default
68
	use apidoc && emake -C doc/srcdoc
53 69
}
54 70

  
55 71
src_install() {
56 72
	emake DESTDIR="${D}" htmldir="/usr/share/doc/${PF}" install
73
	use static-libs || rm "${ED}"/usr/$(get_libdir)/${PN}/*.{a,la}
74
	use apidoc && dodoc -r doc/srcdoc/html
57 75

  
58 76
	dodoc ChangeLog* README TODO
59 77
	echo "LDPATH=${PREFIX}/usr/$(get_libdir)/${PN}" > "${T}/10${PN}" || die
Thank you!