global: add --with-ncurses with prefix to configure (#33136)

This commit is contained in:
Yang Zongze 2022-11-11 10:40:03 +08:00 committed by GitHub
parent b9f69a8dfa
commit 0b302034df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 5 deletions

View File

@ -0,0 +1,11 @@
--- a/configure 2021-07-01 12:06:50.000000000 +0800
+++ b/configure 2022-10-10 14:30:01.348062669 +0800
@@ -15771,7 +15771,7 @@
withval=$with_ncurses; if test x$withval = xno ; then
search_ncurses=false
elif test x$withval != xyes ; then
- CURSES_LIBS="$LIBS -L$withval/lib -lncurses"
+ CURSES_LIBS="$LIBS -L$withval/lib -lncurses -ltinfo"
CURSES_INCLUDEDIR="-I$withval/include"
search_ncurses=false
screen_manager="ncurses"

View File

@ -24,14 +24,16 @@ class Global(Package):
depends_on("exuberant-ctags", type=("build", "run")) depends_on("exuberant-ctags", type=("build", "run"))
depends_on("ncurses") depends_on("ncurses")
def install(self, spec, prefix): patch("global-ncurse.patch")
config_args = ["--prefix={0}".format(prefix)]
config_args.append( def install(self, spec, prefix):
config_args = [
"--prefix={0}".format(prefix),
"--with-exuberant-ctags={0}".format( "--with-exuberant-ctags={0}".format(
os.path.join(spec["exuberant-ctags"].prefix.bin, "ctags") os.path.join(spec["exuberant-ctags"].prefix.bin, "ctags")
) ),
) "--with-ncurses={0}".format(spec["ncurses"].prefix),
]
configure(*config_args) configure(*config_args)