diff options
author | maya <maya@pkgsrc.org> | 2019-03-03 13:12:03 +0000 |
---|---|---|
committer | maya <maya@pkgsrc.org> | 2019-03-03 13:12:03 +0000 |
commit | 5531a330eac6b4341d3b90a143290c204b930cae (patch) | |
tree | 206fa540f028bc31e602a5139795200caf0eab6a | |
parent | 9a8038996636dccbcd68735fef7679d52e6ee37d (diff) | |
download | pkgsrc-5531a330eac6b4341d3b90a143290c204b930cae.tar.gz |
dmenu: fix build on older fontconfig (NetBSD 8.0)
-rw-r--r-- | x11/dmenu/distinfo | 3 | ||||
-rw-r--r-- | x11/dmenu/patches/patch-drw.c | 33 |
2 files changed, 35 insertions, 1 deletions
diff --git a/x11/dmenu/distinfo b/x11/dmenu/distinfo index fc98bea3015..23edd49bcff 100644 --- a/x11/dmenu/distinfo +++ b/x11/dmenu/distinfo @@ -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 --git a/x11/dmenu/patches/patch-drw.c b/x11/dmenu/patches/patch-drw.c new file mode 100644 index 00000000000..89246303d58 --- /dev/null +++ b/x11/dmenu/patches/patch-drw.c @@ -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); |