commit:     7319893a82b52039b567f54ac500c798caa6c47e
Author:     Sébastien Fabbro <bicatali <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 17 17:26:22 2016 +0000
Commit:     Sebastien Fabbro <bicatali <AT> gentoo <DOT> org>
CommitDate: Thu Nov 17 17:26:48 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7319893a

sci-astronomy/esomidas: adding a fix for gfortran-6 (bug #594812)
* Fixing an issue with arrays and gfortran >= 6, patch from Debian
* Adding another patch from debian for free, for non-linux setups

Package-Manager: portage-2.3.2

 sci-astronomy/esomidas/esomidas-15.09.ebuild       |  2 ++
 sci-astronomy/esomidas/files/esomidas-madrid.patch | 25 ++++++++++++++++++++++
 .../esomidas/files/esomidas-nonlinux.patch         | 23 ++++++++++++++++++++
 3 files changed, 50 insertions(+)

diff --git a/sci-astronomy/esomidas/esomidas-15.09.ebuild 
b/sci-astronomy/esomidas/esomidas-15.09.ebuild
index 7efe5eb..17aeea8 100644
--- a/sci-astronomy/esomidas/esomidas-15.09.ebuild
+++ b/sci-astronomy/esomidas/esomidas-15.09.ebuild
@@ -34,10 +34,12 @@ PATCHES=(
        "${FILESDIR}/${PN}-fitswdb.patch"
        "${FILESDIR}/${PN}-fitswdm_c.patch"
        "${FILESDIR}/${PN}-log-stdout.patch"
+       "${FILESDIR}/${PN}-madrid.patch"
        "${FILESDIR}/${PN}-manpages.patch"
        "${FILESDIR}/${PN}-mdb_put.patch"
        "${FILESDIR}/${PN}-no-sp_pty.patch"
        "${FILESDIR}/${PN}-no-strip.patch"
+       "${FILESDIR}/${PN}-nonlinux.patch"
        "${FILESDIR}/${PN}-rarthm_for.patch"
        "${FILESDIR}/${PN}-selechar_c.patch"
        "${FILESDIR}/${PN}-system-readline.patch"

diff --git a/sci-astronomy/esomidas/files/esomidas-madrid.patch 
b/sci-astronomy/esomidas/files/esomidas-madrid.patch
new file mode 100644
index 00000000..cd3d8bf
--- /dev/null
+++ b/sci-astronomy/esomidas/files/esomidas-madrid.patch
@@ -0,0 +1,25 @@
+Author: Ole Streicher <[email protected]>
+Description: Fix size of MADRID array in test
+ When gfortran-6 is called with an optimization (-O1 or higher), arrays with a
+ length 1 seem to be converted to a scalar and assumed to always return the 
same
+ value.
+ .
+ This fails with the MADRID array, which is a placeholder for an array.
+ Specifically ftoc_commf.for fails then, which leads to a missing ftoc_comm.h.
+ .
+ The simple workaround is to use a size > 1 here.
+ .
+ Note that the MADRID array is defined with a length=1 in ~350 places all over
+ eso-midas. They are not changed yet since the verification succeeds. If we get
+ strange bugreports, this may be considered as the problem.
+--- a/system/ftoc-new/ftoc_commf.for
++++ b/system/ftoc-new/ftoc_commf.for
+@@ -34,7 +34,7 @@
+ C
+       PROGRAM F2CCOM
+ C 
+-      INTEGER    MADRID(1)
++      INTEGER    MADRID(3)
+       INTEGER    VALUE(3)
+       INTEGER    STAT,MANY,NOPIX,NOBYT
+       INTEGER*8    PNTR

diff --git a/sci-astronomy/esomidas/files/esomidas-nonlinux.patch 
b/sci-astronomy/esomidas/files/esomidas-nonlinux.patch
new file mode 100644
index 00000000..e5f68f1
--- /dev/null
+++ b/sci-astronomy/esomidas/files/esomidas-nonlinux.patch
@@ -0,0 +1,23 @@
+Author: Ole Streicher <[email protected]>
+Description: Fixes for non-linux (kFreeBSD, Hurd)
+--- a/system/unix/inmidas
++++ b/system/unix/inmidas
+@@ -425,7 +425,7 @@
+ #
+ os=`uname`
+ case "$os" in
+-    "SunOS"|"Linux")
++    SunOS|Linux|GNU|GNU/*)
+       if [ -z "$LD_LIBRARY_PATH" ] ; then
+         LD_LIBRARY_PATH=$MIDASHOME/$MIDVERS/lib
+       else
+--- a/test/prim/veriall.prg
++++ b/test/prim/veriall.prg
+@@ -204,6 +204,7 @@
+       write/keyw in_b MID_WORK:veriall_{out_b(1:{inputi})}.{inputc}
+    endif
+ endif
++write/keyw in_b  MID_WORK:veriall_debian.{inputc}
+ open/file {in_b} write  fc
+ if fc(1) .lt. 0 then
+    write/out Could not create file: "MID_WORK:veriall_{out_b}.{inputc} ..."

Reply via email to