summaryrefslogtreecommitdiff
path: root/dev-libs/libf2c
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs/libf2c')
-rw-r--r--dev-libs/libf2c/Manifest12
-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, 270 insertions, 0 deletions
diff --git a/dev-libs/libf2c/Manifest b/dev-libs/libf2c/Manifest
new file mode 100644
index 000000000000..37e3afd90771
--- /dev/null
+++ b/dev-libs/libf2c/Manifest
@@ -0,0 +1,12 @@
+AUX 20051004-add-ofiles-dep.patch 439 SHA256 3f688297b45515c1e386bb7f94ad36bf0f6a3497a0baff759b54d943cbec7d8f SHA512 f1453a782b593744cceaff2cabcd0aae605324ebfd0e66505d55c4483374e3845710d4c1a6b71c4939adf588466f55d6a5856cd97a8e1c52a751151e9c2ee409 WHIRLPOOL 055db6e8bc28fb186a0e0357e7bd45f919f715828dab90e0907879343d0f749999e1781b468c8014ee979070966c6465ba219843cbf687c00c9d706ddfaaf25b
+AUX 20090407-link-shared-libf2c-correctly.patch 358 SHA256 28e04d4fe1279ad37fba92f1fc9acb3110778a02f4c15da6b659b04baa3d2df0 SHA512 6edc5e0d418b4d87597c696623aacf1b15a526b2f2739726220b6302f3ad444bf01ebcd672f7ae40698f0e524d3019decad751490f38c1b2f32d2fd943df8a72 WHIRLPOOL 97592dd5af100647a4bb82b4254cb0f212b25dad40f599d8acb069fba6432989b30f12d0b56e16aa9e73b96977d4e5dc6ffbaa0a12aa419651a799abae948c63
+AUX libf2c-20110801-64bit-long.patch 1784 SHA256 919698643f12b2fc4b9f4ebac395a8b2c9c01e83028907621b95dee8db4d5653 SHA512 69f2553473b940ab78e185dc17b94513bca2cde4f9a32d60b09183d853096fbe6de2dfc8354d44cdaf04bf5852674d4f31b4a11c8c761c0c802694537156edb1 WHIRLPOOL dacdd83b8dfea14bf6af9c56031a34ae7809140ebdfae311fd947ea887648ebe12eb76b4e509edd5ca66d5ed74556db9b8538bb5d213fd06d322098a3eced516
+AUX libf2c-20110801-format-security.patch 341 SHA256 a1b7a36fb9fd237e5d2cee83363875cf13cda5d59e425602a86b28844ac32920 SHA512 f630296167fffed0cf707430af2f546bcfd77d6443bcec15b24a1c8bdf923f92411b86a37079bd6a73b36baf9caf7d51312b32ff5a669097f3c41fc0bb525f5a WHIRLPOOL 68f448492dfc3a83f76c21b1893e6ea5a5b2f3e197271b0ad511b45f520b26577fc9adc5d279ced8e7ece63c32603327c284c4cdf7a72a2abc7317505e8d1ec8
+AUX libf2c-20110801-main.patch 1708 SHA256 1054e609ec311fe8f8da43d400e762e650bb37405676903b281eed5bdf59535a SHA512 f2c8574f45580d2bf99e5506266668c615f19a985ffa27eefe38d373f083da61dbe486d5c27e034bd38029b46a4a77285e175a7285b1acb37e7a1ecfea6a2bbc WHIRLPOOL 24aefb349f2db7d772fd773039a639eb819cd2be7159e443bb26f0e13929c0409c68f34917bcab09c9eec8a967ec77c4805705c529837028b5b344ff4e372d95
+DIST libf2c-20110801.zip 128845 SHA256 f13c01421e9668dc86c78159d87c2f802dd1f8e62037834285c7ab77200d97d5 SHA512 7a7b7b02ca2b11456aa0deba5094aebc1e9f7070d1742ad76450ec79de7eed967fbd7446524b66c52295ed911471d2dc396d171569b5d37079bdca8220fd2fb6 WHIRLPOOL 7bc8fa6c016dbb860863b39939f27f99156de017a2847764698bc0b5bbf21ff183e783991d6c5200ddba1b636e9a8bb93d560c00344db94b4e9a7b254abdafde
+DIST libf2c-20130927.zip 129082 SHA256 5dff29c58b428fa00cd36b1220e2d71b9882a658fdec1aa094fb7e6e482d6765 SHA512 1a12093dec3c250f4775eebd06f1a9144fdb956ea3162202fb67569fdd956ac5591bc563a0726ca65ea10d465efaac1c1d8024d63bc4a4b5c88bf46242607c8a WHIRLPOOL 0b46ae7e797fe80534a4576508920dca0122fab475b8c3034257b3f3c1bef68d02f981d676565e0e6f82a3ae112b482fb702265dd025202b2359f432dc66a939
+EBUILD libf2c-20110801-r4.ebuild 1256 SHA256 d9ee4d1e37f851b07ec96acfbc6484fb4619f987e0db70b28135f80a29cf186d SHA512 d367309ff9a645e412a5ad2af05bacc2a82df6392e36af6176b950f640337b8b68219e339afe41b147824160e47ef1fcbc85c6a906d13801e4d0a7f202528b69 WHIRLPOOL 3f7f1d2c8fff274eb0aff76e7731e01598cdd6e0ced678cc97b9121ebbc0f06e4f23d038e165b1f941cd7939f1c7a34acec589fa045b507af40c5731c265336b
+EBUILD libf2c-20130927.ebuild 1290 SHA256 c537543561faa7b17b540bb81b64d2b3067b93cac1ce09b7e7126bbf9c3f077b SHA512 a8e33d4a42adc4559828a2c6c8c2746dff6c76d609bd4a0c63c3be8c8b094c3d44afaa89dcb9395f37ac2c2923c473651def6ebcbbdd8e788bcba05ea4836a49 WHIRLPOOL 7e5f7f6602bd689606af219dbef991e524635ad35f9d967f4edf1b795ad852f60d0bdcec917fc585c3584acfc72c777d950eeec0e36f2d3b0cef2ca3eeb42de2
+MISC ChangeLog 2926 SHA256 3d16ac9e8c64366eceeeaeb92286f68b12d220898b6c8231523685b3533dcc3e SHA512 ace8fdb90a8bc64d57c350d6114fb6e799183e27544df9b375239bffa81bdd948226a3b288cd23cd020fcd0d7beafd3956467fd382e39e3ddcf348b689570e1b WHIRLPOOL 79e5cc61a9b034a749e6a6bc9c9d0985893ef256cc065432f10a9f7726af0b6bb313447d4b68690d371b604697d30ab1a473d95ec2995aaaa8b6f9de5e61784a
+MISC ChangeLog-2015 9211 SHA256 d42f27ee42ee1afe089b5a82b0e65ae3338965d9f0505990d7848b07bd33c888 SHA512 7cc9b965d79670dcf70bd1c946b257f7642264637665bdd6fdc14a89dcbfc70f17b9249bc666ba0bf4bc51fb5028a68671c95ab42d15705979d7dbd61c575061 WHIRLPOOL 30ee2db9a27b92481a298bde0f7f23e187f2fd8e76b6d79856a226d3f4ec1139674d24ee79120ac01ab701991d0ede3a5054d2c882d934d15c6b966ad58f5f1d
+MISC metadata.xml 363 SHA256 27fd6dcbcbebd12de381f261666ceaeb66886aac769835e6ef1895cc584de9d2 SHA512 3c5efbb36dba02cfa31cb0b95c78194bfecfcc128b60eb5c11983da6ac26fb0d75bc02e004443fc6365d3cf53b6d9bffc3a0342c185e61ffdc404cb8b4a3f95e WHIRLPOOL 6a3b8a830ef357e03f12bcb72ccd0a3b2d1f40eb5e776329f7137fa16a4bc8e39c8fa3ac29db74f4861a257b9baff2a52fd7a94fcccb1abd8a4f4f416a7bb8ac
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>