View | Details | Raw Unified | Return to bug 195756 | Differences between
and this patch

Collapse All | Expand All

(-)x11/dzen2/Makefile (-6 / +12 lines)
Lines 2-21 Link Here
2
# $FreeBSD: head/x11/dzen2/Makefile 363034 2014-07-27 10:02:09Z marino $
2
# $FreeBSD: head/x11/dzen2/Makefile 363034 2014-07-27 10:02:09Z marino $
3
3
4
PORTNAME=	dzen2
4
PORTNAME=	dzen2
5
PORTVERSION=	0.8.5
5
PORTVERSION=	0.9.5
6
PORTREVISION=	2
7
CATEGORIES=	x11
6
CATEGORIES=	x11
8
MASTER_SITES=	http://gotmor.googlepages.com/
9
7
10
MAINTAINER=	udvzsolt@gmail.com
8
MAINTAINER=	udvzsolt@gmail.com
11
COMMENT=	General purpose messaging, notification and menuing program for X11
9
COMMENT=	General purpose messaging, notification and menuing program for X11
12
10
13
LICENSE=	MIT
11
LICENSE=	MIT
14
12
13
USE_GITHUB=     yes
14
GH_ACCOUNT=     robm
15
GH_PROJECT=     dzen
16
GH_COMMIT=      488ab66
17
GH_TAGNAME=	488ab66019
18
15
USE_XORG=	x11
19
USE_XORG=	x11
16
20
17
OPTIONS_DEFINE=	EXAMPLES GADGETS XPM XINERAMA
21
OPTIONS_DEFINE=	EXAMPLES GADGETS XPM XINERAMA XFT
18
OPTIONS_DEFAULT=	XPM XINERAMA
22
OPTIONS_DEFAULT=	XPM XFT XINERAMA
19
GADGETS_DESC=Build and install gadgets
23
GADGETS_DESC=Build and install gadgets
20
OPTIONS_SUB=yes
24
OPTIONS_SUB=yes
21
25
Lines 29-35 Link Here
29
XPM_LDFLAGS=	-lXpm
33
XPM_LDFLAGS=	-lXpm
30
XINERAMA_USE=	XORG=xinerama
34
XINERAMA_USE=	XORG=xinerama
31
XINERAMA_LDFLAGS=	-lXinerama
35
XINERAMA_LDFLAGS=	-lXinerama
32
XINERAMA_CLAGS=	-DDZEN_XINERAMA
36
XINERAMA_CFLAGS=	-DDZEN_XINERAMA
37
XFT_CFLAGS=	-DDZEN_XFT -I${LOCALBASE}/include/freetype2
38
XFT_USE=	XORG=xft
33
39
34
MAKE_ARGS+=	LDFLAGS="${LDFLAGS} \$${LIBS}" \
40
MAKE_ARGS+=	LDFLAGS="${LDFLAGS} \$${LIBS}" \
35
		CFLAGS="${CFLAGS} ${INCS} -DVERSION=\\\"\$${VERSION}\\\""
41
		CFLAGS="${CFLAGS} ${INCS} -DVERSION=\\\"\$${VERSION}\\\""
(-)x11/dzen2/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (dzen2-0.8.5.tar.gz) = 5e4ce96e8ed22a4a0ad6cfafacdde0532d13d049d77744214b196c4b2bcddff9
1
SHA256 (dzen2-0.9.5.tar.gz) = d4f7943cd39dc23fd825eb684b49dc3484860fa8443d30b06ee38af72a53b556
2
SIZE (dzen2-0.8.5.tar.gz) = 33274
2
SIZE (dzen2-0.9.5.tar.gz) = 38178
(-)x11/dzen2/files/patch-Xft (+115 lines)
Line 0 Link Here
1
--- draw.c.orig	2013-09-23 11:57:39.000000000 +0200
2
+++ draw.c	2014-12-06 20:30:50.785932524 +0100
3
@@ -395,21 +395,20 @@
4
 	XpmColorSymbol xpms;
5
 #endif
6
 
7
+	/* icon cache */
8
+	int ip;
9
+
10
 #ifdef DZEN_XFT
11
 	XftDraw *xftd=NULL;
12
 	XftColor xftc;
13
 	char *xftcs;
14
-	int xftcs_f=0;
15
 	char *xftcs_bg;
16
-	int xftcs_bgf=0;
17
 
18
-	xftcs    = (char *)dzen.fg;
19
-    xftcs_bg = (char *)dzen.bg;
20
+	/* set default fg/bg for XFT */
21
+	xftcs = estrdup(dzen.fg);
22
+	xftcs_bg = estrdup(dzen.bg);
23
 #endif
24
 
25
-	/* icon cache */
26
-	int ip;
27
-
28
 	/* parse line and return the text without control commands */
