pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/wm/dwm dwm: fix build with older fontconfig



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ff074b89e8b2
branches:  trunk
changeset: 330463:ff074b89e8b2
user:      leot <leot%pkgsrc.org@localhost>
date:      Sun Mar 03 13:36:43 2019 +0000

description:
dwm: fix build with older fontconfig

>From and thanks to <maya> for patching it in x11/dmenu!

diffstat:

 wm/dwm/distinfo            |   3 ++-
 wm/dwm/patches/patch-drw.c |  33 +++++++++++++++++++++++++++++++++
 2 files changed, 35 insertions(+), 1 deletions(-)

diffs (49 lines):

diff -r 9e54685b2b13 -r ff074b89e8b2 wm/dwm/distinfo
--- a/wm/dwm/distinfo   Sun Mar 03 13:12:03 2019 +0000
+++ b/wm/dwm/distinfo   Sun Mar 03 13:36:43 2019 +0000
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.16 2019/02/03 22:03:41 leot Exp $
+$NetBSD: distinfo,v 1.17 2019/03/03 13:36:43 leot Exp $
 
 SHA1 (dwm-6.2.tar.gz) = 3b73a7830b060f46cb9165ea951be7c08f6eae33
 RMD160 (dwm-6.2.tar.gz) = 4b105f6a032f6e5db916b876c421f16e5f5ab6dc
 SHA512 (dwm-6.2.tar.gz) = 01abcab954e5b7c20d011e6fd9c28025271fea2e85610c928812f7c6a09f99d7f9e93d11ffc2d6a7aca894b3fa7e507c6c2fe5f26ff5ddcfc650a9bbaaa41e06
 Size (dwm-6.2.tar.gz) = 25273 bytes
+SHA1 (patch-drw.c) = c391b7ac6f60cce02d63c09c8cfb23ec5d3d46ef
diff -r 9e54685b2b13 -r ff074b89e8b2 wm/dwm/patches/patch-drw.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/wm/dwm/patches/patch-drw.c        Sun Mar 03 13:36:43 2019 +0000
@@ -0,0 +1,33 @@
+$NetBSD: patch-drw.c,v 1.1 2019/03/03 13:36:43 leot Exp $
+
+Workaround FC_COLOR not being available on fontconfig < 2.11.91
+(NetBSD-8.0)
+
+This is mostly code to reject colored fonts, so ifdef'ing it out is safe.
+
+--- drw.c.orig 2019-02-02 12:55:02.000000000 +0000
++++ drw.c
+@@ -139,11 +139,13 @@ xfont_create(Drw *drw, const char *fontn
+        * https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=916349
+        * and lots more all over the internet.
+        */
++#ifdef FC_COLOR
+       FcBool iscol;
+       if(FcPatternGetBool(xfont->pattern, FC_COLOR, 0, &iscol) == FcResultMatch && iscol) {
+               XftFontClose(drw->dpy, xfont);
+               return NULL;
+       }
++#endif
+ 
+       font = ecalloc(1, sizeof(Fnt));
+       font->xfont = xfont;
+@@ -350,7 +352,9 @@ drw_text(Drw *drw, int x, int y, unsigne
+                       fcpattern = FcPatternDuplicate(drw->fonts->pattern);
+                       FcPatternAddCharSet(fcpattern, FC_CHARSET, fccharset);
+                       FcPatternAddBool(fcpattern, FC_SCALABLE, FcTrue);
++#ifdef FC_COLOR
+                       FcPatternAddBool(fcpattern, FC_COLOR, FcFalse);
++#endif
+ 
+                       FcConfigSubstitute(NULL, fcpattern, FcMatchPattern);
+                       FcDefaultSubstitute(fcpattern);



Home | Main Index | Thread Index | Old Index