summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-libs/jemalloc
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-libs/jemalloc')
-rw-r--r--dev-libs/jemalloc/Manifest3
-rw-r--r--dev-libs/jemalloc/files/jemalloc-2.2.1-no-pprof.patch24
-rw-r--r--dev-libs/jemalloc/files/jemalloc-2.2.5_fix_html_install.patch12
-rw-r--r--dev-libs/jemalloc/files/jemalloc-3.0.0-no-pprof.patch27
-rw-r--r--dev-libs/jemalloc/files/jemalloc-3.0.0-strip-optimization.patch29
-rw-r--r--dev-libs/jemalloc/files/jemalloc-3.0.0_fix_html_install.patch14
-rw-r--r--dev-libs/jemalloc/files/jemalloc-3.5.1-no-pprof.patch25
-rw-r--r--dev-libs/jemalloc/files/jemalloc-3.5.1-strip-optimization.patch27
-rw-r--r--dev-libs/jemalloc/files/jemalloc-3.5.1_fix_html_install.patch12
-rw-r--r--dev-libs/jemalloc/files/jemalloc-fix-ar-call.patch59
-rw-r--r--dev-libs/jemalloc/files/jemalloc-strip-optimization.patch25
-rw-r--r--dev-libs/jemalloc/jemalloc-2.2.5-r1.ebuild44
-rw-r--r--dev-libs/jemalloc/jemalloc-3.3.1.ebuild45
-rw-r--r--dev-libs/jemalloc/jemalloc-3.6.0.ebuild54
-rw-r--r--dev-libs/jemalloc/metadata.xml12
15 files changed, 412 insertions, 0 deletions
diff --git a/dev-libs/jemalloc/Manifest b/dev-libs/jemalloc/Manifest
new file mode 100644
index 000000000000..2c6c514507ac
--- /dev/null
+++ b/dev-libs/jemalloc/Manifest
@@ -0,0 +1,3 @@
+DIST jemalloc-2.2.5.tar.bz2 224118 SHA256 efcc9636757bd7f53a0fde084c2988bfe26f2868e435447f2d41ac42c0b3521e SHA512 56a29dc7dca66c41d2934731c4bc756de5b58bf707dc2ebcf8515be400ce25e372af6526035117cad5b1964b9ba040ab7178f4c28c1649e86dcb53c3ec884a9d WHIRLPOOL e88fc56ac9db024483196d62e870fe4981d1d02fbf5e3819da504568cc58c8f246df668bb3dfe70ad2d551671577c18d5e6432e60bb3107296e6faad7cd8595c
+DIST jemalloc-3.3.1.tar.bz2 252997 SHA256 35c433cc1df5cdf9eb58b7980338552fc1d7aa64f89fe5643a972ccedb7cf20a SHA512 32814e8678af4954e26c0c0a0e5d06aba8f3844205fe212c5e41929dfab6a94ff11127a9238b5c18d72749827c467ecb874b8f3a9bc161cf1afdf4ea84c58690 WHIRLPOOL 35e8948e18ea7111ae830a8245be995b35f44ed2c2f687f706ee6941c78350c2cfaabefba223c4433069de47a9f92d621feaf176ec0c728e513e5f076e5fc874
+DIST jemalloc-3.6.0.tar.bz2 338964 SHA256 e16c2159dd3c81ca2dc3b5c9ef0d43e1f2f45b04548f42db12e7c12d7bdf84fe SHA512 ebe7c64558a87a735b5906d5cb7527c241664eeae7328538675a12eabe7a1004be0f8766a3bd2a78e61334b196ca7ffc0ee8b8ff59167922a35f126cd1e76e43 WHIRLPOOL d5452005951b10d9d529349481779d79361ec8d8ac1f36f4b54408b5e0184f35d79fee8378188d98f1b8e41ae13557a2cf41ab849b68856ba69f33870fe6e980
diff --git a/dev-libs/jemalloc/files/jemalloc-2.2.1-no-pprof.patch b/dev-libs/jemalloc/files/jemalloc-2.2.1-no-pprof.patch
new file mode 100644
index 000000000000..e10aab4d4f38
--- /dev/null
+++ b/dev-libs/jemalloc/files/jemalloc-2.2.1-no-pprof.patch
@@ -0,0 +1,24 @@
+--- a/Makefile.in 2011-04-11 10:42:32.084403330 -0500
++++ b/Makefile.in 2011-04-11 10:43:23.490760665 -0500
+@@ -42,7 +42,6 @@
+ endif
+
+ # Lists of files.
+-BINS := @srcroot@bin/pprof
+ CHDRS := @objroot@include/jemalloc/jemalloc@install_suffix@.h \
+ @objroot@include/jemalloc/jemalloc_defs@install_suffix@.h
+ CSRCS := @srcroot@src/jemalloc.c @srcroot@src/arena.c @srcroot@src/atomic.c \
+@@ -141,13 +140,6 @@
+ $(CC) -o $@ $< -L@objroot@lib -ljemalloc@install_suffix@
+ endif
+
+-install_bin:
+- install -d $(BINDIR)
+- @for b in $(BINS); do \
+- echo "install -m 755 $$b $(BINDIR)"; \
+- install -m 755 $$b $(BINDIR); \
+-done
+-
+ install_include:
+ install -d $(INCLUDEDIR)/jemalloc
+ @for h in $(CHDRS); do \
diff --git a/dev-libs/jemalloc/files/jemalloc-2.2.5_fix_html_install.patch b/dev-libs/jemalloc/files/jemalloc-2.2.5_fix_html_install.patch
new file mode 100644
index 000000000000..aff4add8b3fe
--- /dev/null
+++ b/dev-libs/jemalloc/files/jemalloc-2.2.5_fix_html_install.patch
@@ -0,0 +1,12 @@
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -176,7 +176,7 @@
+ install -m 644 $$d $(MANDIR)/man3; \
+ done
+
+-install_doc: install_html install_man
++install_doc: install_man
+
+ install: install_bin install_include install_lib install_doc
+
+
diff --git a/dev-libs/jemalloc/files/jemalloc-3.0.0-no-pprof.patch b/dev-libs/jemalloc/files/jemalloc-3.0.0-no-pprof.patch
new file mode 100644
index 000000000000..c2fa815ec529
--- /dev/null
+++ b/dev-libs/jemalloc/files/jemalloc-3.0.0-no-pprof.patch
@@ -0,0 +1,27 @@
+diff --git a/Makefile.in b/Makefile.in
+index 6675b59..ce0782f 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -69,7 +69,6 @@ endif
+ LIBJEMALLOC := $(LIBPREFIX)jemalloc$(install_suffix)
+
+ # Lists of files.
+-BINS := $(srcroot)bin/pprof $(objroot)bin/jemalloc.sh
+ CHDRS := $(objroot)include/jemalloc/jemalloc$(install_suffix).h \
+ $(objroot)include/jemalloc/jemalloc_defs$(install_suffix).h
+ CSRCS := $(srcroot)src/jemalloc.c $(srcroot)src/arena.c $(srcroot)src/atomic.c \
+@@ -196,13 +195,6 @@ build_lib_shared: $(DSOS)
+ build_lib_static: $(STATIC_LIBS)
+ build: build_lib_shared build_lib_static
+
+-install_bin:
+- install -d $(BINDIR)
+- @for b in $(BINS); do \
+- echo "install -m 755 $$b $(BINDIR)"; \
+- install -m 755 $$b $(BINDIR); \
+-done
+-
+ install_include:
+ install -d $(INCLUDEDIR)/jemalloc
+ @for h in $(CHDRS); do \
+
diff --git a/dev-libs/jemalloc/files/jemalloc-3.0.0-strip-optimization.patch b/dev-libs/jemalloc/files/jemalloc-3.0.0-strip-optimization.patch
new file mode 100644
index 000000000000..98c09af6277f
--- /dev/null
+++ b/dev-libs/jemalloc/files/jemalloc-3.0.0-strip-optimization.patch
@@ -0,0 +1,29 @@
+diff --git a/configure.ac b/configure.ac
+index a72019e..e366e1c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -556,23 +556,6 @@ if test "x$enable_debug" = "x1" ; then
+ fi
+ AC_SUBST([enable_debug])
+
+-dnl Only optimize if not debugging.
+-if test "x$enable_debug" = "x0" -a "x$no_CFLAGS" = "xyes" ; then
+- dnl Make sure that an optimization flag was not specified in EXTRA_CFLAGS.
+- optimize="no"
+- echo "$EXTRA_CFLAGS" | grep "\-O" >/dev/null || optimize="yes"
+- if test "x${optimize}" = "xyes" ; then
+- if test "x$GCC" = "xyes" ; then
+- JE_CFLAGS_APPEND([-O3])
+- JE_CFLAGS_APPEND([-funroll-loops])
+- elif test "x$je_cv_msvc" = "xyes" ; then
+- JE_CFLAGS_APPEND([-O2])
+- else
+- JE_CFLAGS_APPEND([-O])
+- fi
+- fi
+-fi
+-
+ dnl Enable statistics calculation by default.
+ AC_ARG_ENABLE([stats],
+ [AS_HELP_STRING([--disable-stats],
+
diff --git a/dev-libs/jemalloc/files/jemalloc-3.0.0_fix_html_install.patch b/dev-libs/jemalloc/files/jemalloc-3.0.0_fix_html_install.patch
new file mode 100644
index 000000000000..0f3026d44c2b
--- /dev/null
+++ b/dev-libs/jemalloc/files/jemalloc-3.0.0_fix_html_install.patch
@@ -0,0 +1,14 @@
+diff --git a/Makefile.in b/Makefile.in
+index 6675b59..3032c6d 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -240,7 +240,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
+
+
diff --git a/dev-libs/jemalloc/files/jemalloc-3.5.1-no-pprof.patch b/dev-libs/jemalloc/files/jemalloc-3.5.1-no-pprof.patch
new file mode 100644
index 000000000000..30cbd501ec5d
--- /dev/null
+++ b/dev-libs/jemalloc/files/jemalloc-3.5.1-no-pprof.patch
@@ -0,0 +1,25 @@
+diff -urN a/Makefile.in b/Makefile.in
+--- a/Makefile.in 2014-02-25 18:49:15.000000000 -0600
++++ b/Makefile.in 2014-03-07 18:24:10.978141932 -0600
+@@ -73,7 +73,6 @@
+ LIBJEMALLOC := $(LIBPREFIX)jemalloc$(install_suffix)
+
+ # Lists of files.
+-BINS := $(srcroot)bin/pprof $(objroot)bin/jemalloc.sh
+ C_HDRS := $(objroot)include/jemalloc/jemalloc$(install_suffix).h
+ C_SRCS := $(srcroot)src/jemalloc.c $(srcroot)src/arena.c \
+ $(srcroot)src/atomic.c $(srcroot)src/base.c $(srcroot)src/bitmap.c \
+@@ -273,13 +272,6 @@
+ build_lib_static: $(STATIC_LIBS)
+ build_lib: build_lib_shared build_lib_static
+
+-install_bin:
+- install -d $(BINDIR)
+- @for b in $(BINS); do \
+- echo "install -m 755 $$b $(BINDIR)"; \
+- install -m 755 $$b $(BINDIR); \
+-done
+-
+ install_include:
+ install -d $(INCLUDEDIR)/jemalloc
+ @for h in $(C_HDRS); do \
diff --git a/dev-libs/jemalloc/files/jemalloc-3.5.1-strip-optimization.patch b/dev-libs/jemalloc/files/jemalloc-3.5.1-strip-optimization.patch
new file mode 100644
index 000000000000..cc8736b84123
--- /dev/null
+++ b/dev-libs/jemalloc/files/jemalloc-3.5.1-strip-optimization.patch
@@ -0,0 +1,27 @@
+diff -urN a/configure.ac b/configure.ac
+--- a/configure.ac 2014-02-25 18:49:15.000000000 -0600
++++ b/configure.ac 2014-03-07 18:19:53.718147847 -0600
+@@ -639,23 +639,6 @@
+ AC_DEFINE([JEMALLOC_IVSALLOC], [ ])
+ fi
+
+-dnl Only optimize if not debugging.
+-if test "x$enable_debug" = "x0" -a "x$no_CFLAGS" = "xyes" ; then
+- dnl Make sure that an optimization flag was not specified in EXTRA_CFLAGS.
+- optimize="no"
+- echo "$CFLAGS $EXTRA_CFLAGS" | grep '\-O' >/dev/null || optimize="yes"
+- if test "x${optimize}" = "xyes" ; then
+- if test "x$GCC" = "xyes" ; then
+- JE_CFLAGS_APPEND([-O3])
+- JE_CFLAGS_APPEND([-funroll-loops])
+- elif test "x$je_cv_msvc" = "xyes" ; then
+- JE_CFLAGS_APPEND([-O2])
+- else
+- JE_CFLAGS_APPEND([-O])
+- fi
+- fi
+-fi
+-
+ dnl Enable statistics calculation by default.
+ AC_ARG_ENABLE([stats],
+ [AS_HELP_STRING([--disable-stats],
diff --git a/dev-libs/jemalloc/files/jemalloc-3.5.1_fix_html_install.patch b/dev-libs/jemalloc/files/jemalloc-3.5.1_fix_html_install.patch
new file mode 100644
index 000000000000..1ce5ad2ede95
--- /dev/null
+++ b/dev-libs/jemalloc/files/jemalloc-3.5.1_fix_html_install.patch
@@ -0,0 +1,12 @@
+diff -urN a/Makefile.in b/Makefile.in
+--- a/Makefile.in 2014-02-25 18:49:15.000000000 -0600
++++ b/Makefile.in 2014-03-07 18:26:23.074138895 -0600
+@@ -317,7 +317,7 @@
+ 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
+
diff --git a/dev-libs/jemalloc/files/jemalloc-fix-ar-call.patch b/dev-libs/jemalloc/files/jemalloc-fix-ar-call.patch
new file mode 100644
index 000000000000..6d81cda55d9e
--- /dev/null
+++ b/dev-libs/jemalloc/files/jemalloc-fix-ar-call.patch
@@ -0,0 +1,59 @@
+diff --git a/Makefile.in b/Makefile.in
+index 7481047..478becb 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -55,6 +55,8 @@ PIC_CFLAGS = @PIC_CFLAGS@
+ CTARGET = @CTARGET@
+ LDTARGET = @LDTARGET@
+ MKLIB = @MKLIB@
++AR = @AR@
++ARFLAGS = crus
+ CC_MM = @CC_MM@
+
+ ifeq (macho, $(ABI))
+@@ -185,7 +187,7 @@ $(objroot)lib/$(LIBJEMALLOC)_s.$(A) : $(COBJS)
+
+ $(STATIC_LIBS):
+ @mkdir -p $(@D)
+- $(MKLIB) $+
++ $(AR) $(ARFLAGS) $@ $+
+
+ $(objroot)test/bitmap$(EXE): $(objroot)src/bitmap.$(O)
+
+diff --git a/configure.ac b/configure.ac
+index c270662..f4b4c21 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -226,9 +226,13 @@ PIC_CFLAGS='-fPIC -DPIC'
+ CTARGET='-o $@'
+ LDTARGET='-o $@'
+ EXTRA_LDFLAGS=
+-MKLIB='ar crus $@'
+ CC_MM=1
+
++AN_MAKEVAR([AR], [AC_PROG_AR])
++AN_PROGRAM([ar], [AC_PROG_AR])
++AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)])
++AC_PROG_AR
++
+ dnl Platform-specific settings. abi and RPATH can probably be determined
+ dnl programmatically, but doing so is error-prone, which makes it generally
+ dnl not worth the trouble.
+@@ -310,7 +314,8 @@ case "${host}" in
+ EXTRA_LDFLAGS="-link -DEBUG"
+ CTARGET='-Fo$@'
+ LDTARGET='-Fe$@'
+- MKLIB='lib -nologo -out:$@'
++ AR='lib'
++ ARFLAGS='-nologo -out:'
+ CC_MM=
+ else
+ importlib="${so}"
+@@ -403,7 +408,6 @@ AC_SUBST([enable_autogen])
+
+ AC_PROG_INSTALL
+ AC_PROG_RANLIB
+-AC_PATH_PROG([AR], [ar], [false], [$PATH])
+ AC_PATH_PROG([LD], [ld], [false], [$PATH])
+ AC_PATH_PROG([AUTOCONF], [autoconf], [false], [$PATH])
+
diff --git a/dev-libs/jemalloc/files/jemalloc-strip-optimization.patch b/dev-libs/jemalloc/files/jemalloc-strip-optimization.patch
new file mode 100644
index 000000000000..60b7d6c22ff1
--- /dev/null
+++ b/dev-libs/jemalloc/files/jemalloc-strip-optimization.patch
@@ -0,0 +1,25 @@
+--- a/configure.ac 2010-02-22 12:07:05.000000000 +0100
++++ b/configure.ac 2010-02-22 12:08:29.000000000 +0100
+@@ -296,21 +296,6 @@
+ fi
+ AC_SUBST([enable_debug])
+
+-dnl Only optimize if not debugging.
+-if test "x$enable_debug" = "x0" -a "x$no_CFLAGS" = "xyes" ; then
+- dnl Make sure that an optimization flag was not specified in EXTRA_CFLAGS.
+- optimize="no"
+- echo "$EXTRA_CFLAGS" | grep "\-O" >/dev/null || optimize="yes"
+- if test "x${optimize}" = "xyes" ; then
+- if test "x$GCC" = "xyes" ; then
+- JE_CFLAGS_APPEND([-O3])
+- JE_CFLAGS_APPEND([-funroll-loops])
+- else
+- JE_CFLAGS_APPEND([-O])
+- fi
+- fi
+-fi
+-
+ dnl Do not enable statistics calculation by default.
+ AC_ARG_ENABLE([stats],
+ [AS_HELP_STRING([--enable-stats], [Enable statistics calculation/reporting])],
+
diff --git a/dev-libs/jemalloc/jemalloc-2.2.5-r1.ebuild b/dev-libs/jemalloc/jemalloc-2.2.5-r1.ebuild
new file mode 100644
index 000000000000..420b4daa183c
--- /dev/null
+++ b/dev-libs/jemalloc/jemalloc-2.2.5-r1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit autotools eutils
+
+DESCRIPTION="Jemalloc is a general-purpose scalable concurrent allocator"
+HOMEPAGE="http://www.canonware.com/jemalloc/"
+SRC_URI="http://www.canonware.com/download/${PN}/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~mips ppc ppc64 x86"
+
+IUSE="debug static-libs stats"
+
+DEPEND=""
+RDEPEND=""
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}/${PN}-strip-optimization.patch" \
+ "${FILESDIR}/${PN}-2.2.1-no-pprof.patch" \
+ "${FILESDIR}/${PN}-2.2.5_fix_html_install.patch"
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --with-jemalloc-prefix=j \
+ $(use_enable debug) \
+ $(use_enable stats)
+}
+
+src_install() {
+ emake DESTDIR="${ED}" install || die
+ dodoc ChangeLog README
+ dohtml doc/jemalloc.html
+
+ use static-libs || find "${ED}" -name '*.a' -exec rm -f {} +
+}
diff --git a/dev-libs/jemalloc/jemalloc-3.3.1.ebuild b/dev-libs/jemalloc/jemalloc-3.3.1.ebuild
new file mode 100644
index 000000000000..3bd29f941655
--- /dev/null
+++ b/dev-libs/jemalloc/jemalloc-3.3.1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit autotools eutils
+
+DESCRIPTION="Jemalloc is a general-purpose scalable concurrent allocator"
+HOMEPAGE="http://www.canonware.com/jemalloc/"
+SRC_URI="http://www.canonware.com/download/${PN}/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ppc ppc64 ~s390 x86 ~x64-macos"
+IUSE="debug static-libs stats"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}/${PN}-3.0.0-strip-optimization.patch" \
+ "${FILESDIR}/${PN}-3.0.0-no-pprof.patch" \
+ "${FILESDIR}/${PN}-3.0.0_fix_html_install.patch"
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable debug) \
+ $(use_enable stats)
+}
+
+src_install() {
+ default
+ dohtml doc/jemalloc.html
+
+ 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 "${D}" -name '*.a' -delete
+}
diff --git a/dev-libs/jemalloc/jemalloc-3.6.0.ebuild b/dev-libs/jemalloc/jemalloc-3.6.0.ebuild
new file mode 100644
index 000000000000..99720e222b88
--- /dev/null
+++ b/dev-libs/jemalloc/jemalloc-3.6.0.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools-multilib eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="Jemalloc is a general-purpose scalable concurrent allocator"
+HOMEPAGE="http://www.canonware.com/jemalloc/"
+SRC_URI="http://www.canonware.com/download/${PN}/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos"
+IUSE="debug static-libs stats"
+
+HTML_DOCS=( doc/jemalloc.html )
+
+PATCHES=( "${FILESDIR}/${PN}-3.5.1-strip-optimization.patch"
+ "${FILESDIR}/${PN}-3.5.1-no-pprof.patch"
+ "${FILESDIR}/${PN}-3.5.1_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_configure() {
+ myeconfargs=(
+ $(use_enable debug)
+ $(use_enable stats)
+ )
+ use sparc && append-cppflags -DLG_QUANTUM=4 -mcpu=ultrasparc
+ # The configure test for page shift requires running code which fails
+ # when cross-compiling. Since it uses _SC_PAGESIZE, and the majority
+ # of systems use 4096 as the base page size, just hardcode 12 here.
+ tc-is-cross-compiler && export je_cv_static_page_shift=12
+ autotools-multilib_src_configure
+}
+
+src_install() {
+ autotools-multilib_src_install
+
+ 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
+}
diff --git a/dev-libs/jemalloc/metadata.xml b/dev-libs/jemalloc/metadata.xml
new file mode 100644
index 000000000000..a53e4b43c49d
--- /dev/null
+++ b/dev-libs/jemalloc/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>mozilla</herd>
+ <longdescription lang="en">
+ Jemalloc is a general-purpose scalable concurrent allocator
+ </longdescription>
+ <use>
+ <flag name='stats'>Enable statistics calculation/reporting</flag>
+ </use>
+</pkgmetadata>
+