commit:     66f518f9c20389755a493d3d432e2fb1ea4ce78f
Author:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
AuthorDate: Mon Mar  7 19:51:28 2022 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Mon Mar  7 19:51:28 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=66f518f9

dev-libs/mimalloc: Revbump, add multilib support

Half-life 2 bundles an ancient version of mimalloc, let's make this
multilib so we can use the system version.

Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>

 dev-libs/mimalloc/mimalloc-2.0.5-r1.ebuild | 36 ++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/dev-libs/mimalloc/mimalloc-2.0.5-r1.ebuild 
b/dev-libs/mimalloc/mimalloc-2.0.5-r1.ebuild
new file mode 100644
index 000000000000..7c12b49f25b0
--- /dev/null
+++ b/dev-libs/mimalloc/mimalloc-2.0.5-r1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake-multilib
+
+DESCRIPTION="mimalloc is a compact general purpose allocator with excellent 
performance"
+HOMEPAGE="https://github.com/microsoft/mimalloc";
+SRC_URI="https://github.com/microsoft/mimalloc/archive/refs/tags/v${PV}.tar.gz 
-> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0/2"
+KEYWORDS="~amd64"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+src_configure() {
+       local mycmakeargs=(
+               # TODO: build hardened variant?
+               #-DMI_SECURE=$(usex hardened)
+
+               -DMI_INSTALL_TOPLEVEL=ON
+               -DMI_BUILD_TESTS=$(usex test)
+       )
+
+       cmake-multilib_src_configure
+}
+
+src_install() {
+       cmake-multilib_src_install
+
+       rm "${ED}/usr/$(get_libdir)/mimalloc.o" || die
+
+       find "${ED}" -name '*.a' -delete || die
+}

Reply via email to