git: e93f6442ef5a - main - net/gnu-radius: Fix the build
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 27 Mar 2026 00:51:39 UTC
The branch main has been updated by jrm:
URL: https://cgit.FreeBSD.org/ports/commit/?id=e93f6442ef5a354b7ad67b21164aae511a0ee642
commit e93f6442ef5a354b7ad67b21164aae511a0ee642
Author: Joseph Mingrone <jrm@FreeBSD.org>
AuthorDate: 2026-03-26 23:39:18 +0000
Commit: Joseph Mingrone <jrm@FreeBSD.org>
CommitDate: 2026-03-27 00:51:13 +0000
net/gnu-radius: Fix the build
The build was failing for two reasons:
1. When devel/readline was installed (e.g. as a dependency of
editors/emacs), its newer interface caused:
readline.c:147:51: error: expected expression
147 | rl_attempted_completion_function = (CPPFunction *) completion_fp;
| ^
readline.c:147:38: error: use of undeclared identifier 'CPPFunction'
147 | rl_attempted_completion_function = (CPPFunction *) completion_fp;
| ^
Patch radius's lib/readline.c to use the modern rl_completion_func_t
type.
2. The elisp files were not being installed, causing a staging error.
Fix this by installing the elisp in a post-install-EMACS-on target.
Sponsored by: The FreeBSD Foundation
---
net/gnu-radius/Makefile | 5 +++++
net/gnu-radius/files/patch-lib_readline.c | 11 +++++++++++
2 files changed, 16 insertions(+)
diff --git a/net/gnu-radius/Makefile b/net/gnu-radius/Makefile
index 6f6b9cb21c08..01f75016e6fa 100644
--- a/net/gnu-radius/Makefile
+++ b/net/gnu-radius/Makefile
@@ -71,4 +71,9 @@ post-install:
${STAGEDIR}${EXAMPLESDIR}\
"! ( -name Makefile -o -name Makefile\.* ) " )
+post-install-EMACS-on:
+ @${MKDIR} ${STAGEDIR}${PREFIX}/${EMACS_SITE_LISPDIR}
+ ${INSTALL_DATA} ${WRKSRC}/elisp/*.el \
+ ${STAGEDIR}${PREFIX}/${EMACS_SITE_LISPDIR}
+
.include <bsd.port.mk>
diff --git a/net/gnu-radius/files/patch-lib_readline.c b/net/gnu-radius/files/patch-lib_readline.c
new file mode 100644
index 000000000000..051053810cd5
--- /dev/null
+++ b/net/gnu-radius/files/patch-lib_readline.c
@@ -0,0 +1,11 @@
+--- lib/readline.c.orig 2026-03-26 21:35:33 UTC
++++ lib/readline.c
+@@ -144,7 +144,7 @@ grad_readline_init(char *name,
+ return;
+ #ifdef WITH_READLINE
+ rl_readline_name = name;
+- rl_attempted_completion_function = (CPPFunction *) completion_fp;
++ rl_attempted_completion_function = (rl_completion_func_t *) completion_fp;
+ rl_getc_function = grad_getc;
+ #endif
+ }