diff options
author | Andrew Savchenko <bircoph@gentoo.org> | 2020-08-30 16:01:42 +0300 |
---|---|---|
committer | Andrew Savchenko <bircoph@gentoo.org> | 2020-08-30 16:05:04 +0300 |
commit | d9f840af70f1d562cb326d3829861c1be64aa761 (patch) | |
tree | 8509c0a66bf4f4ae8cb9a0684cc2148e7247b790 /dev-util/oprofile | |
parent | acct-user/oprofile: add user for dev-util/oprofile (diff) | |
download | gentoo-d9f840af70f1d562cb326d3829861c1be64aa761.tar.gz gentoo-d9f840af70f1d562cb326d3829861c1be64aa761.tar.bz2 gentoo-d9f840af70f1d562cb326d3829861c1be64aa761.zip |
dev-util/oprofile: version bump
- Update to 1.4.0
- Migrate to GLEP 81
- Add support for doxygen docs build via USE=apidoc
- Remove bash-specific operators from configure
- Add USE="static-libs" to control *.a and *.la installation
Closes: https://bugs.gentoo.org/730716
Closes: https://bugs.gentoo.org/723092
Package-Manager: Portage-3.0.3, Repoman-3.0.0
Signed-off-by: Andrew Savchenko <bircoph@gentoo.org>
Diffstat (limited to 'dev-util/oprofile')
-rw-r--r-- | dev-util/oprofile/Manifest | 1 | ||||
-rw-r--r-- | dev-util/oprofile/metadata.xml | 3 | ||||
-rw-r--r-- | dev-util/oprofile/oprofile-1.4.0.ebuild | 87 |
3 files changed, 91 insertions, 0 deletions
diff --git a/dev-util/oprofile/Manifest b/dev-util/oprofile/Manifest index 7a50e041dc76..7fab711d2372 100644 --- a/dev-util/oprofile/Manifest +++ b/dev-util/oprofile/Manifest @@ -1 +1,2 @@ DIST oprofile-1.3.0.tar.gz 1547258 BLAKE2B d8777e41856dc2f082570a1542609bd730fd7076000443f2e17c77eaf75df7a7a772ebb49d82ee657f563797858cecb4c23b130b0174d154c54d5619b8528ad1 SHA512 02a940cd8d38834dca2a97c8ac0fff04ef95b3819cfdf74a462b9326c7abbf2dc55d2a9b9d1fbefc7f455465bf85516be2b879d7daf1861ba2c4af51214377ba +DIST oprofile-1.4.0.tar.gz 1557625 BLAKE2B fe1a725b713da0e06d3876c52f001163965c1b0dd8ccbb271ef6924525ac6ca342d55172c06cc21681b441c744780d5cb523be08562952c5916005ec67734221 SHA512 44c0ae55d20d623ea8b4245bfe3e208813dbb8778d7e320378ffe70538ef6af1a6ddaf5d110e29751c216879543f13121dd71cb320023205622b3f0cd6b157df diff --git a/dev-util/oprofile/metadata.xml b/dev-util/oprofile/metadata.xml index 2a35c6646c1e..99119adc69ca 100644 --- a/dev-util/oprofile/metadata.xml +++ b/dev-util/oprofile/metadata.xml @@ -6,6 +6,9 @@ <name>Andrew Savchenko</name> </maintainer> <longdescription>A transparent low-overhead system-wide profiler</longdescription> + <use> + <flag name="apidoc">Provide doxygen generated API docs.</flag> + </use> <upstream> <remote-id type="sourceforge">oprofile</remote-id> </upstream> diff --git a/dev-util/oprofile/oprofile-1.4.0.ebuild b/dev-util/oprofile/oprofile-1.4.0.ebuild new file mode 100644 index 000000000000..e881632d5f3b --- /dev/null +++ b/dev-util/oprofile/oprofile-1.4.0.ebuild @@ -0,0 +1,87 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools java-pkg-opt-2 linux-info + +DESCRIPTION="A transparent low-overhead system-wide profiler" +HOMEPAGE="http://oprofile.sourceforge.net" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86" +IUSE="apidoc java pch static-libs" + +BDEPEND=" + apidoc? ( app-doc/doxygen[dot] ) + java? ( >=virtual/jdk-1.5:= ) +" +CDEPEND=" + >=dev-libs/popt-1.7-r1 + sys-libs/binutils-libs:= + >=sys-libs/glibc-2.3.2-r1 + ppc64? ( dev-libs/libpfm ) +" +DEPEND="${CDEPEND} + >=sys-kernel/linux-headers-2.6.31 +" +RDEPEND="${CDEPEND} + acct-user/oprofile + acct-group/oprofile +" + +CONFIG_CHECK="PERF_EVENTS" +ERROR_PERF_EVENTS="CONFIG_PERF_EVENTS is mandatory for ${PN} to work." + +pkg_setup() { + linux-info_pkg_setup + if ! kernel_is -ge 2 6 31; then + echo + ewarn "Support for kernels before 2.6.31 has been dropped in ${PN}-1.0.0." + echo + fi + + use java && java-pkg_init +} + +src_prepare() { + # bug 723092 + sed -i 's/==/=/g' configure.ac || die + + java-pkg-opt-2_src_prepare + eautoreconf +} + +src_configure() { + local jh="" + use java && jh="$(java-config -O)" + econf \ + --disable-werror \ + $(use_enable pch) \ + $(use_with java java "${jh}") +} + +src_compile() { + default + use apidoc && emake -C doc/srcdoc +} + +src_install() { + emake DESTDIR="${D}" htmldir="/usr/share/doc/${PF}" install + use static-libs || rm "${ED}"/usr/$(get_libdir)/${PN}/*.{a,la} + use apidoc && dodoc -r doc/srcdoc/html + + dodoc ChangeLog* README TODO + echo "LDPATH=${PREFIX}/usr/$(get_libdir)/${PN}" > "${T}/10${PN}" || die + doenvd "${T}/10${PN}" +} + +pkg_postinst() { + echo + elog "Starting from ${PN}-1.0.0 opcontrol was removed, use operf instead." + elog "CONFIG_OPROFILE is no longer used, you may remove it from your kernels." + elog "Please read manpages and this html doc:" + elog " /usr/share/doc/${PF}/${PN}.html" + echo +} |