diff options
Diffstat (limited to 'dev-libs/libf2c/libf2c-20130927-r1.ebuild')
-rw-r--r-- | dev-libs/libf2c/libf2c-20130927-r1.ebuild | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/dev-libs/libf2c/libf2c-20130927-r1.ebuild b/dev-libs/libf2c/libf2c-20130927-r1.ebuild new file mode 100644 index 000000000000..52fc3a771992 --- /dev/null +++ b/dev-libs/libf2c/libf2c-20130927-r1.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit flag-o-matic toolchain-funcs + +DESCRIPTION="Library that converts FORTRAN to C source" +HOMEPAGE="http://www.netlib.org/f2c/" +SRC_URI="http://www.netlib.org/f2c/${PN}.zip -> ${P}.zip" + +LICENSE="HPND" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux" +IUSE="static-libs" + +BDEPEND="app-arch/unzip" + +S="${WORKDIR}" + +PATCHES=( + "${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 + "${FILESDIR}"/${PN}-20130927-fix-buildsystem.patch +) + +src_configure() { + tc-export AR CC RANLIB +} + +src_compile() { + if use static-libs; then + emake -f makefile.u all + # Clean up files so we can recompile + # with -fPIC for the shared lib + rm -v *.o || die "clean failed" + fi + + append-cflags -fPIC + emake -f makefile.u libf2c.so +} + +src_install () { + doheader f2c.h + + dolib.so libf2c.so.2 + dosym libf2c.so.2 /usr/$(get_libdir)/libf2c.so + use static-libs && dolib.a libf2c.a + + einstalldocs + dodoc Notice +} |