commit:     129f4ab9f8571c651937c46ba7bd4c82d6d052a2
Author:     Sebastian Pipping <sping <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 26 18:33:02 2020 +0000
Commit:     Sebastian Pipping <sping <AT> gentoo <DOT> org>
CommitDate: Thu Nov 26 18:36:37 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=129f4ab9

dev-libs/libowfat: Fix compile with GCC 10 for www-servers/gatling

Closes: https://bugs.gentoo.org/756847
Signed-off-by: Sebastian Pipping <sping <AT> gentoo.org>
Package-Manager: Portage-3.0.0, Repoman-2.3.23

 dev-libs/libowfat/files/libowfat-0.32-gcc10.patch | 25 ++++++++++++
 dev-libs/libowfat/libowfat-0.32-r2.ebuild         | 49 +++++++++++++++++++++++
 2 files changed, 74 insertions(+)

diff --git a/dev-libs/libowfat/files/libowfat-0.32-gcc10.patch 
b/dev-libs/libowfat/files/libowfat-0.32-gcc10.patch
new file mode 100644
index 00000000000..3f292430431
--- /dev/null
+++ b/dev-libs/libowfat/files/libowfat-0.32-gcc10.patch
@@ -0,0 +1,25 @@
+From 67729f54c2e7a24b2bebfa23b75afe607c09a67a Mon Sep 17 00:00:00 2001
+From: Sebastian Pipping <[email protected]>
+Date: Thu, 26 Nov 2020 19:28:03 +0100
+Subject: [PATCH] Fix build with -fno-common or GCC 10
+
+---
+ io_internal.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/io_internal.h b/io_internal.h
+index 6d37c11..3e378d9 100644
+--- a/io_internal.h
++++ b/io_internal.h
+@@ -83,7 +83,7 @@ my_extern array io_pollfds;
+ my_extern long first_readable;
+ my_extern long first_writeable;
+ 
+-my_extern long first_deferred;
++extern long first_deferred;
+ 
+ my_extern enum __io_waitmode {
+   UNDECIDED,
+-- 
+2.27.0
+

diff --git a/dev-libs/libowfat/libowfat-0.32-r2.ebuild 
b/dev-libs/libowfat/libowfat-0.32-r2.ebuild
new file mode 100644
index 00000000000..6e711f600ef
--- /dev/null
+++ b/dev-libs/libowfat/libowfat-0.32-r2.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="reimplement libdjb - excellent libraries from Dan Bernstein"
+SRC_URI="https://www.fefe.de/${PN}/${P}.tar.xz";
+HOMEPAGE="https://www.fefe.de/libowfat/";
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~sparc ~x86"
+IUSE="diet"
+
+RDEPEND="diet? ( >=dev-libs/dietlibc-0.33_pre20090721 )"
+DEPEND="${RDEPEND}
+       >=sys-apps/sed-4"
+
+PATCHES=(
+       "${FILESDIR}"/${P}-gcc10.patch
+)
+
+pkg_setup() {
+       # Required for mult/umult64.c to be usable
+       append-flags -fomit-frame-pointer
+}
+
+src_compile() {
+       emake \
+               CC=$(tc-getCC) \
+               CFLAGS="-I. ${CFLAGS}" \
+               DIET="${EPREFIX}/usr/bin/diet -Os" \
+               prefix="${EPREFIX}/usr" \
+               INCLUDEDIR="${EPREFIX}/usr/include" \
+               $( use diet || echo 'DIET=' )
+}
+
+src_install() {
+       emake \
+               DESTDIR="${D}" \
+               LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
+               MAN3DIR="${EPREFIX}/usr/share/man/man3" \
+               INCLUDEDIR="${EPREFIX}/usr/include" \
+               install
+
+       mv "${ED}"/usr/share/man/man3/{buffer.3,owfat-buffer.3} || die
+}

Reply via email to