diff options
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.patch | 99 |
1 files changed, 78 insertions, 21 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 index 20fd29f96046..91aa55c1f12d 100644 --- a/x11-wm/icewm/files/icewm-1.3.9-fribidi.patch +++ b/x11-wm/icewm/files/icewm-1.3.9-fribidi.patch @@ -1,38 +1,95 @@ ---- icewm-1.3.9/configure.ac -+++ icewm-1.3.9/configure.ac -@@ -53,6 +53,17 @@ - features="$features i18n" +From 800fc7caa9728cebafee86d841ac23b6ffaa896b Mon Sep 17 00:00:00 2001 +From: Brian Bidulock <bidulock@openss7.org> +Date: Wed, 5 Nov 2014 03:25:44 -0700 +Subject: [PATCH] fribidi support (gentoo icewm-1.3.9-fribidi.patch) + + Also fixes several problems with the gentoo patch: + + 1) the patch modifies CORE_CFLAGS and CORE_LIBS before they + are first defined, confusing later PKG_CONFIG([CORE], ...) + so I moved it later in configure.ac + + 2) the patch uses the deprecated fribidi_log2vis, so I modified + src/yfontxft.cc to disabled deprecated symbols (because I + always test build with -Werror). + + 3) the patch ignores the return value of fribidi_log2vis() + causing another warning which -Werror turns into an error. + Changed to "if (fribidi_log2vis(...)) ;" to disable that. + + 4) fixed the configure.ac macro check for fribidi to only warn + when the library is not present but the feature has not + been disabled + + 5) add fribidi to configure.ac features list shown at end of + ./configure run (added xrandr and xinerama too...) +--- + configure.ac | 17 +++++++++++++++-- + src/yfontxft.cc | 47 +++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 62 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index dce4f1e..63d362f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -158,7 +158,8 @@ if test x$enable_xrandr != xno; then + PKG_CHECK_MODULES([XRANDR],[xrandr],[ + CORE_CFLAGS="$XRANDR_CFLAGS $CORE_CFLAGS" + CORE_LIBS="$XRANDR_LIBS $CORE_LIBS" +- AC_DEFINE([CONFIG_XRANDR],[1],[Define to enable XRANDR extension.])], ++ AC_DEFINE([CONFIG_XRANDR],[1],[Define to enable XRANDR extension.]) ++ features="$features xrandr"], + [AC_MSG_WARN([XRANDR not supported.])]) + fi + +@@ -270,10 +271,22 @@ if test x$enable_xinerama != xno ; then + PKG_CHECK_MODULES([XINERAMA],[xinerama],[ + CORE_CFLAGS="$XINERAMA_CFLAGS $CORE_CFLAGS" + CORE_LIBS="$XINERAMA_LIBS $CORE_LIBS" +- AC_DEFINE([XINERAMA],[1],[Define to enable Xinerama support.])], ++ AC_DEFINE([XINERAMA],[1],[Define to enable Xinerama support.]) ++ features="$features xinerama"], + [AC_MSG_WARN([XINERAMA is not supported.])]) fi +AC_ARG_ENABLE([fribidi], -+ AC_HELP_STRING([--disable-fribidi],[Disable right to left support])) ++ 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}" ++ PKG_CHECK_MODULES([FRIBIDI], [fribidi],[ ++ CORE_CFLAGS="$FRIBIDI_CFLAGS $CORE_CFLAGS" ++ CORE_LIBS="$FRIBIDI_LIBS $CORE_LIBS" ++ AC_DEFINE([CONFIG_FRIBIDI],[1],[Define to enable fribidi support.]) ++ features="$features fribidi"], ++ [AC_MSG_WARN([FRIBIDI is not supported.])]) +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 @@ + AC_ARG_ENABLE([prefs], + AC_HELP_STRING([--disable-prefs],[Disable configurable preferences.])) + if test x$enable_prefs = xno ; then +diff --git a/src/yfontxft.cc b/src/yfontxft.cc +index c200dc6..01b52f9 100644 +--- a/src/yfontxft.cc ++++ b/src/yfontxft.cc +@@ -6,6 +6,18 @@ #include "ypaint.h" #include "yxapp.h" #include "intl.h" +#include <stdio.h> + +#ifdef CONFIG_FRIBIDI -+ #include <fribidi/fribidi.h> ++ // remove deprecated warnings for now... ++ #include <fribidi/fribidi-config.h> ++ #if FRIBIDI_USE_GLIB+0 ++ #include <glib.h> ++ #undef G_GNUC_DEPRECATED ++ #define G_GNUC_DEPRECATED ++ #endif ++ #include <fribidi/fribidi.h> +#endif /******************************************************************************/ -@@ -69,10 +74,45 @@ +@@ -69,10 +81,45 @@ class XftGraphics { char_t * str, size_t len) { XftColor *c = *g.color(); @@ -56,10 +113,10 @@ + } + + FriBidiCharType pbase_dir = FRIBIDI_TYPE_N; -+ fribidi_log2vis(str, len, &pbase_dir, //input ++ if (fribidi_log2vis(str, len, &pbase_dir, //input + vis_str, // output + NULL, NULL, NULL // "statistics" that we don't need -+ ); ++ )) ; + str = vis_str; +#endif + |