summaryrefslogtreecommitdiff
path: root/dev-libs/libf2c/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-libs/libf2c/files
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-libs/libf2c/files')
-rw-r--r--dev-libs/libf2c/files/20051004-add-ofiles-dep.patch14
-rw-r--r--dev-libs/libf2c/files/20090407-link-shared-libf2c-correctly.patch11
-rw-r--r--dev-libs/libf2c/files/libf2c-20110801-64bit-long.patch57
-rw-r--r--dev-libs/libf2c/files/libf2c-20110801-format-security.patch11
-rw-r--r--dev-libs/libf2c/files/libf2c-20110801-main.patch40
5 files changed, 133 insertions, 0 deletions
diff --git a/dev-libs/libf2c/files/20051004-add-ofiles-dep.patch b/dev-libs/libf2c/files/20051004-add-ofiles-dep.patch
new file mode 100644
index 000000000000..509726820ae5
--- /dev/null
+++ b/dev-libs/libf2c/files/20051004-add-ofiles-dep.patch
@@ -0,0 +1,14 @@
+diff -urN libf2c.orig/makefile.u libf2c/makefile.u
+--- libf2c.orig/makefile.u 2006-05-13 15:41:29.000000000 -0700
++++ libf2c/makefile.u 2006-05-13 15:42:04.000000000 -0700
+@@ -69,7 +69,9 @@
+ OFILES = $(MISC) $(POW) $(CX) $(DCX) $(REAL) $(DBL) $(INT) \
+ $(HALF) $(CMP) $(EFL) $(CHAR) $(I77) $(TIME)
+
+-all: f2c.h signal1.h sysdep1.h libf2c.a
++all: libf2c.a
++
++$(OFILES): f2c.h signal1.h sysdep1.h
+
+ libf2c.a: $(OFILES)
+ ar r libf2c.a $?
diff --git a/dev-libs/libf2c/files/20090407-link-shared-libf2c-correctly.patch b/dev-libs/libf2c/files/20090407-link-shared-libf2c-correctly.patch
new file mode 100644
index 000000000000..d35e60bed0ff
--- /dev/null
+++ b/dev-libs/libf2c/files/20090407-link-shared-libf2c-correctly.patch
@@ -0,0 +1,11 @@
+--- makefile.u.orig 2008-07-07 23:27:41.000000000 -0700
++++ makefile.u 2008-07-07 23:28:39.000000000 -0700
+@@ -82,7 +82,7 @@
+ ## of "cc -shared".
+
+ libf2c.so: $(OFILES)
+- $(CC) -shared -o libf2c.so $(OFILES)
++ $(CC) -shared $(LDFLAGS) -Wl,-soname,libf2c.so.2 $(OFILES) -o libf2c.so.2 -lm
+
+ ### If your system lacks ranlib, you don't need it; see README.
+
diff --git a/dev-libs/libf2c/files/libf2c-20110801-64bit-long.patch b/dev-libs/libf2c/files/libf2c-20110801-64bit-long.patch
new file mode 100644
index 000000000000..85687c5a4208
--- /dev/null
+++ b/dev-libs/libf2c/files/libf2c-20110801-64bit-long.patch
@@ -0,0 +1,57 @@
+--- libf2c2-20090411.orig/f2c.h0
++++ libf2c2-20090411/f2c.h0
+@@ -7,21 +7,35 @@
+ #ifndef F2C_INCLUDE
+ #define F2C_INCLUDE
+
++#if defined(__alpha__) || defined(__sparc64__) || defined(__x86_64__) || defined(__ia64__)
++typedef int integer;
++typedef unsigned int uinteger;
++#else
+ typedef long int integer;
+ typedef unsigned long int uinteger;
++#endif
+ typedef char *address;
+ typedef short int shortint;
+ typedef float real;
+ typedef double doublereal;
+ typedef struct { real r, i; } complex;
+ typedef struct { doublereal r, i; } doublecomplex;
++#if defined(__alpha__) || defined(__sparc64__) || defined(__x86_64__) || defined(__ia64__)
++typedef int logical;
++#else
+ typedef long int logical;
++#endif
+ typedef short int shortlogical;
+ typedef char logical1;
+ typedef char integer1;
+ #ifdef INTEGER_STAR_8 /* Adjust for integer*8. */
+-typedef long long longint; /* system-dependent */
+-typedef unsigned long long ulongint; /* system-dependent */
++#if defined(__alpha__) || defined(__sparc64__) || defined(__x86_64__) || defined(__ia64__)
++typedef long longint; /* system-dependent */
++typedef unsigned long ulongint; /* system-dependent */
++#else
++typedef long long longint; /* system-dependent - oh yeah*/
++typedef unsigned long long ulongint; /* system-dependent - oh yeah*/
++#endif
+ #define qbit_clear(a,b) ((a) & ~((ulongint)1 << (b)))
+ #define qbit_set(a,b) ((a) | ((ulongint)1 << (b)))
+ #endif
+@@ -42,10 +56,16 @@
+ typedef short ftnlen;
+ typedef short ftnint;
+ #else
++#if defined(__alpha__) || defined(__sparc64__) || defined(__x86_64__) || defined(__ia64__)
++typedef int flag;
++typedef int ftnlen;
++typedef int ftnint;
++#else
+ typedef long int flag;
+ typedef long int ftnlen;
+ typedef long int ftnint;
+ #endif
++#endif
+
+ /*external read, write*/
+ typedef struct
diff --git a/dev-libs/libf2c/files/libf2c-20110801-format-security.patch b/dev-libs/libf2c/files/libf2c-20110801-format-security.patch
new file mode 100644
index 000000000000..669da2d694b4
--- /dev/null
+++ b/dev-libs/libf2c/files/libf2c-20110801-format-security.patch
@@ -0,0 +1,11 @@
+--- arithchk.c
++++ arithchk.c
+@@ -122,7 +122,7 @@
+ long Cray1;
+
+ /* Cray1 = 4617762693716115456 -- without overflow on non-Crays */
+- Cray1 = printf(emptyfmt) < 0 ? 0 : 4617762;
++ Cray1 = fputs(emptyfmt, stdout) < 0 ? 0 : 4617762;
+ if (printf(emptyfmt, Cray1) >= 0)
+ Cray1 = 1000000*Cray1 + 693716;
+ if (printf(emptyfmt, Cray1) >= 0)
diff --git a/dev-libs/libf2c/files/libf2c-20110801-main.patch b/dev-libs/libf2c/files/libf2c-20110801-main.patch
new file mode 100644
index 000000000000..36d61c5c5a4c
--- /dev/null
+++ b/dev-libs/libf2c/files/libf2c-20110801-main.patch
@@ -0,0 +1,40 @@
+Add weak alias for MAIN__
+
+https://bugs.gentoo.org/show_bug.cgi?id=421975
+https://bugs.gentoo.org/show_bug.cgi?id=433782
+https://groups.google.com/forum/#!msg/comp.os.linux.development.apps/41siJKfcJ78/iIcRfZ4y9G8J
+
+Patch written by Chris Reffett <creffett@gentoo.org>
+and Kacper Kowalik <xarthisius@gentoo.org>
+--- a/makefile.u
++++ b/makefile.u
+@@ -27,7 +27,7 @@
+ ## If your system does not have the x86_64-pc-linux-gnu-ld command, comment out
+ ## or remove both the x86_64-pc-linux-gnu-ld and mv lines above.
+
+-MISC = f77vers.o i77vers.o main.o s_rnge.o abort_.o exit_.o getarg_.o iargc_.o\
++MISC = f77vers.o i77vers.o main.o main_foo.o s_rnge.o abort_.o exit_.o getarg_.o iargc_.o\
+ getenv_.o signal_.o s_stop.o s_paus.o system_.o cabs.o ctype.o\
+ derf_.o derfc_.o erf_.o erfc_.o sig_die.o uninit.o
+ POW = pow_ci.o pow_dd.o pow_di.o pow_hh.o pow_ii.o pow_ri.o pow_zi.o pow_zz.o
+@@ -206,7 +206,7 @@
+ i77vers.c i_abs.c i_dim.c i_dnnt.c i_indx.c i_len.c i_mod.c \
+ i_nint.c i_sign.c iargc_.c iio.c ilnw.c inquire.c l_ge.c l_gt.c \
+ l_le.c l_lt.c lbitbits.c lbitshft.c libf2c.lbc libf2c.sy lio.h \
+- lread.c lwrite.c main.c makefile.sy makefile.u makefile.vc \
++ lread.c lwrite.c main.c main_foo.c makefile.sy makefile.u makefile.vc \
+ makefile.wat math.hvc mkfile.plan9 open.c pow_ci.c pow_dd.c \
+ pow_di.c pow_hh.c pow_ii.c pow_qq.c pow_ri.c pow_zi.c pow_zz.c \
+ qbitbits.c qbitshft.c r_abs.c r_acos.c r_asin.c r_atan.c r_atn2.c \
+--- /dev/null
++++ b/main_foo.c
+@@ -0,0 +1,9 @@
++#include <stdio.h>
++#include <stdlib.h>
++
++void missing_MAIN__ (void)
++{
++ fprintf(stderr, "The Fortran main program is missing.\n");
++ abort();
++}
++void MAIN__ (void) __attribute__ ((weak, alias("missing_MAIN__")));