1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-25 20:25:28 +03:00
aports/testing/pihole/0002-Support-compiling-with-libcurses-instead-of-libtermc.patch
2025-05-12 19:10:20 +00:00

38 lines
1.6 KiB
Diff

From 04e81f829339af3248a2eb88d3c8cf28d5736eef 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/3] 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.1/src/CMakeLists.txt b/FTL-6.1/src/CMakeLists.txt
index 82885f23..f9902bec 100644
--- a/FTL-6.1/src/CMakeLists.txt
+++ b/FTL-6.1/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.45.2