Skip to content

Commit

Permalink
dev-libs/jemalloc: Major bug fixes, refer to upstream changelog
Browse files Browse the repository at this point in the history
Package-Manager: Portage-2.3.6, Repoman-2.3.2
  • Loading branch information
anarchpenguin committed May 30, 2017
1 parent 8269609 commit dd65ea5
Show file tree
Hide file tree
Showing 4 changed files with 120 additions and 0 deletions.
1 change: 1 addition & 0 deletions dev-libs/jemalloc/Manifest
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ DIST jemalloc-2.2.5.tar.bz2 224118 SHA256 efcc9636757bd7f53a0fde084c2988bfe26f28
DIST jemalloc-3.3.1.tar.bz2 252997 SHA256 35c433cc1df5cdf9eb58b7980338552fc1d7aa64f89fe5643a972ccedb7cf20a SHA512 32814e8678af4954e26c0c0a0e5d06aba8f3844205fe212c5e41929dfab6a94ff11127a9238b5c18d72749827c467ecb874b8f3a9bc161cf1afdf4ea84c58690 WHIRLPOOL 35e8948e18ea7111ae830a8245be995b35f44ed2c2f687f706ee6941c78350c2cfaabefba223c4433069de47a9f92d621feaf176ec0c728e513e5f076e5fc874
DIST jemalloc-3.6.0.tar.bz2 338964 SHA256 e16c2159dd3c81ca2dc3b5c9ef0d43e1f2f45b04548f42db12e7c12d7bdf84fe SHA512 ebe7c64558a87a735b5906d5cb7527c241664eeae7328538675a12eabe7a1004be0f8766a3bd2a78e61334b196ca7ffc0ee8b8ff59167922a35f126cd1e76e43 WHIRLPOOL d5452005951b10d9d529349481779d79361ec8d8ac1f36f4b54408b5e0184f35d79fee8378188d98f1b8e41ae13557a2cf41ab849b68856ba69f33870fe6e980
DIST jemalloc-4.4.0.tar.bz2 440144 SHA256 a7aea63e9718d2f1adf81d87e3df3cb1b58deb86fc77bad5d702c4c59687b033 SHA512 2f88fb17ede3bf87e334e9c80949870e0dd85b5adcdd89a1750ccf6df5240f35293159ac0a360d3a29cf0b1d17edf86dcc7997c6bf3190ae7da7442d3a3cc14e WHIRLPOOL 1485ce6cf08ee2233117e281d1a61f376d2b6c73f28c68f2cc1956471bcb56a4eef045c0011de141b669d94d7339de5e79860f6b21bfbeffab821d5eb528759c
DIST jemalloc-4.5.0.tar.bz2 449992 SHA256 9409d85664b4f135b77518b0b118c549009dc10f6cba14557d170476611f6780 SHA512 76953363fe1007952232220afa1a91da4c1c33c02369b5ad239d8dd1d0792141197c15e8489a8f4cd301b08494e65cadd8ecd34d025cb0285700dd78d7248821 WHIRLPOOL 33dc51258d6d27942b656fc355cdde24becf0cd50a507375dd51b2fa6c55a6444ff21bcdae0ebe4fae8d2e95fa31989f5cf8bd435a7a59385ebb225a0a4441fe
25 changes: 25 additions & 0 deletions dev-libs/jemalloc/files/jemalloc-4.5.0-fix_html_install.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From c04d0b954adef2d3f1a30d91dc687f6a03b108eb Mon Sep 17 00:00:00 2001
From:
Date: Mon, 29 May 2017 00:58:32 -0500
Subject: [PATCH 2/2] Do not install html doc

---
Makefile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile.in b/Makefile.in
index e49a871..733932a 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -381,7 +381,7 @@ install_doc_man:
$(INSTALL) -m 644 $$d $(MANDIR)/man3; \
done

-install_doc: install_doc_html install_doc_man
+install_doc: install_doc_man

install: install_bin install_include install_lib install_doc

--
2.13.0

35 changes: 35 additions & 0 deletions dev-libs/jemalloc/files/jemalloc-4.5.0-strip-optimization.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
From c568271163445e380679788388f1cb1edbdeaf88 Mon Sep 17 00:00:00 2001
From:
Date: Mon, 29 May 2017 00:57:15 -0500
Subject: [PATCH 1/2] Strip all optimization, let portage handle.

---
configure.ac | 12 ------------
1 file changed, 12 deletions(-)

diff --git a/configure.ac b/configure.ac
index 20a8a64..d8af618 100644
--- a/configure.ac
+++ b/configure.ac
@@ -851,18 +851,6 @@ if test "x$enable_ivsalloc" = "x1" ; then
AC_DEFINE([JEMALLOC_IVSALLOC], [ ])
fi

-dnl Only optimize if not debugging.
-if test "x$enable_debug" = "x0" ; then
- if test "x$GCC" = "xyes" ; then
- JE_CFLAGS_ADD([-O3])
- JE_CFLAGS_ADD([-funroll-loops])
- elif test "x$je_cv_msvc" = "xyes" ; then
- JE_CFLAGS_ADD([-O2])
- else
- JE_CFLAGS_ADD([-O])
- fi
-fi
-
dnl Enable statistics calculation by default.
AC_ARG_ENABLE([stats],
[AS_HELP_STRING([--disable-stats],
--
2.13.0

59 changes: 59 additions & 0 deletions dev-libs/jemalloc/jemalloc-4.5.0.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6

inherit autotools toolchain-funcs multilib-minimal

DESCRIPTION="Jemalloc is a general-purpose scalable concurrent allocator"
HOMEPAGE="http://www.canonware.com/jemalloc/"
SRC_URI="https://github.com/jemalloc/jemalloc/releases/download/${PV}/${P}.tar.bz2"

LICENSE="BSD"
SLOT="0/2"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~x86 ~amd64-linux ~x86-linux ~x64-macos"
IUSE="debug hardened static-libs stats"
HTML_DOCS=( doc/jemalloc.html )
PATCHES=( "${FILESDIR}/${PN}-4.5.0-strip-optimization.patch"
"${FILESDIR}/${PN}-4.5.0-fix_html_install.patch"
)
MULTILIB_WRAPPED_HEADERS=( /usr/include/jemalloc/jemalloc.h )
# autotools-utils.eclass auto-adds configure options when static-libs is in IUSE
# but jemalloc doesn't implement them in its configure; need this here to
# supress the warnings until automagic is removed from the eclass
QA_CONFIGURE_OPTIONS="--enable-static --disable-static --enable-shared --disable-shared"

src_prepare() {
default
eautoreconf
}

multilib_src_configure() {
local myconf=()

if use hardened ; then
myconf+=( --disable-syscall )
fi

ECONF_SOURCE="${S}" \
econf \
$(use_enable debug) \
$(use_enable stats) \
"${myconf[@]}"
}

multilib_src_install() {
# Copy man file which the Makefile looks for
cp "${S}/doc/jemalloc.3" "${BUILD_DIR}/doc" || die
emake DESTDIR="${D}" install
}

multilib_src_install_all() {
if [[ ${CHOST} == *-darwin* ]] ; then
# fixup install_name, #437362
install_name_tool \
-id "${EPREFIX}"/usr/$(get_libdir)/libjemalloc.1.dylib \
"${ED}"/usr/$(get_libdir)/libjemalloc.1.dylib || die
fi
use static-libs || find "${ED}" -name '*.a' -delete
}

0 comments on commit dd65ea5

Please sign in to comment.