summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2014-11-02 19:13:46 +0000
committerLars Wendler <polynomial-c@gentoo.org>2014-11-02 19:13:46 +0000
commitf23ec70206626db8e7c6329d4af9d7dfe86afc50 (patch)
treea7566f1be75774187e4f06d91e83ac995243034b /x11-wm/icewm/files/icewm-1.3.9-fribidi.patch
parentVersion bump. Bug #527972 (diff)
downloadhistorical-f23ec70206626db8e7c6329d4af9d7dfe86afc50.tar.gz
historical-f23ec70206626db8e7c6329d4af9d7dfe86afc50.tar.bz2
historical-f23ec70206626db8e7c6329d4af9d7dfe86afc50.zip
Version bump (bug #525212). Removed old (bug #525022)
Package-Manager: portage-2.2.14/cvs/Linux x86_64 Manifest-Sign-Key: 0x981CA6FC
Diffstat (limited to 'x11-wm/icewm/files/icewm-1.3.9-fribidi.patch')
-rw-r--r--x11-wm/icewm/files/icewm-1.3.9-fribidi.patch80
1 files changed, 80 insertions, 0 deletions
diff --git a/x11-wm/icewm/files/icewm-1.3.9-fribidi.patch b/x11-wm/icewm/files/icewm-1.3.9-fribidi.patch
new file mode 100644
index 000000000000..20fd29f96046
--- /dev/null
+++ b/x11-wm/icewm/files/icewm-1.3.9-fribidi.patch
@@ -0,0 +1,80 @@
+--- icewm-1.3.9/configure.ac
++++ icewm-1.3.9/configure.ac
+@@ -53,6 +53,17 @@
+ features="$features i18n"
+ fi
+
++AC_ARG_ENABLE([fribidi],
++ AC_HELP_STRING([--disable-fribidi],[Disable right to left support]))
++if test "$enable_fribidi" != "no" && test "$enable_i18n" != "no"; then
++ PKG_CHECK_MODULES(FRIBIDI, fribidi)
++
++ AC_DEFINE(CONFIG_FRIBIDI,1, [Define to enable fribidi support])
++
++ CORE_CFLAGS="${CORE_CFLAGS} ${FRIBIDI_CFLAGS}"
++ CORE_LIBS="${CORE_LIBS} ${FRIBIDI_LIBS}"
++fi
++
+ AC_ARG_WITH([unicode-set],
+ AC_HELP_STRING([--with-unicode-set=CODESET],[Your iconv unicode set in
+ machine endian encoding (e.g. WCHAR_T, UCS-4-INTERNAL, UCS-4LE,
+--- icewm-1.3.9/src/yfontxft.cc
++++ icewm-1.3.9/src/yfontxft.cc
+@@ -6,6 +6,11 @@
+ #include "ypaint.h"
+ #include "yxapp.h"
+ #include "intl.h"
++#include <stdio.h>
++
++#ifdef CONFIG_FRIBIDI
++ #include <fribidi/fribidi.h>
++#endif
+
+ /******************************************************************************/
+
+@@ -69,10 +74,45 @@
+ char_t * str, size_t len)
+ {
+ XftColor *c = *g.color();
++
++#ifdef CONFIG_FRIBIDI
++
++#define STATIS_STRING_SIZE 256
++
++ // Based around upstream (1.3.2) patch with some optimization
++ // on my end. (reduce unnecessary memory allocation)
++ // - Gilboa
++
++ char_t static_str[STATIS_STRING_SIZE];
++ char_t *vis_str = static_str;
++
++ if (len >= STATIS_STRING_SIZE)
++ {
++ vis_str = new char_t[len+1];
++ if (!vis_str)
++ return;
++ }
++
++ FriBidiCharType pbase_dir = FRIBIDI_TYPE_N;
++ fribidi_log2vis(str, len, &pbase_dir, //input
++ vis_str, // output
++ NULL, NULL, NULL // "statistics" that we don't need
++ );
++ str = vis_str;
++#endif
++
+ XftDrawString(g.handleXft(), c, font,
+ x - g.xorigin(),
+ y - g.yorigin(),
+ str, len);
++
++#ifdef CONFIG_FRIBIDI
++
++ if (vis_str != static_str)
++ delete[] str;
++
++#endif
++
+ }
+
+ static void textExtents(XftFont * font, char_t * str, size_t len,