commit:     7c1f5a1f4a79f5d2239904dab2689d515ba9d6ad
Author:     Jakov Smolic <jakov.smolic <AT> sartura <DOT> hr>
AuthorDate: Thu Nov 26 10:32:36 2020 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Thu Nov 26 10:32:36 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7c1f5a1f

x11-plugins/gkwebmon: fix build with gcc-10

Closes: https://bugs.gentoo.org/707226
Package-Manager: Portage-3.0.8, Repoman-3.0.1
Signed-off-by: Jakov Smolic <jakov.smolic <AT> sartura.hr>
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 ....patch => gkwebmon-0.2-cc-cflags-ldflags.patch} |  0
 .../gkwebmon/files/gkwebmon-0.2-fno-common.patch   | 38 ++++++++++++++++++++++
 x11-plugins/gkwebmon/gkwebmon-0.2-r2.ebuild        |  6 ++--
 3 files changed, 42 insertions(+), 2 deletions(-)

diff --git a/x11-plugins/gkwebmon/files/respect-cc-cflags-ldflags.patch 
b/x11-plugins/gkwebmon/files/gkwebmon-0.2-cc-cflags-ldflags.patch
similarity index 100%
rename from x11-plugins/gkwebmon/files/respect-cc-cflags-ldflags.patch
rename to x11-plugins/gkwebmon/files/gkwebmon-0.2-cc-cflags-ldflags.patch

diff --git a/x11-plugins/gkwebmon/files/gkwebmon-0.2-fno-common.patch 
b/x11-plugins/gkwebmon/files/gkwebmon-0.2-fno-common.patch
new file mode 100644
index 00000000000..9738177db6f
--- /dev/null
+++ b/x11-plugins/gkwebmon/files/gkwebmon-0.2-fno-common.patch
@@ -0,0 +1,38 @@
+--- a/webmon.c
++++ b/webmon.c
+@@ -7,6 +7,8 @@
+ #include <openssl/md5.h>
+ #include <pthread.h>
+ 
++int updatetime;
++
+ 
+ void clear_entry(int i)
+ {
+--- a/webmon.h
++++ b/webmon.h
+@@ -6,7 +6,7 @@
+ 
+ /* this is included in the saved config file */
+ 
+-int   updatetime;   /* how often to check webpages (in hours) */
++extern int    updatetime;   /* how often to check webpages (in hours) */
+ 
+ struct webinfo {
+   char          *urlData;       /* full url, pointed into by pointers below, 
internal '\0' */
+@@ -21,11 +21,13 @@ struct webinfo {
+   char                use;
+   char                updated; /* new md5 checksum in place */
+   char                flagged; /* a changed has been posted to tooltips for 
this entry */
+-} wi[20];
++};
++
++extern struct webinfo wi[20];
+ 
+ /* end of data for config file */
+ 
+-char wheretostore;  /* 0 == webinfo.init_md5, 1 == webinfo.new_md5 */
++extern char wheretostore;  /* 0 == webinfo.init_md5, 1 == webinfo.new_md5 */
+ 
+ void parse_url_to_config_struct(int i, gchar *instr);  /* parse URL and store 
data in webinfo struct */
+ char *make_url_from_config_struct(int i);

diff --git a/x11-plugins/gkwebmon/gkwebmon-0.2-r2.ebuild 
b/x11-plugins/gkwebmon/gkwebmon-0.2-r2.ebuild
index d7fc617e943..5a5387b6c02 100644
--- a/x11-plugins/gkwebmon/gkwebmon-0.2-r2.ebuild
+++ b/x11-plugins/gkwebmon/gkwebmon-0.2-r2.ebuild
@@ -12,7 +12,6 @@ SRC_URI="mirror://sourceforge/${PN}/${P}.tgz"
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~alpha ~amd64 ppc ~sparc x86"
-IUSE=""
 
 # The Makefile links with -lssl.
 RDEPEND="
@@ -20,7 +19,10 @@ RDEPEND="
        dev-libs/openssl:0="
 DEPEND="${RDEPEND}"
 
-PATCHES=( "${FILESDIR}"/respect-cc-cflags-ldflags.patch )
+PATCHES=(
+       "${FILESDIR}"/${P}-cc-cflags-ldflags.patch
+       "${FILESDIR}"/${P}-fno-common.patch
+)
 
 src_compile() {
        emake CC="$(tc-getCC)"

Reply via email to