From e2df40ad0d132bcc100f3441d564fe38258b120c Mon Sep 17 00:00:00 2001 From: "Z. Liu" Date: Sat, 12 Jul 2025 22:27:13 +0800 Subject: [PATCH] net-misc/stunnel: handle mimalloc's .so filename libmimalloc.so will be libmimalloc-secure.so if dev-libs/mimalloc is built with USE="hardened" Thanks-to: Jiri Netolicky Closes: https://bugs.gentoo.org/956606 Closes: https://bugs.gentoo.org/956616 Signed-off-by: Z. Liu Part-of: https://github.com/gentoo/gentoo/pull/43013 Closes: https://github.com/gentoo/gentoo/pull/43013 Signed-off-by: Sam James --- .../files/stunnel-5.74-hardened-mimalloc.patch | 15 +++++++++++++++ net-misc/stunnel/stunnel-5.74.ebuild | 1 + net-misc/stunnel/stunnel-5.75.ebuild | 1 + 3 files changed, 17 insertions(+) create mode 100644 net-misc/stunnel/files/stunnel-5.74-hardened-mimalloc.patch diff --git a/net-misc/stunnel/files/stunnel-5.74-hardened-mimalloc.patch b/net-misc/stunnel/files/stunnel-5.74-hardened-mimalloc.patch new file mode 100644 index 0000000000000..eeb27f9eb52d6 --- /dev/null +++ b/net-misc/stunnel/files/stunnel-5.74-hardened-mimalloc.patch @@ -0,0 +1,15 @@ +.so of mimalloc will be libmimalloc-secure.so if build with +"-DMI_SECURE=ON" (USE="hardended" in Gentoo). +diff --git a/configure.ac b/configure.ac +index c647b5c..e2b1f55 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -225,7 +225,7 @@ AC_SEARCH_LIBS([openpty], [util]) + AC_SEARCH_LIBS([dlopen], [dl]) + AC_SEARCH_LIBS([shl_load], [dld]) + # Checks for optional libraries +-AC_SEARCH_LIBS([mi_malloc], [mimalloc]) ++AC_SEARCH_LIBS([mi_malloc], [mimalloc mimalloc-secure]) + + # Add BeOS libraries + if test "x${host_os}" = "xbeos"; then diff --git a/net-misc/stunnel/stunnel-5.74.ebuild b/net-misc/stunnel/stunnel-5.74.ebuild index 3187e5965d072..ca1cf9937023f 100644 --- a/net-misc/stunnel/stunnel-5.74.ebuild +++ b/net-misc/stunnel/stunnel-5.74.ebuild @@ -43,6 +43,7 @@ BDEPEND=" PATCHES=( "${FILESDIR}"/${PN}-5.71-dont-clobber-fortify-source.patch "${FILESDIR}"/${PN}-5.71-respect-EPYTHON-for-tests.patch + "${FILESDIR}"/${PN}-5.74-hardened-mimalloc.patch ) python_check_deps() { diff --git a/net-misc/stunnel/stunnel-5.75.ebuild b/net-misc/stunnel/stunnel-5.75.ebuild index ed8a71dca93b6..46518864cdb86 100644 --- a/net-misc/stunnel/stunnel-5.75.ebuild +++ b/net-misc/stunnel/stunnel-5.75.ebuild @@ -43,6 +43,7 @@ BDEPEND=" PATCHES=( "${FILESDIR}"/${PN}-5.71-dont-clobber-fortify-source.patch "${FILESDIR}"/${PN}-5.71-respect-EPYTHON-for-tests.patch + "${FILESDIR}"/${PN}-5.74-hardened-mimalloc.patch ) python_check_deps() {