diff options
author | Masatomo Nakano <nakano@gentoo.org> | 2003-06-24 21:36:09 +0000 |
---|---|---|
committer | Masatomo Nakano <nakano@gentoo.org> | 2003-06-24 21:36:09 +0000 |
commit | faa3d1579225cc238243df0f33a2792fb9dfe2ff (patch) | |
tree | 7723cd65b0e28802ee3795f4d5df0335c8491098 /x11-wm | |
parent | Added Japanese support. (diff) | |
download | gentoo-2-faa3d1579225cc238243df0f33a2792fb9dfe2ff.tar.gz gentoo-2-faa3d1579225cc238243df0f33a2792fb9dfe2ff.tar.bz2 gentoo-2-faa3d1579225cc238243df0f33a2792fb9dfe2ff.zip |
Added Japanese support.
Diffstat (limited to 'x11-wm')
-rw-r--r-- | x11-wm/fluxbox/ChangeLog | 6 | ||||
-rw-r--r-- | x11-wm/fluxbox/Manifest | 4 | ||||
-rw-r--r-- | x11-wm/fluxbox/files/fluxbox-0.1.14-ja.patch | 105 | ||||
-rw-r--r-- | x11-wm/fluxbox/fluxbox-0.1.14-r1.ebuild | 7 |
4 files changed, 117 insertions, 5 deletions
diff --git a/x11-wm/fluxbox/ChangeLog b/x11-wm/fluxbox/ChangeLog index 1ea4b8eabc90..7377f8d27d0e 100644 --- a/x11-wm/fluxbox/ChangeLog +++ b/x11-wm/fluxbox/ChangeLog @@ -1,6 +1,6 @@ # ChangeLog for x11-wm/fluxbox # Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/x11-wm/fluxbox/ChangeLog,v 1.56 2003/06/11 20:50:37 mkeadle Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-wm/fluxbox/ChangeLog,v 1.57 2003/06/24 21:36:01 nakano Exp $ *fluxbox-0.9.3 (11 Jun 2003) @@ -24,6 +24,10 @@ *fluxbox-0.1.14-r1 (10 Dec 2002) + 24 Jun 2003; Masatomo Nakano <nakano@gentoo.org> fluxbox-0.1.14-r1.ebuild, + files/fluxbox-0.1.14-ja.patch: + Added Japanese support. + 18 Apr 2003; Guy Martin <gmsoft@gentoo.org> fluxbox-0.1.14-r1.ebuild : Added hppa to KEYWORDS. diff --git a/x11-wm/fluxbox/Manifest b/x11-wm/fluxbox/Manifest index 726422e5d8e2..3b81be92afab 100644 --- a/x11-wm/fluxbox/Manifest +++ b/x11-wm/fluxbox/Manifest @@ -1,7 +1,7 @@ -MD5 b1e56848ace25cda82ba18aee3ca85d5 fluxbox-0.1.14-r1.ebuild 1334 +MD5 071bacf4ebfa5026becba44ae0290da2 fluxbox-0.1.14-r1.ebuild 1333 MD5 d9f8a622f8ad505d7659826e77d763cd fluxbox-0.9.3.ebuild 2720 MD5 94d32b105402009d58c28e7c46fccee3 fluxbox-0.9.0.ebuild 999 -MD5 dc729a00f2577a78d682f12bd6635ebb ChangeLog 13314 +MD5 10cd6e0f594be60b67b2071039c5bc5e ChangeLog 13450 MD5 534927faffc95004edaa95f7adf436fe fluxbox-0.1.12-r1.ebuild 1029 MD5 f0a0494829d2f32f6c17073ebb87f60a files/fluxbox-0.1.13-nls.patch 581 MD5 ecd86299d1554e7b08784e43077c2d32 files/fluxbox-0.1.14-ja.patch 2459 diff --git a/x11-wm/fluxbox/files/fluxbox-0.1.14-ja.patch b/x11-wm/fluxbox/files/fluxbox-0.1.14-ja.patch new file mode 100644 index 000000000000..37ae4284eb4d --- /dev/null +++ b/x11-wm/fluxbox/files/fluxbox-0.1.14-ja.patch @@ -0,0 +1,105 @@ +diff -uNr fluxbox-0.1.14-orig/src/FbTk/XftFontImp.cc fluxbox-0.1.14/src/FbTk/XftFontImp.cc +--- fluxbox-0.1.14-orig/src/FbTk/XftFontImp.cc 2002-11-27 01:01:27.000000000 +0900 ++++ fluxbox-0.1.14/src/FbTk/XftFontImp.cc 2002-12-10 08:56:04.000000000 +0900 +@@ -24,11 +24,46 @@ + #include "XftFontImp.hh" + #include "App.hh" + ++#include <langinfo.h> ++#include <iconv.h> ++#include <errno.h> ++ + #ifdef HAVE_CONFIG_H + #include "config.h" + #endif //HAVE_CONFIG_H + namespace FbTk { + ++extern "C" { ++ ++static char * locale_to_utf8 (const char *text) ++{ ++ char *loc; ++ char *utf_str, *from, *to; ++ static iconv_t conv = (iconv_t)-1; ++ size_t from_len, to_len; ++ size_t r; ++ if (conv == (iconv_t)-1) { ++ loc = (char *)strdup (nl_langinfo (CODESET)); ++ conv = iconv_open ("UTF-8", loc); ++ free (loc); ++ } ++ from = (char *)text; ++ from_len = strlen (text); ++ to_len = from_len * 6 + 1; ++ utf_str = to = (char *)malloc ((sizeof (char)) * from_len * 6 + 1); ++ r = iconv (conv, &from, &from_len, &to, &to_len); ++ // success or incomplete sequence ++ if (r != (size_t)-1 || errno == EINVAL) { ++ *to = '\0'; ++ utf_str = (char *)realloc (utf_str, strlen (utf_str) + 1); ++ return utf_str; ++ } ++ free (utf_str); ++ return strdup (text); ++} ++ ++} ++ + XftFontImp::XftFontImp(const char *name, bool utf8):m_xftfont(0), + m_utf8mode(utf8) { + if (name != 0) +@@ -99,7 +134,17 @@ + x, y, + (XftChar8 *)(text), len); + } else +-#endif // HAVE_XFT_UTF8_STRING ++ { ++ char *utf_str = locale_to_utf8 (text); ++ size_t utf_len = strlen (utf_str); ++ XftDrawStringUtf8(draw, ++ &xftcolor, ++ m_xftfont, ++ x, y, ++ (XftChar8 *)(utf_str), utf_len); ++ free (utf_str); ++ } ++#else + { + XftDrawString8(draw, + &xftcolor, +@@ -107,6 +152,7 @@ + x, y, + (XftChar8 *)(text), len); + } ++#endif // HAVE_XFT_UTF8_STRING + + XftColorFree(disp, DefaultVisual(disp, screen), + DefaultColormap(disp, screen), &xftcolor); +@@ -124,13 +170,26 @@ + (XftChar8 *)text, len, + &ginfo); + } else +-#endif //HAVE_XFT_UTF8_STRING ++ { ++ char *tmp = strdup(text); ++ tmp[len] = '\0'; ++ char *utf_str = locale_to_utf8 (tmp); ++ size_t utf_len = strlen (utf_str); ++ XftTextExtentsUtf8(App::instance()->display(), ++ m_xftfont, ++ (XftChar8 *)utf_str, utf_len, ++ &ginfo); ++ free (utf_str); ++ free (tmp); ++ } ++#else + { + XftTextExtents8(App::instance()->display(), + m_xftfont, + (XftChar8 *)text, len, + &ginfo); + } ++#endif //HAVE_XFT_UTF8_STRING + return ginfo.xOff; + } + diff --git a/x11-wm/fluxbox/fluxbox-0.1.14-r1.ebuild b/x11-wm/fluxbox/fluxbox-0.1.14-r1.ebuild index 95fb74b71c8c..d397aa4f2ac3 100644 --- a/x11-wm/fluxbox/fluxbox-0.1.14-r1.ebuild +++ b/x11-wm/fluxbox/fluxbox-0.1.14-r1.ebuild @@ -1,8 +1,8 @@ # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/x11-wm/fluxbox/fluxbox-0.1.14-r1.ebuild,v 1.7 2003/06/03 20:53:52 mkeadle Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-wm/fluxbox/fluxbox-0.1.14-r1.ebuild,v 1.8 2003/06/24 21:36:01 nakano Exp $ -IUSE="kde gnome nls xinerama truetype" +IUSE="kde gnome nls xinerama truetype cjk" inherit commonbox flag-o-matic eutils @@ -35,6 +35,9 @@ src_unpack() { # Vano menu destroy patch epatch ${FILESDIR}/${PN}-vano-gentoo.patch + if [ `use cjk` ]; then + epatch ${FILESDIR}/${P}-ja.patch + fi } src_compile() { |