0026-Add-an-option-to-disable-bsddb.patch 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. From a4bbbf0c5f1f68298d5f4e2c2cd80de7e758763c Mon Sep 17 00:00:00 2001
  2. From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  3. Date: Tue, 7 Mar 2017 22:30:06 +0100
  4. Subject: [PATCH] Add an option to disable bsddb
  5. bsddb has an external dependency on Berkeley DB. Since we want to be
  6. able to build Python without it, this patch adds an option to disable
  7. the build/installation of this Python module.
  8. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  9. Signed-off-by: Samuel Martin <s.martin49@gmail.com>
  10. [Peter: update for 2.7.16]
  11. Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
  12. ---
  13. Makefile.pre.in | 8 ++++++--
  14. configure.ac | 22 ++++++++++++++++++++++
  15. 2 files changed, 28 insertions(+), 2 deletions(-)
  16. diff --git a/Makefile.pre.in b/Makefile.pre.in
  17. index 8dee345539..a0473096c1 100644
  18. --- a/Makefile.pre.in
  19. +++ b/Makefile.pre.in
  20. @@ -1053,7 +1053,7 @@ LIBSUBDIRS= site-packages \
  21. email email/mime \
  22. ensurepip ensurepip/_bundled \
  23. json \
  24. - logging bsddb csv importlib wsgiref \
  25. + logging csv importlib wsgiref \
  26. ctypes ctypes/macholib \
  27. idlelib idlelib/Icons \
  28. distutils distutils/command \
  29. @@ -1070,7 +1070,6 @@ TESTSUBDIRS = test test/audiodata test/capath test/data \
  30. test/tracedmodules \
  31. email/test email/test/data \
  32. json/tests \
  33. - bsddb/test \
  34. ctypes/test \
  35. idlelib/idle_test \
  36. distutils/tests \
  37. @@ -1111,6 +1110,11 @@ ifeq (@EXPAT@,yes)
  38. LIBSUBDIRS += $(XMLLIBSUBDIRS)
  39. endif
  40. +ifeq (@BSDDB@,yes)
  41. +LIBSUBDIRS += bsddb
  42. +TESTSUBDIRS += bsddb/test
  43. +endif
  44. +
  45. libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
  46. @for i in $(SCRIPTDIR) $(LIBDEST); \
  47. do \
  48. diff --git a/configure.ac b/configure.ac
  49. index 4e430d82b8..361e8c120e 100644
  50. --- a/configure.ac
  51. +++ b/configure.ac
  52. @@ -2863,6 +2863,28 @@ AC_ARG_ENABLE(nis,
  53. DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} nis"
  54. fi])
  55. +AC_ARG_ENABLE(dbm,
  56. + AS_HELP_STRING([--disable-dbm], [disable DBM]),
  57. + [ if test "$enableval" = "no"; then
  58. + DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} dbm"
  59. + fi])
  60. +
  61. +AC_ARG_ENABLE(gdbm,
  62. + AS_HELP_STRING([--disable-gdbm], [disable GDBM]),
  63. + [ if test "$enableval" = "no"; then
  64. + DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} gdbm"
  65. + fi])
  66. +
  67. +AC_SUBST(BSDDB)
  68. +AC_ARG_ENABLE(bsddb,
  69. + AS_HELP_STRING([--disable-bsddb], [disable BerkeyleyDB]),
  70. + [ if test "$enableval" = "no"; then
  71. + BSDDB=no
  72. + DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _bsddb"
  73. + else
  74. + BSDDB=yes
  75. + fi], [ BSDDB=yes ])
  76. +
  77. AC_ARG_ENABLE(unicodedata,
  78. AS_HELP_STRING([--disable-unicodedata], [disable unicodedata]),
  79. [ if test "$enableval" = "no"; then
  80. --
  81. 2.11.0