Gentoo Archives: gentoo-commits

From: Jory Pratt <anarchy@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/jemalloc/files/, dev-libs/jemalloc/
Date: Tue, 30 May 2017 21:23:32
Message-Id: 1496179397.dd65ea59e45578ff47fb08e48b7d2f27ecbc6e05.anarchy@gentoo
1 commit: dd65ea59e45578ff47fb08e48b7d2f27ecbc6e05
2 Author: Jory A. Pratt <anarchy <AT> gentoo <DOT> org>
3 AuthorDate: Tue May 30 21:22:15 2017 +0000
4 Commit: Jory Pratt <anarchy <AT> gentoo <DOT> org>
5 CommitDate: Tue May 30 21:23:17 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dd65ea59
7
8 dev-libs/jemalloc: Major bug fixes, refer to upstream changelog
9
10 Package-Manager: Portage-2.3.6, Repoman-2.3.2
11
12 dev-libs/jemalloc/Manifest | 1 +
13 .../files/jemalloc-4.5.0-fix_html_install.patch | 25 +++++++++
14 .../files/jemalloc-4.5.0-strip-optimization.patch | 35 +++++++++++++
15 dev-libs/jemalloc/jemalloc-4.5.0.ebuild | 59 ++++++++++++++++++++++
16 4 files changed, 120 insertions(+)
17
18 diff --git a/dev-libs/jemalloc/Manifest b/dev-libs/jemalloc/Manifest
19 index f2ade290ae7..e40e83fca4b 100644
20 --- a/dev-libs/jemalloc/Manifest
21 +++ b/dev-libs/jemalloc/Manifest
22 @@ -2,3 +2,4 @@ DIST jemalloc-2.2.5.tar.bz2 224118 SHA256 efcc9636757bd7f53a0fde084c2988bfe26f28
23 DIST jemalloc-3.3.1.tar.bz2 252997 SHA256 35c433cc1df5cdf9eb58b7980338552fc1d7aa64f89fe5643a972ccedb7cf20a SHA512 32814e8678af4954e26c0c0a0e5d06aba8f3844205fe212c5e41929dfab6a94ff11127a9238b5c18d72749827c467ecb874b8f3a9bc161cf1afdf4ea84c58690 WHIRLPOOL 35e8948e18ea7111ae830a8245be995b35f44ed2c2f687f706ee6941c78350c2cfaabefba223c4433069de47a9f92d621feaf176ec0c728e513e5f076e5fc874
24 DIST jemalloc-3.6.0.tar.bz2 338964 SHA256 e16c2159dd3c81ca2dc3b5c9ef0d43e1f2f45b04548f42db12e7c12d7bdf84fe SHA512 ebe7c64558a87a735b5906d5cb7527c241664eeae7328538675a12eabe7a1004be0f8766a3bd2a78e61334b196ca7ffc0ee8b8ff59167922a35f126cd1e76e43 WHIRLPOOL d5452005951b10d9d529349481779d79361ec8d8ac1f36f4b54408b5e0184f35d79fee8378188d98f1b8e41ae13557a2cf41ab849b68856ba69f33870fe6e980
25 DIST jemalloc-4.4.0.tar.bz2 440144 SHA256 a7aea63e9718d2f1adf81d87e3df3cb1b58deb86fc77bad5d702c4c59687b033 SHA512 2f88fb17ede3bf87e334e9c80949870e0dd85b5adcdd89a1750ccf6df5240f35293159ac0a360d3a29cf0b1d17edf86dcc7997c6bf3190ae7da7442d3a3cc14e WHIRLPOOL 1485ce6cf08ee2233117e281d1a61f376d2b6c73f28c68f2cc1956471bcb56a4eef045c0011de141b669d94d7339de5e79860f6b21bfbeffab821d5eb528759c
26 +DIST jemalloc-4.5.0.tar.bz2 449992 SHA256 9409d85664b4f135b77518b0b118c549009dc10f6cba14557d170476611f6780 SHA512 76953363fe1007952232220afa1a91da4c1c33c02369b5ad239d8dd1d0792141197c15e8489a8f4cd301b08494e65cadd8ecd34d025cb0285700dd78d7248821 WHIRLPOOL 33dc51258d6d27942b656fc355cdde24becf0cd50a507375dd51b2fa6c55a6444ff21bcdae0ebe4fae8d2e95fa31989f5cf8bd435a7a59385ebb225a0a4441fe
27
28 diff --git a/dev-libs/jemalloc/files/jemalloc-4.5.0-fix_html_install.patch b/dev-libs/jemalloc/files/jemalloc-4.5.0-fix_html_install.patch
29 new file mode 100644
30 index 00000000000..159702e6230
31 --- /dev/null
32 +++ b/dev-libs/jemalloc/files/jemalloc-4.5.0-fix_html_install.patch
33 @@ -0,0 +1,25 @@
34 +From c04d0b954adef2d3f1a30d91dc687f6a03b108eb Mon Sep 17 00:00:00 2001
35 +From:
36 +Date: Mon, 29 May 2017 00:58:32 -0500
37 +Subject: [PATCH 2/2] Do not install html doc
38 +
39 +---
40 + Makefile.in | 2 +-
41 + 1 file changed, 1 insertion(+), 1 deletion(-)
42 +
43 +diff --git a/Makefile.in b/Makefile.in
44 +index e49a871..733932a 100644
45 +--- a/Makefile.in
46 ++++ b/Makefile.in
47 +@@ -381,7 +381,7 @@ install_doc_man:
48 + $(INSTALL) -m 644 $$d $(MANDIR)/man3; \
49 + done
50 +
51 +-install_doc: install_doc_html install_doc_man
52 ++install_doc: install_doc_man
53 +
54 + install: install_bin install_include install_lib install_doc
55 +
56 +--
57 +2.13.0
58 +
59
60 diff --git a/dev-libs/jemalloc/files/jemalloc-4.5.0-strip-optimization.patch b/dev-libs/jemalloc/files/jemalloc-4.5.0-strip-optimization.patch
61 new file mode 100644
62 index 00000000000..8b346be86c0
63 --- /dev/null
64 +++ b/dev-libs/jemalloc/files/jemalloc-4.5.0-strip-optimization.patch
65 @@ -0,0 +1,35 @@
66 +From c568271163445e380679788388f1cb1edbdeaf88 Mon Sep 17 00:00:00 2001
67 +From:
68 +Date: Mon, 29 May 2017 00:57:15 -0500
69 +Subject: [PATCH 1/2] Strip all optimization, let portage handle.
70 +
71 +---
72 + configure.ac | 12 ------------
73 + 1 file changed, 12 deletions(-)
74 +
75 +diff --git a/configure.ac b/configure.ac
76 +index 20a8a64..d8af618 100644
77 +--- a/configure.ac
78 ++++ b/configure.ac
79 +@@ -851,18 +851,6 @@ if test "x$enable_ivsalloc" = "x1" ; then
80 + AC_DEFINE([JEMALLOC_IVSALLOC], [ ])
81 + fi
82 +
83 +-dnl Only optimize if not debugging.
84 +-if test "x$enable_debug" = "x0" ; then
85 +- if test "x$GCC" = "xyes" ; then
86 +- JE_CFLAGS_ADD([-O3])
87 +- JE_CFLAGS_ADD([-funroll-loops])
88 +- elif test "x$je_cv_msvc" = "xyes" ; then
89 +- JE_CFLAGS_ADD([-O2])
90 +- else
91 +- JE_CFLAGS_ADD([-O])
92 +- fi
93 +-fi
94 +-
95 + dnl Enable statistics calculation by default.
96 + AC_ARG_ENABLE([stats],
97 + [AS_HELP_STRING([--disable-stats],
98 +--
99 +2.13.0
100 +
101
102 diff --git a/dev-libs/jemalloc/jemalloc-4.5.0.ebuild b/dev-libs/jemalloc/jemalloc-4.5.0.ebuild
103 new file mode 100644
104 index 00000000000..9b1c134e5a2
105 --- /dev/null
106 +++ b/dev-libs/jemalloc/jemalloc-4.5.0.ebuild
107 @@ -0,0 +1,59 @@
108 +# Copyright 1999-2017 Gentoo Foundation
109 +# Distributed under the terms of the GNU General Public License v2
110 +
111 +EAPI=6
112 +
113 +inherit autotools toolchain-funcs multilib-minimal
114 +
115 +DESCRIPTION="Jemalloc is a general-purpose scalable concurrent allocator"
116 +HOMEPAGE="http://www.canonware.com/jemalloc/"
117 +SRC_URI="https://github.com/jemalloc/jemalloc/releases/download/${PV}/${P}.tar.bz2"
118 +
119 +LICENSE="BSD"
120 +SLOT="0/2"
121 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~x86 ~amd64-linux ~x86-linux ~x64-macos"
122 +IUSE="debug hardened static-libs stats"
123 +HTML_DOCS=( doc/jemalloc.html )
124 +PATCHES=( "${FILESDIR}/${PN}-4.5.0-strip-optimization.patch"
125 + "${FILESDIR}/${PN}-4.5.0-fix_html_install.patch"
126 +)
127 +MULTILIB_WRAPPED_HEADERS=( /usr/include/jemalloc/jemalloc.h )
128 +# autotools-utils.eclass auto-adds configure options when static-libs is in IUSE
129 +# but jemalloc doesn't implement them in its configure; need this here to
130 +# supress the warnings until automagic is removed from the eclass
131 +QA_CONFIGURE_OPTIONS="--enable-static --disable-static --enable-shared --disable-shared"
132 +
133 +src_prepare() {
134 + default
135 + eautoreconf
136 +}
137 +
138 +multilib_src_configure() {
139 + local myconf=()
140 +
141 + if use hardened ; then
142 + myconf+=( --disable-syscall )
143 + fi
144 +
145 + ECONF_SOURCE="${S}" \
146 + econf \
147 + $(use_enable debug) \
148 + $(use_enable stats) \
149 + "${myconf[@]}"
150 +}
151 +
152 +multilib_src_install() {
153 + # Copy man file which the Makefile looks for
154 + cp "${S}/doc/jemalloc.3" "${BUILD_DIR}/doc" || die
155 + emake DESTDIR="${D}" install
156 +}
157 +
158 +multilib_src_install_all() {
159 + if [[ ${CHOST} == *-darwin* ]] ; then
160 + # fixup install_name, #437362
161 + install_name_tool \
162 + -id "${EPREFIX}"/usr/$(get_libdir)/libjemalloc.1.dylib \
163 + "${ED}"/usr/$(get_libdir)/libjemalloc.1.dylib || die
164 + fi
165 + use static-libs || find "${ED}" -name '*.a' -delete
166 +}