105-optional-curses.patch 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. Add an option to disable the curses module
  2. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  3. Signed-off-by: Samuel Martin <s.martin49@gmail.com>
  4. ---
  5. Makefile.pre.in | 6 +++++-
  6. configure.in | 9 +++++++++
  7. 2 files changed, 14 insertions(+), 1 deletion(-)
  8. Index: b/Makefile.pre.in
  9. ===================================================================
  10. --- a/Makefile.pre.in
  11. +++ b/Makefile.pre.in
  12. @@ -972,7 +972,7 @@
  13. multiprocessing multiprocessing/dummy \
  14. unittest \
  15. lib-old \
  16. - curses $(MACHDEPS)
  17. + $(MACHDEPS)
  18. TESTSUBDIRS = test test/audiodata test/capath test/data \
  19. test/cjkencodings test/decimaltestdata test/xmltestdata \
  20. @@ -1014,6 +1014,10 @@
  21. lib-tk/test/test_ttk
  22. endif
  23. +ifeq (@CURSES@,yes)
  24. +LIBSUBDIRS += curses
  25. +endif
  26. +
  27. libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
  28. @for i in $(SCRIPTDIR) $(LIBDEST); \
  29. do \
  30. Index: b/configure.ac
  31. ===================================================================
  32. --- a/configure.ac
  33. +++ b/configure.ac
  34. @@ -2651,6 +2651,15 @@
  35. DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _tkinter"
  36. fi
  37. +AC_SUBST(CURSES)
  38. +AC_ARG_ENABLE(curses,
  39. + AS_HELP_STRING([--disable-curses], [disable curses]),
  40. + [ CURSES="${enableval}" ], [ CURSES=yes ])
  41. +
  42. +if test "$CURSES" = "no"; then
  43. + DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _curses _curses_panel"
  44. +fi
  45. +
  46. AC_SUBST(PYDOC)
  47. AC_ARG_ENABLE(pydoc,