summaryrefslogtreecommitdiff
path: root/dev-util/oprofile
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-util/oprofile
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-util/oprofile')
-rw-r--r--dev-util/oprofile/Manifest14
-rw-r--r--dev-util/oprofile/files/oprofile-0.9.9-gcc-4.9-non-ppc.patch36
-rw-r--r--dev-util/oprofile/files/oprofile-0.9.9-gcc-4.9-unused.patch47
-rw-r--r--dev-util/oprofile/files/oprofile-1.0.0-athlon.patch20
-rw-r--r--dev-util/oprofile/files/oprofile-1.1.0-gcc6-template-depth.patch10
-rw-r--r--dev-util/oprofile/files/oprofile-1.1.0-gcc6.patch30
-rw-r--r--dev-util/oprofile/metadata.xml12
-rw-r--r--dev-util/oprofile/oprofile-0.9.9-r2.ebuild82
-rw-r--r--dev-util/oprofile/oprofile-1.1.0-r1.ebuild75
-rw-r--r--dev-util/oprofile/oprofile-1.2.0-r1.ebuild64
10 files changed, 390 insertions, 0 deletions
diff --git a/dev-util/oprofile/Manifest b/dev-util/oprofile/Manifest
new file mode 100644
index 000000000000..e99ef674a858
--- /dev/null
+++ b/dev-util/oprofile/Manifest
@@ -0,0 +1,14 @@
+AUX oprofile-0.9.9-gcc-4.9-non-ppc.patch 1612 SHA256 491897ec7b00e72f0b645c5b0eb6212d7edc46dc6322978d8d69b655fb2ba928 SHA512 6cd0d067a95528aa40adb76cb38fc7ba76da16357621fb9e25ad6c61662e5bab9ebc9f52ee23da078aed2f650d95d2a3dc76389d93775e328be34f65570abaa3 WHIRLPOOL 3096a872a734fdf925e15f014c0327dcf664aec29ff2195abef00416142959a7dceaebe7245cbcfa04f708d7777f5b999ea597c83fa2414a03c6c995821017bf
+AUX oprofile-0.9.9-gcc-4.9-unused.patch 1285 SHA256 123930ceb8f1a743cf8d1bd679d73505dd419807335c19616c44ba8395974c5e SHA512 79f3388bb2e3a76611ecc414618f89b27f471f464aa4be63ac54b620b4b37c4e4e39179230775f712fcf63919a85f3808e1577f6e7f4ae3319ebe28c44667952 WHIRLPOOL c96332536a0fcc6d38765b7d7e9f27b373cd3cb0c6c70d22dade13e4c15a907826ca1e390fa5b77ac580e602c594ea2aaa8a3ca0860a558f3213d8273cba3261
+AUX oprofile-1.0.0-athlon.patch 641 SHA256 bb2fd7d0d644df165f225efc14731c0e54a134adcf918b4cd54b3be81b4003b5 SHA512 450afe61b035f987e1e53f44a8ed69886a0031ec21c61225fdf34dc9a5fb6292bbd81e197e2db22d31e01f739463ed8916dd8f95c63f17ac789e62866b8505fe WHIRLPOOL 0a6cdf86c5342b2b715cdcaa86789f04739623587ce73538e4683842b8a4bff45ac35147576e54a0b219e9cd89cce7aebc18b77004c9fdc63c486b3c4c73099e
+AUX oprofile-1.1.0-gcc6-template-depth.patch 454 SHA256 91cc1aa17be128b1c22b7c17bc9e389de875b040a2295690c3fd399a9a8f589c SHA512 c5356ff2e0b31b792eac13c4f19123f6fadfc5fa0154bd422a86185514410eef48eabc321c32d344b1dbf9357de888130e0a84336d08551cea7c787478f9f21e WHIRLPOOL 4baaff5e4c000da08364394128693a0cdaa46e54cab0a5ea3644c775ea9887ce5447319a3b15f6235d4e8c94b1a129f678baa1507c276bb559cc4bfe83a6b94b
+AUX oprofile-1.1.0-gcc6.patch 777 SHA256 985e0845702fef9a6d2985bced1150bd80995fbd3dc88017b887d776f4b489d7 SHA512 de907f9583255a313c719eaf8163385de15a40d4ea76eb13e91f223375597f9d1ef41ad21bf129e550536e6a6a316beb3cd2c528fd38cb17e3fc22256f1dbc38 WHIRLPOOL aaf36439043b07d2266efaf97deb1864508afd61026ce9465ad23cf3fad4a88ed8e1ea03dc5686eedd02c8b215e3ebee7bc7f37163464b6ee4c0ad4265eb6c9e
+DIST oprofile-0.9.9.tar.gz 1502834 SHA256 1e523400daaba7b8d0d15269e977a08b40edfea53970774b69ae130e25117597 SHA512 98cc3d2c15744d02ed649833cf4797482aec73bd52653e916f80b490e17a8250d988c4c945e52dd8999a0d0603fec405e99c9570dfc54baa4992950fe4d8763f WHIRLPOOL 534d04449923da5008dbf044f9783a1d39ad8b749170edf04a503ca1a885455fc8aef4f5894060d14135f5e3b0a0d577897779eed30dc26deff9b0663fcbb7d1
+DIST oprofile-1.1.0.tar.gz 1468502 SHA256 cf759a6de1a6033d5dfc93bda129a9f2e128aecc4238cc657feb0801d1b0366c SHA512 b26f67f20172a4912c0aafb3adf83f9084ea62b9ca89e4cfcb3e13276114a05b07587f7d250028995a10c39ae993e2bce271be11688010473ab9f0fd81715758 WHIRLPOOL b268af1578c485165624e0152751b6c5053c745e6813d6f13ea554993f311e540312854a36011e10560e82c378ef1fc357220a69cd713f73824ae249cc150650
+DIST oprofile-1.2.0.tar.gz 1533343 SHA256 eb95f98c40b7d0ee29b45fba3565d9f8381747528aa6b6159e37d4fa0c8ca57d SHA512 d642d9a8d71ad271a80d21806ffd8522613830f450a71dc531005e940f31f683936691898d381a31f8913715361db8c1713dfe3744a5f9214419349f6504717d WHIRLPOOL e677d0117ef232bbd8794793e9b9fb31c1d89dc87e5d797d18720ff8baaf0e2f6e8328662a6b1e5b2a5662081e06927923f7969502dea9609ab09ab424a2ae07
+EBUILD oprofile-0.9.9-r2.ebuild 1992 SHA256 2805dd488dacff0f2efd04b22b5d09cb34a425dc95ac2597d6fbc762d01bf618 SHA512 6d858d0f9a3d4f38618564cff40775fddec8bf1e98778c8e062227f5fbff720a91cdaed8bf50e4e480de747935c9f342754937f36f6af18f38118e04a3ddfdc5 WHIRLPOOL ca36f806af5fb51af9603e9786f6ac701401cbc22c7c3aa231dcbd96d939074c55b232b1c9813671821f98a7ae1f796b13d07d6ba7b71f547a100aef526c3818
+EBUILD oprofile-1.1.0-r1.ebuild 1835 SHA256 4a412ffbe32e228555efb9d575be7a5db9d58a94dd795252b452d281c60e401a SHA512 d53e071b01e6f2e9247444ea9130debd07db16c6df589709ee1a3e71a3d5f923af5f2c22ef4f721ddce3fd37c26b4744284d0bbf43138040dbddcae79960b4ed WHIRLPOOL 4d2840fcec7ec84fec9e8079aaf468d0d4dc5ea6102f5d36846243a64c1e16a8dcdedf08dcc3eb612e809a6294541087735f6a7e2b5858dd90db617e50a1ad1c
+EBUILD oprofile-1.2.0-r1.ebuild 1603 SHA256 daac87db1929bdb701dcb94f95adf3c95f52910e3467dd1a30d22dc165a8b123 SHA512 be29f71b347cf06159f406baedc7064c1c42248e26ff6557946ad216cb3024c7ee1a8f92f565dfdbdd96989ec000e832fb3002baac63f9dcb7cc618c42808f2b WHIRLPOOL 91cd1467f6444ada24fe6543bb7b589a10f58c83aa66eb967a4ec162a9473b414e4172ad04609716a87a9b4cc9423fbbab86c2913d2845baeffd255fc2741534
+MISC ChangeLog 7191 SHA256 caff7df5f7f7f4498331b093a727a0c3e78e40584cb8e153340e9478d938c24f SHA512 395f7bb7f6fdfbe7de14d66d484df39124395ba7f9045263e2540b6efe8c0ea64e9eaeed291e90e18caaff6e00d257a8161b431c094a4e4e5934f05a4845038a WHIRLPOOL c444c187143ac8904d5dceed7cdc9178ddb73c99c11a25caae08be5143b83773afd46f7ae0ad50fe24131e482778f8cb9c925821386b6aaa35c776f595ab1952
+MISC ChangeLog-2015 16859 SHA256 7da2ca27ee9cca6121d43a39383f43f55ac89b427785b0ca060babcef596e53c SHA512 50bb462e603642a869da7be3479b4a7fe95c85f8be7a2ee49e5c33dc4a36a9d93e89e9acc6841ce49d49c2a9ef32b4b0b57eb57ef6f1e315204ad181541995ef WHIRLPOOL fb1589b46ec17b4f513fa4067caaa2bbe9d784c9b2d89446a6be9e6b103e0c3b415aaf23ac89de2eb1f4d3db24cec7d2049bf175fa7431f1c3b30ded86b4d223
+MISC metadata.xml 423 SHA256 4f5e88258389ba2346a99e77e858ff72ef5abf678237d49df61855446c022155 SHA512 01f96b806fca3e20eb84908a1cd77edbe11291be0098aff2e4d20f0fbf86ea0ef9972c7148c791bc826152a109d16903781cc2f2f367a2ac8b8fb7e5efee378a WHIRLPOOL 0e4ebb0290bcd49a12b04b59de7a9a5c06a91abde3a5ca03afcd78a1c510269a2404347cea04fbe3677959ce986959d872875936b91c2ee0927a6e74170676b1
diff --git a/dev-util/oprofile/files/oprofile-0.9.9-gcc-4.9-non-ppc.patch b/dev-util/oprofile/files/oprofile-0.9.9-gcc-4.9-non-ppc.patch
new file mode 100644
index 000000000000..423c703f7ffb
--- /dev/null
+++ b/dev-util/oprofile/files/oprofile-0.9.9-gcc-4.9-non-ppc.patch
@@ -0,0 +1,36 @@
+Backported from 1.0.0:
+======================================================================
+commit 008e470a9b8751de0a3745e511cbc05b68759688
+Author: Aaro Koskinen <aaro.koskinen@iki.fi>
+Date: Mon May 12 08:28:46 2014 -0500
+
+ configure: fix test-for-synth check with GCC 4.9.0
+
+ With GCC 4.9.0 oprofile 0.9.9 build fails on non-PPC platfroms because
+ the "test-for-synth" configure check result is incorrect: There is a NULL
+ pointer dereference in the test program, so the compiler seems to optimize
+ the rest of the code away, and the test will always succeed regardless
+ whether powerpc_elf64_vec/bfd_elf64_powerpc_vec are present or not.
+ Fix by allocating the referred struct statically.
+
+ While at it, also include stdio.h to avoid a compiler warning.
+
+ Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
+
+diff --git a/m4/binutils.m4 b/m4/binutils.m4
+index 25fb15a..d7948c1 100644
+--- a/m4/binutils.m4
++++ b/m4/binutils.m4
+@@ -27,8 +27,10 @@ if test "$OS" = "Linux"; then
+ AC_MSG_CHECKING([whether bfd_get_synthetic_symtab() exists in BFD library])
+ rm -f test-for-synth
+ AC_LANG_CONFTEST(
+- [AC_LANG_PROGRAM([[#include <bfd.h>]],
+- [[asymbol * synthsyms; bfd * ibfd = 0;
++ [AC_LANG_PROGRAM([[#include <bfd.h>]
++ [#include <stdio.h>]
++ [static bfd _ibfd;]],
++ [[asymbol * synthsyms; bfd * ibfd = &_ibfd;
+ long synth_count = bfd_get_synthetic_symtab(ibfd, 0, 0, 0, 0, &synthsyms);
+ extern const bfd_target bfd_elf64_powerpc_vec;
+ extern const bfd_target bfd_elf64_powerpcle_vec;
diff --git a/dev-util/oprofile/files/oprofile-0.9.9-gcc-4.9-unused.patch b/dev-util/oprofile/files/oprofile-0.9.9-gcc-4.9-unused.patch
new file mode 100644
index 000000000000..5c541a053a72
--- /dev/null
+++ b/dev-util/oprofile/files/oprofile-0.9.9-gcc-4.9-unused.patch
@@ -0,0 +1,47 @@
+commit 98f57a6c0e32bc6080a50e1cdd769b9ff78108bc
+Author: William Cohen <wcohen@redhat.com>
+Date: Tue Jun 10 09:56:55 2014 -0500
+
+ Remove unused functions causing errors in recent gcc
+
+ The Fedora rawhide compiler is now stricter and will treat the
+ warnings for unused functions as errors and stop the compile. This patch
+ removes two unused functions in the code.
+
+ Signed-off-by: William Cohen <wcohen@redhat.com>
+
+diff --git a/libpp/callgraph_container.cpp b/libpp/callgraph_container.cpp
+index 1d1c95f..c5bc272 100644
+--- a/libpp/callgraph_container.cpp
++++ b/libpp/callgraph_container.cpp
+@@ -36,13 +36,6 @@ using namespace std;
+
+ namespace {
+
+-bool operator==(cg_symbol const & lhs, cg_symbol const & rhs)
+-{
+- less_symbol cmp_symb;
+- return !cmp_symb(lhs, rhs) && !cmp_symb(rhs, lhs);
+-}
+-
+-
+ // we store {caller,callee} inside a single u64
+ odb_key_t caller_to_key(u32 value)
+ {
+diff --git a/libpp/xml_utils.cpp b/libpp/xml_utils.cpp
+index 5f1a3a1..3de41e5 100644
+--- a/libpp/xml_utils.cpp
++++ b/libpp/xml_utils.cpp
+@@ -101,12 +101,6 @@ bool has_separated_thread_info()
+ }
+
+
+-string get_cpu_num(size_t pclass)
+-{
+- return classes.v[pclass].ptemplate.cpu;
+-}
+-
+-
+ }; // anonymous namespace
+
+ xml_utils::xml_utils(format_output::xml_formatter * xo,
diff --git a/dev-util/oprofile/files/oprofile-1.0.0-athlon.patch b/dev-util/oprofile/files/oprofile-1.0.0-athlon.patch
new file mode 100644
index 000000000000..5916271b3a00
--- /dev/null
+++ b/dev-util/oprofile/files/oprofile-1.0.0-athlon.patch
@@ -0,0 +1,20 @@
+Fix AMD Athlon CPU family recognition.
+See upstream bug 275 for details:
+https://sourceforge.net/p/oprofile/bugs/275/
+--- oprofile-1.0.0/libop/op_cpu_type.c.orig 2014-09-12 18:39:47.000000000 +0400
++++ oprofile-1.0.0/libop/op_cpu_type.c 2014-11-30 18:29:00.328342552 +0300
+@@ -538,10 +538,13 @@
+ family = cpu_family(eax);
+
+ /* These family does not exist in the past.*/
+- if (family < 0x0f || family == 0x13)
++ if ((family < 0x0f && family != 0x06) || family == 0x13)
+ return ret;
+
+ switch (family) {
++ case 0x6:
++ ret = op_get_cpu_number("i386/athlon");
++ break;
+ case 0x0f:
+ ret = op_get_cpu_number("x86-64/hammer");
+ break;
diff --git a/dev-util/oprofile/files/oprofile-1.1.0-gcc6-template-depth.patch b/dev-util/oprofile/files/oprofile-1.1.0-gcc6-template-depth.patch
new file mode 100644
index 000000000000..01fc86910a3a
--- /dev/null
+++ b/dev-util/oprofile/files/oprofile-1.1.0-gcc6-template-depth.patch
@@ -0,0 +1,10 @@
+--- oprofile-1.1.0/configure.ac.orig 2015-07-21 17:53:27.000000000 +0300
++++ oprofile-1.1.0/configure.ac 2016-11-22 01:15:31.329067697 +0300
+@@ -320,7 +320,6 @@
+ AX_CXXFLAGS_OPTION(OP_CXXFLAGS,[-Wall])
+ AX_CFLAGS_OPTION(OP_CFLAGS,[-fno-common])
+ AX_CXXFLAGS_OPTION(OP_CXXFLAGS,[-fno-common])
+-AX_CXXFLAGS_OPTION(OP_CXXFLAGS,[-ftemplate-depth-50])
+ AX_CFLAGS_OPTION(OP_CFLAGS,[-Wdeclaration-after-statement])
+
+ dnl enable option to use GCC test coverage
diff --git a/dev-util/oprofile/files/oprofile-1.1.0-gcc6.patch b/dev-util/oprofile/files/oprofile-1.1.0-gcc6.patch
new file mode 100644
index 000000000000..ab3ca7c1b142
--- /dev/null
+++ b/dev-util/oprofile/files/oprofile-1.1.0-gcc6.patch
@@ -0,0 +1,30 @@
+--- a/libop/op_alloc_counter.c
++++ b/libop/op_alloc_counter.c
+@@ -171,7 +171,7 @@
+ /* no counters then probably perfmon managing perfmon hw */
+ if (nr_counters <= 0) {
+ nr_counters = op_get_nr_counters(cpu_type);
+- unavailable_counters = (~0) << nr_counters;
++ unavailable_counters = (~0U) << nr_counters;
+ }
+
+ /* Check to see if we have enough physical counters to map events*/
+--- a/libutil++/op_bfd.cpp
++++ b/libutil++/op_bfd.cpp
+@@ -535,15 +535,13 @@
+ {
+ op_bfd_symbol const & sym = syms[sym_idx];
+
+- bool const verbose = cverb << (vbfd & vlevel1);
+-
+ if (anon_obj)
+ start = sym.vma();
+ else
+ start = sym.filepos();
+ end = start + sym.size();
+
+- if (!verbose)
++ if (!(cverb << (vbfd & vlevel1)))
+ return;
+
+ io_state state(cverb << (vbfd & vlevel1));
diff --git a/dev-util/oprofile/metadata.xml b/dev-util/oprofile/metadata.xml
new file mode 100644
index 000000000000..2a35c6646c1e
--- /dev/null
+++ b/dev-util/oprofile/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>bircoph@gentoo.org</email>
+ <name>Andrew Savchenko</name>
+ </maintainer>
+ <longdescription>A transparent low-overhead system-wide profiler</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">oprofile</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-util/oprofile/oprofile-0.9.9-r2.ebuild b/dev-util/oprofile/oprofile-0.9.9-r2.ebuild
new file mode 100644
index 000000000000..a5a0ac05f129
--- /dev/null
+++ b/dev-util/oprofile/oprofile-0.9.9-r2.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+inherit autotools eutils linux-info multilib user java-pkg-opt-2
+
+MY_P=${PN}-${PV/_/-}
+DESCRIPTION="A transparent low-overhead system-wide profiler"
+HOMEPAGE="http://${PN}.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ~mips ppc ppc64 sparc x86"
+IUSE="java pch qt4"
+
+DEPEND=">=dev-libs/popt-1.7-r1
+ sys-libs/binutils-libs:=
+ >=sys-libs/glibc-2.3.2-r1
+ ppc64? ( dev-libs/libpfm )
+ qt4? ( dev-qt/qtgui:4[qt3support] )
+ java? ( >=virtual/jdk-1.5:= )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ linux-info_pkg_setup
+ if ! linux_config_exists || ! linux_chkconfig_present OPROFILE ; then
+ echo
+ elog "In order for ${PN} to work, you need to configure your kernel"
+ elog "with CONFIG_OPROFILE set to 'm' or 'y'."
+ echo
+ fi
+
+ if ! kernel_is -ge 2 6 ; then
+ echo
+ elog "Support for kernels before 2.6 has been dropped in ${PN}-0.9.8."
+ echo
+ fi
+
+ # Required for JIT support, see README_PACKAGERS
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 -1 ${PN}
+
+ use java && java-pkg_init
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-gcc-4.9-non-ppc.patch"
+ epatch "${FILESDIR}/${P}-gcc-4.9-unused.patch"
+ epatch "${FILESDIR}/${PN}-1.0.0-athlon.patch"
+ epatch "${FILESDIR}/${PN}-1.1.0-gcc6.patch"
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-werror \
+ $(use_with qt4 x) \
+ $(use_enable qt4 gui qt4) \
+ $(use_enable pch) \
+ $(use_with java java ${JAVA_HOME})
+}
+
+src_install() {
+ emake DESTDIR="${D}" htmldir="/usr/share/doc/${PF}" install
+
+ dodoc ChangeLog* README TODO
+
+ dodir /etc/env.d
+ echo "LDPATH=${PREFIX}/usr/$(get_libdir)/${PN}" > "${D}"/etc/env.d/10${PN} || die "env.d failed"
+}
+
+pkg_postinst() {
+ echo
+ elog "Now load the ${PN} module by running:"
+ elog " # opcontrol --init"
+ elog "Then read manpages and this html doc:"
+ elog " /usr/share/doc/${PF}/${PN}.html"
+ echo
+}
diff --git a/dev-util/oprofile/oprofile-1.1.0-r1.ebuild b/dev-util/oprofile/oprofile-1.1.0-r1.ebuild
new file mode 100644
index 000000000000..2c8a16f7a16f
--- /dev/null
+++ b/dev-util/oprofile/oprofile-1.1.0-r1.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+inherit autotools eutils java-pkg-opt-2 linux-info multilib user
+
+MY_P=${PN}-${PV/_/-}
+DESCRIPTION="A transparent low-overhead system-wide profiler"
+HOMEPAGE="http://${PN}.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ~mips ppc ppc64 sparc x86"
+IUSE="java pch"
+
+RDEPEND=">=dev-libs/popt-1.7-r1
+ sys-libs/binutils-libs:=
+ >=sys-libs/glibc-2.3.2-r1
+ java? ( >=virtual/jdk-1.5:= )
+ ppc64? ( dev-libs/libpfm )"
+DEPEND="${RDEPEND}
+ >=sys-kernel/linux-headers-2.6.31"
+
+S="${WORKDIR}/${MY_P}"
+
+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
+
+ # Required for JIT support, see README_PACKAGERS
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 -1 ${PN}
+
+ use java && java-pkg_init
+}
+
+src_prepare() {
+ # fix bug #594178
+ epatch "${FILESDIR}/${PN}-1.1.0-gcc6.patch"
+ # bug #600000
+ epatch "${FILESDIR}/${PN}-1.1.0-gcc6-template-depth.patch"
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-werror \
+ $(use_enable pch) \
+ $(use_with java java ${JAVA_HOME})
+}
+
+src_install() {
+ emake DESTDIR="${D}" htmldir="/usr/share/doc/${PF}" install
+
+ dodoc ChangeLog* README TODO
+ echo "LDPATH=${PREFIX}/usr/$(get_libdir)/${PN}" > "${T}/10${PN}"
+ 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
+}
diff --git a/dev-util/oprofile/oprofile-1.2.0-r1.ebuild b/dev-util/oprofile/oprofile-1.2.0-r1.ebuild
new file mode 100644
index 000000000000..809a7ce8a485
--- /dev/null
+++ b/dev-util/oprofile/oprofile-1.2.0-r1.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit java-pkg-opt-2 linux-info user
+
+DESCRIPTION="A transparent low-overhead system-wide profiler"
+HOMEPAGE="http://${PN}.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="java pch"
+
+RDEPEND=">=dev-libs/popt-1.7-r1
+ sys-libs/binutils-libs:=
+ >=sys-libs/glibc-2.3.2-r1
+ java? ( >=virtual/jdk-1.5:= )
+ ppc64? ( dev-libs/libpfm )"
+DEPEND="${RDEPEND}
+ >=sys-kernel/linux-headers-2.6.31"
+
+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
+
+ # Required for JIT support, see README_PACKAGERS
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 -1 ${PN}
+
+ use java && java-pkg_init
+}
+
+src_configure() {
+ econf \
+ --disable-werror \
+ $(use_enable pch) \
+ $(use_with java java ${JAVA_HOME})
+}
+
+src_install() {
+ emake DESTDIR="${D}" htmldir="/usr/share/doc/${PF}" install
+
+ 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
+}