x11-misc/habak: Fix CFLAGS=-fno-common
authorJeroen Roovers <jer@gentoo.org>
Sun, 2 Feb 2020 09:40:07 +0000 (10:40 +0100)
committerJeroen Roovers <jer@gentoo.org>
Sun, 2 Feb 2020 09:40:39 +0000 (10:40 +0100)
Package-Manager: Portage-2.3.86, Repoman-2.3.20
Closes: https://bugs.gentoo.org/show_bug.cgi?id=707774
Signed-off-by: Jeroen Roovers <jer@gentoo.org>
x11-misc/habak/files/habak-0.2.5-fno-common.patch [new file with mode: 0644]
x11-misc/habak/habak-0.2.5-r3.ebuild

diff --git a/x11-misc/habak/files/habak-0.2.5-fno-common.patch b/x11-misc/habak/files/habak-0.2.5-fno-common.patch
new file mode 100644 (file)
index 0000000..0fad5f4
--- /dev/null
@@ -0,0 +1,33 @@
+--- a/src/random.c
++++ b/src/random.c
+@@ -8,12 +8,15 @@
+ #include <regex.h>
+ #include <errno.h>
++
++#include "i.h"
++
+ extern int errno;
+ int syserr;
+ #define ALLOC_STEP 1000
+ regex_t regexp;
+-int size_files=0, used_files=0, i=0;
++int size_files=0, used_files=0;
+ char **files, *wyjscie;
+ regmatch_t matchpos;
+--- a/src/habak.c
++++ b/src/habak.c
+@@ -14,6 +14,7 @@
+ #include <Imlib2.h>
+ #include "types.h"
+ #include "proto.h"
++#include "i.h"
+ habak_l *current_list_item=NULL, *first_list_item=NULL;
+ habak_t *current_habak;
+--- /dev/null
++++ b/src/i.h
+@@ -0,0 +1 @@
++extern int i;
index 1dcc37e3e7140fa558632ab497df8edae320705b..4279398d92dbcb50639161ed4739e2dcbafa94b6 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -23,6 +23,7 @@ DEPEND="
 "
 DOCS=( ChangeLog README TODO "${FILESDIR}"/README.en )
 PATCHES=(
+       "${FILESDIR}"/${P}-fno-common.patch
        "${FILESDIR}"/${P}-gentoo.patch
 )