app-i18n/ibus: add patch to fix test failures
authorNaohiro Aota <naota@gentoo.org>
Thu, 4 Oct 2018 21:47:46 +0000 (06:47 +0900)
committerNaohiro Aota <naota@gentoo.org>
Fri, 5 Oct 2018 09:55:59 +0000 (18:55 +0900)
Add upstream patch to enable GSettings in the test.
https://github.com/ibus/ibus/commit/10cc30eac200d10b581d9d2122d5a732f4880943

Closes: https://bugs.gentoo.org/664804
Signed-off-by: Naohiro Aota <naota@gentoo.org>
Package-Manager: Portage-2.3.50, Repoman-2.3.11

app-i18n/ibus/files/ibus-1.5.18-enable-gsettings-in-runtest.patch [new file with mode: 0644]
app-i18n/ibus/ibus-1.5.18.ebuild

diff --git a/app-i18n/ibus/files/ibus-1.5.18-enable-gsettings-in-runtest.patch b/app-i18n/ibus/files/ibus-1.5.18-enable-gsettings-in-runtest.patch
new file mode 100644 (file)
index 0000000..24b5cd3
--- /dev/null
@@ -0,0 +1,62 @@
+From 4b4fe00cc2750713ef8d2bc0a9f396ab577c36fc Mon Sep 17 00:00:00 2001
+From: Naohiro Aota <naota@gentoo.org>
+Date: Thu, 4 Oct 2018 18:14:17 +0900
+Subject: [PATCH] src/tests: Enable GSettings in runtest in ibus-1.5.18
+
+This patch is based on:
+https://github.com/ibus/ibus/commit/10cc30eac200d10b581d9d2122d5a732f4880943
+
+Signed-off-by: Naohiro Aota <naota@gentoo.org>
+---
+ src/tests/runtest | 21 +++++++++++++++++++++
+ 1 file changed, 21 insertions(+)
+
+diff --git a/src/tests/runtest b/src/tests/runtest
+index 0e43fee..84d85ab 100755
+--- a/src/tests/runtest
++++ b/src/tests/runtest
+@@ -29,6 +29,7 @@ ibus-engine-switch
+ ibus-compose
+ test-stress
+ "
++IBUS_SCHEMA_FILE='org.freedesktop.ibus.gschema.xml'
+ # Portable replacement of basename.
+ func_basename () {
+@@ -80,6 +81,12 @@ trap 'func_cleanup $tstdir' 1 2 3 15
+ tst=$1; shift
+ tstdir=tmp-`func_basename $tst`
++# IBusEngine has GSettings
++if test ! -f "$top_builddir/data/dconf/$IBUS_SCHEMA_FILE" ; then
++    echo "NOT FOUND $top_builddir/data/dconf/$IBUS_SCHEMA_FILE"
++    exit -1
++fi
++
+ test -d $tstdir || mkdir $tstdir
+ ( cd $tstdir
+@@ -101,6 +108,20 @@ test -d $tstdir || mkdir $tstdir
+     IBUS_ADDRESS_FILE=$PWD/ibus-daemon.pid
+     export IBUS_ADDRESS_FILE
++    cp "../$top_builddir/data/dconf/$IBUS_SCHEMA_FILE" $PWD
++    glib-compile-schemas $PWD
++    if test $? -ne 0 ; then
++        echo "FAILED glib-compile-schemas"
++        retval=1
++        return
++    fi
++    if test ! -f $PWD/gschemas.compiled ; then
++        echo "NOT FOUND $PWD/gschemas.compiled"
++        retval=1
++        return
++    fi
++    export GSETTINGS_SCHEMA_DIR=$PWD
++
+     # Start ibus-daemon.
+     ../$top_builddir/bus/ibus-daemon \
+     --daemonize \
+-- 
+2.19.0
+
index 4aff43a818d84dc6d740690e455fe5d7960d78b3..d966417a8ef869c347318c689bfc934f7267ef00 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="6"
@@ -72,6 +72,8 @@ DEPEND="${CDEPEND}
        nls? ( sys-devel/gettext )
        unicode? ( app-i18n/unicode-data )"
 
+PATCHES=( "${FILESDIR}"/${P}-enable-gsettings-in-runtest.patch )
+
 src_prepare() {
        vala_src_prepare --ignore-use
        sed -i "/UCD_DIR=/s/\$with_emoji_annotation_dir/\$with_ucd_dir/" configure.ac