From 9c50ce2c87e6fd0c48a3afca7220852d3befbe9c Mon Sep 17 00:00:00 2001 From: Sergey Fedorov Date: Fri, 13 Dec 2024 15:41:28 +0800 Subject: [PATCH] liboping*: fix building --- net/liboping/Portfile | 23 ++++++++++------ net/liboping/files/devel-patch-oping.c.diff | 30 +++++++++++++++++++++ net/liboping/files/patch-oping.c.diff | 30 +++++++++++++++++++++ 3 files changed, 75 insertions(+), 8 deletions(-) create mode 100644 net/liboping/files/devel-patch-oping.c.diff create mode 100644 net/liboping/files/patch-oping.c.diff diff --git a/net/liboping/Portfile b/net/liboping/Portfile index 2981bd95406ce..1e1444aa36187 100644 --- a/net/liboping/Portfile +++ b/net/liboping/Portfile @@ -5,7 +5,6 @@ PortGroup github 1.0 name liboping categories net -platforms darwin license LGPL-2.1 GPL-2 maintainers nomaintainer description C library and program for ICMP echo requests @@ -22,17 +21,25 @@ if {${subport} eq ${name}} { checksums rmd160 97cfca317c5884f68a0f7d88d5b022864e4f91ce \ sha256 c206b05743d0730814be3115b48abd0b00016677525153c78730da307aba0846 \ size 395596 + + # https://github.com/octo/liboping/issues/72 + patchfiles-append \ + patch-oping.c.diff } subport ${name}-devel { - github.setup octo liboping f9115d65b561adeb6d36ded952949f065ad0a572 - version 20170914 - revision 1 + github.setup octo liboping 656ea6996d083090cbbae1581287a3b1a5dcfb56 + version 20200601 + revision 0 conflicts liboping - checksums rmd160 40dcd0a11db6a9e0c4ec6a97313d2070a7280934 \ - sha256 00d017bde998ca5a99a2922cef389510cd0248561662044df1225808e5283a03 \ - size 65495 + checksums rmd160 e20c99cf49a0ba3ebae43e70ccf96f3c1189c231 \ + sha256 fe309c135b719ae5a5f9cfe7133c7ca6f70fd1e5310e73a780a7f53ebfde153a \ + size 65534 + + # https://github.com/octo/liboping/issues/72 + patchfiles-append \ + devel-patch-oping.c.diff use_autoreconf yes } @@ -40,7 +47,7 @@ subport ${name}-devel { homepage https://noping.cc depends_build-append \ - port:pkgconfig + path:bin/pkg-config:pkgconfig depends_lib-append port:ncurses diff --git a/net/liboping/files/devel-patch-oping.c.diff b/net/liboping/files/devel-patch-oping.c.diff new file mode 100644 index 0000000000000..2c13af99c9cba --- /dev/null +++ b/net/liboping/files/devel-patch-oping.c.diff @@ -0,0 +1,30 @@ +--- src/oping.c ++++ src/oping.c 2024-12-13 15:38:31.000000000 +0800 +@@ -1155,7 +1155,7 @@ + wattron (ctx->window, COLOR_PAIR(color)); + + if (has_utf8()) +- mvwprintw (ctx->window, /* y = */ y_max, /* x = */ x + 2, symbol); ++ mvwprintw (ctx->window, /* y = */ y_max, /* x = */ x + 2, "%s", symbol); + else + mvwaddch (ctx->window, /* y = */ y_max, /* x = */ x + 2, symbolc); + +@@ -1261,7 +1261,7 @@ + mvwaddch (ctx->window, /* y = */ y_max, /* x = */ x + 2, ' '); + else if (has_utf8 ()) + mvwprintw (ctx->window, /* y = */ y_max, /* x = */ x + 2, +- hist_symbols_utf8[index]); ++ "%s", hist_symbols_utf8[index]); + else + mvwaddch (ctx->window, /* y = */ y_max, /* x = */ x + 2, + hist_symbols_acs[index] | A_ALTCHARSET); +@@ -1638,8 +1638,7 @@ + + HOST_PRINTF ("%zu bytes from %s (%s): icmp_seq=%u ttl=%i ", + data_len, context->host, context->addr, +- sequence, recv_ttl, +- format_qos (recv_qos, recv_qos_str, sizeof (recv_qos_str))); ++ sequence, recv_ttl); + if ((recv_qos != 0) || (opt_send_qos != 0)) + { + HOST_PRINTF ("qos=%s ", diff --git a/net/liboping/files/patch-oping.c.diff b/net/liboping/files/patch-oping.c.diff new file mode 100644 index 0000000000000..89def3090c478 --- /dev/null +++ b/net/liboping/files/patch-oping.c.diff @@ -0,0 +1,30 @@ +--- src/oping.c ++++ src/oping.c 2024-12-04 10:11:24.000000000 +0800 +@@ -1125,7 +1125,7 @@ + wattron (ctx->window, COLOR_PAIR(color)); + + if (has_utf8()) +- mvwprintw (ctx->window, /* y = */ 3, /* x = */ x + 2, symbol); ++ mvwprintw (ctx->window, /* y = */ 3, /* x = */ x + 2, "%s", symbol); + else + mvwaddch (ctx->window, /* y = */ 3, /* x = */ x + 2, symbolc); + +@@ -1223,7 +1223,7 @@ + mvwaddch (ctx->window, /* y = */ 3, /* x = */ x + 2, ' '); + else if (has_utf8 ()) + mvwprintw (ctx->window, /* y = */ 3, /* x = */ x + 2, +- hist_symbols_utf8[index]); ++ "%s", hist_symbols_utf8[index]); + else + mvwaddch (ctx->window, /* y = */ 3, /* x = */ x + 2, + hist_symbols_acs[index] | A_ALTCHARSET); +@@ -1600,8 +1600,7 @@ + + HOST_PRINTF ("%zu bytes from %s (%s): icmp_seq=%u ttl=%i ", + data_len, context->host, context->addr, +- sequence, recv_ttl, +- format_qos (recv_qos, recv_qos_str, sizeof (recv_qos_str))); ++ sequence, recv_ttl); + if ((recv_qos != 0) || (opt_send_qos != 0)) + { + HOST_PRINTF ("qos=%s ",