summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Pielmeier <billie@gentoo.org>2016-09-10 12:08:05 +0200
committerDaniel Pielmeier <billie@gentoo.org>2016-09-10 12:08:05 +0200
commitd8f3459654138b9a74cb2100d99957f7892c1e21 (patch)
treeb50aad91278be282b9caf4c0f441eef5b5e598fb
parentsys-devel/clang: marked ~x86-macos (diff)
downloadgentoo-d8f3459654138b9a74cb2100d99957f7892c1e21.tar.gz
gentoo-d8f3459654138b9a74cb2100d99957f7892c1e21.tar.bz2
gentoo-d8f3459654138b9a74cb2100d99957f7892c1e21.zip
app-admin/conky: Fix build without X11. Bug #592252.
Thanks to Toralf Förster for the report. Package-Manager: portage-2.2.28
-rw-r--r--app-admin/conky/conky-1.10.4.ebuild2
-rw-r--r--app-admin/conky/files/conky-1.10.4-x11-build.patch31
2 files changed, 33 insertions, 0 deletions
diff --git a/app-admin/conky/conky-1.10.4.ebuild b/app-admin/conky/conky-1.10.4.ebuild
index a660756b02e..ab4f01482e9 100644
--- a/app-admin/conky/conky-1.10.4.ebuild
+++ b/app-admin/conky/conky-1.10.4.ebuild
@@ -74,6 +74,8 @@ CONFIG_CHECK=~IPV6
DOCS=( README.md TODO ChangeLog NEWS AUTHORS )
+PATCHES=( "${FILESDIR}"/${P}-x11-build.patch )
+
DISABLE_AUTOFORMATTING="yes"
DOC_CONTENTS="You can find sample configurations at ${ROOT%/}/usr/share/doc/${PF}.
To customize, copy to ${XDG_CONFIG_HOME}/conky/conky.conf
diff --git a/app-admin/conky/files/conky-1.10.4-x11-build.patch b/app-admin/conky/files/conky-1.10.4-x11-build.patch
new file mode 100644
index 00000000000..eb113a47fd5
--- /dev/null
+++ b/app-admin/conky/files/conky-1.10.4-x11-build.patch
@@ -0,0 +1,31 @@
+From 178015a9495b7d40031ed7459e4f6b6731633a7c Mon Sep 17 00:00:00 2001
+From: shizeeg <shizeeque@gmail.com>
+Date: Thu, 8 Sep 2016 18:24:29 +0300
+Subject: [PATCH] Fix build without X11 (#317)
+
+---
+ src/conky.cc | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/conky.cc b/src/conky.cc
+index 0a812fc..4c5da94 100644
+--- a/src/conky.cc
++++ b/src/conky.cc
+@@ -1404,6 +1404,9 @@ static void draw_string(const char *s)
+
+ int draw_each_line_inner(char *s, int special_index, int last_special_applied)
+ {
++#ifndef BUILD_X11
++ static int cur_x, cur_y; /* current x and y for drawing */
++#endif
+ #ifdef BUILD_X11
+ int font_h = 0;
+ int cur_y_add = 0;
+@@ -1934,6 +1937,7 @@ static void draw_text(void)
+
+ static void draw_stuff(void)
+ {
++ static int text_offset_x, text_offset_y; /* offset for start position */
+ text_offset_x = text_offset_y = 0;
+ #ifdef BUILD_IMLIB2
+ cimlib_render(text_start_x, text_start_y, window.width, window.height);