diff options
author | Justin Lecher <jlec@gentoo.org> | 2015-02-02 08:28:51 +0000 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2015-02-02 08:28:51 +0000 |
commit | babec468ac3cab28ae21eee16c58c8d882eaed64 (patch) | |
tree | 446a7b6784fb3cbf08263459210faa385193916e /dev-libs | |
parent | sci-libs/libsvm: Respect CC, #484200 (diff) | |
download | gentoo-2-babec468ac3cab28ae21eee16c58c8d882eaed64.tar.gz gentoo-2-babec468ac3cab28ae21eee16c58c8d882eaed64.tar.bz2 gentoo-2-babec468ac3cab28ae21eee16c58c8d882eaed64.zip |
dev-libs/libf2c: Add patch for format-security, #538342; thanks Ted Tanberry for the patch
(Portage version: 2.2.15/cvs/Linux x86_64, signed Manifest commit with key B9D4F231BD1558AB!)
Diffstat (limited to 'dev-libs')
-rw-r--r-- | dev-libs/libf2c/ChangeLog | 10 | ||||
-rw-r--r-- | dev-libs/libf2c/files/libf2c-20110801-format-security.patch | 11 | ||||
-rw-r--r-- | dev-libs/libf2c/libf2c-20110801-r4.ebuild | 58 |
3 files changed, 77 insertions, 2 deletions
diff --git a/dev-libs/libf2c/ChangeLog b/dev-libs/libf2c/ChangeLog index b13eb64b4102..1ac36b467248 100644 --- a/dev-libs/libf2c/ChangeLog +++ b/dev-libs/libf2c/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-libs/libf2c -# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/libf2c/ChangeLog,v 1.62 2014/02/03 09:34:00 jlec Exp $ +# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/libf2c/ChangeLog,v 1.63 2015/02/02 08:28:51 jlec Exp $ + +*libf2c-20110801-r4 (02 Feb 2015) + + 02 Feb 2015; Justin Lecher <jlec@gentoo.org> +libf2c-20110801-r4.ebuild, + +files/libf2c-20110801-format-security.patch: + Add patch for format-security, #538342; thanks Ted Tanberry for the patch 03 Feb 2014; Justin Lecher <jlec@gentoo.org> -files/20070912-link-shared-libf2c-correctly.patch, 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/libf2c-20110801-r4.ebuild b/dev-libs/libf2c/libf2c-20110801-r4.ebuild new file mode 100644 index 000000000000..cf96c434bdcf --- /dev/null +++ b/dev-libs/libf2c/libf2c-20110801-r4.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/libf2c/libf2c-20110801-r4.ebuild,v 1.1 2015/02/02 08:28:51 jlec Exp $ + +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 +} |