Skip to content

Commit aeabc76

Browse files
committed
weechat: fix linking to correct libs
1 parent 6f008aa commit aeabc76

File tree

2 files changed

+32
-2
lines changed

2 files changed

+32
-2
lines changed

irc/weechat/Portfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ PortGroup cmake 1.1
55
PortGroup conflicts_build 1.0
66

77
# Need strndup()
8-
PortGroup legacysupport 1.0
8+
PortGroup legacysupport 1.1
99
legacysupport.newest_darwin_requires_legacy 10
1010

1111
name weechat
1212
version 4.5.0
13-
revision 0
13+
revision 1
1414
checksums rmd160 322aba1c2fffc882ceb34c21c08183d1ef6139c5 \
1515
sha256 b85e800af0f7c9f2d60d72c0f7e56abbaa60274a4d47be17407907292da30398 \
1616
size 2745516
@@ -63,6 +63,9 @@ license_noconflict asciidoctor
6363

6464
patchfiles no-extra-gcc-warnings.patch
6565

66+
# https://github.com/weechat/weechat/pull/2221
67+
patchfiles-append 0001-CMakeLists-fix-linking-to-curl-and-ncurses-on-macOS.patch
68+
6669
configure.args-append \
6770
-DENABLE_GUILE=OFF \
6871
-DENABLE_JAVASCRIPT=OFF \
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
From adc57daa860747c44dd252b6140c3f88399653c0 Mon Sep 17 00:00:00 2001
2+
From: Sergey Fedorov <[email protected]>
3+
Date: Sat, 21 Dec 2024 21:19:08 +0800
4+
Subject: [PATCH] CMakeLists: fix linking to curl and ncurses on macOS
5+
6+
Closes: https://github.com/weechat/weechat/issues/2218
7+
---
8+
CMakeLists.txt | 6 ++++--
9+
1 file changed, 4 insertions(+), 2 deletions(-)
10+
11+
diff --git CMakeLists.txt CMakeLists.txt
12+
index 5d15a3548..44c2c5cd0 100644
13+
--- CMakeLists.txt
14+
+++ CMakeLists.txt
15+
@@ -247,8 +247,10 @@ find_library(DL_LIBRARY
16+
PATHS /lib /usr/lib /usr/libexec /usr/local/lib /usr/local/libexec
17+
)
18+
if(DL_LIBRARY)
19+
- string(REGEX REPLACE "/[^/]*$" "" DL_LIBRARY_PATH "${DL_LIBRARY}")
20+
- set(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} -L${DL_LIBRARY_PATH}")
21+
+ if(NOT APPLE)
22+
+ string(REGEX REPLACE "/[^/]*$" "" DL_LIBRARY_PATH "${DL_LIBRARY}")
23+
+ set(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} -L${DL_LIBRARY_PATH}")
24+
+ endif()
25+
list(APPEND EXTRA_LIBS dl)
26+
endif()
27+

0 commit comments

Comments
 (0)