summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfujiwarat <takao.fujiwara1@gmail.com>2016-03-02 19:14:22 +0900
committerfujiwarat <takao.fujiwara1@gmail.com>2016-03-02 19:14:22 +0900
commit6aa89efa0e3b86af08d479187dba33554c701ec6 (patch)
tree555ac7cf001146736deb737c5a43b0172a83385d
parent9fd13449f61481b8b7d7b3572493c43a573675a5 (diff)
downloadibus-anthy-6aa89efa0e3b86af08d479187dba33554c701ec6.tar.gz
Fixed environment variables in anthy.xml and scripts (#4)
-rw-r--r--configure.ac4
-rw-r--r--engine/python2/Makefile.am38
-rw-r--r--engine/python2/_config.py.in16
-rw-r--r--engine/python2/anthy.xml.in.in6
-rw-r--r--engine/python2/ibus-engine-anthy.in11
-rw-r--r--engine/python3/Makefile.am38
-rw-r--r--engine/python3/_config.py.in16
-rw-r--r--engine/python3/anthy.xml.in.in6
-rw-r--r--engine/python3/ibus-engine-anthy.in11
-rw-r--r--setup/python2/Makefile.am29
-rw-r--r--setup/python2/ibus-setup-anthy.in7
-rw-r--r--setup/python3/Makefile.am29
-rw-r--r--setup/python3/ibus-setup-anthy.in7
13 files changed, 112 insertions, 106 deletions
diff --git a/configure.ac b/configure.ac
index 8f4eeb9..0cdb8c8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -426,18 +426,14 @@ data/Makefile
gir/Makefile
engine/Makefile
engine/python2/Makefile
-engine/python2/ibus-engine-anthy
engine/python2/anthy.xml.in
engine/python2/default.xml.in
engine/python3/Makefile
-engine/python3/ibus-engine-anthy
engine/python3/anthy.xml.in
engine/python3/default.xml.in
setup/Makefile
setup/python2/Makefile
-setup/python2/ibus-setup-anthy
setup/python3/Makefile
-setup/python3/ibus-setup-anthy
icons/Makefile
m4/Makefile
])
diff --git a/engine/python2/Makefile.am b/engine/python2/Makefile.am
index afc9236..47a7574 100644
--- a/engine/python2/Makefile.am
+++ b/engine/python2/Makefile.am
@@ -3,8 +3,8 @@
# ibus-anthy - The Anthy engine for IBus
#
# Copyright (c) 2007-2008 Peng Huang <shawn.p.huang@gmail.com>
-# Copyright (c) 2010-2015 Takao Fujiwara <takao.fujiwara1@gmail.com>
-# Copyright (c) 2007-2015 Red Hat, Inc.
+# Copyright (c) 2010-2016 Takao Fujiwara <takao.fujiwara1@gmail.com>
+# Copyright (c) 2007-2016 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -77,23 +77,32 @@ componentdir = $(datadir)/ibus/component
engine_DATA = default.xml
enginedir = $(pkgdatadir)/engine
+# $(SYMBOL_XML) cannot be extracted in Makefile but $(libexecdir) can be
+# extracted to ${exec_prefix}/libexec so use capital @LIBEXECDIR@ here.
%.xml: %.xml.in
- sed -e "s|\@libexecdir\@|$(libexecdir)|g" \
- -e "s|\@pkgdatadir\@|$(pkgdatadir)|g" \
+ sed -e "s|\@LIBEXECDIR\@|$(libexecdir)|g" \
+ -e "s|\@PKGDATADIR\@|$(pkgdatadir)|g" \
-e "s|_description|description|g" \
$< > $@
+ibus-engine-anthy: ibus-engine-anthy.in
+ sed -e "s|\@prefix\@|$(prefix)|g" \
+ -e "s|\@exec_prefix\@|$(exec_prefix)|g" \
+ -e "s|\@libexecdir\@|$(libexecdir)|g" \
+ -e "s|\@datarootdir\@|$(datarootdir)|g" \
+ -e "s|\@PACKAGE\@|$(PACKAGE)|g" \
+ -e "s|\@PYTHON\@|$(PYTHON)|g" \
+ -e "s|\@ENV_IBUS_ENGINE\@|$(ENV_IBUS_ENGINE)|g" \
+ $< > $@
+
_config.py: _config.py.in
- ( \
- PKGDATADIR=$(pkgdatadir); \
- LIBEXECDIR=$(libexecdir); \
- DATADIR=$(datadir); \
- LAYOUT=$(LAYOUT); \
- SYMBOL_CHAR_INT=$(SYMBOL_CHAR_INT); \
- ICON_PREFERENCE=$(ICON_PREFERENCE); \
- s=`cat $<`; \
- eval "echo \"$${s}\""; \
- ) > $@
+ sed -e "s|\@pkgdatadir\@|$(pkgdatadir)|g" \
+ -e "s|\@libexecdir\@|$(libexecdir)|g" \
+ -e "s|\@datadir\@|$(datadir)|g" \
+ -e "s|\@LAYOUT\@|$(LAYOUT)|g" \
+ -e "s|\@SYMBOL_CHAR_INT\@|$(SYMBOL_CHAR_INT)|g" \
+ -e "s|\@ICON_PREFERENCE\@|$(ICON_PREFERENCE)|g" \
+ $< > $@
test:
$(ENV_IBUS_TEST) \
@@ -116,6 +125,7 @@ CLEANFILES = \
$(PYGTK2_ANTHY_GEN) \
anthy.xml \
default.xml \
+ ibus-engine-anthy \
*.pyc \
$(NULL)
diff --git a/engine/python2/_config.py.in b/engine/python2/_config.py.in
index 4d5738b..d78d182 100644
--- a/engine/python2/_config.py.in
+++ b/engine/python2/_config.py.in
@@ -4,8 +4,8 @@
# ibus-anthy - The Anthy engine for IBus
#
# Copyright (c) 2007-2008 Peng Huang <shawn.p.huang@gmail.com>
-# Copyright (c) 2010-2013 Takao Fujiwara <takao.fujiwara1@gmail.com>
-# Copyright (c) 2007-2013 Red Hat, Inc.
+# Copyright (c) 2010-2016 Takao Fujiwara <takao.fujiwara1@gmail.com>
+# Copyright (c) 2007-2016 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,10 +21,10 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-PKGDATADIR = '${PKGDATADIR}'
-LIBEXECDIR = '${LIBEXECDIR}'
-LOCALEDIR = '${DATADIR}/locale'
-LAYOUT = '${LAYOUT}'
-SYMBOL_CHAR = unichr(${SYMBOL_CHAR_INT})
-ICON_PREFERENCE = '${ICON_PREFERENCE}'
+PKGDATADIR = '@pkgdatadir@'
+LIBEXECDIR = '@libexecdir@'
+LOCALEDIR = '@datadir@/locale'
+LAYOUT = '@LAYOUT@'
+SYMBOL_CHAR = unichr(@SYMBOL_CHAR_INT@)
+ICON_PREFERENCE = '@ICON_PREFERENCE@'
DEBUG = False
diff --git a/engine/python2/anthy.xml.in.in b/engine/python2/anthy.xml.in.in
index d332260..414ef32 100644
--- a/engine/python2/anthy.xml.in.in
+++ b/engine/python2/anthy.xml.in.in
@@ -3,7 +3,7 @@
<component>
<name>org.freedesktop.IBus.Anthy</name>
<description>Anthy Component</description>
- <exec>@libexecdir@/ibus-engine-anthy --ibus</exec>
+ <exec>@LIBEXECDIR@/ibus-engine-anthy --ibus</exec>
<version>@PACKAGE_VERSION@</version>
<author>Peng Huang &lt;shawn.p.huang@gmail.com&gt;</author>
<license>GPL</license>
@@ -13,7 +13,7 @@
<!-- for engines -->
<observed-paths>
<path>~/.config/ibus-anthy/engines.xml</path>
- <path>@pkgdatadir@/engine/default.xml</path>
+ <path>@PKGDATADIR@/engine/default.xml</path>
</observed-paths>
- <engines exec="@libexecdir@/ibus-engine-anthy --xml" />
+ <engines exec="@LIBEXECDIR@/ibus-engine-anthy --xml" />
</component>
diff --git a/engine/python2/ibus-engine-anthy.in b/engine/python2/ibus-engine-anthy.in
index c54b10a..f663165 100644
--- a/engine/python2/ibus-engine-anthy.in
+++ b/engine/python2/ibus-engine-anthy.in
@@ -5,8 +5,8 @@
# ibus-anthy - The Anthy engine for IBus
#
# Copyright (c) 2007-2008 Peng Huang <shawn.p.huang@gmail.com>
-# Copyright (c) 2010-2013 Takao Fujiwara <takao.fujiwara1@gmail.com>
-# Copyright (c) 2007-2013 Red Hat, Inc.
+# Copyright (c) 2010-2016 Takao Fujiwara <takao.fujiwara1@gmail.com>
+# Copyright (c) 2007-2016 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,12 +22,7 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-prefix=@prefix@
-datarootdir=@datarootdir@
-exec_prefix=@exec_prefix@
-libexecdir=@libexecdir@
export IBUS_PREFIX=@prefix@
export IBUS_ANTHY_PKGDATADIR=@datarootdir@/@PACKAGE@
-export LIBEXECDIR=$libexecdir
+export LIBEXECDIR=@libexecdir@
exec @ENV_IBUS_ENGINE@ @PYTHON@ @datarootdir@/@PACKAGE@/engine/main.py $@
-
diff --git a/engine/python3/Makefile.am b/engine/python3/Makefile.am
index afc9236..47a7574 100644
--- a/engine/python3/Makefile.am
+++ b/engine/python3/Makefile.am
@@ -3,8 +3,8 @@
# ibus-anthy - The Anthy engine for IBus
#
# Copyright (c) 2007-2008 Peng Huang <shawn.p.huang@gmail.com>
-# Copyright (c) 2010-2015 Takao Fujiwara <takao.fujiwara1@gmail.com>
-# Copyright (c) 2007-2015 Red Hat, Inc.
+# Copyright (c) 2010-2016 Takao Fujiwara <takao.fujiwara1@gmail.com>
+# Copyright (c) 2007-2016 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -77,23 +77,32 @@ componentdir = $(datadir)/ibus/component
engine_DATA = default.xml
enginedir = $(pkgdatadir)/engine
+# $(SYMBOL_XML) cannot be extracted in Makefile but $(libexecdir) can be
+# extracted to ${exec_prefix}/libexec so use capital @LIBEXECDIR@ here.
%.xml: %.xml.in
- sed -e "s|\@libexecdir\@|$(libexecdir)|g" \
- -e "s|\@pkgdatadir\@|$(pkgdatadir)|g" \
+ sed -e "s|\@LIBEXECDIR\@|$(libexecdir)|g" \
+ -e "s|\@PKGDATADIR\@|$(pkgdatadir)|g" \
-e "s|_description|description|g" \
$< > $@
+ibus-engine-anthy: ibus-engine-anthy.in
+ sed -e "s|\@prefix\@|$(prefix)|g" \
+ -e "s|\@exec_prefix\@|$(exec_prefix)|g" \
+ -e "s|\@libexecdir\@|$(libexecdir)|g" \
+ -e "s|\@datarootdir\@|$(datarootdir)|g" \
+ -e "s|\@PACKAGE\@|$(PACKAGE)|g" \
+ -e "s|\@PYTHON\@|$(PYTHON)|g" \
+ -e "s|\@ENV_IBUS_ENGINE\@|$(ENV_IBUS_ENGINE)|g" \
+ $< > $@
+
_config.py: _config.py.in
- ( \
- PKGDATADIR=$(pkgdatadir); \
- LIBEXECDIR=$(libexecdir); \
- DATADIR=$(datadir); \
- LAYOUT=$(LAYOUT); \
- SYMBOL_CHAR_INT=$(SYMBOL_CHAR_INT); \
- ICON_PREFERENCE=$(ICON_PREFERENCE); \
- s=`cat $<`; \
- eval "echo \"$${s}\""; \
- ) > $@
+ sed -e "s|\@pkgdatadir\@|$(pkgdatadir)|g" \
+ -e "s|\@libexecdir\@|$(libexecdir)|g" \
+ -e "s|\@datadir\@|$(datadir)|g" \
+ -e "s|\@LAYOUT\@|$(LAYOUT)|g" \
+ -e "s|\@SYMBOL_CHAR_INT\@|$(SYMBOL_CHAR_INT)|g" \
+ -e "s|\@ICON_PREFERENCE\@|$(ICON_PREFERENCE)|g" \
+ $< > $@
test:
$(ENV_IBUS_TEST) \
@@ -116,6 +125,7 @@ CLEANFILES = \
$(PYGTK2_ANTHY_GEN) \
anthy.xml \
default.xml \
+ ibus-engine-anthy \
*.pyc \
$(NULL)
diff --git a/engine/python3/_config.py.in b/engine/python3/_config.py.in
index f68b50a..ffb1bbe 100644
--- a/engine/python3/_config.py.in
+++ b/engine/python3/_config.py.in
@@ -4,8 +4,8 @@
# ibus-anthy - The Anthy engine for IBus
#
# Copyright (c) 2007-2008 Peng Huang <shawn.p.huang@gmail.com>
-# Copyright (c) 2010-2014 Takao Fujiwara <takao.fujiwara1@gmail.com>
-# Copyright (c) 2007-2014 Red Hat, Inc.
+# Copyright (c) 2010-2016 Takao Fujiwara <takao.fujiwara1@gmail.com>
+# Copyright (c) 2007-2016 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,10 +21,10 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-PKGDATADIR = '${PKGDATADIR}'
-LIBEXECDIR = '${LIBEXECDIR}'
-LOCALEDIR = '${DATADIR}/locale'
-LAYOUT = '${LAYOUT}'
-SYMBOL_CHAR = chr(${SYMBOL_CHAR_INT})
-ICON_PREFERENCE = '${ICON_PREFERENCE}'
+PKGDATADIR = '@pkgdatadir@'
+LIBEXECDIR = '@libexecdir@'
+LOCALEDIR = '@datadir@/locale'
+LAYOUT = '@LAYOUT@'
+SYMBOL_CHAR = chr(@SYMBOL_CHAR_INT@)
+ICON_PREFERENCE = '@ICON_PREFERENCE@'
DEBUG = False
diff --git a/engine/python3/anthy.xml.in.in b/engine/python3/anthy.xml.in.in
index d332260..414ef32 100644
--- a/engine/python3/anthy.xml.in.in
+++ b/engine/python3/anthy.xml.in.in
@@ -3,7 +3,7 @@
<component>
<name>org.freedesktop.IBus.Anthy</name>
<description>Anthy Component</description>
- <exec>@libexecdir@/ibus-engine-anthy --ibus</exec>
+ <exec>@LIBEXECDIR@/ibus-engine-anthy --ibus</exec>
<version>@PACKAGE_VERSION@</version>
<author>Peng Huang &lt;shawn.p.huang@gmail.com&gt;</author>
<license>GPL</license>
@@ -13,7 +13,7 @@
<!-- for engines -->
<observed-paths>
<path>~/.config/ibus-anthy/engines.xml</path>
- <path>@pkgdatadir@/engine/default.xml</path>
+ <path>@PKGDATADIR@/engine/default.xml</path>
</observed-paths>
- <engines exec="@libexecdir@/ibus-engine-anthy --xml" />
+ <engines exec="@LIBEXECDIR@/ibus-engine-anthy --xml" />
</component>
diff --git a/engine/python3/ibus-engine-anthy.in b/engine/python3/ibus-engine-anthy.in
index c54b10a..f663165 100644
--- a/engine/python3/ibus-engine-anthy.in
+++ b/engine/python3/ibus-engine-anthy.in
@@ -5,8 +5,8 @@
# ibus-anthy - The Anthy engine for IBus
#
# Copyright (c) 2007-2008 Peng Huang <shawn.p.huang@gmail.com>
-# Copyright (c) 2010-2013 Takao Fujiwara <takao.fujiwara1@gmail.com>
-# Copyright (c) 2007-2013 Red Hat, Inc.
+# Copyright (c) 2010-2016 Takao Fujiwara <takao.fujiwara1@gmail.com>
+# Copyright (c) 2007-2016 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,12 +22,7 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-prefix=@prefix@
-datarootdir=@datarootdir@
-exec_prefix=@exec_prefix@
-libexecdir=@libexecdir@
export IBUS_PREFIX=@prefix@
export IBUS_ANTHY_PKGDATADIR=@datarootdir@/@PACKAGE@
-export LIBEXECDIR=$libexecdir
+export LIBEXECDIR=@libexecdir@
exec @ENV_IBUS_ENGINE@ @PYTHON@ @datarootdir@/@PACKAGE@/engine/main.py $@
-
diff --git a/setup/python2/Makefile.am b/setup/python2/Makefile.am
index f1a8e8d..948f0a8 100644
--- a/setup/python2/Makefile.am
+++ b/setup/python2/Makefile.am
@@ -4,8 +4,8 @@
#
# Copyright (c) 2007-2008 Peng Huang <shawn.p.huang@gmail.com>
# Copyright (c) 2009 Hideaki ABE <abe.sendai@gmail.com>
-# Copyright (c) 2010-2013 Takao Fujiwara <takao.fujiwara1@gmail.com>
-# Copyright (c) 2007-2013 Red Hat, Inc.
+# Copyright (c) 2010-2016 Takao Fujiwara <takao.fujiwara1@gmail.com>
+# Copyright (c) 2007-2016 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -61,13 +61,13 @@ setup_anthydir = $(datadir)/ibus-anthy/setup
CONFIG_CLEAN_FILES = \
$(BUILT_SOURCES) \
- $(libexec_SCRIPTS) \
$(NULL)
CLEANFILES = \
$(BUILT_SOURCES) \
$(desktop_DATA) \
$(desktop_in_files) \
+ $(libexec_SCRIPTS) \
*.pyc \
$(NULL)
@@ -76,6 +76,12 @@ EXTRA_DIST = \
$(setup_anthy_built_in_files) \
$(NULL)
+ibus-setup-anthy: ibus-setup-anthy.in
+ sed -e "s|\@prefix\@|$(prefix)|g" \
+ -e "s|\@localedir\@|$(localedir)|g" \
+ -e "s|\@PYTHON\@|$(PYTHON)|g" \
+ $< > $@
+
anthyprefs.py: anthyprefs.py.in
sed -e "s|\@ANTHY_ZIPCODE_FILE\@|$(ANTHY_ZIPCODE_FILE)|g" \
-e "s|\@KASUMI_EXEC_FILE\@|$(KASUMI_EXEC_FILE)|g" \
@@ -86,16 +92,13 @@ anthyprefs.py: anthyprefs.py.in
$< > $@
_config.py: _config.py.in
- ( \
- PKGDATADIR=$(pkgdatadir); \
- LIBEXECDIR=$(libexecdir); \
- DATADIR=$(datadir); \
- LAYOUT=$(LAYOUT); \
- SYMBOL_CHAR_INT=$(SYMBOL_CHAR_INT); \
- ICON_PREFERENCE=$(ICON_PREFERENCE); \
- s=`cat $<`; \
- eval "echo \"$${s}\""; \
- ) > $@
+ sed -e "s|\@pkgdatadir\@|$(pkgdatadir)|g" \
+ -e "s|\@libexecdir\@|$(libexecdir)|g" \
+ -e "s|\@datadir\@|$(datadir)|g" \
+ -e "s|\@LAYOUT\@|$(LAYOUT)|g" \
+ -e "s|\@SYMBOL_CHAR_INT\@|$(SYMBOL_CHAR_INT)|g" \
+ -e "s|\@ICON_PREFERENCE\@|$(ICON_PREFERENCE)|g" \
+ $< > $@
# Need a time lag between .py and .py.in files to build .py files
# because *_PYTHON valuables are installed in the tarball.
diff --git a/setup/python2/ibus-setup-anthy.in b/setup/python2/ibus-setup-anthy.in
index f8832fd..b936d2c 100644
--- a/setup/python2/ibus-setup-anthy.in
+++ b/setup/python2/ibus-setup-anthy.in
@@ -4,8 +4,8 @@
# ibus-tmpl - The Input Bus template project
#
# Copyright (c) 2007-2008 Peng Huang <shawn.p.huang@gmail.com>
-# Copyright (c) 2010-2013 Takao Fujiwara <takao.fujiwara1@gmail.com>
-# Copyright (c) 2007-2013 Red Hat, Inc.
+# Copyright (c) 2010-2016 Takao Fujiwara <takao.fujiwara1@gmail.com>
+# Copyright (c) 2007-2016 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,5 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-prefix=@prefix@
-datarootdir=@datarootdir@
export IBUS_LOCALEDIR=@localedir@
exec @PYTHON@ @prefix@/share/ibus-anthy/setup/main.py $@
-
diff --git a/setup/python3/Makefile.am b/setup/python3/Makefile.am
index f1a8e8d..948f0a8 100644
--- a/setup/python3/Makefile.am
+++ b/setup/python3/Makefile.am
@@ -4,8 +4,8 @@
#
# Copyright (c) 2007-2008 Peng Huang <shawn.p.huang@gmail.com>
# Copyright (c) 2009 Hideaki ABE <abe.sendai@gmail.com>
-# Copyright (c) 2010-2013 Takao Fujiwara <takao.fujiwara1@gmail.com>
-# Copyright (c) 2007-2013 Red Hat, Inc.
+# Copyright (c) 2010-2016 Takao Fujiwara <takao.fujiwara1@gmail.com>
+# Copyright (c) 2007-2016 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -61,13 +61,13 @@ setup_anthydir = $(datadir)/ibus-anthy/setup
CONFIG_CLEAN_FILES = \
$(BUILT_SOURCES) \
- $(libexec_SCRIPTS) \
$(NULL)
CLEANFILES = \
$(BUILT_SOURCES) \
$(desktop_DATA) \
$(desktop_in_files) \
+ $(libexec_SCRIPTS) \
*.pyc \
$(NULL)
@@ -76,6 +76,12 @@ EXTRA_DIST = \
$(setup_anthy_built_in_files) \
$(NULL)
+ibus-setup-anthy: ibus-setup-anthy.in
+ sed -e "s|\@prefix\@|$(prefix)|g" \
+ -e "s|\@localedir\@|$(localedir)|g" \
+ -e "s|\@PYTHON\@|$(PYTHON)|g" \
+ $< > $@
+
anthyprefs.py: anthyprefs.py.in
sed -e "s|\@ANTHY_ZIPCODE_FILE\@|$(ANTHY_ZIPCODE_FILE)|g" \
-e "s|\@KASUMI_EXEC_FILE\@|$(KASUMI_EXEC_FILE)|g" \
@@ -86,16 +92,13 @@ anthyprefs.py: anthyprefs.py.in
$< > $@
_config.py: _config.py.in
- ( \
- PKGDATADIR=$(pkgdatadir); \
- LIBEXECDIR=$(libexecdir); \
- DATADIR=$(datadir); \
- LAYOUT=$(LAYOUT); \
- SYMBOL_CHAR_INT=$(SYMBOL_CHAR_INT); \
- ICON_PREFERENCE=$(ICON_PREFERENCE); \
- s=`cat $<`; \
- eval "echo \"$${s}\""; \
- ) > $@
+ sed -e "s|\@pkgdatadir\@|$(pkgdatadir)|g" \
+ -e "s|\@libexecdir\@|$(libexecdir)|g" \
+ -e "s|\@datadir\@|$(datadir)|g" \
+ -e "s|\@LAYOUT\@|$(LAYOUT)|g" \
+ -e "s|\@SYMBOL_CHAR_INT\@|$(SYMBOL_CHAR_INT)|g" \
+ -e "s|\@ICON_PREFERENCE\@|$(ICON_PREFERENCE)|g" \
+ $< > $@
# Need a time lag between .py and .py.in files to build .py files
# because *_PYTHON valuables are installed in the tarball.
diff --git a/setup/python3/ibus-setup-anthy.in b/setup/python3/ibus-setup-anthy.in
index f8832fd..b936d2c 100644
--- a/setup/python3/ibus-setup-anthy.in
+++ b/setup/python3/ibus-setup-anthy.in
@@ -4,8 +4,8 @@
# ibus-tmpl - The Input Bus template project
#
# Copyright (c) 2007-2008 Peng Huang <shawn.p.huang@gmail.com>
-# Copyright (c) 2010-2013 Takao Fujiwara <takao.fujiwara1@gmail.com>
-# Copyright (c) 2007-2013 Red Hat, Inc.
+# Copyright (c) 2010-2016 Takao Fujiwara <takao.fujiwara1@gmail.com>
+# Copyright (c) 2007-2016 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,5 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-prefix=@prefix@
-datarootdir=@datarootdir@
export IBUS_LOCALEDIR=@localedir@
exec @PYTHON@ @prefix@/share/ibus-anthy/setup/main.py $@
-