Rename simple.xml to simple.xml.in

This commit is contained in:
Takao Fujiwara 2020-08-27 22:58:10 +09:00
parent f661c28f2f
commit 3e5b0e7a10
4 changed files with 99 additions and 6 deletions

2
.gitignore vendored
View File

@ -56,4 +56,4 @@ ibus-1.3.6.tar.gz
/ibus-1.5.20.tar.gz
/ibus-1.5.21.tar.gz
/ibus-1.5.22.tar.gz
/ibus-simple-1.5.22.20200826.xml.gz
/ibus-simple-1.5.22.20200827.xml.gz

View File

@ -2279,3 +2279,92 @@ index 48dd8fac..601c1c3f 100755
--
2.24.1
From e938846b1624a9455128edb64f144b0a1181736c Mon Sep 17 00:00:00 2001
From: fujiwarat <takao.fujiwara1@gmail.com>
Date: Thu, 27 Aug 2020 22:40:23 +0900
Subject: [PATCH] engine: Genarate simple.xml at build time
The engine path of ibus-engine-simple should be decided in
build time and simple.xml is renamed to simple.xml.in
Also Revert 6879879002af47d49d8740ca383a048d2ac8e904
BUG=https://github.com/ibus/ibus/issues/2153
---
engine/Makefile.am | 15 ++++++++++++---
src/tests/runtest | 15 +--------------
2 files changed, 13 insertions(+), 17 deletions(-)
diff --git a/engine/Makefile.am b/engine/Makefile.am
index ca405496..d810704b 100644
--- a/engine/Makefile.am
+++ b/engine/Makefile.am
@@ -80,21 +80,30 @@ component_DATA = \
componentdir = $(pkgdatadir)/component
MAINTAINERCLEANFILES = \
+ simple.xml.in \
+ $(NULL)
+
+CLEANFILES = \
simple.xml \
$(NULL)
EXTRA_DIST = \
gensimple.py \
iso639converter.py \
- simple.xml \
+ simple.xml.in \
$(NULL)
-simple.xml:
+simple.xml: simple.xml.in
+ $(AM_V_GEN) sed \
+ -e 's|@libexecdir[@]|$(libexecdir)|g' $< > $@.tmp && \
+ mv $@.tmp $@
+
+simple.xml.in:
$(srcdir)/gensimple.py \
--input=$(datarootdir)/X11/xkb/rules/evdev.xml \
--output=$@ \
--version=$(VERSION).`date '+%Y%m%d'` \
- --exec-path=$(libexecdir)/ibus-engine-simple \
+ --exec-path=@libexecdir\@/ibus-engine-simple \
--iso-path=$(datarootdir)/xml/iso-codes/iso_639.xml \
--first-language \
$(NULL)
diff --git a/src/tests/runtest b/src/tests/runtest
index 11bcc6c2..a6e4194b 100755
--- a/src/tests/runtest
+++ b/src/tests/runtest
@@ -91,19 +91,6 @@ func_copy_component () {
fi
}
-func_copy_simple_xml () {
- file=$1
- base=`func_basename $file`
- libexecdir=`func_dirname $file`
- # top_srcdir != top_builddir in make dist
- libexecdir=`echo "$libexecdir" | sed -e "s|$top_srcdir|$top_builddir|"`
- if test -f $file; then
- mkdir -p components
- sed "s|\(<exec>\).*\(/ibus-engine-simple</exec>\)|\1$libexecdir\2|" \
- < $file > components/$base
- fi
-}
-
trap 'func_cleanup $tstdir' 1 2 3 15
tst=$1; shift
@@ -140,7 +127,7 @@ run_test_case()
exit -1
fi
# func_copy_component replaces s/$top_srcdir/%top_builddir/
- func_copy_simple_xml "../$top_srcdir/engine/simple.xml"
+ func_copy_component "../$top_srcdir/engine/simple.xml"
func_copy_component "../$top_srcdir/conf/memconf/memconf.xml"
IBUS_COMPONENT_PATH=$PWD/components
--
2.24.1

View File

@ -26,14 +26,14 @@
Name: ibus
Version: 1.5.22
Release: 14%{?dist}
Release: 15%{?dist}
Summary: Intelligent Input Bus for Linux OS
License: LGPLv2+
URL: https://github.com/ibus/%name/wiki
Source0: https://github.com/ibus/%name/releases/download/%{version}/%{name}-%{version}.tar.gz
Source1: %{name}-xinput
Source2: %{name}.conf.5
Source3: https://fujiwara.fedorapeople.org/ibus/po/%{name}-simple-1.5.22.20200826.xml.gz
Source3: https://fujiwara.fedorapeople.org/ibus/po/%{name}-simple-1.5.22.20200827.xml.gz
Source4: https://fujiwara.fedorapeople.org/ibus/po/%{name}-po-1.5.22-20200827.tar.gz
# Patch0: %%{name}-HEAD.patch
Patch0: %{name}-HEAD.patch
@ -249,8 +249,9 @@ the functionality of the installed %{name} package.
# cp client/gtk2/ibusim.c client/gtk3/ibusim.c || :
cp client/gtk2/ibusim.c client/gtk3/ibusim.c || :
cd engine
cp %{SOURCE3} simple.xml.gz
gunzip simple.xml.gz
rm simple.xml.in
cp %{SOURCE3} simple.xml.in.gz
gunzip simple.xml.in.gz
cd ..
zcat %{SOURCE4} | tar xfv -
@ -460,6 +461,9 @@ dconf update || :
%{_datadir}/installed-tests/ibus
%changelog
* Thu Aug 27 2020 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.22-15
- Rename simple.xml to simple.xml.in
* Thu Aug 27 2020 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.22-14
- Update ibusunicodegen.h with latest unicode-ucd
- Update simple.xml with latest xkeyboard-config

View File

@ -1,3 +1,3 @@
SHA512 (ibus-1.5.22.tar.gz) = 0abe89acc6da8cea484a6b9f807c08e94869072f374f9e8f4541a426636f818f1c3cb8b9237f97245771f9e4bf19184983d8ac924177dc4824ca6e8b5304425d
SHA512 (ibus-simple-1.5.22.20200826.xml.gz) = 8de160f73f474f6eed838171fdc28a0f9d32def4d7f80f83e125bcde5fddd99807545bfde8ee19a964d40419f029f160356e0b188472a2bd742f9882dd4673df
SHA512 (ibus-simple-1.5.22.20200827.xml.gz) = d97a0228507741ddbb06b17690694db900c0d983e00c86bed0537a825d90d951ff1287f3f7e72a706856ecb11c2172070d9eb9168f9e0a4ec28b6783862e742b
SHA512 (ibus-po-1.5.22-20200827.tar.gz) = 87bcade0166744e186af81747d5f3c38e223a85f6bef859f714a8dc9912789def2bc41c67b78a2743455be3c53df31953ca382f0d23ac115a0a42deea7675de3