aboutsummaryrefslogtreecommitdiff
path: root/chinese
diff options
context:
space:
mode:
authorVanilla I. Shu <vanilla@FreeBSD.org>2015-02-26 14:28:14 +0000
committerVanilla I. Shu <vanilla@FreeBSD.org>2015-02-26 14:28:14 +0000
commit29db6498d87aed206ef68be9a9f6f09c784eb86e (patch)
treeb7f9da27d45a37100360d56703263e085df0a673 /chinese
parentdd4a95cbc12df8021b23f999f255eb345846ad92 (diff)
downloadports-29db6498d87aed206ef68be9a9f6f09c784eb86e.tar.gz
ports-29db6498d87aed206ef68be9a9f6f09c784eb86e.zip
Fix runtime error with wrong datadir.
Obtained from: James Hung via facebook.
Notes
Notes: svn path=/head/; revision=380006
Diffstat (limited to 'chinese')
-rw-r--r--chinese/libchewing/Makefile1
-rw-r--r--chinese/libchewing/files/patch-src_porting__layer_src_plat__path.c15
2 files changed, 16 insertions, 0 deletions
diff --git a/chinese/libchewing/Makefile b/chinese/libchewing/Makefile
index b1e1fd78bb29..ee76ce2ed4a8 100644
--- a/chinese/libchewing/Makefile
+++ b/chinese/libchewing/Makefile
@@ -3,6 +3,7 @@
PORTNAME= libchewing
PORTVERSION= 0.4.0
+PORTREVISION= 1
CATEGORIES= chinese textproc
MAINTAINER= ports@FreeBSD.org
diff --git a/chinese/libchewing/files/patch-src_porting__layer_src_plat__path.c b/chinese/libchewing/files/patch-src_porting__layer_src_plat__path.c
new file mode 100644
index 000000000000..f8fbaf1b3dad
--- /dev/null
+++ b/chinese/libchewing/files/patch-src_porting__layer_src_plat__path.c
@@ -0,0 +1,15 @@
+--- src/porting_layer/src/plat_path.c.orig 2015-02-26 14:13:31 UTC
++++ src/porting_layer/src/plat_path.c
+@@ -36,10 +36,10 @@ int get_search_path(char *path, size_t p
+ } else {
+ home = getenv("HOME");
+ if (home) {
+- snprintf(path, path_len, "%s/.chewing" SEARCH_PATH_SEP CHEWING_DATADIR "/libchewing", home);
++ snprintf(path, path_len, "%s/.chewing" SEARCH_PATH_SEP CHEWING_DATADIR, home);
+ } else {
+ // No HOME ?
+- strncpy(path, SEARCH_PATH_SEP CHEWING_DATADIR "/libchewing", path_len);
++ strncpy(path, SEARCH_PATH_SEP CHEWING_DATADIR, path_len);
+ }
+ }
+