From 0b302034dfb9af346abbf4a4f16d2147d26e1c41 Mon Sep 17 00:00:00 2001 From: Yang Zongze Date: Fri, 11 Nov 2022 10:40:03 +0800 Subject: global: add --with-ncurses with prefix to configure (#33136) --- var/spack/repos/builtin/packages/global/global-ncurse.patch | 11 +++++++++++ var/spack/repos/builtin/packages/global/package.py | 12 +++++++----- 2 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 var/spack/repos/builtin/packages/global/global-ncurse.patch diff --git a/var/spack/repos/builtin/packages/global/global-ncurse.patch b/var/spack/repos/builtin/packages/global/global-ncurse.patch new file mode 100644 index 0000000000..89d48fbf00 --- /dev/null +++ b/var/spack/repos/builtin/packages/global/global-ncurse.patch @@ -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" diff --git a/var/spack/repos/builtin/packages/global/package.py b/var/spack/repos/builtin/packages/global/package.py index 8e39f79c9f..0cdd674eb4 100644 --- a/var/spack/repos/builtin/packages/global/package.py +++ b/var/spack/repos/builtin/packages/global/package.py @@ -24,14 +24,16 @@ class Global(Package): depends_on("exuberant-ctags", type=("build", "run")) depends_on("ncurses") - def install(self, spec, prefix): - config_args = ["--prefix={0}".format(prefix)] + patch("global-ncurse.patch") - config_args.append( + def install(self, spec, prefix): + config_args = [ + "--prefix={0}".format(prefix), "--with-exuberant-ctags={0}".format( os.path.join(spec["exuberant-ctags"].prefix.bin, "ctags") - ) - ) + ), + "--with-ncurses={0}".format(spec["ncurses"].prefix), + ] configure(*config_args) -- cgit v1.2.3-70-g09d2