From 61376c57025fd0c25c7ae57863688681cc729a7c Mon Sep 17 00:00:00 2001 From: aeiouaeiouaeiouaeiouaeiouaeiou Date: Fri, 25 Oct 2024 03:10:04 +0300 Subject: [PATCH] tio: fix build on macOS Sequoia --- comms/tio/Portfile | 6 +++++- comms/tio/files/patch-replace-send.diff | 24 ++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 comms/tio/files/patch-replace-send.diff diff --git a/comms/tio/Portfile b/comms/tio/Portfile index 45dcae842e17..7d121c07af81 100644 --- a/comms/tio/Portfile +++ b/comms/tio/Portfile @@ -10,7 +10,7 @@ legacysupport.newest_darwin_requires_legacy 15 github.setup tio tio 3.7 v github.tarball_from releases -revision 0 +revision 1 categories comms installs_libs no @@ -37,6 +37,10 @@ depends_lib-append path:lib/pkgconfig/glib-2.0.pc:glib2 \ port:inih \ port:lua54 +# https://github.com/tio/tio/issues/278 +# remove this in the next release +patchfiles-append patch-replace-send.diff + use_xz yes post-destroot { diff --git a/comms/tio/files/patch-replace-send.diff b/comms/tio/files/patch-replace-send.diff new file mode 100644 index 000000000000..a1a538729094 --- /dev/null +++ b/comms/tio/files/patch-replace-send.diff @@ -0,0 +1,24 @@ +From 9fec68911769736ab2595fda911a835e5c21633b Mon Sep 17 00:00:00 2001 +From: Martin Lund +Date: Sun, 15 Sep 2024 05:57:31 +0200 +Subject: [PATCH] Fix name declaration conflict with socket send() +--- src/script.c ++++ src/script.c +@@ -181,7 +181,7 @@ static int modem_send(lua_State *L) + } + + // lua: send(string) +-static int send(lua_State *L) ++static int send_(lua_State *L) + { + const char *string = lua_tostring(L, 1); + int ret; +@@ -455,7 +455,7 @@ static const struct luaL_Reg tio_lib[] = + { "msleep", msleep}, + { "line_set", line_set}, + { "modem_send", modem_send}, +- { "send", send}, ++ { "send", send_}, + { "read", read_string}, + { "expect", expect}, + { "exit", exit_},