app-text/tabler: Fix building with CFLAGS=-fno-common
authorJeroen Roovers <jer@gentoo.org>
Sun, 17 May 2020 12:26:47 +0000 (14:26 +0200)
committerJeroen Roovers <jer@gentoo.org>
Sun, 17 May 2020 12:27:53 +0000 (14:27 +0200)
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Closes: https://bugs.gentoo.org/706932
Signed-off-by: Jeroen Roovers <jer@gentoo.org>
app-text/tabler/files/tabler-2-fno-common.patch [new file with mode: 0644]
app-text/tabler/tabler-2-r1.ebuild

diff --git a/app-text/tabler/files/tabler-2-fno-common.patch b/app-text/tabler/files/tabler-2-fno-common.patch
new file mode 100644 (file)
index 0000000..b334880
--- /dev/null
@@ -0,0 +1,22 @@
+--- a/util.h
++++ b/util.h
+@@ -35,7 +35,7 @@
+ int digits(int n, int base);
+ char *replace_backslashed(char *string);
+-char *_strregtok_previous_end;
++extern char *_strregtok_previous_end;
+ char *strregtok(char *string, const regex_t *seperator);
+ #endif /* UTIL_H */
+--- a/util.c
++++ b/util.c
+@@ -32,6 +32,8 @@
+ #include "conf.h"
+ #include "util.h"
++char *_strregtok_previous_end;
++
+ /* replace_backslashed
+  *
+  * Replaces, within the given string, certain backslashed characters with the
index f727d216278fac073c160f8e520e8d03b4011f32..e39e7e2835a9659b1bbf42dd13c1e59731e33d0c 100644 (file)
@@ -1,7 +1,7 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI=7
 
 DESCRIPTION="A utility to create text art tables from delimited input"
 HOMEPAGE="https://sourceforge.net/projects/tabler/"
@@ -10,9 +10,9 @@ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="amd64 ppc x86"
-IUSE=""
-
-src_install() {
-       emake DESTDIR="${D}" install
-       dodoc AUTHORS ChangeLog README
-}
+PATCHES=(
+       "${FILESDIR}"/${P}-fno-common.patch
+)
+DOCS=(
+       AUTHORS ChangeLog README
+)