diff options
author | nobutaka <nobutaka@FreeBSD.org> | 2005-06-06 00:05:11 +0800 |
---|---|---|
committer | nobutaka <nobutaka@FreeBSD.org> | 2005-06-06 00:05:11 +0800 |
commit | 0a33d299e65e067747fc4912470c25c8810be8a7 (patch) | |
tree | 11c195315adda004bbfe73af54ef2c490a5c4430 /japanese | |
parent | c8cfec372d712adbf2e657d5de14d57148b25c2a (diff) | |
download | freebsd-ports-gnome-0a33d299e65e067747fc4912470c25c8810be8a7.tar.gz freebsd-ports-gnome-0a33d299e65e067747fc4912470c25c8810be8a7.tar.zst freebsd-ports-gnome-0a33d299e65e067747fc4912470c25c8810be8a7.zip |
Fix incorrect usage of bind_textdomain_codeset().
PR: ports/80755
Submitted by: YONETANI Tomokazu <qhwt+fbsd@les.ath.cx>
Patch Obtained from: http://lists.freedesktop.org/archives/uim-commit/2005-May/000728.html
Diffstat (limited to 'japanese')
-rw-r--r-- | japanese/uim/Makefile | 4 | ||||
-rw-r--r-- | japanese/uim/files/patch-uim:context.h | 22 |
2 files changed, 24 insertions, 2 deletions
diff --git a/japanese/uim/Makefile b/japanese/uim/Makefile index e32c1e67ae08..09113b9d803d 100644 --- a/japanese/uim/Makefile +++ b/japanese/uim/Makefile @@ -7,7 +7,7 @@ PORTNAME= uim PORTVERSION= 0.4.6 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= japanese x11 MASTER_SITES= http://uim.freedesktop.org/releases/ @@ -48,7 +48,7 @@ PLIST_SUB+= GNOME="@comment " .endif .if exists(${X11BASE}/bin/scim) || defined(WITH_SCIM) -LIB_DEPENDS= scim-1.0.6:${PORTSDIR}/textproc/scim +LIB_DEPENDS= scim-1.0.7:${PORTSDIR}/textproc/scim PLIST_SUB+= SCIM="" .else PLIST_SUB+= SCIM="@comment " diff --git a/japanese/uim/files/patch-uim:context.h b/japanese/uim/files/patch-uim:context.h new file mode 100644 index 000000000000..fc4da7781f4c --- /dev/null +++ b/japanese/uim/files/patch-uim:context.h @@ -0,0 +1,22 @@ +--- uim/context.h.orig Sat Feb 5 11:50:05 2005 ++++ uim/context.h Sun Jun 5 16:43:06 2005 +@@ -156,13 +156,16 @@ + + #ifdef ENABLE_NLS + #define UIM_PREPARE_SAVING_TEXTDOMAIN_CODESET() \ +- const char *orig_encoding, *client_encoding; ++ char *enc, *orig_encoding = NULL; \ ++ const char *client_encoding; + #define UIM_SWITCH_TEXTDOMAIN_CODESET(uc) \ +- orig_encoding = bind_textdomain_codeset(GETTEXT_PACKAGE, NULL); \ ++ if ((enc = bind_textdomain_codeset(GETTEXT_PACKAGE, NULL))) \ ++ orig_encoding = strdup(enc); \ + client_encoding = (uc) ? ((struct uim_context_ *)uc)->encoding : uim_last_client_encoding; \ + bind_textdomain_codeset(GETTEXT_PACKAGE, client_encoding); + #define UIM_RESTORE_TEXTDOMAIN_CODESET() \ +- bind_textdomain_codeset(GETTEXT_PACKAGE, orig_encoding); ++ bind_textdomain_codeset(GETTEXT_PACKAGE, orig_encoding); \ ++ free(orig_encoding); + #else /* ENABLE_NLS */ + #define UIM_PREPARE_SAVING_TEXTDOMAIN_CODESET() + #define UIM_SWITCH_TEXTDOMAIN_CODESET(uc) |