commit:     8e62f993267124f495956bffb2dcdc00c9f8ece5
Author:     Alexey Sokolov <alexey+gentoo <AT> asokolov <DOT> org>
AuthorDate: Sat Sep 23 09:00:52 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Sep 27 09:12:32 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8e62f993

sys-devel/llvm: fix build in Darwin Prefix

Bug: https://bugs.gentoo.org/758167
Signed-off-by: Alexey Sokolov <alexey+gentoo <AT> asokolov.org>
Closes: https://github.com/gentoo/gentoo/pull/32730
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 sys-devel/llvm/llvm-16.0.6.ebuild             | 7 +++++++
 sys-devel/llvm/llvm-17.0.0_rc4.ebuild         | 7 +++++++
 sys-devel/llvm/llvm-17.0.1.9999.ebuild        | 7 +++++++
 sys-devel/llvm/llvm-17.0.1.ebuild             | 7 +++++++
 sys-devel/llvm/llvm-18.0.0.9999.ebuild        | 7 +++++++
 sys-devel/llvm/llvm-18.0.0_pre20230906.ebuild | 7 +++++++
 6 files changed, 42 insertions(+)

diff --git a/sys-devel/llvm/llvm-16.0.6.ebuild 
b/sys-devel/llvm/llvm-16.0.6.ebuild
index ae2efdaf8280..d6cb84f6df61 100644
--- a/sys-devel/llvm/llvm-16.0.6.ebuild
+++ b/sys-devel/llvm/llvm-16.0.6.ebuild
@@ -425,6 +425,13 @@ multilib_src_configure() {
                )
        fi
 
+       # On Macos prefix, Gentoo doesn't split sys-libs/ncurses to libtinfo and
+       # libncurses, but llvm tries to use libtinfo before libncurses, and 
ends up
+       # using libtinfo (actually, libncurses.dylib) from system instead of 
prefix
+       use kernel_Darwin && mycmakeargs+=(
+               -DTerminfo_LIBRARIES=-lncurses
+       )
+
        # workaround BMI bug in gcc-7 (fixed in 7.4)
        # https://bugs.gentoo.org/649880
        # apply only to x86, https://bugs.gentoo.org/650506

diff --git a/sys-devel/llvm/llvm-17.0.0_rc4.ebuild 
b/sys-devel/llvm/llvm-17.0.0_rc4.ebuild
index 3b29671ea107..6bda0f273990 100644
--- a/sys-devel/llvm/llvm-17.0.0_rc4.ebuild
+++ b/sys-devel/llvm/llvm-17.0.0_rc4.ebuild
@@ -439,6 +439,13 @@ multilib_src_configure() {
                )
        fi
 
+       # On Macos prefix, Gentoo doesn't split sys-libs/ncurses to libtinfo and
+       # libncurses, but llvm tries to use libtinfo before libncurses, and 
ends up
+       # using libtinfo (actually, libncurses.dylib) from system instead of 
prefix
+       use kernel_Darwin && mycmakeargs+=(
+               -DTerminfo_LIBRARIES=-lncurses
+       )
+
        # workaround BMI bug in gcc-7 (fixed in 7.4)
        # https://bugs.gentoo.org/649880
        # apply only to x86, https://bugs.gentoo.org/650506

diff --git a/sys-devel/llvm/llvm-17.0.1.9999.ebuild 
b/sys-devel/llvm/llvm-17.0.1.9999.ebuild
index 3b29671ea107..6bda0f273990 100644
--- a/sys-devel/llvm/llvm-17.0.1.9999.ebuild
+++ b/sys-devel/llvm/llvm-17.0.1.9999.ebuild
@@ -439,6 +439,13 @@ multilib_src_configure() {
                )
        fi
 
+       # On Macos prefix, Gentoo doesn't split sys-libs/ncurses to libtinfo and
+       # libncurses, but llvm tries to use libtinfo before libncurses, and 
ends up
+       # using libtinfo (actually, libncurses.dylib) from system instead of 
prefix
+       use kernel_Darwin && mycmakeargs+=(
+               -DTerminfo_LIBRARIES=-lncurses
+       )
+
        # workaround BMI bug in gcc-7 (fixed in 7.4)
        # https://bugs.gentoo.org/649880
        # apply only to x86, https://bugs.gentoo.org/650506

diff --git a/sys-devel/llvm/llvm-17.0.1.ebuild 
b/sys-devel/llvm/llvm-17.0.1.ebuild
index c6b0aa4bafb6..a7a24bb390c2 100644
--- a/sys-devel/llvm/llvm-17.0.1.ebuild
+++ b/sys-devel/llvm/llvm-17.0.1.ebuild
@@ -439,6 +439,13 @@ multilib_src_configure() {
                )
        fi
 
+       # On Macos prefix, Gentoo doesn't split sys-libs/ncurses to libtinfo and
+       # libncurses, but llvm tries to use libtinfo before libncurses, and 
ends up
+       # using libtinfo (actually, libncurses.dylib) from system instead of 
prefix
+       use kernel_Darwin && mycmakeargs+=(
+               -DTerminfo_LIBRARIES=-lncurses
+       )
+
        # workaround BMI bug in gcc-7 (fixed in 7.4)
        # https://bugs.gentoo.org/649880
        # apply only to x86, https://bugs.gentoo.org/650506

diff --git a/sys-devel/llvm/llvm-18.0.0.9999.ebuild 
b/sys-devel/llvm/llvm-18.0.0.9999.ebuild
index 8f7c0ff09445..6e07e59a22ce 100644
--- a/sys-devel/llvm/llvm-18.0.0.9999.ebuild
+++ b/sys-devel/llvm/llvm-18.0.0.9999.ebuild
@@ -438,6 +438,13 @@ multilib_src_configure() {
                )
        fi
 
+       # On Macos prefix, Gentoo doesn't split sys-libs/ncurses to libtinfo and
+       # libncurses, but llvm tries to use libtinfo before libncurses, and 
ends up
+       # using libtinfo (actually, libncurses.dylib) from system instead of 
prefix
+       use kernel_Darwin && mycmakeargs+=(
+               -DTerminfo_LIBRARIES=-lncurses
+       )
+
        # workaround BMI bug in gcc-7 (fixed in 7.4)
        # https://bugs.gentoo.org/649880
        # apply only to x86, https://bugs.gentoo.org/650506

diff --git a/sys-devel/llvm/llvm-18.0.0_pre20230906.ebuild 
b/sys-devel/llvm/llvm-18.0.0_pre20230906.ebuild
index 8f7c0ff09445..6e07e59a22ce 100644
--- a/sys-devel/llvm/llvm-18.0.0_pre20230906.ebuild
+++ b/sys-devel/llvm/llvm-18.0.0_pre20230906.ebuild
@@ -438,6 +438,13 @@ multilib_src_configure() {
                )
        fi
 
+       # On Macos prefix, Gentoo doesn't split sys-libs/ncurses to libtinfo and
+       # libncurses, but llvm tries to use libtinfo before libncurses, and 
ends up
+       # using libtinfo (actually, libncurses.dylib) from system instead of 
prefix
+       use kernel_Darwin && mycmakeargs+=(
+               -DTerminfo_LIBRARIES=-lncurses
+       )
+
        # workaround BMI bug in gcc-7 (fixed in 7.4)
        # https://bugs.gentoo.org/649880
        # apply only to x86, https://bugs.gentoo.org/650506

Reply via email to