2
1

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

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. From d04ec780bf7c0825ab260bd1d6b7292141b2dcde Mon Sep 17 00:00:00 2001
  2. From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  3. Date: Wed, 23 Dec 2015 11:49:30 +0100
  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. ---
  8. Makefile.pre.in | 6 +++++-
  9. configure.ac | 9 +++++++++
  10. 2 files changed, 14 insertions(+), 1 deletion(-)
  11. diff --git a/Makefile.pre.in b/Makefile.pre.in
  12. index 0a93c27..b97c21e 100644
  13. --- a/Makefile.pre.in
  14. +++ b/Makefile.pre.in
  15. @@ -1186,7 +1186,7 @@ LIBSUBDIRS= \
  16. multiprocessing multiprocessing/dummy \
  17. unittest \
  18. venv venv/scripts venv/scripts/posix \
  19. - curses $(MACHDEPS)
  20. + $(MACHDEPS)
  21. TESTSUBDIRS = test test/test_asyncio \
  22. test/test_email test/test_email/data \
  23. @@ -1253,6 +1253,10 @@ TESTSUBDIRS += tkinter/test tkinter/test/test_tkinter \
  24. tkinter/test/test_ttk
  25. endif
  26. +ifeq (@CURSES@,yes)
  27. +LIBSUBDIRS += curses
  28. +endif
  29. +
  30. ifeq (@TEST_MODULES@,yes)
  31. LIBSUBDIRS += $(TESTSUBDIRS)
  32. endif
  33. diff --git a/configure.ac b/configure.ac
  34. index 787b185..0be47b2 100644
  35. --- a/configure.ac
  36. +++ b/configure.ac
  37. @@ -2912,6 +2912,15 @@ if test "$TK" = "no"; then
  38. DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _tkinter"
  39. fi
  40. +AC_SUBST(CURSES)
  41. +AC_ARG_ENABLE(curses,
  42. + AS_HELP_STRING([--disable-curses], [disable curses]),
  43. + [ CURSES="${enableval}" ], [ CURSES=yes ])
  44. +
  45. +if test "$CURSES" = "no"; then
  46. + DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _curses _curses_panel"
  47. +fi
  48. +
  49. AC_SUBST(PYDOC)
  50. AC_ARG_ENABLE(pydoc,
  51. --
  52. 2.6.4