eb43c7a029da45a99bce2cc6bb208b05afa0d63d
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / python / 103-optional-sqlite.patch
1 Add option to disable the sqlite3 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 |   24 +++++++++++++++++-------
8  configure.in |    9 +++++++++
9  2 file changed, 9 insertions(+)
10
11 Index: b/configure.ac
12 ===================================================================
13 --- a/configure.ac
14 +++ b/configure.ac
15 @@ -2627,6 +2627,15 @@
16        AC_CHECK_FUNCS(pthread_atfork)
17  fi
18  
19 +AC_SUBST(SQLITE3)
20 +AC_ARG_ENABLE(sqlite3,
21 +       AS_HELP_STRING([--disable-sqlite3], [disable sqlite3]),
22 +       [ SQLITE3="${enableval}" ], [ SQLITE3=yes ])
23 +
24 +if test "$SQLITE3" = "no" ; then
25 +   DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _sqlite3"
26 +fi
27 +
28  AC_SUBST(PYDOC)
29  
30  AC_ARG_ENABLE(pydoc,
31 Index: b/Makefile.pre.in
32 ===================================================================
33 --- a/Makefile.pre.in
34 +++ b/Makefile.pre.in
35 @@ -965,7 +965,6 @@
36                 email email/mime \
37                 ensurepip ensurepip/_bundled \
38                 json \
39 -               sqlite3  \
40                 logging bsddb csv importlib wsgiref \
41                 ctypes ctypes/macholib \
42                 idlelib idlelib/Icons \
43 @@ -983,7 +982,6 @@
44         test/tracedmodules \
45         email/test email/test/data \
46         json/tests \
47 -       sqlite3/test \
48         bsddb/test \
49         ctypes/test \
50         idlelib/idle_test \
51 @@ -1006,6 +1004,11 @@
52                 lib2to3/tests/data/fixers/myfixes
53  endif
54  
55 +ifeq (@SQLITE3@,yes)
56 +LIBSUBDIRS += sqlite3
57 +TESTSUBDIRS += sqlite3/test
58 +endif
59 +
60  libinstall:    build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
61         @for i in $(SCRIPTDIR) $(LIBDEST); \
62         do \