libreport/0003-do-not-build-or-install-any-piece-of-BZ-when-without.patch

74 lines
2.1 KiB
Diff
Raw Normal View History

From ba41acbee0b8d65ccfac89265a2b6e84c6e0bf7a Mon Sep 17 00:00:00 2001
From: Michal Toman <mtoman@redhat.com>
Date: Fri, 26 Apr 2013 09:20:34 +0200
Subject: [LIBREPORT PATCH 3/6] do not build or install any piece of BZ when
--without-bugzilla
Signed-off-by: Michal Toman <mtoman@redhat.com>
Signed-off-by: Jiri Moskovcak <jmoskovc@redhat.com>
---
configure.ac | 23 +++++++++++++++++++++++
src/plugins/Makefile.am | 5 ++---
2 files changed, 25 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index 67310d1..179add8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -104,8 +104,31 @@ XMLRPC_CLIENT_CFLAGS=`xmlrpc-c-config client --cflags 2> /dev/null`
XMLRPC_CLIENT_LIBS=`xmlrpc-c-config client --libs 2> /dev/null`
AC_SUBST(XMLRPC_CLIENT_CFLAGS)
AC_SUBST(XMLRPC_CLIENT_LIBS)
+
+# enable bugzilla translations
+for FILE in `grep "#.*ugzilla.*" po/POTFILES.in`
+do
+ sed -ie "s,$FILE,${FILE:1}," po/POTFILES.in
+ sed -ie "\,^${FILE:1}$,d" po/POTFILES.skip
+done
else
AM_CONDITIONAL(BUILD_BUGZILLA, false)
+
+# disablie bugzilla translations
+for FILE in `grep "ugzilla" po/POTFILES.in`
+do
+ if test "${FILE:0:1}" = "#"
+ then
+ continue
+ fi
+
+ sed -ie "s,$FILE,#$FILE," po/POTFILES.in
+ grep "$FILE" po/POTFILES.skip > /dev/null 2>&1
+ if test $?
+ then
+ echo "$FILE" >> po/POTFILES.skip
+ fi
+done
fi dnl end NO_BUGZILLA
AC_PATH_PROG([PYTHON_CONFIG], [python-config], [no])
diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am
index 79fe9d2..16ff97c 100644
--- a/src/plugins/Makefile.am
+++ b/src/plugins/Makefile.am
@@ -62,14 +62,13 @@ eventsconfdir = $(EVENTS_CONF_DIR)
dist_eventsconf_DATA = \
mailx_event.conf \
print_event.conf \
- bugzilla_event.conf \
rhtsupport_event.conf \
uploader_event.conf \
- emergencyanalysis_event.conf \
- bugzilla_anaconda_event.conf
+ emergencyanalysis_event.conf
reporters_extra_dist =
if BUILD_BUGZILLA
+dist_eventsconf_DATA += bugzilla_event.conf bugzilla_anaconda_event.conf
reporters_extra_dist += report_Bugzilla.xml.in report_Bugzilla.conf
endif
--
1.8.1.4