-
Notifications
You must be signed in to change notification settings - Fork 742
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sysutils/ttyd: Only link with shared library
Due to how upstream handles libraries ttyd picks up both static and shared library of libwebsockets which is not intended. The least intrusive way I found is to simply detect it using pkgconfig instead. While at it, disable check for git to determine version. Reported by: Jeff Schmidt <jeff.jschmidt@gmail.com> Approved by: portmgr (blanket, build fix)
- Loading branch information
Daniel Engberg
authored and
Daniel Engberg
committed
Feb 22, 2023
1 parent
513c258
commit 35c7398
Showing
2 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- CMakeLists.txt.orig 2023-01-18 03:42:54 UTC | ||
+++ CMakeLists.txt | ||
@@ -58,11 +58,15 @@ if(JSON-C_FOUND) | ||
SET(JSON-C_LIBRARIES "${JSON-C_LIBRARY}") | ||
endif() | ||
|
||
+find_package(PkgConfig REQUIRED) | ||
find_package(ZLIB REQUIRED) | ||
-find_package(Libwebsockets 3.2.0 REQUIRED) | ||
+pkg_search_module(LIBWEBSOCKETS REQUIRED libwebsockets>=3.2.0) | ||
+if(LIBWEBSOCKETS_FOUND) | ||
+ message(STATUS "Found LIBWEBSOCKETS: ${LIBWEBSOCKETS_LINK_LIBRARIES} - Version: ${LIBWEBSOCKETS_VERSION}") | ||
+endif() | ||
|
||
set(INCLUDE_DIRS ${ZLIB_INCLUDE_DIR} ${LIBWEBSOCKETS_INCLUDE_DIRS} ${JSON-C_INCLUDE_DIRS} ${LIBUV_INCLUDE_DIRS}) | ||
-set(LINK_LIBS ${ZLIB_LIBRARIES} ${LIBWEBSOCKETS_LIBRARIES} ${JSON-C_LIBRARIES} ${LIBUV_LIBRARIES}) | ||
+set(LINK_LIBS ${ZLIB_LIBRARIES} ${LIBWEBSOCKETS_LINK_LIBRARIES} ${JSON-C_LIBRARIES} ${LIBUV_LIBRARIES}) | ||
|
||
set (CMAKE_REQUIRED_INCLUDES ${INCLUDE_DIRS}) | ||
include(CheckSymbolExists) |