git: 2e9e32cb83ff - 2022Q2 - devel/mimalloc: fix install wiht WITH_DEBUG

From: Emanuel Haupt <ehaupt_at_FreeBSD.org>
Date: Tue, 12 Apr 2022 08:42:47 UTC
The branch 2022Q2 has been updated by ehaupt:

URL: https://cgit.FreeBSD.org/ports/commit/?id=2e9e32cb83ff0ab900c891f4ebd81443b999fcaa

commit 2e9e32cb83ff0ab900c891f4ebd81443b999fcaa
Author:     Emanuel Haupt <ehaupt@FreeBSD.org>
AuthorDate: 2022-04-12 08:37:16 +0000
Commit:     Emanuel Haupt <ehaupt@FreeBSD.org>
CommitDate: 2022-04-12 08:42:39 +0000

    devel/mimalloc: fix install wiht WITH_DEBUG
    
    If WITH_DEBUG is defined shared objects are installed with -debug
    suffix. This not only fails to install but would also break consumers.
    
    Patch CMakeLists.txt accordingly.
    
    Reported by:    koobs (via irc)
    
    (cherry picked from commit 2cba286258af03d7880db549f64678919040c85c)
---
 devel/mimalloc/files/patch-CMakeLists.txt | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/devel/mimalloc/files/patch-CMakeLists.txt b/devel/mimalloc/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..7c9fce5c9d33
--- /dev/null
+++ b/devel/mimalloc/files/patch-CMakeLists.txt
@@ -0,0 +1,13 @@
+--- CMakeLists.txt.orig	2022-02-15 00:44:33 UTC
++++ CMakeLists.txt
+@@ -258,8 +258,8 @@ else()
+ endif()
+ 
+ string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LC)
+-if(NOT(CMAKE_BUILD_TYPE_LC MATCHES "^(release|relwithdebinfo|minsizerel|none)$"))
+-  set(mi_basename "${mi_basename}-${CMAKE_BUILD_TYPE_LC}") #append build type (e.g. -debug) if not a release version
++if(NOT(CMAKE_BUILD_TYPE_LC MATCHES "^(debug|release|relwithdebinfo|minsizerel|none)$"))
++  set(mi_basename "${mi_basename}-${CMAKE_BUILD_TYPE_LC}") #append build type if not a release version or debug
+ endif()
+ if(MI_BUILD_SHARED)
+   list(APPEND mi_build_targets "shared")