29
 	if(nodraw) {
30
 		rbuf = emalloc(MAX_LINE_LEN);
31
@@ -446,8 +445,7 @@
32
 			xpms.pixel = dzen.norm[ColBG];
33
 #endif
34
 #ifdef DZEN_XFT
35
-			xftcs_bg = (char *)dzen.bg;
36
-			xftcs_bgf = 0;
37
+			xftcs_bg = estrdup(dzen.bg);
38
 #endif
39
 		}
40
 		else {
41
@@ -679,15 +677,9 @@
42
 						case bg:
43
 							lastbg = tval[0] ? (unsigned)getcolor(tval) : dzen.norm[ColBG];
44
 #ifdef DZEN_XFT
45
-							if(xftcs_bgf) free(xftcs_bg);				
46
-							if(tval[0]) {
47
-								xftcs_bg = estrdup(tval);
48
-								xftcs_bgf = 1;
49
-							} else {
50
-								xftcs_bg = (char *)dzen.bg;
51
-								xftcs_bgf = 0;
52
-							}
53
-#endif							
54
+							if(xftcs_bg) free(xftcs_bg);
55
+							xftcs_bg = estrdup(tval[0] ? tval : dzen.bg);
56
+#endif
57
 
58
 							break;
59
 
60
@@ -695,19 +687,14 @@
61
 							lastfg = tval[0] ? (unsigned)getcolor(tval) : dzen.norm[ColFG];
62
 							XSetForeground(dzen.dpy, dzen.tgc, lastfg);
63
 #ifdef DZEN_XFT
64
-							if(tval[0]) {
65
-								xftcs = estrdup(tval);
66
-								xftcs_f = 1;
67
-							} else {
68
-								xftcs = (char *)dzen.fg;
69
-								xftcs_f = 0;
70
-							}
71
-#endif							
72
+							if (xftcs) free(xftcs);
73
+							xftcs = estrdup(tval[0] ? tval : dzen.fg);
74
+#endif
75
 							break;
76
 
77
 						case fn:
78
 							if(tval[0]) {
79
-#ifndef DZEN_XFT		
80
+#ifndef DZEN_XFT
81
 								if(!strncmp(tval, "dfnt", 4)) {
82
 									cur_fnt = &(dzen.fnpl[atoi(tval+4)]);
83
 
84
@@ -816,18 +803,8 @@
85
 						DefaultColormap(dzen.dpy, dzen.screen),  xftcs,  &xftc);
86
 				}
87
 
88
-				XftDrawStringUtf8(xftd, &xftc, 
89
+				XftDrawStringUtf8(xftd, &xftc,
90
 						cur_fnt->xftfont, px, py + dzen.font.xftfont->ascent, (const FcChar8 *)lbuf, strlen(lbuf));
91
-
92
-				if(xftcs_f) {
93
-					free(xftcs);
94
-					xftcs_f = 0;
95
-				}
96
-				if(xftcs_bgf) {
97
-					free(xftcs_bg);
98
-					xftcs_bgf = 0;
99
-				}
100
-
101
 #endif
102
 
103
 				max_y = MAX(max_y, py+dzen.font.height);
104
@@ -920,6 +897,11 @@
105
 #endif
106
 	}
107
 
108
+#ifdef DZEN_XFT
109
+	if(xftcs) free(xftcs);
110
+	if(xftcs_bg) free(xftcs_bg);
111
+#endif
112
+
113
 	return nodraw ? rbuf : NULL;
114
 }
115
 
(-)x11/dzen2/files/patch-gadgets__kittscanner.sh (-17 lines)
Lines 1-17 Link Here
1
--- ./gadgets/kittscanner.sh.orig	2014-06-17 15:00:13.000000000 +0200
2
+++ ./gadgets/kittscanner.sh	2014-06-17 15:00:24.000000000 +0200
3
@@ -19,10 +19,10 @@
4
 
5
 SLEEP=0.1
6
 
7
-#DZEN=/usr/local/bin/dzen2
8
-DZEN=../dzen2
9
-#DZENOPTS="-bg $BG -fg $INACTIVE_LED_COLOR"
10
-DZENOPTS="-bg $BG -fg $INACTIVE_LED_COLOR -xs 1 -y 30"
11
+DZEN=/usr/local/bin/dzen2
12
+#DZEN=../dzen2
13
+DZENOPTS="-bg $BG -fg $INACTIVE_LED_COLOR"
14
+#DZENOPTS="-bg $BG -fg $INACTIVE_LED_COLOR -xs 1 -y 30"
15
 
16
 #-----------------------------------------------------------------------
17
 
(-)x11/dzen2/pkg-descr (-1 / +1 lines)
Lines 3-6 Link Here
3
integrate well with window managers like dwm, wmii and xmonad though
3
integrate well with window managers like dwm, wmii and xmonad though
4
it will work with any windowmanger.
4
it will work with any windowmanger.
5
5
6
WWW: http://gotmor.googlepages.com/dzen
6
WWW: https://github.com/robm/dzen

Return to bug 195756