1 |
commit: 509cca29fe90b34bcb7dae9d507e2bb85bc8edda |
2 |
Author: WANG Xuerui <xen0n <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed May 4 09:11:57 2022 +0000 |
4 |
Commit: WANG Xuerui <xen0n <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed May 4 14:31:52 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=509cca29 |
7 |
|
8 |
dev-libs/jemalloc: add 5.3.0_pre20220405 |
9 |
|
10 |
This is snapshot of https://github.com/jemalloc/jemalloc/commit/ed5fc14b28ca, |
11 |
currently being tested by upstream as the 5.3.0 RC. |
12 |
|
13 |
Tested locally on amd64 and loong, but revdeps are not tested, so dropped |
14 |
all keywords for this version. |
15 |
|
16 |
Meanwhile, bumped EAPI to 8, and removed IUSE=static-libs due to no |
17 |
consumer in tree. |
18 |
|
19 |
See: https://github.com/jemalloc/jemalloc/issues/2213 |
20 |
Closes: https://github.com/gentoo/gentoo/pull/25315 |
21 |
Signed-off-by: WANG Xuerui <xen0n <AT> gentoo.org> |
22 |
|
23 |
dev-libs/jemalloc/Manifest | 1 + |
24 |
.../files/jemalloc-5.3.0-gentoo-fixups.patch | 43 ++++++++++++++++++ |
25 |
.../jemalloc/jemalloc-5.3.0_pre20220405.ebuild | 53 ++++++++++++++++++++++ |
26 |
3 files changed, 97 insertions(+) |
27 |
|
28 |
diff --git a/dev-libs/jemalloc/Manifest b/dev-libs/jemalloc/Manifest |
29 |
index e9979c395b76..0ba9cde236bf 100644 |
30 |
--- a/dev-libs/jemalloc/Manifest |
31 |
+++ b/dev-libs/jemalloc/Manifest |
32 |
@@ -1 +1,2 @@ |
33 |
DIST jemalloc-5.2.1.tar.bz2 554279 BLAKE2B 52cb8cd5e5807a750a7e5e9ee005afd61144d821d7f7029a5eca998fd61787a7271338dee3de586ddf93f5fdbddc2c2ca03ba64375a70096f273a6aa173da431 SHA512 0bbb77564d767cef0c6fe1b97b705d368ddb360d55596945aea8c3ba5889fbce10479d85ad492c91d987caacdbbdccc706aa3688e321460069f00c05814fae02 |
34 |
+DIST jemalloc-5.3.0_pre20220405.tar.xz 671240 BLAKE2B 75cc8b58f9ce10ad1ae61b6b0146727796585d2edfd88c100661181409591bce3ed8499bfc5ffbbfac217c9baf33f955934aac9a62190874bc070c22b7e8f18f SHA512 aeacb637c0a5bd653ad584700fd3a91717b49dba60174871047e0e72ac805c9931940b0faf2e1846e09b975799d9545e32e71e0ff5951c0dcb23cfc8680a2ce9 |
35 |
|
36 |
diff --git a/dev-libs/jemalloc/files/jemalloc-5.3.0-gentoo-fixups.patch b/dev-libs/jemalloc/files/jemalloc-5.3.0-gentoo-fixups.patch |
37 |
new file mode 100644 |
38 |
index 000000000000..e500a63225f0 |
39 |
--- /dev/null |
40 |
+++ b/dev-libs/jemalloc/files/jemalloc-5.3.0-gentoo-fixups.patch |
41 |
@@ -0,0 +1,43 @@ |
42 |
+This is jemalloc-5.2.0-gentoo-fixups.patch, rebased on top of upstream commit |
43 |
+https://github.com/jemalloc/jemalloc/commit/ed5fc14b28ca62a6. |
44 |
+From: Jory Pratt <anarchy@g.o> |
45 |
+Date: Tue, 23 Apr 2019 10:04:19 -0500 |
46 |
+Subject: [PATCH] Don't override user cflags, disable html_doc from being |
47 |
+ installed |
48 |
+ |
49 |
+Signed-off-by: Jory Pratt <anarchy@g.o> |
50 |
+--- a/Makefile.in |
51 |
++++ b/Makefile.in |
52 |
+@@ -603,7 +603,7 @@ install_doc_man: build_doc_man |
53 |
+ $(INSTALL) -v -m 644 $$d $(MANDIR)/man3; \ |
54 |
+ done |
55 |
+ |
56 |
+-install_doc: install_doc_html install_doc_man |
57 |
++install_doc: install_doc_man |
58 |
+ |
59 |
+ install: install_bin install_include install_lib |
60 |
+ |
61 |
+--- a/configure.ac |
62 |
++++ b/configure.ac |
63 |
+@@ -1220,21 +1220,6 @@ if test "x$enable_debug" = "x1" ; then |
64 |
+ fi |
65 |
+ AC_SUBST([enable_debug]) |
66 |
+ |
67 |
+-dnl Only optimize if not debugging. |
68 |
+-if test "x$enable_debug" = "x0" ; then |
69 |
+- if test "x$GCC" = "xyes" ; then |
70 |
+- JE_CFLAGS_ADD([-O3]) |
71 |
+- JE_CXXFLAGS_ADD([-O3]) |
72 |
+- JE_CFLAGS_ADD([-funroll-loops]) |
73 |
+- elif test "x$je_cv_msvc" = "xyes" ; then |
74 |
+- JE_CFLAGS_ADD([-O2]) |
75 |
+- JE_CXXFLAGS_ADD([-O2]) |
76 |
+- else |
77 |
+- JE_CFLAGS_ADD([-O]) |
78 |
+- JE_CXXFLAGS_ADD([-O]) |
79 |
+- fi |
80 |
+-fi |
81 |
+- |
82 |
+ dnl Enable statistics calculation by default. |
83 |
+ AC_ARG_ENABLE([stats], |
84 |
+ [AS_HELP_STRING([--disable-stats], |
85 |
|
86 |
diff --git a/dev-libs/jemalloc/jemalloc-5.3.0_pre20220405.ebuild b/dev-libs/jemalloc/jemalloc-5.3.0_pre20220405.ebuild |
87 |
new file mode 100644 |
88 |
index 000000000000..bb8d838144a4 |
89 |
--- /dev/null |
90 |
+++ b/dev-libs/jemalloc/jemalloc-5.3.0_pre20220405.ebuild |
91 |
@@ -0,0 +1,53 @@ |
92 |
+# Copyright 1999-2022 Gentoo Authors |
93 |
+# Distributed under the terms of the GNU General Public License v2 |
94 |
+ |
95 |
+EAPI="8" |
96 |
+ |
97 |
+inherit autotools multilib-minimal |
98 |
+ |
99 |
+DESCRIPTION="Jemalloc is a general-purpose scalable concurrent allocator" |
100 |
+HOMEPAGE="http://jemalloc.net/ https://github.com/jemalloc/jemalloc" |
101 |
+#SRC_URI="https://github.com/jemalloc/jemalloc/releases/download/${PV}/${P}.tar.bz2" |
102 |
+SRC_URI="https://dev.gentoo.org/~xen0n/distfiles/${P}.tar.xz" |
103 |
+ |
104 |
+LICENSE="BSD" |
105 |
+SLOT="0/2" |
106 |
+#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~ppc ~ppc64 ~riscv ~s390 ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris" |
107 |
+IUSE="debug lazy-lock prof stats xmalloc" |
108 |
+HTML_DOCS=( doc/jemalloc.html ) |
109 |
+PATCHES=( "${FILESDIR}/${PN}-5.3.0-gentoo-fixups.patch" ) |
110 |
+ |
111 |
+MULTILIB_WRAPPED_HEADERS=( /usr/include/jemalloc/jemalloc.h ) |
112 |
+ |
113 |
+src_prepare() { |
114 |
+ default |
115 |
+ eautoreconf |
116 |
+} |
117 |
+ |
118 |
+multilib_src_configure() { |
119 |
+ local myconf=( |
120 |
+ $(use_enable debug) |
121 |
+ $(use_enable lazy-lock) |
122 |
+ $(use_enable prof) |
123 |
+ $(use_enable stats) |
124 |
+ $(use_enable xmalloc) |
125 |
+ ) |
126 |
+ |
127 |
+ ECONF_SOURCE="${S}" econf "${myconf[@]}" |
128 |
+} |
129 |
+ |
130 |
+multilib_src_install() { |
131 |
+ # Copy man file which the Makefile looks for |
132 |
+ cp "${S}/doc/jemalloc.3" "${BUILD_DIR}/doc" || die |
133 |
+ emake DESTDIR="${D}" install |
134 |
+} |
135 |
+ |
136 |
+multilib_src_install_all() { |
137 |
+ if [[ ${CHOST} == *-darwin* ]] ; then |
138 |
+ # fixup install_name, #437362 |
139 |
+ install_name_tool \ |
140 |
+ -id "${EPREFIX}"/usr/$(get_libdir)/libjemalloc.2.dylib \ |
141 |
+ "${ED}"/usr/$(get_libdir)/libjemalloc.2.dylib || die |
142 |
+ fi |
143 |
+ find "${ED}" -name '*.a' -delete || die |
144 |
+} |