commit:     1e0279c07698c06dc567af8fd51abee09674c6e3
Author:     Ted Tanberry <ted.tanberry <AT> gmail <DOT> com>
AuthorDate: Sun Dec 27 22:05:20 2015 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Sun Dec 27 22:05:20 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1e0279c0

sci-libs/cdd+: Gentoo-Bug: 569222, fix for GCC-5.

Package-Manager: portage-2.2.26

 sci-libs/cdd+/cdd+-077a.ebuild                    |  4 +-
 sci-libs/cdd+/files/cdd+-077a-gcc-5.patch         | 14 +++++++
 sci-libs/cdd+/files/cdd+-077a-qa-const-char.patch | 47 +++++++++++++++++++++++
 3 files changed, 64 insertions(+), 1 deletion(-)

diff --git a/sci-libs/cdd+/cdd+-077a.ebuild b/sci-libs/cdd+/cdd+-077a.ebuild
index 19dd12c..d3333ee 100644
--- a/sci-libs/cdd+/cdd+-077a.ebuild
+++ b/sci-libs/cdd+/cdd+-077a.ebuild
@@ -21,7 +21,9 @@ RDEPEND="${DEPEND}"
 src_prepare() {
        epatch \
                "${FILESDIR}"/${P}-headers.patch \
-               "${FILESDIR}"/${P}-gentoo.patch
+               "${FILESDIR}"/${P}-gentoo.patch \
+               "${FILESDIR}"/${P}-gcc-5.patch \
+               "${FILESDIR}"/${P}-qa-const-char.patch
 }
 
 src_compile() {

diff --git a/sci-libs/cdd+/files/cdd+-077a-gcc-5.patch 
b/sci-libs/cdd+/files/cdd+-077a-gcc-5.patch
new file mode 100644
index 0000000..cd2d32a
--- /dev/null
+++ b/sci-libs/cdd+/files/cdd+-077a-gcc-5.patch
@@ -0,0 +1,14 @@
+Fix check for GCC version beyond major version 4.
+Gentoo bug #569222
+
+--- cdd+-077a/gmp_init.cc
++++ cdd+-077a/gmp_init.cc
+@@ -31,7 +31,7 @@
+ # define pm_gmp_reallocate std::__alloc::reallocate
+ #endif // gcc 3.3
+ 
+-#if __GNUC__==3 && __GNUC_MINOR__==4 || __GNUC__==4
++#if __GNUC__==3 && __GNUC_MINOR__==4 || __GNUC__>=4
+ # include <ext/pool_allocator.h>
+ 
+ namespace {

diff --git a/sci-libs/cdd+/files/cdd+-077a-qa-const-char.patch 
b/sci-libs/cdd+/files/cdd+-077a-qa-const-char.patch
new file mode 100644
index 0000000..a230472
--- /dev/null
+++ b/sci-libs/cdd+/files/cdd+-077a-qa-const-char.patch
@@ -0,0 +1,47 @@
+Silence warnings produced by passing a string literal to a 'char*':
+
+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
+@@ -185,8 +185,8 @@
+ extern int output_digits;  /* Float digits for output.  Does not affect the 
computation. */
+ 
+ void SetInputFile(boolean *);
+-void SetWriteFileName(DataFileType, char, char *);
+-void SetReadFileName(DataFileType, char, char *);
++void SetWriteFileName(DataFileType, char, const char *);
++void SetReadFileName(DataFileType, char, const char *);
+ 
+ myTYPE FABS(myTYPE);
+ void SetNumberType(string);
+--- cdd+-077a/cddio.C
++++ cdd+-077a/cddio.C
+@@ -90,10 +90,10 @@
+   }
+ }
+ 
+-void SetWriteFileName(DataFileType fname, char cflag, char *fscript)
++void SetWriteFileName(DataFileType fname, char cflag, const char *fscript)
+ {
+   boolean quit=False;
+-  char *extension;
++  const char *extension;
+   DataFileType newname;
+   
+   switch (cflag) {
+@@ -192,10 +192,10 @@
+   if (DynamicWriteOn) printf("Open %s file %s.\n",fscript,fname);
+ }
+ 
+-void SetReadFileName(DataFileType fname, char cflag, char *fscript)
++void SetReadFileName(DataFileType fname, char cflag, const char *fscript)
+ {
+   boolean quit=False;
+-  char *extension;
++  const char *extension;
+   DataFileType newname;
+   
+   switch (cflag) {

Reply via email to