summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--RepositoryExternal.mk6
-rw-r--r--config_host.mk.in1
-rw-r--r--configure.in14
-rw-r--r--vcl/generic/fontmanager/fontconfig.cxx8
4 files changed, 25 insertions, 4 deletions
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 4389a545c608..e7690cf86192 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -1232,6 +1232,12 @@ $(call gb_LinkTarget_add_defs,$(1),\
-DENABLE_DBUS \
)
+ifeq ($(ENABLE_PACKAGEKIT),YES)
+$(call gb_LinkTarget_add_defs,$(1),\
+ -DENABLE_PACKAGEKIT \
+)
+endif # ENABLE_PACKAGEKIT
+
$(call gb_LinkTarget_add_libs,$(1),\
$(DBUS_LIBS) \
)
diff --git a/config_host.mk.in b/config_host.mk.in
index d72f79fb6800..3edba3b3b0c3 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -114,6 +114,7 @@ export ENABLE_CAIRO_CANVAS=@ENABLE_CAIRO_CANVAS@
export ENABLE_CRASHDUMP=@ENABLE_CRASHDUMP@
export ENABLE_CUPS=@ENABLE_CUPS@
export ENABLE_DBUS=@ENABLE_DBUS@
+export ENABLE_PACKAGEKIT=@ENABLE_PACKAGEKIT@
export ENABLE_DEBUG_FOR=@ENABLE_DEBUG_FOR@
export ENABLE_DIRECTX=@ENABLE_DIRECTX@
export ENABLE_EVOAB2=@ENABLE_EVOAB2@
diff --git a/configure.in b/configure.in
index 980486292b99..18286b6b3b7f 100644
--- a/configure.in
+++ b/configure.in
@@ -9262,6 +9262,20 @@ AC_SUBST(ENABLE_DBUS)
AC_SUBST(DBUS_CFLAGS)
AC_SUBST(DBUS_LIBS)
+AC_MSG_CHECKING([whether to enable font install via packagekit])
+if test "$ENABLE_DBUS" = "TRUE"; then
+ if test -n "$enable_packagekit"; then
+ ENABLE_PACKAGEKIT=YES
+ AC_MSG_RESULT([yes])
+ else
+ ENABLE_PACKAGEKIT=NO
+ AC_MSG_RESULT([no])
+ fi
+else
+ AC_MSG_RESULT([no, dbus disabled.])
+fi
+AC_SUBST(ENABLE_PACKAGEKIT)
+
dnl ===================================================================
dnl Check whether the gtk 2.0 libraries are available.
dnl ===================================================================
diff --git a/vcl/generic/fontmanager/fontconfig.cxx b/vcl/generic/fontmanager/fontconfig.cxx
index b164adc77178..7b779e4940d7 100644
--- a/vcl/generic/fontmanager/fontconfig.cxx
+++ b/vcl/generic/fontmanager/fontconfig.cxx
@@ -82,7 +82,7 @@ using namespace psp;
#define FC_FONTFORMAT "fontformat"
#endif
-#ifdef ENABLE_DBUS
+#if defined(ENABLE_DBUS) && defined(ENABLE_PACKAGEKIT)
#include <dbus/dbus-glib.h>
#endif
@@ -834,7 +834,7 @@ namespace
return OString();
}
-#ifdef ENABLE_DBUS
+#if defined(ENABLE_DBUS) && defined(ENABLE_PACKAGEKIT)
LanguageTag getExemplerLangTagForCodePoint(sal_uInt32 currentChar)
{
int32_t script = u_getIntPropertyValue(currentChar, UCHAR_SCRIPT);
@@ -857,7 +857,7 @@ namespace
IMPL_LINK_NOARG(PrintFontManager, autoInstallFontLangSupport)
{
-#ifdef ENABLE_DBUS
+#if defined(ENABLE_DBUS) && defined(ENABLE_PACKAGEKIT)
guint xid = get_xid_for_dbus();
if (!xid)
@@ -1056,7 +1056,7 @@ bool PrintFontManager::Substitute( FontSelectPattern &rPattern, rtl::OUString& r
}
}
OUString sStillMissing(pRemainingCodes, nRemainingLen);
-#ifdef ENABLE_DBUS
+#if defined(ENABLE_DBUS) && defined(ENABLE_PACKAGEKIT)
if (get_xid_for_dbus())
{
if (sStillMissing == rMissingCodes) //replaced nothing