8a852c56f5a167922d7334ac02a22f3f7c54b57c
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / python3 / 104-optional-tk.patch
1 Add an option to disable the tk 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 |   14 +++++++++++---
8  configure.ac    |    9 +++++++++
9  2 files changed, 20 insertions(+), 3 deletions(-)
10
11 Index: b/Makefile.pre.in
12 ===================================================================
13 --- a/Makefile.pre.in
14 +++ b/Makefile.pre.in
15 @@ -1140,7 +1140,7 @@
16  EXTRAPLATDIR= @EXTRAPLATDIR@
17  MACHDEPS=      $(PLATDIR) $(EXTRAPLATDIR)
18  XMLLIBSUBDIRS=  xml xml/dom xml/etree xml/parsers xml/sax
19 -LIBSUBDIRS=    tkinter \
20 +LIBSUBDIRS=    \
21                 site-packages \
22                 asyncio \
23                 collections concurrent concurrent/futures encodings \
24 @@ -1158,8 +1158,7 @@
25                 venv venv/scripts venv/scripts/posix \
26                 curses $(MACHDEPS)
27  
28 -TESTSUBDIRS =  tkinter/test tkinter/test/test_tkinter tkinter/test/test_ttk \
29 -               test test/test_asyncio \
30 +TESTSUBDIRS =  test test/test_asyncio \
31                 test/test_email test/test_email/data \
32                 test/test_json \
33                 test/audiodata \
34 @@ -1213,6 +1212,12 @@
35  TESTSUBDIRS += sqlite3/test
36  endif
37  
38 +ifeq (@TK@,yes)
39 +LIBSUBDIRS += tkinter
40 +TESTSUBDIRS += tkinter/test tkinter/test/test_tkinter \
41 +       tkinter/test/test_ttk
42 +endif
43 +
44  ifeq (@TEST_MODULES@,yes)
45  LIBSUBDIRS += $(TESTSUBDIRS)
46  endif
47 Index: b/configure.ac
48 ===================================================================
49 --- a/configure.ac
50 +++ b/configure.ac
51 @@ -2684,6 +2684,15 @@
52     DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _sqlite3"
53  fi
54  
55 +AC_SUBST(TK)
56 +AC_ARG_ENABLE(tk,
57 +       AS_HELP_STRING([--disable-tk], [disable tk]),
58 +       [ TK="${enableval}" ], [ TK=yes ])
59 +
60 +if test "$TK" = "no"; then
61 +   DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _tkinter"
62 +fi
63 +
64  AC_SUBST(PYDOC)
65  
66  AC_ARG_ENABLE(pydoc,