Gentoo Archives: gentoo-commits

From: Patrick McLean <chutzpah@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/jemalloc/files/, dev-libs/jemalloc/
Date: Mon, 31 Jul 2017 16:40:34
Message-Id: 1501519060.820ed9c0c32b7e8b756d7adf380426a0b6822f9b.chutzpah@gentoo
1 commit: 820ed9c0c32b7e8b756d7adf380426a0b6822f9b
2 Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jul 31 16:37:40 2017 +0000
4 Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
5 CommitDate: Mon Jul 31 16:37:40 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=820ed9c0
7
8 dev-libs/jemalloc: Version bump to 5.0.1
9
10 Package-Manager: Portage-2.3.6, Repoman-2.3.3
11
12 dev-libs/jemalloc/Manifest | 1 +
13 .../files/jemalloc-5.0.1-strip-optimization.patch | 26 +++++++++
14 dev-libs/jemalloc/jemalloc-5.0.1.ebuild | 62 ++++++++++++++++++++++
15 dev-libs/jemalloc/metadata.xml | 3 ++
16 4 files changed, 92 insertions(+)
17
18 diff --git a/dev-libs/jemalloc/Manifest b/dev-libs/jemalloc/Manifest
19 index e40e83fca4b..4fca67d7b99 100644
20 --- a/dev-libs/jemalloc/Manifest
21 +++ b/dev-libs/jemalloc/Manifest
22 @@ -3,3 +3,4 @@ DIST jemalloc-3.3.1.tar.bz2 252997 SHA256 35c433cc1df5cdf9eb58b7980338552fc1d7aa
23 DIST jemalloc-3.6.0.tar.bz2 338964 SHA256 e16c2159dd3c81ca2dc3b5c9ef0d43e1f2f45b04548f42db12e7c12d7bdf84fe SHA512 ebe7c64558a87a735b5906d5cb7527c241664eeae7328538675a12eabe7a1004be0f8766a3bd2a78e61334b196ca7ffc0ee8b8ff59167922a35f126cd1e76e43 WHIRLPOOL d5452005951b10d9d529349481779d79361ec8d8ac1f36f4b54408b5e0184f35d79fee8378188d98f1b8e41ae13557a2cf41ab849b68856ba69f33870fe6e980
24 DIST jemalloc-4.4.0.tar.bz2 440144 SHA256 a7aea63e9718d2f1adf81d87e3df3cb1b58deb86fc77bad5d702c4c59687b033 SHA512 2f88fb17ede3bf87e334e9c80949870e0dd85b5adcdd89a1750ccf6df5240f35293159ac0a360d3a29cf0b1d17edf86dcc7997c6bf3190ae7da7442d3a3cc14e WHIRLPOOL 1485ce6cf08ee2233117e281d1a61f376d2b6c73f28c68f2cc1956471bcb56a4eef045c0011de141b669d94d7339de5e79860f6b21bfbeffab821d5eb528759c
25 DIST jemalloc-4.5.0.tar.bz2 449992 SHA256 9409d85664b4f135b77518b0b118c549009dc10f6cba14557d170476611f6780 SHA512 76953363fe1007952232220afa1a91da4c1c33c02369b5ad239d8dd1d0792141197c15e8489a8f4cd301b08494e65cadd8ecd34d025cb0285700dd78d7248821 WHIRLPOOL 33dc51258d6d27942b656fc355cdde24becf0cd50a507375dd51b2fa6c55a6444ff21bcdae0ebe4fae8d2e95fa31989f5cf8bd435a7a59385ebb225a0a4441fe
26 +DIST jemalloc-5.0.1.tar.bz2 499300 SHA256 4814781d395b0ef093b21a08e8e6e0bd3dab8762f9935bbfb71679b0dea7c3e9 SHA512 8cb5957a5724eb2bbad120cf0028ea8b2b14b4a416c1751b7c967351a7fd51135058ea0d3c4dc1d127c86f3aa7e9fd5ef101857110aabfdb7789427791c432c3 WHIRLPOOL 7bbaa407b1e403ef3bb5ecf6289dcf7f3cc9e31d8077d6e9b10e434e8f02e8e8c45ec890b67bcf39f8b7419ffcae893b4aa256f1a05750b196fcfbfadbd8696a
27
28 diff --git a/dev-libs/jemalloc/files/jemalloc-5.0.1-strip-optimization.patch b/dev-libs/jemalloc/files/jemalloc-5.0.1-strip-optimization.patch
29 new file mode 100644
30 index 00000000000..523badf5775
31 --- /dev/null
32 +++ b/dev-libs/jemalloc/files/jemalloc-5.0.1-strip-optimization.patch
33 @@ -0,0 +1,26 @@
34 +diff --git a/configure.ac b/configure.ac
35 +index 1551ded8..2f470672 100644
36 +--- a/configure.ac
37 ++++ b/configure.ac
38 +@@ -976,21 +976,6 @@ if test "x$enable_debug" = "x1" ; then
39 + fi
40 + AC_SUBST([enable_debug])
41 +
42 +-dnl Only optimize if not debugging.
43 +-if test "x$enable_debug" = "x0" ; then
44 +- if test "x$GCC" = "xyes" ; then
45 +- JE_CFLAGS_ADD([-O3])
46 +- JE_CXXFLAGS_ADD([-O3])
47 +- JE_CFLAGS_ADD([-funroll-loops])
48 +- elif test "x$je_cv_msvc" = "xyes" ; then
49 +- JE_CFLAGS_ADD([-O2])
50 +- JE_CXXFLAGS_ADD([-O2])
51 +- else
52 +- JE_CFLAGS_ADD([-O])
53 +- JE_CXXFLAGS_ADD([-O])
54 +- fi
55 +-fi
56 +-
57 + dnl Enable statistics calculation by default.
58 + AC_ARG_ENABLE([stats],
59 + [AS_HELP_STRING([--disable-stats],
60
61 diff --git a/dev-libs/jemalloc/jemalloc-5.0.1.ebuild b/dev-libs/jemalloc/jemalloc-5.0.1.ebuild
62 new file mode 100644
63 index 00000000000..02de00c4587
64 --- /dev/null
65 +++ b/dev-libs/jemalloc/jemalloc-5.0.1.ebuild
66 @@ -0,0 +1,62 @@
67 +# Copyright 1999-2017 Gentoo Foundation
68 +# Distributed under the terms of the GNU General Public License v2
69 +
70 +EAPI=6
71 +
72 +inherit autotools toolchain-funcs multilib-minimal
73 +
74 +DESCRIPTION="Jemalloc is a general-purpose scalable concurrent allocator"
75 +HOMEPAGE="http://www.canonware.com/jemalloc/"
76 +SRC_URI="https://github.com/jemalloc/jemalloc/releases/download/${PV}/${P}.tar.bz2"
77 +
78 +LICENSE="BSD"
79 +SLOT="0/2"
80 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~x86 ~amd64-linux ~x86-linux ~x64-macos"
81 +IUSE="debug hardened +hugepages lazy-lock static-libs stats xmalloc"
82 +HTML_DOCS=( doc/jemalloc.html )
83 +PATCHES=( "${FILESDIR}/${PN}-5.0.1-strip-optimization.patch"
84 + "${FILESDIR}/${PN}-4.5.0-fix_html_install.patch"
85 +)
86 +MULTILIB_WRAPPED_HEADERS=( /usr/include/jemalloc/jemalloc.h )
87 +# autotools-utils.eclass auto-adds configure options when static-libs is in IUSE
88 +# but jemalloc doesn't implement them in its configure; need this here to
89 +# supress the warnings until automagic is removed from the eclass
90 +QA_CONFIGURE_OPTIONS="--enable-static --disable-static --enable-shared --disable-shared"
91 +
92 +src_prepare() {
93 + default
94 + eautoreconf
95 +}
96 +
97 +multilib_src_configure() {
98 + local myconf=()
99 +
100 + if use hardened ; then
101 + myconf+=( --disable-syscall )
102 + fi
103 +
104 + ECONF_SOURCE="${S}" \
105 + econf \
106 + $(use_enable debug) \
107 + $(use_enable lazy-lock) \
108 + $(use_enable hugepages thp) \
109 + $(use_enable stats) \
110 + $(use_enable xmalloc) \
111 + "${myconf[@]}"
112 +}
113 +
114 +multilib_src_install() {
115 + # Copy man file which the Makefile looks for
116 + cp "${S}/doc/jemalloc.3" "${BUILD_DIR}/doc" || die
117 + emake DESTDIR="${D}" install
118 +}
119 +
120 +multilib_src_install_all() {
121 + if [[ ${CHOST} == *-darwin* ]] ; then
122 + # fixup install_name, #437362
123 + install_name_tool \
124 + -id "${EPREFIX}"/usr/$(get_libdir)/libjemalloc.1.dylib \
125 + "${ED}"/usr/$(get_libdir)/libjemalloc.1.dylib || die
126 + fi
127 + use static-libs || find "${ED}" -name '*.a' -delete
128 +}
129
130 diff --git a/dev-libs/jemalloc/metadata.xml b/dev-libs/jemalloc/metadata.xml
131 index d376e50e4b1..848a0a7987d 100644
132 --- a/dev-libs/jemalloc/metadata.xml
133 +++ b/dev-libs/jemalloc/metadata.xml
134 @@ -9,7 +9,10 @@
135 Jemalloc is a general-purpose scalable concurrent allocator
136 </longdescription>
137 <use>
138 + <flag name="hugepages">Enable transparent huge page support</flag>
139 + <flag name="lazy-lock">Enable lazy locking (only lock when multi-threaded)</flag>
140 <flag name="stats">Enable statistics calculation/reporting</flag>
141 + <flag name="xmalloc">Add support for xmalloc (abort-on-out-of-memory)</flag>
142 </use>
143 <upstream>
144 <remote-id type="github">jemalloc/jemalloc</remote-id>