diff options
author | Akinori Hattori <hattya@gentoo.org> | 2017-08-17 00:29:25 +0900 |
---|---|---|
committer | Akinori Hattori <hattya@gentoo.org> | 2017-08-17 00:38:55 +0900 |
commit | 48bf70c1aac4b38c7f59a05130f6042e62503868 (patch) | |
tree | d5c06263faa57f4512ea2597fca8ce12f54196b9 /app-i18n/ibus-chewing | |
parent | app-i18n/ibus-chewing: inherit gnome2-utils (diff) | |
download | gentoo-48bf70c1aac4b38c7f59a05130f6042e62503868.tar.gz gentoo-48bf70c1aac4b38c7f59a05130f6042e62503868.tar.bz2 gentoo-48bf70c1aac4b38c7f59a05130f6042e62503868.zip |
app-i18n/ibus-chewing: fix src_test
Package-Manager: Portage-2.3.6, Repoman-2.3.1
Diffstat (limited to 'app-i18n/ibus-chewing')
-rw-r--r-- | app-i18n/ibus-chewing/files/ibus-chewing-test.patch | 45 | ||||
-rw-r--r-- | app-i18n/ibus-chewing/ibus-chewing-1.5.1-r1.ebuild | 11 |
2 files changed, 55 insertions, 1 deletions
diff --git a/app-i18n/ibus-chewing/files/ibus-chewing-test.patch b/app-i18n/ibus-chewing/files/ibus-chewing-test.patch new file mode 100644 index 000000000000..abed91d377d3 --- /dev/null +++ b/app-i18n/ibus-chewing/files/ibus-chewing-test.patch @@ -0,0 +1,45 @@ +--- a/test/MakerDialogBackend-test.c ++++ b/test/MakerDialogBackend-test.c +@@ -126,7 +126,7 @@ + void backup_key_to_g_value(const gchar * key, GType gType, GValue * value) + { + g_value_init(value, gType); +- backend_command_get_key_value(key, value); ++ mkdg_backend_read(backend, value, QUOTE_ME(PROJECT_SCHEMA_SECTION), key, NULL); + } + + void change_new_value_from_orig_value(GValue * newValue, +@@ -169,7 +169,7 @@ + { + GValue storedGValue = { 0 }; + g_value_init(&storedGValue, G_VALUE_TYPE(newValue)); +- backend_command_get_key_value(key, &storedGValue); ++ mkdg_backend_read(backend, &storedGValue, QUOTE_ME(PROJECT_SCHEMA_SECTION), key, NULL); + g_assert(mkdg_g_value_is_equal(newValue, &storedGValue)); + g_value_unset(&storedGValue); + } +@@ -219,7 +219,7 @@ + #define GCONF_KEY "max-chi-symbol-len" + GValue origValue = { 0 }; + g_value_init(&origValue, G_TYPE_BOOLEAN); +- backend_command_get_key_value(GCONF_KEY, &origValue); ++ mkdg_backend_read(backend, &origValue, QUOTE_ME(PROJECT_SCHEMA_SECTION), GCONF_KEY, NULL); + + GValue newValue = { 0 }; + g_value_init(&newValue, G_TYPE_BOOLEAN); +@@ -229,13 +229,13 @@ + + GValue storedValue = { 0 }; + g_value_init(&storedValue, G_TYPE_BOOLEAN); +- backend_command_get_key_value(GCONF_KEY, &storedValue); ++ mkdg_backend_read(backend, &storedValue, QUOTE_ME(PROJECT_SCHEMA_SECTION), GCONF_KEY, NULL); + g_assert(mkdg_g_value_is_equal(&newValue, &storedValue)); + + /* + * Restore the original value + */ +- backend_command_set_key_value(GCONF_KEY, &origValue); ++ mkdg_backend_write(backend, &origValue, QUOTE_ME(PROJECT_SCHEMA_SECTION), GCONF_KEY, NULL); + #undef GCONF_KEY + } + diff --git a/app-i18n/ibus-chewing/ibus-chewing-1.5.1-r1.ebuild b/app-i18n/ibus-chewing/ibus-chewing-1.5.1-r1.ebuild index 6ba022cbe6f3..2f5ba84757a2 100644 --- a/app-i18n/ibus-chewing/ibus-chewing-1.5.1-r1.ebuild +++ b/app-i18n/ibus-chewing/ibus-chewing-1.5.1-r1.ebuild @@ -4,7 +4,7 @@ EAPI="6" CMAKE_MAKEFILE_GENERATOR="emake" -inherit cmake-utils gnome2-utils +inherit cmake-utils gnome2-utils virtualx MY_P="${P}-Source" @@ -30,6 +30,7 @@ DEPEND="${RDEPEND} nls? ( sys-devel/gettext )" S="${WORKDIR}/${MY_P}" +PATCHES=( "${FILESDIR}"/${PN}-test.patch ) DOCS=( AUTHORS ChangeLog README RELEASE-NOTES.txt USER-GUIDE ) src_configure() { @@ -41,6 +42,14 @@ src_configure() { cmake-utils_src_configure } +src_test() { + "${EROOT}"${GLIB_COMPILE_SCHEMAS} --allow-any-name "${BUILD_DIR}"/bin || die + + export GSETTINGS_BACKEND="memory" + export GSETTINGS_SCHEMA_DIR="${BUILD_DIR}/bin" + virtx cmake-utils_src_test +} + pkg_preinst() { gnome2_gconf_savelist gnome2_schemas_savelist |