72979cf3cd8704040b986197d205ad13940b110f
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / python3 / 105-optional-curses.patch
1 Add an option to disable the curses module
2
3 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
4 Signed-off-by: Samuel Martin <s.martin49@gmail.com>
5
6 ---
7  Makefile.pre.in |    6 +++++-
8  configure.ac    |    9 +++++++++
9  2 files changed, 14 insertions(+), 1 deletion(-)
10
11 Index: b/Makefile.pre.in
12 ===================================================================
13 --- a/Makefile.pre.in
14 +++ b/Makefile.pre.in
15 @@ -1156,7 +1156,7 @@
16                 multiprocessing multiprocessing/dummy \
17                 unittest \
18                 venv venv/scripts venv/scripts/posix \
19 -               curses $(MACHDEPS)
20 +               $(MACHDEPS)
21  
22  TESTSUBDIRS =  test test/test_asyncio \
23                 test/test_email test/test_email/data \
24 @@ -1218,6 +1218,10 @@
25         tkinter/test/test_ttk
26  endif
27  
28 +ifeq (@CURSES@,yes)
29 +LIBSUBDIRS += curses
30 +endif
31 +
32  ifeq (@TEST_MODULES@,yes)
33  LIBSUBDIRS += $(TESTSUBDIRS)
34  endif
35 Index: b/configure.ac
36 ===================================================================
37 --- a/configure.ac
38 +++ b/configure.ac
39 @@ -2693,6 +2693,15 @@
40     DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _tkinter"
41  fi
42  
43 +AC_SUBST(CURSES)
44 +AC_ARG_ENABLE(curses,
45 +       AS_HELP_STRING([--disable-curses], [disable curses]),
46 +       [ CURSES="${enableval}" ], [ CURSES=yes ])
47 +
48 +if test "$CURSES" = "no"; then
49 +   DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _curses _curses_panel"
50 +fi
51 +
52  AC_SUBST(PYDOC)
53  
54  AC_ARG_ENABLE(pydoc,