aboutsummaryrefslogtreecommitdiffstats
path: root/package/libglib2/libglib2-no-tests.patch
blob: 81b5af2d1bff3bd894b252f6f6c45f79176a1e5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
Add a --disable-tests option to the configure script

Disabling the build of tests has two benefits:
 * Prevents the build of a lot of code that doesn't build on noMMU
   platforms.
 * Reduces the build time.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Index: libglib2-2.30.3/Makefile.am
===================================================================
--- libglib2-2.30.3.orig/Makefile.am	2012-03-11 22:43:28.000000000 +0100
+++ libglib2-2.30.3/Makefile.am	2013-03-09 17:32:01.000000000 +0100
@@ -6,7 +6,11 @@
 
 ACLOCAL_AMFLAGS = -I m4macros ${ACLOCAL_FLAGS}
 
-SUBDIRS = . m4macros glib gmodule gthread gobject gio tests po docs
+if BUILD_TESTS
+TEST_SUBDIR = tests
+endif
+
+SUBDIRS = . m4macros glib gmodule gthread gobject gio $(TEST_SUBDIR) po docs
 DIST_SUBDIRS = $(SUBDIRS) build
 
 bin_SCRIPTS = glib-gettextize
Index: libglib2-2.30.3/gio/Makefile.am
===================================================================
--- libglib2-2.30.3.orig/gio/Makefile.am	2012-03-11 22:44:19.000000000 +0100
+++ libglib2-2.30.3/gio/Makefile.am	2013-03-09 17:32:38.000000000 +0100
@@ -282,7 +282,11 @@
 
 endif
 
-SUBDIRS += tests
+if BUILD_TESTS
+TEST_SUBDIR = tests
+endif
+
+SUBDIRS += $(TEST_SUBDIR)
 
 libgio_2_0_la_SOURCES =		\
 	gappinfo.c 		\
Index: libglib2-2.30.3/configure.ac
===================================================================
--- libglib2-2.30.3.orig/configure.ac	2013-03-09 17:30:55.000000000 +0100
+++ libglib2-2.30.3/configure.ac	2013-03-09 17:37:27.000000000 +0100
@@ -234,11 +234,18 @@
               [AC_HELP_STRING([--disable-rebuilds],
                               [disable all source autogeneration rules])],,
               [enable_rebuilds=yes])
+AC_ARG_ENABLE(tests,
+		[AC_HELP_STRING([--disable-tests],
+				[disable all tests])],
+		enable_tests=${enableval},
+		enable_tests=yes)
 
 if test "x$enable_threads" != "xyes"; then
   enable_threads=no
 fi
 
+AM_CONDITIONAL(BUILD_TESTS, [test x$enable_tests = xyes])
+
 AC_MSG_CHECKING([whether to enable garbage collector friendliness])
 if test "x$enable_gc_friendly" = "xyes"; then
   AC_DEFINE(ENABLE_GC_FRIENDLY_DEFAULT, 1, [Whether to enable GC friendliness by default])
Index: libglib2-2.30.3/glib/Makefile.am
===================================================================
--- libglib2-2.30.3.orig/glib/Makefile.am	2012-03-11 22:43:28.000000000 +0100
+++ libglib2-2.30.3/glib/Makefile.am	2013-03-09 18:02:59.000000000 +0100
@@ -42,7 +42,11 @@
 gregex_h =
 endif
 
-SUBDIRS = libcharset $(PRINTF_SUBDIR) $(MAYBE_PCRE) update-pcre . tests
+if BUILD_TESTS
+TEST_SUBDIR = tests
+endif
+
+SUBDIRS = libcharset $(PRINTF_SUBDIR) $(MAYBE_PCRE) update-pcre . $(TEST_SUBDIR)
 
 DIST_SUBDIRS = libcharset gnulib pcre update-pcre tests
 
Index: libglib2-2.30.3/gobject/Makefile.am
===================================================================
--- libglib2-2.30.3.orig/gobject/Makefile.am	2012-03-11 22:43:29.000000000 +0100
+++ libglib2-2.30.3/gobject/Makefile.am	2013-03-09 18:03:40.000000000 +0100
@@ -4,7 +4,11 @@
 ## Process this file with automake to produce Makefile.in
 include $(top_srcdir)/Makefile.decl
 
-SUBDIRS = . tests
+if BUILD_TESTS
+TEST_SUBDIR = tests
+endif
+
+SUBDIRS = . $(TEST_SUBDIR)
 
 BUILT_SOURCES=
 CLEANFILES=
Index: libglib2-2.30.3/gthread/Makefile.am
===================================================================
--- libglib2-2.30.3.orig/gthread/Makefile.am	2012-03-11 22:43:29.000000000 +0100
+++ libglib2-2.30.3/gthread/Makefile.am	2013-03-09 18:04:16.000000000 +0100
@@ -1,7 +1,11 @@
 ## Process this file with automake to produce Makefile.in
 include $(top_srcdir)/Makefile.decl
 
-SUBDIRS = . tests
+if BUILD_TESTS
+TEST_SUBDIR = tests
+endif
+
+SUBDIRS = . $(TEST_SUBDIR)
 DIST_SUBDIRS = tests
 
 AM_CPPFLAGS = 				\