sci-libs/cdd+: Gentoo-Bug: 569222, fix for GCC-5.
authorTed Tanberry <ted.tanberry@gmail.com>
Sun, 27 Dec 2015 22:05:20 +0000 (23:05 +0100)
committerTed Tanberry <ted.tanberry@gmail.com>
Sun, 27 Dec 2015 22:05:20 +0000 (23:05 +0100)
Package-Manager: portage-2.2.26

sci-libs/cdd+/cdd+-077a.ebuild
sci-libs/cdd+/files/cdd+-077a-gcc-5.patch [new file with mode: 0644]
sci-libs/cdd+/files/cdd+-077a-qa-const-char.patch [new file with mode: 0644]

index 19dd12c7ac2833d4b82a7286bcc5626a60cd1f93..d3333eeba0a1860ecec623997bdc3dd2b3e7cb07 100644 (file)
@@ -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 (file)
index 0000000..cd2d32a
--- /dev/null
@@ -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 (file)
index 0000000..a230472
--- /dev/null
@@ -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) {