commit:     d540cd1f90c6cac3c4e81401f42ebf4c769ca7b6
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 11 11:38:15 2022 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Tue Oct 11 11:42:32 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d540cd1f

sci-mathematics/otter: fix lto mismatch + build w/ upcoming clang16

Closes: https://bugs.gentoo.org/863257
Closes: https://bugs.gentoo.org/871423
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 .../otter/files/otter-3.3-clang16.patch            | 23 ++++++++++++++++++++++
 .../{otter-3.3-r3.ebuild => otter-3.3-r4.ebuild}   |  7 +++++--
 2 files changed, 28 insertions(+), 2 deletions(-)

diff --git a/sci-mathematics/otter/files/otter-3.3-clang16.patch 
b/sci-mathematics/otter/files/otter-3.3-clang16.patch
new file mode 100644
index 000000000000..d70400e4feba
--- /dev/null
+++ b/sci-mathematics/otter/files/otter-3.3-clang16.patch
@@ -0,0 +1,23 @@
+https://bugs.gentoo.org/863257
+https://bugs.gentoo.org/871423
+--- a/mace2/anldp.c
++++ b/mace2/anldp.c
+@@ -51,2 +51,4 @@
+ 
++#include "../source/header.h"
++
+ int First_order;        /* used by dp.c */
+--- a/source/formed/display.c
++++ b/source/formed/display.c
+@@ -588,3 +588,3 @@
+ 
+-setup_operator_pixmaps(font_string)
++void setup_operator_pixmaps(font_string)
+ char font_string[];
+--- a/source/formed/formed.c
++++ b/source/formed/formed.c
+@@ -15,3 +15,3 @@
+ 
+-main(argc, argv)
++int main(argc, argv)
+ int argc;

diff --git a/sci-mathematics/otter/otter-3.3-r3.ebuild 
b/sci-mathematics/otter/otter-3.3-r4.ebuild
similarity index 78%
rename from sci-mathematics/otter/otter-3.3-r3.ebuild
rename to sci-mathematics/otter/otter-3.3-r4.ebuild
index 6eb0dc06c302..edf670138134 100644
--- a/sci-mathematics/otter/otter-3.3-r3.ebuild
+++ b/sci-mathematics/otter/otter-3.3-r4.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -22,14 +22,17 @@ DEPEND="${RDEPEND}"
 PATCHES=(
        "${FILESDIR}"/${P}-build.patch
        "${FILESDIR}"/${P}-gold.patch
+       "${FILESDIR}"/${P}-clang16.patch
 )
 
 src_configure() {
        append-cflags -fcommon
+       append-cflags -std=gnu89 # old codebase, incompatible with c2x
+       append-cppflags -D_GNU_SOURCE #871423 (gethostname, caddr_t)
 }
 
 src_compile() {
-       tc-export CC
+       tc-export AR CC
 
        emake -C source
        emake -C mace2

Reply via email to