summaryrefslogtreecommitdiff
path: root/dev-util/google-perftools
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/google-perftools
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-util/google-perftools')
-rw-r--r--dev-util/google-perftools/Manifest17
-rw-r--r--dev-util/google-perftools/files/gperftools-2.0+glibc-2.16.patch13
-rw-r--r--dev-util/google-perftools/files/gperftools-2.0-32bit-barrier.patch17
-rw-r--r--dev-util/google-perftools/google-perftools-1.8.3.ebuild84
-rw-r--r--dev-util/google-perftools/google-perftools-2.0-r2.ebuild71
-rw-r--r--dev-util/google-perftools/google-perftools-2.4.ebuild85
-rw-r--r--dev-util/google-perftools/google-perftools-2.5.ebuild85
-rw-r--r--dev-util/google-perftools/google-perftools-2.6.1.ebuild85
-rw-r--r--dev-util/google-perftools/google-perftools-2.6.ebuild85
-rw-r--r--dev-util/google-perftools/metadata.xml26
10 files changed, 568 insertions, 0 deletions
diff --git a/dev-util/google-perftools/Manifest b/dev-util/google-perftools/Manifest
new file mode 100644
index 000000000000..87c77f35c1d3
--- /dev/null
+++ b/dev-util/google-perftools/Manifest
@@ -0,0 +1,17 @@
+AUX gperftools-2.0+glibc-2.16.patch 604 SHA256 abb19fd87ce092fc0cb0a4a5964834ec97b12d2462bc2b8bd8668c4ca71fcea5 SHA512 aa9b94c4712227b6414fc34a47154f416b120004c81704ab181c7985b6dce60bf1d98e4175678fb445cd59bb6c85d4d7bb0a093e186ecc9f115bc841d27cb964 WHIRLPOOL 75866b1e0e17ccc206459b31e284f7892d7e03c4cd862f8f6d66b374887aab938e9d79115228b7a7258f6bddd2439348fb48f67581744b9fdad1b4f6ae8079ef
+AUX gperftools-2.0-32bit-barrier.patch 792 SHA256 224776d529f1a1d11a036f16f04d4f01e3fd805d6fdd361c7d4b714f5bfbb87c SHA512 a39fd183d76a76e5c4cb3915f966e008250b4c72098bd2a9d13f10e01efd8dd1e36a51e0d4ef5f712d20398fa8605aa40e2529af085e80f918a1e227d7c92def WHIRLPOOL dafa07810d202816462603457395491a7d5901c0faf3134383635ef9a267aeba9f6635e687659dd1634ef7219970334a485350d6f8cad33f6792d87b779c21a3
+DIST google-perftools-1.8.3.tar.gz 1265062 SHA256 6ad744b34abb24312631740d9912f4667993b02e5f59b91246c31a2a911a9d59 SHA512 c6938391d182982ba6a87cd3d023e5fdf3501c42aecb951504e2fc97ce9e5bb2a6e6a577504ddbe89220b45ae47e58ce3e68f84aa45ff238d949dee4fc765b51 WHIRLPOOL 70ef15f25451a0f3eddb92e948e6d7d2e46a7ee8684636ddff312d5f0dda1429a7fe3f1f6756f0a979e4957b09c47513ddad9504415795e9e82ba51188672fdc
+DIST gperftools-2.0.tar.gz 1261243 SHA256 7de3dd91f018825b1e7d332af1edace15c6211f430186febede1835069861080 SHA512 61bf7a26974058912a4165cbc363351bc735599d36ab569dc7e84a75a690adbc17a4178512a57469fc7c17befaad2a271ef4ea5c29a36b664153938939269926 WHIRLPOOL 4f49a7da976040cacdecb8e18294b09fbfe276422ba35058476a14a3c1df072f8748d70f738adafa03a3a445701ed32b6232f13962d8ec8c5a968652414797a6
+DIST gperftools-2.4.tar.gz 890402 SHA256 a73c2d066fb0d8e5a9102c0c17eadd8041f9b43b40b50faff54db01256772f6c SHA512 77198c150ee26579adc8f190be0c4ba90a9e3854b006c3aa9252b5863b1fce317fd690c6aa0ed202c81f0bbcfbe2d5f8a182263e77b7fb4fbc6b3e8bfffc9fb0 WHIRLPOOL 4b74a6074e1d0e0f6c5c3d8487a73045849237db93abcb5f4bb4aa7f40fcf9355d0cb1702335904ba6153ead62cb5a6df264d359bc1ce32fbb13fba4d2f2ddbc
+DIST gperftools-2.5.tar.gz 895753 SHA256 0256331e67e8be12995b57183ec6affd071231f997bfcb5d5b050f86d4ad577e SHA512 974b86eadebe0437f4b7cf51de84afa315390cdcd2a88c8ccc8448b0b3e98c2241d89b4987b5fca1937102ae00a43802d9d06d7b11272e3dfeeaa23cf58ad68d WHIRLPOOL 4fc82910585107a2a879cae1b83afdcf98a39c3c7cbce3e8ba28b7b00ea1f638bb795213b7a6330bb311dd399bd7bcf34b3705cb8f75921ac1fd9ce3c0d1e8fd
+DIST gperftools-2.6.1.tar.gz 907916 SHA256 3a51215bf0f0c1eedaef9cd377fe6b47dddafc3e5a66d292abb176e1ed36aab8 SHA512 49c1123ef8e297381e30fae6fc2391539ac5e1d3097b3f9f59c21853589152e248e92be0739bc50da6e5542f2638a9719b88f2d454221f463915d89e569776d2 WHIRLPOOL f93beba285703e199b27fd03e9c16732dcd9b625a16daad02c255392627dcf57b093a767bc645716b5f3395446c6181678c775b53f7d2dc151a398dad737a761
+DIST gperftools-2.6.tar.gz 906841 SHA256 ff07a20a522fc729b899c542fedd3156fb1600973786542917675f7634b4905c SHA512 9fc32066304b76ad323e90ce2e7b437e7f1a5094b8d40a0e3df4d317fd57b4c048a19dacb7d148bd40557a080b0b82fe2da8ef32ae5511735ca7118e06b1ee38 WHIRLPOOL c91ffd09e9fd3202c17813d27370b144fa4140a6bd62b3e6c662557ac674c16575edcd50313d2cd342834a6ea5e799b96dca72ff600714486f9515bcc0c538c1
+EBUILD google-perftools-1.8.3.ebuild 2133 SHA256 a1a9f59fae005bf577fe3fa1da4eae13566d0bbbe0f374f0d99e052129f2bcac SHA512 205e18c8d5cf0ff78d3f5a91daaafee95b4395cd6a68fa3d4d606a29b5bd720f1a013a3398e6c9eb4b660e1bc614bc5f269a87cada037c09bfd5f80985a530fb WHIRLPOOL 26e5fb6ef462588588d258349ab3774adaa2d54458910396871d43b662ab2567b71f1bd64e21aa39448a8da96759d7c74c26d4d3215aa5ab5c2f9e33d0d90465
+EBUILD google-perftools-2.0-r2.ebuild 1803 SHA256 6adfe2de28d516f389ef765fbfa2592d167b7c0b3ba17ea93d7c24c9eb16ccb7 SHA512 7fe925ddae89c431f7177c4bc97dc2e5a663452e9fde34d16f28fd5dbfa8e584b961362cc1f65ee726478b54a2d000b15ef3bf81ce4e10c11aee2a78990e3a58 WHIRLPOOL 92f5123e02f594fd564d05360d0c5bb2010adbbfaf6bc6820af41cd8e73240d54c2418127ca3b2414d180f2a3f603e452b5525c8260d37ab2fe22fcbc260f95c
+EBUILD google-perftools-2.4.ebuild 2297 SHA256 0df96482fdd830d12d6a0c2c632395852365765be0555972a0e9b63adb14c1a2 SHA512 026a68d5920847c00fd1af24397ce45575dab9e16f569c9d55b7b0424511cab365be429e33bb7d74ef70a57c38eacc825d3809d44c204678b046c9a76302a460 WHIRLPOOL 2c055a442e973a67cbcd194445313337549cddebaada059d1f352e2ed9b17386876b78d4aeff254fda7b65d7d6d920a8a84f08322b984fdb44604811c9a17f40
+EBUILD google-perftools-2.5.ebuild 2239 SHA256 7032fdcb3fcc76f461b663cbd6ed6f5bc212a20a330f4d3ac227d3aad7552aa4 SHA512 a82b99fac33b076300aa37a7ead134b3ce52468e8a4a7d1ac8721a49459cddce81dcf7a816361d53b6cfaf1d33500a0c39417713275bb148d7b7197cfb46a78d WHIRLPOOL 96cf077cb4181959ff706473ccc3c38166768a6e3eb3f1d4819324011eeb97f1446ac6a459274c921f8fa2fdb0a11b252ec1a487c8eceb27616d065df0c3fc5d
+EBUILD google-perftools-2.6.1.ebuild 2318 SHA256 6fdc629c2037d021d8825daa6991156c1e0ecfbdc5b47781a280054bd06eb245 SHA512 4a49fa149ad25f5ce4b533259be598833ba3f99b5899abdcbc7cc6aefaea55dd047c09dfe02be22b12a880d3a57ec3da4dde69acb3d1bae6a3b912b3c8d2c90d WHIRLPOOL ad145243aacbdf91d251ac1ee2e811065d5e03eb04c34e4b857f64a537447decd31174d470b56de265ea6c8896c98f7a191358fa54bb81e895f7a89d8dc563b1
+EBUILD google-perftools-2.6.ebuild 2298 SHA256 6a7c079b35aff1edb76ccb75c8ef2e08a06eabc2287b167cb9d9cf6acb1d0eb6 SHA512 c7f8cd8b270f7ac343e63f620da03a0787c8c20271030c653eb1d5a5ee42e6666f36b2652c8c71fa0785d87d67b82f9005b7f564d72ccae159521a9cad8e75cf WHIRLPOOL 1653a819e3848f3fd9238f7c35fe00625cf83075ad1ab673b6981a9b8856ec5c7757083b5fec393786d41b0705eaa72430b2877163605c9e4d50ec54dbee2101
+MISC ChangeLog 4054 SHA256 22515ab4664b0a511e9bf0f8ee9b76fc5c14ec5e82c9fd4bd69348b3dc599132 SHA512 793f80676ee546b0d7b7617c6400a5ecc272abc90274b9543ec84a598afc256d9b1a83b3ca973122bfadc2ce1e7abd4cce70704cd99cc1338b6a49d3921692b5 WHIRLPOOL 192ad668add8ac87e7eb6988787b1dbc6b051f47b44e8af9724db9308a39c85700f656a33f348fa6518c4f8beff9768c3b031bb89d52bca062b5374ac6559fa5
+MISC ChangeLog-2015 5705 SHA256 f0713639a4e8fa98e217225e6f991582cd1f01503f7a0aa9bdf2f5851daaec1d SHA512 f2682216c6471645d0629d215cf96b3191bcf13b7dd461e648fa18acad54aedfce1e3bd9f16d61e2fbf818a58f058f7fbdc092461cd6326c6e676629d7dcb29b WHIRLPOOL d4ddef9f7c001087549b99a047f0c179dfd6f320cb170514a47c640489bb9da75113e2b3cf9b0019566d8ff53152f602e9ad7e704de7f35dde4d772ddace5c76
+MISC metadata.xml 894 SHA256 3eab17f7e2fd16d56083a6db977be937330bd8b5b30153bfcbeadc0d0ac4d1c0 SHA512 8b940221b8eab122bf8579bce312c71c4ff49e6a35982e9b38990ad181ead444b8cb98b8a919fa941f99842fa28be9e5b456eb07954b3b25f4acc4112d98c0d2 WHIRLPOOL 160606974ec27a6e1a062dad767598302c71157149cf94b57e6b3cb16436e1614d87e8c25624d0eac29662adebf65cf071cbb669e6eb1ada0b2b67f32e36866e
diff --git a/dev-util/google-perftools/files/gperftools-2.0+glibc-2.16.patch b/dev-util/google-perftools/files/gperftools-2.0+glibc-2.16.patch
new file mode 100644
index 000000000000..b17e0d57f5fb
--- /dev/null
+++ b/dev-util/google-perftools/files/gperftools-2.0+glibc-2.16.patch
@@ -0,0 +1,13 @@
+Index: gperftools-2.0/src/base/linuxthreads.cc
+===================================================================
+--- gperftools-2.0.orig/src/base/linuxthreads.cc
++++ gperftools-2.0/src/base/linuxthreads.cc
+@@ -193,7 +193,7 @@ static volatile int *sig_pids, sig_num_t
+ /* Signal handler to help us recover from dying while we are attached to
+ * other threads.
+ */
+-static void SignalHandler(int signum, siginfo_t *si, void *data) {
++static void SignalHandler(int signum, struct siginfo *si, void *data) {
+ if (sig_pids != NULL) {
+ if (signum == SIGABRT) {
+ while (sig_num_threads-- > 0) {
diff --git a/dev-util/google-perftools/files/gperftools-2.0-32bit-barrier.patch b/dev-util/google-perftools/files/gperftools-2.0-32bit-barrier.patch
new file mode 100644
index 000000000000..df89a92ed010
--- /dev/null
+++ b/dev-util/google-perftools/files/gperftools-2.0-32bit-barrier.patch
@@ -0,0 +1,17 @@
+Atomic64 not available on all architectures.
+Use AtomicWord instead.
+
+Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
+
+diff -Nuar gperftools-2.0.orig/src/base/spinlock_internal.cc gperftools-2.0/src/base/spinlock_internal.cc
+--- gperftools-2.0.orig/src/base/spinlock_internal.cc 2012-02-02 21:36:23.000000000 +0000
++++ gperftools-2.0/src/base/spinlock_internal.cc 2013-01-20 23:44:01.629077919 +0000
+@@ -80,7 +80,7 @@
+ static int SuggestedDelayNS(int loop) {
+ // Weak pseudo-random number generator to get some spread between threads
+ // when many are spinning.
+- static base::subtle::Atomic64 rand;
++ static AtomicWord rand;
+ uint64 r = base::subtle::NoBarrier_Load(&rand);
+ r = 0x5deece66dLL * r + 0xb; // numbers from nrand48()
+ base::subtle::NoBarrier_Store(&rand, r);
diff --git a/dev-util/google-perftools/google-perftools-1.8.3.ebuild b/dev-util/google-perftools/google-perftools-1.8.3.ebuild
new file mode 100644
index 000000000000..7440a1c1f1c5
--- /dev/null
+++ b/dev-util/google-perftools/google-perftools-1.8.3.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit toolchain-funcs eutils flag-o-matic
+
+DESCRIPTION="Fast, multi-threaded malloc() and nifty performance analysis tools"
+HOMEPAGE="https://github.com/gperftools/gperftools"
+SRC_URI="https://github.com/gperftools/gperftools/archive/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+# contains ASM code, with support for
+# freebsd x86/amd64
+# linux x86/amd64/ppc/ppc64/arm
+# OSX ppc/amd64
+# AIX ppc/ppc64
+KEYWORDS="-* amd64 x86 ~x86-fbsd"
+IUSE="largepages +debug minimal" # test"
+
+DEPEND="sys-libs/libunwind"
+RDEPEND="${DEPEND}"
+
+# tests end up in an infinite loop, even without sandbox
+RESTRICT=test
+
+pkg_setup() {
+ # set up the make options in here so that we can actually make use
+ # of them on both compile and install.
+
+ # Avoid building the unit testing if we're not going to execute
+ # tests; this trick here allows us to ignore the tests without
+ # touching the build system (and thus without rebuilding
+ # autotools). Keep commented as long as it's restricted.
+
+ # use test && \
+ makeopts="${makeopts} noinst_PROGRAMS= "
+
+ # don't install _anything_ from the documentation, since it would
+ # install it in non-standard locations, and would just waste time.
+ makeopts="${makeopts} dist_doc_DATA= "
+}
+
+src_configure() {
+ use largepages && append-cppflags -DTCMALLOC_LARGE_PAGES
+
+ append-flags -fno-strict-aliasing
+
+ econf \
+ --disable-static \
+ --disable-dependency-tracking \
+ --enable-fast-install \
+ $(use_enable debug debugalloc) \
+ $(use_enable minimal)
+}
+
+src_compile() {
+ emake ${makeopts} || die "emake failed"
+}
+
+src_test() {
+ case "${LD_PRELOAD}" in
+ *libsandbox*)
+ ewarn "Unable to run tests when sanbox is enabled."
+ ewarn "See https://bugs.gentoo.org/290249"
+ return 0
+ ;;
+ esac
+
+ emake check || die "tests failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install ${makeopts} || die "emake install failed"
+
+ # Remove libtool files since we dropped the static libraries
+ find "${D}" -name '*.la' -delete
+
+ dodoc README AUTHORS ChangeLog TODO NEWS || die
+ pushd doc
+ dohtml -r * || die
+ popd
+}
diff --git a/dev-util/google-perftools/google-perftools-2.0-r2.ebuild b/dev-util/google-perftools/google-perftools-2.0-r2.ebuild
new file mode 100644
index 000000000000..c0b175dcf38d
--- /dev/null
+++ b/dev-util/google-perftools/google-perftools-2.0-r2.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+MY_P="gperftools-${PV}"
+
+inherit toolchain-funcs eutils flag-o-matic autotools-utils
+
+DESCRIPTION="Fast, multi-threaded malloc() and nifty performance analysis tools"
+HOMEPAGE="https://github.com/gperftools/gperftools"
+SRC_URI="https://github.com/gperftools/gperftools/archive/${MY_P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0/4"
+# contains ASM code, with support for
+# freebsd x86/amd64
+# linux x86/amd64/ppc/ppc64/arm
+# OSX ppc/amd64
+# AIX ppc/ppc64
+KEYWORDS="-* amd64 arm ppc ppc64 x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="largepages +debug minimal test static-libs"
+
+DEPEND="sys-libs/libunwind"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+HTML_DOCS="doc"
+
+pkg_setup() {
+ # set up the make options in here so that we can actually make use
+ # of them on both compile and install.
+
+ # Avoid building the unit testing if we're not going to execute
+ # tests; this trick here allows us to ignore the tests without
+ # touching the build system (and thus without rebuilding
+ # autotools). Keep commented as long as it's restricted.
+ use test || \
+ MAKEOPTS+=" noinst_PROGRAMS= "
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${MY_P}+glibc-2.16.patch"
+ epatch "${FILESDIR}/${MY_P}-32bit-barrier.patch"
+}
+
+src_configure() {
+ use largepages && append-cppflags -DTCMALLOC_LARGE_PAGES
+ append-flags -fno-strict-aliasing -fno-omit-frame-pointer
+
+ local myeconfargs=(
+ --htmldir=/usr/share/doc/${PF}/html
+ $(use_enable debug debugalloc)
+ $(use_enable minimal)
+ )
+
+ autotools-utils_src_configure
+}
+
+src_test() {
+ case "${LD_PRELOAD}" in
+ *libsandbox*)
+ ewarn "Unable to run tests when sanbox is enabled."
+ ewarn "See https://bugs.gentoo.org/290249"
+ return 0
+ ;;
+ esac
+
+ autotools-utils_src_test
+}
diff --git a/dev-util/google-perftools/google-perftools-2.4.ebuild b/dev-util/google-perftools/google-perftools-2.4.ebuild
new file mode 100644
index 000000000000..a2986988f31c
--- /dev/null
+++ b/dev-util/google-perftools/google-perftools-2.4.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+MY_P="gperftools-${PV}"
+inherit toolchain-funcs flag-o-matic vcs-snapshot autotools multilib-minimal
+
+DESCRIPTION="Fast, multi-threaded malloc() and nifty performance analysis tools"
+HOMEPAGE="https://github.com/gperftools/gperftools"
+SRC_URI="https://github.com/gperftools/gperftools/tarball/${MY_P} -> ${MY_P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0/4"
+# contains ASM code, with support for
+# freebsd x86/amd64
+# linux x86/amd64/ppc/ppc64/arm
+# OSX ppc/amd64
+# AIX ppc/ppc64
+KEYWORDS="-* ~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="largepages +debug minimal optimisememory test static-libs"
+
+DEPEND="sys-libs/libunwind"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+HTML_DOCS="doc"
+
+pkg_setup() {
+ # set up the make options in here so that we can actually make use
+ # of them on both compile and install.
+
+ # Avoid building the unit testing if we're not going to execute
+ # tests; this trick here allows us to ignore the tests without
+ # touching the build system (and thus without rebuilding
+ # autotools). Keep commented as long as it's restricted.
+ use test || \
+ MAKEOPTS+=" noinst_PROGRAMS= "
+}
+
+src_prepare() {
+ default
+ eautoreconf
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ use largepages && append-cppflags -DTCMALLOC_LARGE_PAGES
+ use optimisememory && append-cppflags -DTCMALLOC_SMALL_BUT_SLOW
+ append-flags -fno-strict-aliasing -fno-omit-frame-pointer
+
+ econf \
+ --htmldir=/usr/share/doc/${PF}/html \
+ --docdir=/usr/share/doc/${PF} \
+ --enable-shared \
+ $(use_enable static-libs static) \
+ $(use_enable debug debugalloc) \
+ $(if [[ ${ABI} == x32 ]]; then printf "--enable-minimal\n" else use_enable minimal; fi)
+}
+
+src_test() {
+ case "${LD_PRELOAD}" in
+ *libsandbox*)
+ ewarn "Unable to run tests when sandbox is enabled."
+ ewarn "See https://bugs.gentoo.org/290249"
+ return 0
+ ;;
+ esac
+
+ multilib-minimal_src_test
+}
+
+src_install() {
+ if ! use minimal && has x32 ${MULTILIB_ABIS}; then
+ MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/gperftools/heap-checker.h
+ /usr/include/gperftools/heap-profiler.h
+ /usr/include/gperftools/stacktrace.h
+ /usr/include/gperftools/profiler.h
+ )
+ fi
+
+ multilib-minimal_src_install
+}
diff --git a/dev-util/google-perftools/google-perftools-2.5.ebuild b/dev-util/google-perftools/google-perftools-2.5.ebuild
new file mode 100644
index 000000000000..79740a1047c5
--- /dev/null
+++ b/dev-util/google-perftools/google-perftools-2.5.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+
+MY_P="gperftools-${PV}"
+inherit toolchain-funcs eutils flag-o-matic vcs-snapshot autotools-multilib
+
+DESCRIPTION="Fast, multi-threaded malloc() and nifty performance analysis tools"
+HOMEPAGE="https://github.com/gperftools/gperftools"
+SRC_URI="https://github.com/gperftools/gperftools/tarball/${MY_P} -> ${MY_P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0/4"
+# contains ASM code, with support for
+# freebsd x86/amd64
+# linux x86/amd64/ppc/ppc64/arm
+# OSX ppc/amd64
+# AIX ppc/ppc64
+KEYWORDS="-* ~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="largepages +debug minimal optimisememory test static-libs"
+
+DEPEND="sys-libs/libunwind"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+HTML_DOCS="doc"
+
+pkg_setup() {
+ # set up the make options in here so that we can actually make use
+ # of them on both compile and install.
+
+ # Avoid building the unit testing if we're not going to execute
+ # tests; this trick here allows us to ignore the tests without
+ # touching the build system (and thus without rebuilding
+ # autotools). Keep commented as long as it's restricted.
+ use test || \
+ MAKEOPTS+=" noinst_PROGRAMS= "
+}
+
+multilib_src_configure() {
+ use largepages && append-cppflags -DTCMALLOC_LARGE_PAGES
+ use optimisememory && append-cppflags -DTCMALLOC_SMALL_BUT_SLOW
+ append-flags -fno-strict-aliasing -fno-omit-frame-pointer
+
+ local myeconfargs=(
+ --htmldir=/usr/share/doc/${PF}/html
+ $(use_enable debug debugalloc)
+ )
+
+ if [[ ${ABI} == x32 ]]; then
+ myeconfargs+=( --enable-minimal )
+ else
+ myeconfargs+=( $(use_enable minimal) )
+ fi
+ autotools-utils_src_configure
+}
+
+src_test() {
+ case "${LD_PRELOAD}" in
+ *libsandbox*)
+ ewarn "Unable to run tests when sandbox is enabled."
+ ewarn "See https://bugs.gentoo.org/290249"
+ return 0
+ ;;
+ esac
+
+ autotools-multilib_src_test
+}
+
+src_install() {
+ if ! use minimal && has x32 ${MULTILIB_ABIS}; then
+ MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/gperftools/heap-checker.h
+ /usr/include/gperftools/heap-profiler.h
+ /usr/include/gperftools/stacktrace.h
+ /usr/include/gperftools/profiler.h
+ )
+ fi
+
+ autotools-multilib_src_install
+}
diff --git a/dev-util/google-perftools/google-perftools-2.6.1.ebuild b/dev-util/google-perftools/google-perftools-2.6.1.ebuild
new file mode 100644
index 000000000000..708d67991674
--- /dev/null
+++ b/dev-util/google-perftools/google-perftools-2.6.1.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+MY_P="gperftools-${PV}"
+inherit toolchain-funcs flag-o-matic vcs-snapshot autotools multilib-minimal
+
+DESCRIPTION="Fast, multi-threaded malloc() and nifty performance analysis tools"
+HOMEPAGE="https://github.com/gperftools/gperftools"
+SRC_URI="https://github.com/gperftools/gperftools/tarball/${MY_P} -> ${MY_P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0/4"
+# contains ASM code, with support for
+# freebsd x86/amd64
+# linux x86/amd64/ppc/ppc64/arm
+# OSX ppc/amd64
+# AIX ppc/ppc64
+KEYWORDS="-* ~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="largepages +debug minimal optimisememory test static-libs"
+
+DEPEND="sys-libs/libunwind"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+HTML_DOCS="docs"
+
+pkg_setup() {
+ # set up the make options in here so that we can actually make use
+ # of them on both compile and install.
+
+ # Avoid building the unit testing if we're not going to execute
+ # tests; this trick here allows us to ignore the tests without
+ # touching the build system (and thus without rebuilding
+ # autotools). Keep commented as long as it's restricted.
+ use test || \
+ MAKEOPTS+=" noinst_PROGRAMS= "
+}
+
+src_prepare() {
+ default
+ eautoreconf
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ use largepages && append-cppflags -DTCMALLOC_LARGE_PAGES
+ use optimisememory && append-cppflags -DTCMALLOC_SMALL_BUT_SLOW
+ append-flags -fno-strict-aliasing -fno-omit-frame-pointer
+
+ econf \
+ --htmldir=${EPREFIX}/usr/share/doc/${PF}/html \
+ --docdir=${EPREFIX}/usr/share/doc/${PF} \
+ --enable-shared \
+ $(use_enable static-libs static) \
+ $(use_enable debug debugalloc) \
+ $(if [[ ${ABI} == x32 ]]; then printf "--enable-minimal\n" else use_enable minimal; fi)
+}
+
+src_test() {
+ case "${LD_PRELOAD}" in
+ *libsandbox*)
+ ewarn "Unable to run tests when sandbox is enabled."
+ ewarn "See https://bugs.gentoo.org/290249"
+ return 0
+ ;;
+ esac
+
+ multilib-minimal_src_test
+}
+
+src_install() {
+ if ! use minimal && has x32 ${MULTILIB_ABIS}; then
+ MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/gperftools/heap-checker.h
+ /usr/include/gperftools/heap-profiler.h
+ /usr/include/gperftools/stacktrace.h
+ /usr/include/gperftools/profiler.h
+ )
+ fi
+
+ multilib-minimal_src_install
+}
diff --git a/dev-util/google-perftools/google-perftools-2.6.ebuild b/dev-util/google-perftools/google-perftools-2.6.ebuild
new file mode 100644
index 000000000000..48a3be80a5e3
--- /dev/null
+++ b/dev-util/google-perftools/google-perftools-2.6.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+MY_P="gperftools-${PV}"
+inherit toolchain-funcs flag-o-matic vcs-snapshot autotools multilib-minimal
+
+DESCRIPTION="Fast, multi-threaded malloc() and nifty performance analysis tools"
+HOMEPAGE="https://github.com/gperftools/gperftools"
+SRC_URI="https://github.com/gperftools/gperftools/tarball/${MY_P} -> ${MY_P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0/4"
+# contains ASM code, with support for
+# freebsd x86/amd64
+# linux x86/amd64/ppc/ppc64/arm
+# OSX ppc/amd64
+# AIX ppc/ppc64
+KEYWORDS="-* ~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="largepages +debug minimal optimisememory test static-libs"
+
+DEPEND="sys-libs/libunwind"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+HTML_DOCS="docs"
+
+pkg_setup() {
+ # set up the make options in here so that we can actually make use
+ # of them on both compile and install.
+
+ # Avoid building the unit testing if we're not going to execute
+ # tests; this trick here allows us to ignore the tests without
+ # touching the build system (and thus without rebuilding
+ # autotools). Keep commented as long as it's restricted.
+ use test || \
+ MAKEOPTS+=" noinst_PROGRAMS= "
+}
+
+src_prepare() {
+ default
+ eautoreconf
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ use largepages && append-cppflags -DTCMALLOC_LARGE_PAGES
+ use optimisememory && append-cppflags -DTCMALLOC_SMALL_BUT_SLOW
+ append-flags -fno-strict-aliasing -fno-omit-frame-pointer
+
+ econf \
+ --htmldir=/usr/share/doc/${PF}/html \
+ --docdir=/usr/share/doc/${PF} \
+ --enable-shared \
+ $(use_enable static-libs static) \
+ $(use_enable debug debugalloc) \
+ $(if [[ ${ABI} == x32 ]]; then printf "--enable-minimal\n" else use_enable minimal; fi)
+}
+
+src_test() {
+ case "${LD_PRELOAD}" in
+ *libsandbox*)
+ ewarn "Unable to run tests when sandbox is enabled."
+ ewarn "See https://bugs.gentoo.org/290249"
+ return 0
+ ;;
+ esac
+
+ multilib-minimal_src_test
+}
+
+src_install() {
+ if ! use minimal && has x32 ${MULTILIB_ABIS}; then
+ MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/gperftools/heap-checker.h
+ /usr/include/gperftools/heap-profiler.h
+ /usr/include/gperftools/stacktrace.h
+ /usr/include/gperftools/profiler.h
+ )
+ fi
+
+ multilib-minimal_src_install
+}
diff --git a/dev-util/google-perftools/metadata.xml b/dev-util/google-perftools/metadata.xml
new file mode 100644
index 000000000000..e6791a60364b
--- /dev/null
+++ b/dev-util/google-perftools/metadata.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <use>
+ <flag name="largepages">
+ Use (experimental) larger pages for tcmalloc, this increases
+ memory usage, but should speed up the allocation/free
+ operations.
+ </flag>
+ <flag name="debug">
+ Build a set of libraries with debug support (so-called
+ debugalloc). These are available by default but are not needed
+ unless you're actually developing using tcmalloc.
+ </flag>
+ <flag name="minimal">
+ Only build the tcmalloc_minimal library, ignoring the heap
+ checker and the profilers.
+ </flag>
+ <flag name="optimisememory">
+ To build libtcmalloc with smaller internal caches.
+ </flag>
+ </use>
+ <upstream>
+ <remote-id type="github">gperftools/gperftools</remote-id>
+ </upstream>
+</pkgmetadata>