devel/gcli: fix build with liblowdown-1.4.0

Upstream has broken the API in this minor update.

Event:		38C3
This commit is contained in:
Robert Clausecker 2024-12-28 14:14:58 +01:00
parent 8142550011
commit 893b259a87
2 changed files with 16 additions and 0 deletions

View File

@ -1,5 +1,6 @@
PORTNAME= gcli
DISTVERSION= 2.5.0
PORTREVISION= 1
CATEGORIES= devel net
MASTER_SITES= https://herrhotzenplotz.de/gcli/releases/gcli-${DISTVERSION}/

View File

@ -0,0 +1,15 @@
--- src/cmd/cmd.c.orig 2024-12-28 13:13:41 UTC
+++ src/cmd/cmd.c
@@ -179,9 +179,9 @@ gcli_pretty_print(char const *input, int indent, int m
if (!gcli_config_have_colours(g_clictx))
opts.oflags |= (LOWDOWN_TERM_NOANSI|LOWDOWN_TERM_NOCOLOUR);
- opts.vmargin = 1;
- opts.hmargin = indent - 4; /* somehow there's always 4 spaces being emitted by lowdown */
- opts.cols = maxlinelen;
+ opts.term.vmargin = 1;
+ opts.term.hmargin = indent - 4; /* somehow there's always 4 spaces being emitted by lowdown */
+ opts.term.cols = maxlinelen;
if ((doc = lowdown_doc_new(&opts)) == NULL)
err(1, NULL);