pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/x11/dmenu dmenu: fix build on older fontconfig (NetBSD...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/9e54685b2b13
branches:  trunk
changeset: 330462:9e54685b2b13
user:      maya <maya%pkgsrc.org@localhost>
date:      Sun Mar 03 13:12:03 2019 +0000

description:
dmenu: fix build on older fontconfig (NetBSD 8.0)

diffstat:

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

diffs (49 lines):

diff -r 58fde9f91f9b -r 9e54685b2b13 x11/dmenu/distinfo
--- a/x11/dmenu/distinfo        Sun Mar 03 12:32:50 2019 +0000
+++ b/x11/dmenu/distinfo        Sun Mar 03 13:12:03 2019 +0000
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.12 2019/02/03 21:54:01 leot Exp $
+$NetBSD: distinfo,v 1.13 2019/03/03 13:12:03 maya Exp $
 
 SHA1 (dmenu-4.9.tar.gz) = 73d1a9a844e8f285fc315ea4ee5b95da2b0bc8f4
 RMD160 (dmenu-4.9.tar.gz) = fbaf4597df4596e0e7b1bf85adac5aa222e60469
 SHA512 (dmenu-4.9.tar.gz) = c2779209fe012de8ca1cdd72923da6d594f4a8368c85c3c0e0afd4ae489a95fe0e6f05a947d115b6b389aa7170ab14c2c645a2031353b0a08f38327ab461fe65
 Size (dmenu-4.9.tar.gz) = 15972 bytes
+SHA1 (patch-drw.c) = c391b7ac6f60cce02d63c09c8cfb23ec5d3d46ef
diff -r 58fde9f91f9b -r 9e54685b2b13 x11/dmenu/patches/patch-drw.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/dmenu/patches/patch-drw.c     Sun Mar 03 13:12:03 2019 +0000
@@ -0,0 +1,33 @@
+$NetBSD: patch-drw.c,v 1.1 2019/03/03 13:12:03 maya 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