public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sci-libs/cdd+/files/, sci-libs/cdd+/
@ 2021-08-05  1:03 Sam James
  0 siblings, 0 replies; only message in thread
From: Sam James @ 2021-08-05  1:03 UTC (permalink / raw
  To: gentoo-commits

commit:     ac43e2bc87f16df47eed3be4d983fad1d83fb50a
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Aug  5 01:03:34 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Aug  5 01:03:37 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ac43e2bc

sci-libs/cdd+: update EAPI 5 -> 7, fix build with GCC 11

Closes: https://bugs.gentoo.org/787941
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sci-libs/cdd+/cdd+-077a.ebuild                     | 24 ++++----
 sci-libs/cdd+/files/cdd+-077a-gcc-5.patch          |  4 +-
 .../files/cdd+-077a-gcc11-dynamic-exceptions.patch | 71 ++++++++++++++++++++++
 sci-libs/cdd+/files/cdd+-077a-gentoo.patch         |  4 +-
 sci-libs/cdd+/files/cdd+-077a-headers.patch        | 36 +++--------
 sci-libs/cdd+/files/cdd+-077a-qa-const-char.patch  |  8 +--
 6 files changed, 98 insertions(+), 49 deletions(-)

diff --git a/sci-libs/cdd+/cdd+-077a.ebuild b/sci-libs/cdd+/cdd+-077a.ebuild
index b0f5d66efdd..12930c685ab 100644
--- a/sci-libs/cdd+/cdd+-077a.ebuild
+++ b/sci-libs/cdd+/cdd+-077a.ebuild
@@ -1,9 +1,9 @@
 # Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=5
+EAPI=7
 
-inherit epatch multilib toolchain-funcs
+inherit toolchain-funcs
 
 DESCRIPTION="Another implementation of the double description method"
 HOMEPAGE="http://www.ifor.math.ethz.ch/~fukuda/cdd_home/"
@@ -12,27 +12,25 @@ SRC_URI="ftp://ftp.ifor.math.ethz.ch/pub/fukuda/cdd/${P}.tar.gz"
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="amd64 ~arm x86"
-IUSE=""
 
 DEPEND="dev-libs/gmp:0="
 RDEPEND="${DEPEND}"
 
-src_prepare() {
-	epatch \
-		"${FILESDIR}"/${P}-headers.patch \
-		"${FILESDIR}"/${P}-gentoo.patch \
-		"${FILESDIR}"/${P}-gcc-5.patch \
-		"${FILESDIR}"/${P}-qa-const-char.patch
-}
+PATCHES=(
+	"${FILESDIR}"/${P}-headers.patch
+	"${FILESDIR}"/${P}-gentoo.patch
+	"${FILESDIR}"/${P}-gcc-5.patch
+	"${FILESDIR}"/${P}-qa-const-char.patch
+	"${FILESDIR}"/${P}-gcc11-dynamic-exceptions.patch
+)
 
 src_compile() {
 	emake \
 		CC="$(tc-getCC)" \
 		LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
-		GMPLIBDIR="${EPREFIX}/usr/$(get_libdir)" \
-		GMPINCLUDE="${EPREFIX}/usr/include" \
+		GMPLIBDIR="${ESYSROOT}/usr/$(get_libdir)" \
+		GMPINCLUDE="${ESYSROOT}/usr/include" \
 		all
-
 }
 
 src_install() {

diff --git a/sci-libs/cdd+/files/cdd+-077a-gcc-5.patch b/sci-libs/cdd+/files/cdd+-077a-gcc-5.patch
index cd2d32a8a31..94018d6da2a 100644
--- a/sci-libs/cdd+/files/cdd+-077a-gcc-5.patch
+++ b/sci-libs/cdd+/files/cdd+-077a-gcc-5.patch
@@ -1,8 +1,8 @@
 Fix check for GCC version beyond major version 4.
 Gentoo bug #569222
 
---- cdd+-077a/gmp_init.cc
-+++ cdd+-077a/gmp_init.cc
+--- a/gmp_init.cc
++++ b/gmp_init.cc
 @@ -31,7 +31,7 @@
  # define pm_gmp_reallocate std::__alloc::reallocate
  #endif // gcc 3.3

diff --git a/sci-libs/cdd+/files/cdd+-077a-gcc11-dynamic-exceptions.patch b/sci-libs/cdd+/files/cdd+-077a-gcc11-dynamic-exceptions.patch
new file mode 100644
index 00000000000..1ac5a0cef32
--- /dev/null
+++ b/sci-libs/cdd+/files/cdd+-077a-gcc11-dynamic-exceptions.patch
@@ -0,0 +1,71 @@
+https://bugs.gentoo.org/787941
+
+From 46d95aeac2d3951d79291def284bb610e7cb033f Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Thu, 5 Aug 2021 02:00:33 +0100
+Subject: [PATCH] Drop deprecated C++17 dynamic exceptions
+
+---
+ Integer.h   |   6 +++---
+ Rational.cc |   2 +-
+ Rational.h  |   2 +-
+ cddio.o     | Bin 0 -> 154584 bytes
+ 4 files changed, 5 insertions(+), 5 deletions(-)
+ create mode 100644 cddio.o
+
+diff --git a/Integer.h b/Integer.h
+index 8b7f04e..d4a1bdd 100644
+--- a/Integer.h
++++ b/Integer.h
+@@ -179,7 +179,7 @@ public:
+    }
+ 
+    /// Recognizes automatically number base 10, 8, or 16.
+-   Integer& set(const char *s) throw(gmp_error)
++   Integer& set(const char *s)
+    {
+       if (mpz_set_str(rep, s, 0) < 0)
+ 	 throw gmp_error("Integer: syntax error in string");
+@@ -195,14 +195,14 @@ public:
+ 
+    operator double() const { return mpz_get_d(rep); }
+ 
+-   operator long() const throw(gmp_error)
++   operator long() const
+    {
+       if (!mpz_fits_slong_p(rep))
+ 	 throw gmp_error("Integer: value too big");
+       return mpz_get_si(rep);
+    }
+ 
+-   operator int() const throw(gmp_error)
++   operator int() const
+    {
+       if (!mpz_fits_sint_p(rep))
+ 	 throw gmp_error("Integer: value too big");
+diff --git a/Rational.cc b/Rational.cc
+index f1b86a4..c679671 100644
+--- a/Rational.cc
++++ b/Rational.cc
+@@ -19,7 +19,7 @@
+ #include "Rational.h"
+ #include <cstring>
+ 
+-Rational& Rational::set(const char* s) throw (gmp_error)
++Rational& Rational::set(const char* s)
+ {
+    const char* digit=s;
+    while (*digit && *digit!='/') ++digit;
+diff --git a/Rational.h b/Rational.h
+index acaba13..eb30578 100644
+--- a/Rational.h
++++ b/Rational.h
+@@ -421,7 +421,7 @@ public:
+        Numerator and denominator are expected delimited by `/'.
+        Omitted denominator assumed equal to 1.
+    */
+-   Rational& set(const char *s) throw(gmp_error);
++   Rational& set(const char *s);
+ 
+    Rational& operator= (const Rational& b)
+    {

diff --git a/sci-libs/cdd+/files/cdd+-077a-gentoo.patch b/sci-libs/cdd+/files/cdd+-077a-gentoo.patch
index efe6d7035e9..b61b8ab42a0 100644
--- a/sci-libs/cdd+/files/cdd+-077a-gentoo.patch
+++ b/sci-libs/cdd+/files/cdd+-077a-gentoo.patch
@@ -1,5 +1,5 @@
---- makefile.orig	2010-01-19 20:22:59.000000000 +0100
-+++ makefile	2010-01-19 20:52:01.000000000 +0100
+--- a/makefile
++++ b/makefile
 @@ -6,21 +6,21 @@
  #CC = /bin/cc
  

diff --git a/sci-libs/cdd+/files/cdd+-077a-headers.patch b/sci-libs/cdd+/files/cdd+-077a-headers.patch
index c6ceb93bfaa..4df6f05871c 100644
--- a/sci-libs/cdd+/files/cdd+-077a-headers.patch
+++ b/sci-libs/cdd+/files/cdd+-077a-headers.patch
@@ -1,10 +1,5 @@
-Index: Integer.h
-===================================================================
-RCS file: /home/imocvs/cdd+/Integer.h,v
-retrieving revision 1.1.1.1
-diff -u -p -r1.1.1.1 Integer.h
---- Integer.h	2008/12/15 01:19:52	1.1.1.1
-+++ Integer.h	2008/12/15 01:24:04
+--- a/Integer.h
++++ b/Integer.h
 @@ -23,6 +23,7 @@
  #include <gmp_init.h>
  #include <cctype>
@@ -13,13 +8,8 @@ diff -u -p -r1.1.1.1 Integer.h
  
  class Integer; class Rational;
  
-Index: Rational.cc
-===================================================================
-RCS file: /home/imocvs/cdd+/Rational.cc,v
-retrieving revision 1.1.1.1
-diff -u -p -r1.1.1.1 Rational.cc
---- Rational.cc	2008/12/15 01:19:52	1.1.1.1
-+++ Rational.cc	2008/12/15 01:25:14
+--- a/Rational.cc
++++ b/Rational.cc
 @@ -17,6 +17,7 @@
  
  #include <cctype>
@@ -28,13 +18,8 @@ diff -u -p -r1.1.1.1 Rational.cc
  
  Rational& Rational::set(const char* s) throw (gmp_error)
  {
-Index: Rational.h
-===================================================================
-RCS file: /home/imocvs/cdd+/Rational.h,v
-retrieving revision 1.1.1.1
-diff -u -p -r1.1.1.1 Rational.h
---- Rational.h	2008/12/15 01:19:52	1.1.1.1
-+++ Rational.h	2008/12/15 01:27:08
+--- a/Rational.h
++++ b/Rational.h
 @@ -17,6 +17,7 @@
  #define _POLYMAKE_GMP_RATIONAL_H "$Project: polymake $$Id$
  
@@ -52,13 +37,8 @@ diff -u -p -r1.1.1.1 Rational.h
        *den_buf++ = '/';
        denominator(a).putstr(os.flags(), den_buf);
     }
-Index: gmp_init.cc
-===================================================================
-RCS file: /home/imocvs/cdd+/gmp_init.cc,v
-retrieving revision 1.1.1.1
-diff -u -p -r1.1.1.1 gmp_init.cc
---- gmp_init.cc	2008/12/15 01:19:52	1.1.1.1
-+++ gmp_init.cc	2008/12/15 01:23:45
+--- a/gmp_init.cc
++++ b/gmp_init.cc
 @@ -16,6 +16,7 @@
  #ident "$Project: polymake $$Id$
  

diff --git a/sci-libs/cdd+/files/cdd+-077a-qa-const-char.patch b/sci-libs/cdd+/files/cdd+-077a-qa-const-char.patch
index a2304725990..883b6bf809b 100644
--- a/sci-libs/cdd+/files/cdd+-077a-qa-const-char.patch
+++ b/sci-libs/cdd+/files/cdd+-077a-qa-const-char.patch
@@ -4,8 +4,8 @@ cddio.C: In function ‘void SetWriteFileName(char*, char, char*)’:
 cddio.C:103:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
            extension=".ine"; break;     /* output file for ine data */
 
---- cdd+-077a/cdd.h
-+++ cdd+-077a/cdd.h
+--- a/cdd.h
++++ b/cdd.h
 @@ -185,8 +185,8 @@
  extern int output_digits;  /* Float digits for output.  Does not affect the computation. */
  
@@ -17,8 +17,8 @@ cddio.C:103:20: warning: deprecated conversion from string constant to ‘char*
  
  myTYPE FABS(myTYPE);
  void SetNumberType(string);
---- cdd+-077a/cddio.C
-+++ cdd+-077a/cddio.C
+--- a/cddio.C
++++ b/cddio.C
 @@ -90,10 +90,10 @@
    }
  }


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-05  1:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-05  1:03 [gentoo-commits] repo/gentoo:master commit in: sci-libs/cdd+/files/, sci-libs/cdd+/ Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox