summaryrefslogtreecommitdiff
path: root/extra/libnotify/libnotify-0.7.1-gtk3-tests.patch
blob: 7d12305203668aa6acf4cfbf77a05a3695b980f1 (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
From 92983cacd36fa9b050f911bc4de09b8c4fb9f3b2 Mon Sep 17 00:00:00 2001
From: Gilles Dartiguelongue <eva@gentoo.org>
Date: Thu, 16 Dec 2010 00:01:13 +0100
Subject: [PATCH] gentoo: do not build gtk+:3 tests if not required

---
 configure.ac      |    5 +++++
 tests/Makefile.am |   30 +++++++++++++++++-------------
 2 files changed, 22 insertions(+), 13 deletions(-)

diff --git a/configure.ac b/configure.ac
index 71609ed..7767c5b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -97,10 +97,15 @@ AC_SUBST(PACKAGE_LIBS)
 AC_SUBST(PACKAGE_CFLAGS)
 AC_SUBST(pkg_modules)
 
+AC_ARG_ENABLE([tests],
+	AS_HELP_STRING([--enable-tests], [Check for extra dependencies to build all tests]))
+AS_IF([test $enable_tests = yes], [
 tests_modules="gtk+-3.0 >= $REQ_GTK_VERSION"
 PKG_CHECK_MODULES(TESTS, [$tests_modules])
+])
 AC_SUBST(TESTS_LIBS)
 AC_SUBST(TESTS_CFLAGS)
+AM_CONDITIONAL([MORE_TESTS], [test $enable_tests = yes])
 
 GLIB_GENMARSHAL=`pkg-config --variable=glib_genmarshal glib-2.0`
 AC_SUBST(GLIB_GENMARSHAL)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 7acf9a3..2856a82 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -2,18 +2,15 @@ INCLUDES = \
 	-I$(top_srcdir) \
 	$(TESTS_CFLAGS)
 
-noinst_PROGRAMS = \
+check_PROGRAMS = \
 	test-replace \
-	test-replace-widget \
 	test-server-info \
 	test-default-action \
 	test-multi-actions \
 	test-action-icons \
-	test-image \
 	test-basic \
 	test-error \
 	test-markup \
-	test-persistence \
 	test-resident \
 	test-rtl \
 	test-size-changes \
@@ -23,6 +20,22 @@ noinst_PROGRAMS = \
 	test-xy-actions \
 	test-xy-stress
 
+#if MORE_TESTS
+check_PROGRAMS += \
+	test-image \
+	test-replace-widget \
+	test-persistence
+
+test_replace_widget_SOURCES = test-replace-widget.c
+test_replace_widget_LDADD  = $(common_ldflags)
+
+test_image_SOURCES = test-image.c
+test_image_LDADD  = $(common_ldflags)
+
+test_persistence_SOURCES = test-persistence.c
+test_persistence_LDADD = $(common_ldflags)
+#endif
+
 common_ldflags = \
 	$(top_builddir)/libnotify/libnotify.la \
 	$(TESTS_LIBS)
@@ -30,9 +43,6 @@ common_ldflags = \
 test_replace_SOURCES = test-replace.c
 test_replace_LDADD  = $(common_ldflags)
 
-test_replace_widget_SOURCES = test-replace-widget.c
-test_replace_widget_LDADD  = $(common_ldflags)
-
 test_server_info_SOURCES = test-server-info.c
 test_server_info_LDADD   = $(common_ldflags)
 
@@ -48,9 +58,6 @@ test_multi_actions_LDADD  = $(common_ldflags)
 test_action_icons_SOURCES = test-action-icons.c
 test_action_icons_LDADD  = $(common_ldflags)
 
-test_image_SOURCES = test-image.c
-test_image_LDADD  = $(common_ldflags)
-
 test_basic_SOURCES = test-basic.c
 test_basic_LDADD = $(common_ldflags)
 
@@ -75,9 +82,6 @@ test_xy_stress_LDADD = $(common_ldflags)
 test_rtl_SOURCES = test-rtl.c
 test_rtl_LDADD = $(common_ldflags)
 
-test_persistence_SOURCES = test-persistence.c
-test_persistence_LDADD = $(common_ldflags)
-
 test_resident_SOURCES = test-resident.c
 test_resident_LDADD = $(common_ldflags)
 
-- 
1.7.4.rc2