mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-25 20:25:28 +03:00
38 lines
1.6 KiB
Diff
38 lines
1.6 KiB
Diff
From e38ae491fead65d59fb5a7610171cad9abd60284 Mon Sep 17 00:00:00 2001
|
|
From: Mike Crute <mike@crute.us>
|
|
Date: Sat, 10 May 2025 15:12:56 -0700
|
|
Subject: [PATCH 2/4] Support compiling with libcurses instead of libtermcap
|
|
|
|
libcurses contains an implementation of libtermcap.
|
|
---
|
|
src/CMakeLists.txt | 11 +++++++++--
|
|
1 file changed, 9 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/FTL-6.2.3/src/CMakeLists.txt b/FTL-6.2.3/src/CMakeLists.txt
|
|
index 82885f23..f9902bec 100644
|
|
--- a/FTL-6.2.3/src/CMakeLists.txt
|
|
+++ b/FTL-6.2.3/src/CMakeLists.txt
|
|
@@ -349,11 +349,18 @@ add_subdirectory(ntp)
|
|
find_library(LIBREADLINE NAMES libreadline${LIBRARY_SUFFIX} readline)
|
|
find_library(LIBHISTORY NAMES libhistory${LIBRARY_SUFFIX} history)
|
|
find_library(LIBTERMCAP NAMES libtermcap${LIBRARY_SUFFIX} termcap)
|
|
-if(LIBREADLINE AND LIBHISTORY AND LIBTERMCAP)
|
|
+find_library(LIBCURSES NAMES libcurses${LIBRARY_SUFFIX} curses)
|
|
+if(LIBREADLINE AND LIBHISTORY AND (LIBTERMCAP OR LIBCURSES))
|
|
message(STATUS "Building FTL with readline support: YES")
|
|
target_compile_definitions(lua PRIVATE LUA_USE_READLINE)
|
|
target_compile_definitions(sqlite3 PRIVATE HAVE_READLINE)
|
|
- target_link_libraries(pihole-FTL ${LIBREADLINE} ${LIBHISTORY} ${LIBTERMCAP})
|
|
+ if(LIBCURSES)
|
|
+ message(STATUS "Building FTL with libcurses support: YES")
|
|
+ target_link_libraries(pihole-FTL ${LIBREADLINE} ${LIBHISTORY} ${LIBCURSES})
|
|
+ else()
|
|
+ message(STATUS "Building FTL with libtermcap support: YES")
|
|
+ target_link_libraries(pihole-FTL ${LIBREADLINE} ${LIBHISTORY} ${LIBTERMCAP})
|
|
+ endif()
|
|
else()
|
|
message(STATUS "Building FTL with readline support: NO")
|
|
endif()
|
|
--
|
|
2.49.0
|
|
|