summaryrefslogtreecommitdiff
path: root/dev-libs/libf2c
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
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-libs/libf2c')
-rw-r--r--dev-libs/libf2c/Manifest10
-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
-rw-r--r--dev-libs/libf2c/libf2c-20110801-r4.ebuild57
-rw-r--r--dev-libs/libf2c/libf2c-20130927.ebuild57
-rw-r--r--dev-libs/libf2c/metadata.xml11
9 files changed, 268 insertions, 0 deletions
diff --git a/dev-libs/libf2c/Manifest b/dev-libs/libf2c/Manifest
new file mode 100644
index 000000000000..7287dcebaf82
--- /dev/null
+++ b/dev-libs/libf2c/Manifest
@@ -0,0 +1,10 @@
+AUX 20051004-add-ofiles-dep.patch 439 BLAKE2B f7dc9a424f9502c26325bcd0281618ce10f6ca643a81ba1252ee476f4a21972b67684b625666df88cff923d6c4424852fe6d587d052d1adca4bec1a9b2f62e59 SHA512 f1453a782b593744cceaff2cabcd0aae605324ebfd0e66505d55c4483374e3845710d4c1a6b71c4939adf588466f55d6a5856cd97a8e1c52a751151e9c2ee409
+AUX 20090407-link-shared-libf2c-correctly.patch 358 BLAKE2B 3ce42e0fa356542ef761feaeba9f9170e80ba733616c4fad93f48a6d378f755efd92bace6c3a69887ad1d529d6e8bad479425545b86bb65a8cad6066b1f0454b SHA512 6edc5e0d418b4d87597c696623aacf1b15a526b2f2739726220b6302f3ad444bf01ebcd672f7ae40698f0e524d3019decad751490f38c1b2f32d2fd943df8a72
+AUX libf2c-20110801-64bit-long.patch 1784 BLAKE2B 279043ebe08450ce165d3f1c6a9bc87acd9ffdcde434f807a05adc87bff12f097bd26ea990aff85ea8c6917e15bbc2c964fe109b7d095a1308fc7216bde2b640 SHA512 69f2553473b940ab78e185dc17b94513bca2cde4f9a32d60b09183d853096fbe6de2dfc8354d44cdaf04bf5852674d4f31b4a11c8c761c0c802694537156edb1
+AUX libf2c-20110801-format-security.patch 341 BLAKE2B 7260d732672fa774f9b8669d0e58abaa4949d54459f1e38e92df5ad39d0f9cdab845fed74ec81c1697c2bf1ba350d75a486221f462c9ab5f1b0fad914fd943f7 SHA512 f630296167fffed0cf707430af2f546bcfd77d6443bcec15b24a1c8bdf923f92411b86a37079bd6a73b36baf9caf7d51312b32ff5a669097f3c41fc0bb525f5a
+AUX libf2c-20110801-main.patch 1708 BLAKE2B becf5fd72a0d9bad9a6fef4d6013b2e1dbedd2b2d1cb9764a3a04772648f24f2875d6257595c95c09b17159baf47c217d4fbdc3cd4d6dfa37980adb306552e3e SHA512 f2c8574f45580d2bf99e5506266668c615f19a985ffa27eefe38d373f083da61dbe486d5c27e034bd38029b46a4a77285e175a7285b1acb37e7a1ecfea6a2bbc
+DIST libf2c-20110801.zip 128845 BLAKE2B f948693c0aace5725f3a4ab3406396a9f16fbb3c08681fe200ba2ba0b48dadb3c051a510cf9b4714d9fbfebc43e52ba13d6fdbff3590c19a164acc710ebe2958 SHA512 7a7b7b02ca2b11456aa0deba5094aebc1e9f7070d1742ad76450ec79de7eed967fbd7446524b66c52295ed911471d2dc396d171569b5d37079bdca8220fd2fb6
+DIST libf2c-20130927.zip 129082 BLAKE2B 09f818bde8888b569858784c39e93a6a11b3103039f44c3f6a1246b29efb5f8ae6e45f787ed0c2216bea383a79b9554aff30e1fbb00668bbc872b4bc30d87ba8 SHA512 1a12093dec3c250f4775eebd06f1a9144fdb956ea3162202fb67569fdd956ac5591bc563a0726ca65ea10d465efaac1c1d8024d63bc4a4b5c88bf46242607c8a
+EBUILD libf2c-20110801-r4.ebuild 1256 BLAKE2B 1e22881db8cf4e49fd711c556b169156689dcd5b24bbd7fe6ead5c25d206a022aa9b947abc54af6dcd3d1af18f5867b927b677a7123b70e6be3abdb649a9a16d SHA512 d367309ff9a645e412a5ad2af05bacc2a82df6392e36af6176b950f640337b8b68219e339afe41b147824160e47ef1fcbc85c6a906d13801e4d0a7f202528b69
+EBUILD libf2c-20130927.ebuild 1290 BLAKE2B a3468ddd537fa482c38e3d633d47f609c09bbed62f92e4b3a021054ce4957f8a0b6113e27028a1c1ba860349e928833df5a1a0efe75160062a354e40f55c7d84 SHA512 a8e33d4a42adc4559828a2c6c8c2746dff6c76d609bd4a0c63c3be8c8b094c3d44afaa89dcb9395f37ac2c2923c473651def6ebcbbdd8e788bcba05ea4836a49
+MISC metadata.xml 363 BLAKE2B 854c5e9e83fb984b31f4def65cb25720bacbff0522fe93e3488211611e15896e562ab86a101ea0f661ffa6de9bb15331dce1e39ca614b1987ed35184029a0d18 SHA512 3c5efbb36dba02cfa31cb0b95c78194bfecfcc128b60eb5c11983da6ac26fb0d75bc02e004443fc6365d3cf53b6d9bffc3a0342c185e61ffdc404cb8b4a3f95e
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__")));
diff --git a/dev-libs/libf2c/libf2c-20110801-r4.ebuild b/dev-libs/libf2c/libf2c-20110801-r4.ebuild
new file mode 100644
index 000000000000..50e2c97344ee
--- /dev/null
+++ b/dev-libs/libf2c/libf2c-20110801-r4.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="Library that converts FORTRAN to C source"
+HOMEPAGE="http://www.netlib.org/f2c/"
+SRC_URI="${HOMEPAGE}/${PN}.zip -> ${P}.zip"
+
+LICENSE="HPND"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="static-libs"
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S="${WORKDIR}"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/20051004-add-ofiles-dep.patch \
+ "${FILESDIR}"/20090407-link-shared-libf2c-correctly.patch \
+ "${FILESDIR}"/${P}-main.patch\
+ "${FILESDIR}"/${P}-64bit-long.patch \
+ "${FILESDIR}"/${P}-format-security.patch
+ sed -i -e "s/ld /$(tc-getLD) /" makefile.u || die
+}
+
+src_compile() {
+ emake \
+ -f makefile.u \
+ libf2c.so \
+ CFLAGS="${CFLAGS} -fPIC" \
+ CC="$(tc-getCC)"
+
+ # Clean up files so we can recompile without PIC for the static lib
+ if use static-libs; then
+ rm *.o || die "clean failed"
+ emake \
+ -f makefile.u \
+ all \
+ CFLAGS="${CFLAGS}" \
+ CC="$(tc-getCC)"
+ fi
+}
+
+src_install () {
+ dolib libf2c.so.2
+ dosym libf2c.so.2 /usr/$(get_libdir)/libf2c.so
+ use static-libs && dolib.a libf2c.a
+ doheader f2c.h
+ dodoc README Notice
+}
diff --git a/dev-libs/libf2c/libf2c-20130927.ebuild b/dev-libs/libf2c/libf2c-20130927.ebuild
new file mode 100644
index 000000000000..a9e73c1620a9
--- /dev/null
+++ b/dev-libs/libf2c/libf2c-20130927.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="Library that converts FORTRAN to C source"
+HOMEPAGE="http://www.netlib.org/f2c/"
+SRC_URI="${HOMEPAGE}/${PN}.zip -> ${P}.zip"
+
+LICENSE="HPND"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="static-libs"
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S="${WORKDIR}"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/20051004-add-ofiles-dep.patch \
+ "${FILESDIR}"/20090407-link-shared-libf2c-correctly.patch \
+ "${FILESDIR}"/${PN}-20110801-main.patch\
+ "${FILESDIR}"/${PN}-20110801-64bit-long.patch \
+ "${FILESDIR}"/${PN}-20110801-format-security.patch
+ sed -i -e "s/ld /$(tc-getLD) /" makefile.u || die
+}
+
+src_compile() {
+ emake \
+ -f makefile.u \
+ libf2c.so \
+ CFLAGS="${CFLAGS} -fPIC" \
+ CC="$(tc-getCC)"
+
+ # Clean up files so we can recompile without PIC for the static lib
+ if use static-libs; then
+ rm *.o || die "clean failed"
+ emake \
+ -f makefile.u \
+ all \
+ CFLAGS="${CFLAGS}" \
+ CC="$(tc-getCC)"
+ fi
+}
+
+src_install () {
+ dolib libf2c.so.2
+ dosym libf2c.so.2 /usr/$(get_libdir)/libf2c.so
+ use static-libs && dolib.a libf2c.a
+ doheader f2c.h
+ dodoc README Notice
+}
diff --git a/dev-libs/libf2c/metadata.xml b/dev-libs/libf2c/metadata.xml
new file mode 100644
index 000000000000..edfd7994e880
--- /dev/null
+++ b/dev-libs/libf2c/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci@gentoo.org</email>
+ <name>Gentoo Science Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ A library to conver FORTRAN 77 to C/C++ source code.
+</longdescription>
+</pkgmetadata>