forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dev-libs/jemalloc: Major bug fixes, refer to upstream changelog
Package-Manager: Portage-2.3.6, Repoman-2.3.2
- Loading branch information
1 parent
8269609
commit dd65ea5
Showing
4 changed files
with
120 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
dev-libs/jemalloc/files/jemalloc-4.5.0-fix_html_install.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
35
dev-libs/jemalloc/files/jemalloc-4.5.0-strip-optimization.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |