libglib2-no-tests.patch 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. Add a --disable-tests option to the configure script
  2. Disabling the build of tests has two benefits:
  3. * Prevents the build of a lot of code that doesn't build on noMMU
  4. platforms.
  5. * Reduces the build time.
  6. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  7. Index: libglib2-2.30.3/Makefile.am
  8. ===================================================================
  9. --- libglib2-2.30.3.orig/Makefile.am 2012-03-11 22:43:28.000000000 +0100
  10. +++ libglib2-2.30.3/Makefile.am 2013-03-09 17:32:01.000000000 +0100
  11. @@ -6,7 +6,11 @@
  12. ACLOCAL_AMFLAGS = -I m4macros ${ACLOCAL_FLAGS}
  13. -SUBDIRS = . m4macros glib gmodule gthread gobject gio tests po docs
  14. +if BUILD_TESTS
  15. +TEST_SUBDIR = tests
  16. +endif
  17. +
  18. +SUBDIRS = . m4macros glib gmodule gthread gobject gio $(TEST_SUBDIR) po docs
  19. DIST_SUBDIRS = $(SUBDIRS) build
  20. bin_SCRIPTS = glib-gettextize
  21. Index: libglib2-2.30.3/gio/Makefile.am
  22. ===================================================================
  23. --- libglib2-2.30.3.orig/gio/Makefile.am 2012-03-11 22:44:19.000000000 +0100
  24. +++ libglib2-2.30.3/gio/Makefile.am 2013-03-09 17:32:38.000000000 +0100
  25. @@ -282,7 +282,11 @@
  26. endif
  27. -SUBDIRS += tests
  28. +if BUILD_TESTS
  29. +TEST_SUBDIR = tests
  30. +endif
  31. +
  32. +SUBDIRS += $(TEST_SUBDIR)
  33. libgio_2_0_la_SOURCES = \
  34. gappinfo.c \
  35. Index: libglib2-2.30.3/configure.ac
  36. ===================================================================
  37. --- libglib2-2.30.3.orig/configure.ac 2013-03-09 17:30:55.000000000 +0100
  38. +++ libglib2-2.30.3/configure.ac 2013-03-09 17:37:27.000000000 +0100
  39. @@ -234,11 +234,18 @@
  40. [AC_HELP_STRING([--disable-rebuilds],
  41. [disable all source autogeneration rules])],,
  42. [enable_rebuilds=yes])
  43. +AC_ARG_ENABLE(tests,
  44. + [AC_HELP_STRING([--disable-tests],
  45. + [disable all tests])],
  46. + enable_tests=${enableval},
  47. + enable_tests=yes)
  48. if test "x$enable_threads" != "xyes"; then
  49. enable_threads=no
  50. fi
  51. +AM_CONDITIONAL(BUILD_TESTS, [test x$enable_tests = xyes])
  52. +
  53. AC_MSG_CHECKING([whether to enable garbage collector friendliness])
  54. if test "x$enable_gc_friendly" = "xyes"; then
  55. AC_DEFINE(ENABLE_GC_FRIENDLY_DEFAULT, 1, [Whether to enable GC friendliness by default])
  56. Index: libglib2-2.30.3/glib/Makefile.am
  57. ===================================================================
  58. --- libglib2-2.30.3.orig/glib/Makefile.am 2012-03-11 22:43:28.000000000 +0100
  59. +++ libglib2-2.30.3/glib/Makefile.am 2013-03-09 18:02:59.000000000 +0100
  60. @@ -42,7 +42,11 @@
  61. gregex_h =
  62. endif
  63. -SUBDIRS = libcharset $(PRINTF_SUBDIR) $(MAYBE_PCRE) update-pcre . tests
  64. +if BUILD_TESTS
  65. +TEST_SUBDIR = tests
  66. +endif
  67. +
  68. +SUBDIRS = libcharset $(PRINTF_SUBDIR) $(MAYBE_PCRE) update-pcre . $(TEST_SUBDIR)
  69. DIST_SUBDIRS = libcharset gnulib pcre update-pcre tests
  70. Index: libglib2-2.30.3/gobject/Makefile.am
  71. ===================================================================
  72. --- libglib2-2.30.3.orig/gobject/Makefile.am 2012-03-11 22:43:29.000000000 +0100
  73. +++ libglib2-2.30.3/gobject/Makefile.am 2013-03-09 18:03:40.000000000 +0100
  74. @@ -4,7 +4,11 @@
  75. ## Process this file with automake to produce Makefile.in
  76. include $(top_srcdir)/Makefile.decl
  77. -SUBDIRS = . tests
  78. +if BUILD_TESTS
  79. +TEST_SUBDIR = tests
  80. +endif
  81. +
  82. +SUBDIRS = . $(TEST_SUBDIR)
  83. BUILT_SOURCES=
  84. CLEANFILES=
  85. Index: libglib2-2.30.3/gthread/Makefile.am
  86. ===================================================================
  87. --- libglib2-2.30.3.orig/gthread/Makefile.am 2012-03-11 22:43:29.000000000 +0100
  88. +++ libglib2-2.30.3/gthread/Makefile.am 2013-03-09 18:04:16.000000000 +0100
  89. @@ -1,7 +1,11 @@
  90. ## Process this file with automake to produce Makefile.in
  91. include $(top_srcdir)/Makefile.decl
  92. -SUBDIRS = . tests
  93. +if BUILD_TESTS
  94. +TEST_SUBDIR = tests
  95. +endif
  96. +
  97. +SUBDIRS = . $(TEST_SUBDIR)
  98. DIST_SUBDIRS = tests
  99. AM_CPPFLAGS = \