0007-Add-an-option-to-disable-the-curses-module.patch 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. From 7ec209bfb172ba5382c010954057fd32e4f21cf6 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. Upstream: N/A
  6. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  7. Signed-off-by: Samuel Martin <s.martin49@gmail.com>
  8. [ Andrey Smirnov: ported to Python 3.6 ]
  9. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
  10. [ Adam Duskett: ported to Python 3.10.0 ]
  11. Signed-off-by: Adam Duskett <aduskett@gmail.com>
  12. [ Vincent Fazio: ported to Python 3.13.2 ]
  13. Signed-off-by: Vincent Fazio <vfazio@gmail.com>
  14. ---
  15. Makefile.pre.in | 5 ++++-
  16. configure.ac | 7 +++++++
  17. 2 files changed, 11 insertions(+), 1 deletion(-)
  18. diff --git a/Makefile.pre.in b/Makefile.pre.in
  19. index 6d6631cbe31..a4531d1f0fc 100644
  20. --- a/Makefile.pre.in
  21. +++ b/Makefile.pre.in
  22. @@ -2316,7 +2316,6 @@ LIBSUBDIRS= asyncio \
  23. concurrent concurrent/futures \
  24. csv \
  25. ctypes ctypes/macholib \
  26. - curses \
  27. dbm \
  28. email email/mime \
  29. encodings \
  30. @@ -2484,6 +2483,10 @@ LIBSUBDIRS += tkinter
  31. TESTSUBDIRS += test/test_tkinter test/test_ttk
  32. endif
  33. +ifeq (@CURSES@,yes)
  34. +LIBSUBDIRS += curses
  35. +endif
  36. +
  37. COMPILEALL_OPTS=-j0
  38. ifeq (@PYDOC@,yes)
  39. diff --git a/configure.ac b/configure.ac
  40. index a1a91e094cd..30ad6f1e68d 100644
  41. --- a/configure.ac
  42. +++ b/configure.ac
  43. @@ -4674,6 +4674,13 @@ AC_ARG_ENABLE(sqlite3,
  44. AS_IF([test "$SQLITE3" = "no"],
  45. [PY_STDLIB_MOD_SET_NA([_sqlite3])])
  46. +AC_SUBST(CURSES)
  47. +AC_ARG_ENABLE(curses,
  48. + AS_HELP_STRING([--disable-curses], [disable curses]),
  49. + [ CURSES="${enableval}" ], [ CURSES=yes ])
  50. +AS_IF([test "$CURSES" = "no"],
  51. + [PY_STDLIB_MOD_SET_NA([_curses], [_curses_panel])])
  52. +
  53. AC_SUBST(PYDOC)
  54. AC_ARG_ENABLE(pydoc,
  55. --
  56. 2.34.1