aboutsummaryrefslogtreecommitdiff
path: root/japanese/ibus-anthy
diff options
context:
space:
mode:
authorDaichi GOTO <daichi@FreeBSD.org>2010-03-16 09:49:40 +0000
committerDaichi GOTO <daichi@FreeBSD.org>2010-03-16 09:49:40 +0000
commit447dc09809fc87a8c5c1c769a26d8389472bd43a (patch)
tree38f92f10b48dca6c33619c253486b69ba00bbcc7 /japanese/ibus-anthy
parent47b5d29bc5fd0e6b88110f9c288a5b80d1cb4a74 (diff)
downloadports-447dc09809fc87a8c5c1c769a26d8389472bd43a.tar.gz
ports-447dc09809fc87a8c5c1c769a26d8389472bd43a.zip
Fix and improve LOCALBASE treatment
Notes
Notes: svn path=/head/; revision=251126
Diffstat (limited to 'japanese/ibus-anthy')
-rw-r--r--japanese/ibus-anthy/Makefile10
-rw-r--r--japanese/ibus-anthy/files/patch-configure22
-rw-r--r--japanese/ibus-anthy/files/patch-engine_engine.py11
-rw-r--r--japanese/ibus-anthy/files/patch-setup_anthyprefs.py18
-rw-r--r--japanese/ibus-anthy/files/patch-setup_main.py11
5 files changed, 69 insertions, 3 deletions
diff --git a/japanese/ibus-anthy/Makefile b/japanese/ibus-anthy/Makefile
index a439083bb4cd..d63b51f1aef3 100644
--- a/japanese/ibus-anthy/Makefile
+++ b/japanese/ibus-anthy/Makefile
@@ -7,7 +7,7 @@
PORTNAME= ibus-anthy
PORTVERSION= 1.2.0.20100313
-PORTREVISION= 0
+PORTREVISION= 1
CATEGORIES= japanese
MASTER_SITES= ${MASTER_SITE_GOOGLE_CODE}
@@ -34,6 +34,14 @@ USE_GETTEXT= yes
PLIST_SUB+= NLS=""
.endif
+REPLACE_FILES= engine/engine.py setup/anthyprefs.py setup/main.py
+
+post-patch:
+ @for FILE in ${REPLACE_FILES}; do \
+ ${SED} -i .bak -e "s/@@LOCALBASE@@/${LOCALBASE:S/\//\\\//g}/g" \
+ ${WRKSRC}/$${FILE}; \
+ done;
+
port-build:
.if !defined(WITHOUT_NLS)
@cd ${WRKSRC}/po; \
diff --git a/japanese/ibus-anthy/files/patch-configure b/japanese/ibus-anthy/files/patch-configure
index 55b8e68c1259..757ccdc715c4 100644
--- a/japanese/ibus-anthy/files/patch-configure
+++ b/japanese/ibus-anthy/files/patch-configure
@@ -1,5 +1,5 @@
---- configure.orig 2010-03-16 10:42:56.913074122 +0900
-+++ configure 2010-03-16 10:36:06.999930133 +0900
+--- configure.orig 2010-03-16 18:01:57.094452930 +0900
++++ configure 2010-03-16 18:01:03.005537719 +0900
@@ -17898,9 +17898,9 @@
#define HAVE_DECL_NTH_UNCONVERTED_CANDIDATE 0
_ACEOF
@@ -52,3 +52,21 @@
fi
+@@ -18156,7 +18156,7 @@
+ fi
+
+
+-if test x"$SWIG" == x""; then
++if test x"$SWIG" = x""; then
+ { { $as_echo "$as_me:$LINENO: error: can not find swig" >&5
+ $as_echo "$as_me: error: can not find swig" >&2;}
+ { (exit 1); exit 1; }; }
+@@ -18464,7 +18464,7 @@
+ fi
+
+
+-if test x"$PYTHON_CONFIG" == x""; then
++if test x"$PYTHON_CONFIG" = x""; then
+ # Extract the first word of "python-config", so it can be a program name with args.
+ set dummy python-config; ac_word=$2
+ { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
diff --git a/japanese/ibus-anthy/files/patch-engine_engine.py b/japanese/ibus-anthy/files/patch-engine_engine.py
new file mode 100644
index 000000000000..b5a2c4bc2b77
--- /dev/null
+++ b/japanese/ibus-anthy/files/patch-engine_engine.py
@@ -0,0 +1,11 @@
+--- engine/engine.py.orig 2010-03-16 17:26:28.900007826 +0900
++++ engine/engine.py 2010-03-16 17:26:52.344325749 +0900
+@@ -89,7 +89,7 @@
+ It's better to load config.py(.in) in engine and setup instead and
+ I will move KASUMI_IMG_PATH.
+ '''
+-KASUMI_IMG_PATH = "/usr/share/pixmaps/kasumi.png"
++KASUMI_IMG_PATH = "@@LOCALBASE@@/share/pixmaps/kasumi.png"
+
+ KP_Table = {}
+ for s in dir(keysyms):
diff --git a/japanese/ibus-anthy/files/patch-setup_anthyprefs.py b/japanese/ibus-anthy/files/patch-setup_anthyprefs.py
new file mode 100644
index 000000000000..562fa9abf7d6
--- /dev/null
+++ b/japanese/ibus-anthy/files/patch-setup_anthyprefs.py
@@ -0,0 +1,18 @@
+--- setup/anthyprefs.py.orig 2010-03-16 17:30:03.668452978 +0900
++++ setup/anthyprefs.py 2010-03-16 17:28:25.641496479 +0900
+@@ -185,11 +185,11 @@
+ },
+
+ 'dict': {
+- 'anthy_zipcode': ['/usr/share/anthy/zipcode.t'],
+- 'ibus_symbol': ['/usr/share/ibus-anthy/dicts/symbol.t'],
++ 'anthy_zipcode': ['@@LOCALBASE@@/share/anthy/zipcode.t'],
++ 'ibus_symbol': ['@@LOCALBASE@@/share/ibus-anthy/dicts/symbol.t'],
+ 'files': [
+- '/usr/share/anthy/zipcode.t',
+- '/usr/share/ibus-anthy/dicts/symbol.t',
++ '@@LOCALBASE@@/share/anthy/zipcode.t',
++ '@@LOCALBASE@@/share/ibus-anthy/dicts/symbol.t',
+ ],
+ },
+
diff --git a/japanese/ibus-anthy/files/patch-setup_main.py b/japanese/ibus-anthy/files/patch-setup_main.py
new file mode 100644
index 000000000000..35cec1359951
--- /dev/null
+++ b/japanese/ibus-anthy/files/patch-setup_main.py
@@ -0,0 +1,11 @@
+--- setup/main.py.orig 2010-03-16 17:32:17.110533466 +0900
++++ setup/main.py 2010-03-16 17:33:17.660764012 +0900
+@@ -59,7 +59,7 @@
+ # This can add the pixbuf without scaling.
+ anthydir = path.dirname(path.dirname(__file__))
+ if not anthydir:
+- anthydir = "/usr/share/ibus-anthy"
++ anthydir = "@@LOCALBASE@@/share/ibus-anthy"
+ icon_path = path.join(anthydir, "icons", "ibus-anthy.png")
+ if path.exists(icon_path):
+ xml.get_widget('main').set_icon_from_file(icon_path)