summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJory A. Pratt <anarchy@gentoo.org>2017-05-30 16:22:15 -0500
committerJory A. Pratt <anarchy@gentoo.org>2017-05-30 16:23:17 -0500
commitdd65ea59e45578ff47fb08e48b7d2f27ecbc6e05 (patch)
tree3214f0a9480de68f7d65a7afe671a83f79b9a569 /dev-libs/jemalloc/jemalloc-4.5.0.ebuild
parentdev-lang/perl: Version bump, masked for testing (diff)
downloadgentoo-dd65ea59e45578ff47fb08e48b7d2f27ecbc6e05.tar.gz
gentoo-dd65ea59e45578ff47fb08e48b7d2f27ecbc6e05.tar.bz2
gentoo-dd65ea59e45578ff47fb08e48b7d2f27ecbc6e05.zip
dev-libs/jemalloc: Major bug fixes, refer to upstream changelog
Package-Manager: Portage-2.3.6, Repoman-2.3.2
Diffstat (limited to 'dev-libs/jemalloc/jemalloc-4.5.0.ebuild')
-rw-r--r--dev-libs/jemalloc/jemalloc-4.5.0.ebuild59
1 files changed, 59 insertions, 0 deletions
diff --git a/dev-libs/jemalloc/jemalloc-4.5.0.ebuild b/dev-libs/jemalloc/jemalloc-4.5.0.ebuild
new file mode 100644
index 000000000000..9b1c134e5a25
--- /dev/null
+++ b/dev-libs/jemalloc/jemalloc-4.5.0.ebuild
@@ -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
+}