updated on Thu Jan 12 08:01:00 UTC 2012
[aur-mirror.git] / indicator-appmenu / make-tests-optional.patch
blob95e4ac9fbd1bec0f3dbc0c80c5147d392590182d
1 diff -Naur indicator-appmenu-0.3.2.orig/configure.ac indicator-appmenu-0.3.2/configure.ac
2 --- indicator-appmenu-0.3.2.orig/configure.ac 2011-10-13 20:24:15.000000000 +0200
3 +++ indicator-appmenu-0.3.2/configure.ac 2011-11-23 03:16:35.032863857 +0100
4 @@ -85,9 +85,23 @@
6 DBUSMENU_JSONLOADER_REQUIRED_VERSION=0.3.3
8 -PKG_CHECK_MODULES(INDICATORTEST,
9 - dbusmenu-jsonloader-0.4 >= $DBUSMENU_JSONLOADER_REQUIRED_VERSION
10 - )
11 +AC_ARG_ENABLE([tests],
12 + AC_HELP_STRING([--disable-tests], [Disable test scripts and tools]),,
13 + [enable_tests=auto])
15 +if test x"$enable_tests" != x"no" ; then
16 + PKG_CHECK_MODULES(INDICATORTEST,
17 + dbusmenu-jsonloader-0.4 >= $DBUSMENU_JSONLOADER_REQUIRED_VERSION,
18 + [have_dbusmenu_jsonloader=yes],
19 + [have_dbusmenu_jsonloader=no]
20 + )
21 + if test x${enable_tests} = xyes && test x${have_dbusmenu_jsonloader} = xno; then
22 + AC_MSG_ERROR([Test scripts and tools configured but dbusmenu-jsonloader not found])
23 + fi
24 +else
25 + have_dbusmenu-jsonloader=no
26 +fi
27 +AM_CONDITIONAL(BUILD_TESTS, test x${have_dbusmenu_jsonloader} = xyes)
29 AC_SUBST(INDICATORTEST_CFLAGS)
30 AC_SUBST(INDICATORTEST_LIBS)
31 @@ -154,4 +168,5 @@
33 Prefix: $prefix
34 Indicator Dir: $INDICATORDIR
35 + Test tools: $have_dbusmenu_jsonloader
37 diff -Naur indicator-appmenu-0.3.2.orig/Makefile.am indicator-appmenu-0.3.2/Makefile.am
38 --- indicator-appmenu-0.3.2.orig/Makefile.am 2011-07-22 23:05:41.000000000 +0200
39 +++ indicator-appmenu-0.3.2/Makefile.am 2011-11-23 03:16:55.071636476 +0100
40 @@ -1,8 +1,11 @@
42 +SUBDIRS = src
44 +if BUILD_TESTS
45 +SUBDIRS += \
46 -SUBDIRS = \
47 - src \
48 scripts \
49 tools
50 +endif
52 DISTCHECK_CONFIGURE_FLAGS = --enable-localinstall --enable-deprecations