0009-Add-an-option-to-disable-the-curses-module.patch 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. From d7ea122e8ae506019761b92987b141fe7ea55f76 Mon Sep 17 00:00:00 2001
  2. From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  3. Date: Wed, 22 Feb 2017 17:31:51 -0800
  4. Subject: [PATCH] Add an option to disable the curses module
  5. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  6. Signed-off-by: Samuel Martin <s.martin49@gmail.com>
  7. [ Andrey Smirnov: ported to Python 3.6 ]
  8. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
  9. [ Adam Duskett: ported to Python 3.10.0 ]
  10. Signed-off-by: Adam Duskett <aduskett@gmail.com>
  11. ---
  12. Makefile.pre.in | 5 ++++-
  13. configure.ac | 7 +++++++
  14. 2 files changed, 11 insertions(+), 1 deletion(-)
  15. diff --git a/Makefile.pre.in b/Makefile.pre.in
  16. index 6d9527ddd0..283ca1bd60 100644
  17. --- a/Makefile.pre.in
  18. +++ b/Makefile.pre.in
  19. @@ -2095,7 +2095,6 @@ LIBSUBDIRS= asyncio \
  20. concurrent concurrent/futures \
  21. csv \
  22. ctypes ctypes/macholib \
  23. - curses \
  24. dbm \
  25. email email/mime \
  26. encodings \
  27. @@ -2255,6 +2254,10 @@ LIBSUBDIRS += tkinter
  28. TESTSUBDIRS += test/test_tkinter test/test_ttk
  29. endif
  30. +ifeq (@CURSES@,yes)
  31. +LIBSUBDIRS += curses
  32. +endif
  33. +
  34. COMPILEALL_OPTS=-j0
  35. ifeq (@PYDOC@,yes)
  36. diff --git a/configure.ac b/configure.ac
  37. index 4c5cbe4153..92d663ed40 100644
  38. --- a/configure.ac
  39. +++ b/configure.ac
  40. @@ -4523,6 +4523,13 @@ AC_ARG_ENABLE(sqlite3,
  41. AS_IF([test "$SQLITE3" = "no"],
  42. [PY_STDLIB_MOD_SET_NA([_sqlite3])])
  43. +AC_SUBST(CURSES)
  44. +AC_ARG_ENABLE(curses,
  45. + AS_HELP_STRING([--disable-curses], [disable curses]),
  46. + [ CURSES="${enableval}" ], [ CURSES=yes ])
  47. +AS_IF([test "$CURSES" = "no"],
  48. + [PY_STDLIB_MOD_SET_NA([_curses], [_curses_panel])])
  49. +
  50. AC_SUBST(PYDOC)
  51. AC_ARG_ENABLE(pydoc,
  52. --
  53. 2.34.1