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

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. From dba12f15baad06cc7e17a275201cc022bb6c84f7 Mon Sep 17 00:00:00 2001
  2. From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  3. Date: Tue, 7 Mar 2017 22:29:06 +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 f7f025f..bd537d9 100644
  13. --- a/Makefile.pre.in
  14. +++ b/Makefile.pre.in
  15. @@ -1050,7 +1050,7 @@ LIBSUBDIRS= site-packages \
  16. multiprocessing multiprocessing/dummy \
  17. unittest \
  18. lib-old \
  19. - curses $(MACHDEPS)
  20. + $(MACHDEPS)
  21. TESTSUBDIRS = test test/audiodata test/capath test/data \
  22. test/cjkencodings test/decimaltestdata test/xmltestdata \
  23. @@ -1092,6 +1092,10 @@ TESTSUBDIRS += lib-tk/test lib-tk/test/test_tkinter \
  24. lib-tk/test/test_ttk
  25. endif
  26. +ifeq (@CURSES@,yes)
  27. +LIBSUBDIRS += curses
  28. +endif
  29. +
  30. libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
  31. @for i in $(SCRIPTDIR) $(LIBDEST); \
  32. do \
  33. diff --git a/configure.ac b/configure.ac
  34. index d0f032c..ab081bc 100644
  35. --- a/configure.ac
  36. +++ b/configure.ac
  37. @@ -2823,6 +2823,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.7.4