MFH: r548445
shells/zsh: Fix build with devel/ncurses 6.2
When devel/ncurses is installed in the system, the Zsh configure script
detects and uses ${LOCALBASE}/include/ncurses/ncurses.h instead.
The patch is obtained from this commit:
c6a8516361
/
cc -c -I. -I../../Src -I../../Src -I../../Src/Zle -I. -I/usr/local/include -DBOOL_DEFINED -DLIBICONV_PLUG -DHAVE_CONFIG_H -DMODULE -O2 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -fPIC -o curses..o curses.c
In file included from curses.c:210:
./curses_keys.h:93:15: error: use of undeclared identifier 'KEY_EVENT'
{"EVENT", KEY_EVENT},
^
1 error generated.
*** Error code 1
Reviewed by: koobs
Approved by: koobs (ports, mentor)
Differential Revision: https://reviews.freebsd.org/D26355
Approved by: ports-secteam (fluffy)
This commit is contained in:
parent
8e45048881
commit
7f924e5d0d
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/branches/2020Q3/; revision=548588
@ -88,6 +88,10 @@ SUB_FILES= pkg-message
|
||||
CONFIGURE_ENV+= ac_cv_lib_iconv_libiconv=no
|
||||
.endif
|
||||
|
||||
.if ${ncurses_ARGS} == port
|
||||
EXTRA_PATCHES= ${PATCHDIR}/extra-patch-Src_Modules_curses__keys.awk
|
||||
.endif
|
||||
|
||||
post-patch:
|
||||
# FreeBSD's clock_gettime(2) is in libc, not librt; see PR 167857
|
||||
@${REINPLACE_CMD} -e '/LIBS/s|-lrt||' ${WRKSRC}/configure
|
||||
|
18
shells/zsh/files/extra-patch-Src_Modules_curses__keys.awk
Normal file
18
shells/zsh/files/extra-patch-Src_Modules_curses__keys.awk
Normal file
@ -0,0 +1,18 @@
|
||||
https://sourceforge.net/p/zsh/code/ci/c6a85163619ed1cee89ab047a0d98108ed46828d/
|
||||
--- Src/Modules/curses_keys.awk.orig 2017-12-04 14:09:36 UTC
|
||||
+++ Src/Modules/curses_keys.awk
|
||||
@@ -12,8 +12,13 @@ BEGIN {nkeydefs = 0}
|
||||
|
||||
END {
|
||||
printf("static const struct zcurses_namenumberpair keypad_names[] = {\n")
|
||||
- for (i = 0; i < 0 + nkeydefs; i++)
|
||||
+ for (i = 0; i < 0 + nkeydefs; i++) {
|
||||
+ if (name[i] == "EVENT")
|
||||
+ printf("#ifdef KEY_EVENT\n")
|
||||
printf(" {\"%s\", KEY_%s},\n", name[i], name[i])
|
||||
+ if (name[i] == "EVENT")
|
||||
+ printf("#endif\n")
|
||||
+ }
|
||||
printf(" {NULL, 0}\n")
|
||||
printf("};\n")
|
||||
}
|
Loading…
Reference in New Issue
Block a user