diff -ruN --exclude=CVS ../fcitx.orig/Makefile ./Makefile --- ../fcitx.orig/Makefile 2012-06-06 01:43:20.000000000 -0500 +++ ./Makefile 2012-06-09 20:41:57.914206989 -0500 @@ -7,7 +7,7 @@ PORTNAME= fcitx PORTVERSION= 4.2.3 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= chinese x11 MASTER_SITES= ${MASTER_SITE_GOOGLE_CODE} DISTFILES= ${DISTNAME}${EXTRACT_SUFX} pinyin.tar.gz table.tar.gz @@ -38,11 +38,11 @@ OPTIONS_DEFINE= GTK2 GTK3 QT4 OPENCC TPUNC -GTK2_DESC= "Enable Gtk2 IM module" -GTK3_DESC= "Enable Gtk3 IM module" -QT4_DESC= "Enable Qt4 IM module" -OPENCC_DESC= "Enable OpenCC for Chinese Transform" -TPUNC_DESC= "Use traditional quotation marks" +GTK2_DESC= Enable Gtk2 IM module +GTK3_DESC= Enable Gtk3 IM module +QT4_DESC= Enable Qt4 IM module +OPENCC_DESC= Enable OpenCC for Chinese Transform +TPUNC_DESC= Use traditional quotation marks .include diff -ruN --exclude=CVS ../fcitx.orig/files/patch-src_lib_fcitx-utils_utils.c ./files/patch-src_lib_fcitx-utils_utils.c --- ../fcitx.orig/files/patch-src_lib_fcitx-utils_utils.c 1969-12-31 18:00:00.000000000 -0600 +++ ./files/patch-src_lib_fcitx-utils_utils.c 2012-06-09 20:39:55.000000000 -0500 @@ -0,0 +1,78 @@ +diff --git src/lib/fcitx-utils/utils.c src/lib/fcitx-utils/utils.c +index c97ff44..473abc3 100644 +--- src/lib/fcitx-utils/utils.c ++++ src/lib/fcitx-utils/utils.c +@@ -337,19 +337,23 @@ int fcitx_utils_pid_exists(pid_t pid) + if (vm == 0) // ignore all error + return 1; + +- int cnt; +- struct kinfo_proc * kp = kvm_getprocs(vm, KERN_PROC_PID, pid, &cnt); +- if (kp == 0) +- return 1; +- int i; +- for (i = 0; i < cnt; i++) +- if (kp->ki_pid == pid) ++ int result = 1; ++ do { ++ int cnt; ++ struct kinfo_proc * kp = kvm_getprocs(vm, KERN_PROC_PID, pid, &cnt); ++ if (kp == 0) { ++ result = 1; + break; +- int result; +- if (i != cnt) +- result = 1; +- else +- result = 0; ++ } ++ int i; ++ for (i = 0; i < cnt; i++) ++ if (kp->ki_pid == pid) ++ break; ++ if (i != cnt) ++ result = 1; ++ else ++ result = 0; ++ } while (0); + kvm_close(vm); + return result; + #else +@@ -386,21 +390,24 @@ char* fcitx_utils_get_process_name() + if (vm == 0) + return strdup(""); + +- int cnt; +- int mypid = getpid(); +- struct kinfo_proc * kp = kvm_getprocs(vm, KERN_PROC_PID, mypid, &cnt); +- if ((cnt != 1) || (kp == 0)) +- return strdup(""); +- int i; +- for (i = 0; i < cnt; i++) +- if (kp->ki_pid == mypid) +- break; + char* result = NULL; +- if (i != cnt) +- result = strdup(kp->ki_comm); +- else +- result = strdup(""); ++ do { ++ int cnt; ++ int mypid = getpid(); ++ struct kinfo_proc * kp = kvm_getprocs(vm, KERN_PROC_PID, mypid, &cnt); ++ if ((cnt != 1) || (kp == 0)) { ++ break; ++ } ++ int i; ++ for (i = 0; i < cnt; i++) ++ if (kp->ki_pid == mypid) ++ break; ++ if (i != cnt) ++ result = strdup(kp->ki_comm); ++ } while (0); + kvm_close(vm); ++ if (result == NULL) ++ result = strdup(""); + return result; + #else + return strdup("");