pkgsrc-Changes archive

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

CVS commit: pkgsrc/wm/dwm



Module Name:    pkgsrc
Committed By:   leot
Date:           Sun Mar  3 13:36:43 UTC 2019

Modified Files:
        pkgsrc/wm/dwm: distinfo
Added Files:
        pkgsrc/wm/dwm/patches: patch-drw.c

Log Message:
dwm: fix build with older fontconfig

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


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 pkgsrc/wm/dwm/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/wm/dwm/patches/patch-drw.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/wm/dwm/distinfo
diff -u pkgsrc/wm/dwm/distinfo:1.16 pkgsrc/wm/dwm/distinfo:1.17
--- pkgsrc/wm/dwm/distinfo:1.16 Sun Feb  3 22:03:41 2019
+++ pkgsrc/wm/dwm/distinfo      Sun Mar  3 13:36:43 2019
@@ -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

Added files:

Index: pkgsrc/wm/dwm/patches/patch-drw.c
diff -u /dev/null pkgsrc/wm/dwm/patches/patch-drw.c:1.1
--- /dev/null   Sun Mar  3 13:36:43 2019
+++ pkgsrc/wm/dwm/patches/patch-drw.c   Sun Mar  3 13:36:43 2019
@@ -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