From 41875593066a603ff4cd746a430e481fd7d3a180 Mon Sep 17 00:00:00 2001 From: Jordan R Abrahams-Whitehead Date: Tue, 1 Oct 2024 18:41:28 +0000 Subject: [PATCH] [lldb] Add terminfo dependency for ncurses support For ChromiumOS, terminfo is separate from the ncurses shared libraries. We need to explicitly look for libtinfo, and add that as a dependency. Original patch from: https://github.com/spack/spack/commit/9ea261265010eacd250691a8361f661d0576f25c patch.cherry: false patch.platforms: chromiumos patch.version_range.from: 537678 patch.version_range.until: null --- lldb/cmake/modules/FindCursesAndPanel.cmake | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lldb/cmake/modules/FindCursesAndPanel.cmake b/lldb/cmake/modules/FindCursesAndPanel.cmake index aaadf214bf54..cd2a68a01a0d 100644 --- a/lldb/cmake/modules/FindCursesAndPanel.cmake +++ b/lldb/cmake/modules/FindCursesAndPanel.cmake @@ -2,12 +2,15 @@ # FindCursesAndPanel # ----------- # -# Find the curses and panel library as a whole. +# Find the curses, terminfo, and panel library as a whole. +# NOTE: This is patched due to a terminfo dependency error introduced in +# https://github.com/llvm/llvm-project/pull/92865 -if(CURSES_INCLUDE_DIRS AND CURSES_LIBRARIES AND PANEL_LIBRARIES) +if(CURSES_INCLUDE_DIRS AND CURSES_LIBRARIES AND TINFO_LIBRARIES AND PANEL_LIBRARIES) set(CURSESANDPANEL_FOUND TRUE) else() find_package(Curses QUIET) + find_package(TINFO_LIBRARIES NAMES tinfo DOC "The curses tinfo library" QUIET) find_library(PANEL_LIBRARIES NAMES panel DOC "The curses panel library" QUIET) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(CursesAndPanel @@ -16,9 +19,10 @@ else() REQUIRED_VARS CURSES_INCLUDE_DIRS CURSES_LIBRARIES + TINFO_LIBRARIES PANEL_LIBRARIES) - if(CURSES_FOUND AND PANEL_LIBRARIES) - mark_as_advanced(CURSES_INCLUDE_DIRS CURSES_LIBRARIES PANEL_LIBRARIES) + if(CURSES_FOUND AND TINFO_LIBRARIES AND PANEL_LIBRARIES) + mark_as_advanced(CURSES_INCLUDE_DIRS CURSES_LIBRARIES TINFO_LIBRARIES PANEL_LIBRARIES) endif() endif() -- 2.49.0.395.g12beb8f557-goog