The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / python / 106-optional-expat.patch
1 Add an option to disable expat
2
3 This patch replaces the existing --with-system-expat option with a
4 --with-expat={system,builtin,none} option, which allows to tell Python
5 whether we want to use the system expat (already installed), the expat
6 builtin the Python sources, or no expat at all (which disables the
7 installation of XML modules).
8
9 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
10 Signed-off-by: Samuel Martin <s.martin49@gmail.com>
11
12 ---
13  Makefile.pre.in |    6 +++++-
14  configure.in    |   18 +++++++++++++-----
15  setup.py        |    2 +-
16  3 files changed, 19 insertions(+), 7 deletions(-)
17
18 Index: b/Makefile.pre.in
19 ===================================================================
20 --- a/Makefile.pre.in
21 +++ b/Makefile.pre.in
22 @@ -968,7 +968,7 @@
23                 logging bsddb csv importlib wsgiref \
24                 ctypes ctypes/macholib \
25                 idlelib idlelib/Icons \
26 -               distutils distutils/command $(XMLLIBSUBDIRS) \
27 +               distutils distutils/command \
28                 multiprocessing multiprocessing/dummy \
29                 unittest \
30                 lib-old \
31 @@ -1018,6 +1018,10 @@
32  LIBSUBDIRS += curses
33  endif
34  
35 +ifeq (@EXPAT@,yes)
36 +LIBSUBDIRS += $(XMLLIBSUBDIRS)
37 +endif
38 +
39  libinstall:    build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
40         @for i in $(SCRIPTDIR) $(LIBDEST); \
41         do \
42 Index: b/configure.ac
43 ===================================================================
44 --- a/configure.ac
45 +++ b/configure.ac
46 @@ -2292,13 +2292,21 @@
47  AC_SUBST(DISABLED_EXTENSIONS)
48  
49  # Check for use of the system expat library
50 -AC_MSG_CHECKING(for --with-system-expat)
51 -AC_ARG_WITH(system_expat,
52 -            AS_HELP_STRING([--with-system-expat], [build pyexpat module using an installed expat library]),
53 +AC_MSG_CHECKING(for --with-expat)
54 +AC_ARG_WITH(expat,
55 +            AS_HELP_STRING([--with-expat], [select which expat version to use: system, builtin, none]),
56              [],
57 -            [with_system_expat="no"])
58 +            [with_expat="builtin"])
59  
60 -AC_MSG_RESULT($with_system_expat)
61 +AC_MSG_RESULT($with_expat)
62 +
63 +if test "$with_expat" != "none"; then
64 +   EXPAT=yes
65 +else
66 +   DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} pyexpat"
67 +   EXPAT=no
68 +fi
69 +AC_SUBST(EXPAT)
70  
71  # Check for use of the system libffi library
72  AC_MSG_CHECKING(for --with-system-ffi)
73 Index: b/setup.py
74 ===================================================================
75 --- a/setup.py
76 +++ b/setup.py
77 @@ -1474,7 +1474,7 @@
78          #
79          # More information on Expat can be found at www.libexpat.org.
80          #
81 -        if '--with-system-expat' in sysconfig.get_config_var("CONFIG_ARGS"):
82 +        if '--with-expat=system' in sysconfig.get_config_var("CONFIG_ARGS"):
83              expat_inc = []
84              define_macros = []
85              expat_lib = ['expat']