summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Fabbro <bicatali@gentoo.org>2009-04-07 12:16:44 +0000
committerSebastien Fabbro <bicatali@gentoo.org>2009-04-07 12:16:44 +0000
commit13e644187a440f2540bba85f16ea3d6a61fef8fd (patch)
treec2078528f1371a4010f6ac40f89dbe74b80a7e09 /dev-libs/libf2c
parentuse metadata.xml instead of use.local.desc (diff)
downloadgentoo-2-13e644187a440f2540bba85f16ea3d6a61fef8fd.tar.gz
gentoo-2-13e644187a440f2540bba85f16ea3d6a61fef8fd.tar.bz2
gentoo-2-13e644187a440f2540bba85f16ea3d6a61fef8fd.zip
Version bump (bug #263725, thanks to jlec) and fixed for as-needed (bug #248350). Added a static use flag for static library building switch.
(Portage version: 2.2_rc28/cvs/Linux x86_64)
Diffstat (limited to 'dev-libs/libf2c')
-rw-r--r--dev-libs/libf2c/ChangeLog14
-rw-r--r--dev-libs/libf2c/files/20070912-link-shared-libf2c-correctly.patch2
-rw-r--r--dev-libs/libf2c/files/20090407-link-shared-libf2c-correctly.patch11
-rw-r--r--dev-libs/libf2c/files/libf2c-20021004-shared-object.patch47
-rw-r--r--dev-libs/libf2c/libf2c-20021004-r1.ebuild40
-rw-r--r--dev-libs/libf2c/libf2c-20090407.ebuild59
6 files changed, 83 insertions, 90 deletions
diff --git a/dev-libs/libf2c/ChangeLog b/dev-libs/libf2c/ChangeLog
index fdd8ca164349..b7bb05f7219e 100644
--- a/dev-libs/libf2c/ChangeLog
+++ b/dev-libs/libf2c/ChangeLog
@@ -1,6 +1,16 @@
# ChangeLog for dev-libs/libf2c
-# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/libf2c/ChangeLog,v 1.31 2008/11/26 16:43:36 ranger Exp $
+# Copyright 2002-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/libf2c/ChangeLog,v 1.32 2009/04/07 12:16:44 bicatali Exp $
+
+*libf2c-20090407 (07 Apr 2009)
+
+ 07 Apr 2009; Sébastien Fabbro <bicatali@gentoo.org>
+ -files/libf2c-20021004-shared-object.patch,
+ files/20070912-link-shared-libf2c-correctly.patch,
+ +files/20090407-link-shared-libf2c-correctly.patch,
+ -libf2c-20021004-r1.ebuild, +libf2c-20090407.ebuild:
+ Version bump (bug #263725, thanks to jlec) and fixed for as-needed (bug
+ #248350). Added a static use flag for static library building switch.
26 Nov 2008; Brent Baude <ranger@gentoo.org> libf2c-20070912.ebuild:
stable ppc64, bug 245830
diff --git a/dev-libs/libf2c/files/20070912-link-shared-libf2c-correctly.patch b/dev-libs/libf2c/files/20070912-link-shared-libf2c-correctly.patch
index d8f20a942d89..261b76eb6c29 100644
--- a/dev-libs/libf2c/files/20070912-link-shared-libf2c-correctly.patch
+++ b/dev-libs/libf2c/files/20070912-link-shared-libf2c-correctly.patch
@@ -5,7 +5,7 @@
libf2c.so: $(OFILES)
- cc -shared -o libf2c.so $(OFILES)
-+ $(CC) -shared -Wl,-soname,libf2c.so.2 -lm -o libf2c.so.2 $(OFILES)
++ $(CC) -shared $(LDFLAGS) -Wl,-soname,libf2c.so.2 -lm $(OFILES) -o libf2c.so.2
### If your system lacks ranlib, you don't need it; see README.
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..35b3bb135c08
--- /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 -lm $(OFILES) -o libf2c.so.2
+
+ ### If your system lacks ranlib, you don't need it; see README.
+
diff --git a/dev-libs/libf2c/files/libf2c-20021004-shared-object.patch b/dev-libs/libf2c/files/libf2c-20021004-shared-object.patch
deleted file mode 100644
index baab44a6bd5a..000000000000
--- a/dev-libs/libf2c/files/libf2c-20021004-shared-object.patch
+++ /dev/null
@@ -1,47 +0,0 @@
---- makefile.u.orig 2004-06-30 23:30:44.980603208 +0200
-+++ makefile.u 2004-06-30 23:33:28.220786928 +0200
-@@ -17,6 +17,7 @@
- # compile, then strip unnecessary symbols
- .c.o:
- $(CC) -c -DSkip_f2c_Undefs $(CFLAGS) $*.c
-+ $(CC) -c -DSkip_f2c_Undefs $(CFLAGS) -fPIC $*.c -o shared/$*.o
- ld -r -x -o $*.xxx $*.o
- mv $*.xxx $*.o
- ## Under Solaris (and other systems that do not understand ld -x),
-@@ -63,7 +64,14 @@
- # For INTEGER*8 support (which requires system-dependent adjustments to
- # f2c.h), add $(QINT) to the libf2c.a dependency list below...
-
--all: f2c.h signal1.h sysdep1.h libf2c.a
-+dirs:
-+ mkdir -p shared
-+
-+libf2c.so: $(MISC) $(POW) $(CX) $(DCX) $(REAL) $(DBL) $(INT) \
-+ $(HALF) $(CMP) $(EFL) $(CHAR) $(I77) $(TIME)
-+ gcc -shared -o libf2c.so shared/*.o
-+
-+all: dirs f2c.h signal1.h sysdep1.h libf2c.a libf2c.so
-
- libf2c.a: $(MISC) $(POW) $(CX) $(DCX) $(REAL) $(DBL) $(INT) \
- $(HALF) $(CMP) $(EFL) $(CHAR) $(I77) $(TIME)
-@@ -74,9 +82,11 @@
-
- f77vers.o: f77vers.c
- $(CC) -c f77vers.c
-+ $(CC) -fPIC -c f77vers.c -o shared/f77vers.o
-
- i77vers.o: i77vers.c
- $(CC) -c i77vers.c
-+ $(CC) -fPIC -c i77vers.c -o shared/i77vers.o
-
- # To get an "f2c.h" for use with "f2c -C++", first "make hadd"
- hadd: f2c.h0 f2ch.add
-@@ -108,7 +118,7 @@
- -ranlib $(LIBDIR)/libf2c.a
-
- clean:
-- rm -f libf2c.a *.o arith.h signal1.h sysdep1.h
-+ rm -f libf2c.a *.o shared/*.o arith.h signal1.h sysdep1.h
-
- backspac.o: fio.h
- close.o: fio.h
diff --git a/dev-libs/libf2c/libf2c-20021004-r1.ebuild b/dev-libs/libf2c/libf2c-20021004-r1.ebuild
deleted file mode 100644
index e4c6bbdefed1..000000000000
--- a/dev-libs/libf2c/libf2c-20021004-r1.ebuild
+++ /dev/null
@@ -1,40 +0,0 @@
-# Copyright 1999-2008 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/libf2c/libf2c-20021004-r1.ebuild,v 1.14 2008/11/06 15:05:15 bicatali Exp $
-
-inherit toolchain-funcs eutils
-
-DESCRIPTION="Library that converts FORTRAN to C source."
-HOMEPAGE="ftp://ftp.netlib.org/f2c/index.html"
-SRC_URI="ftp://ftp.netlib.org/f2c/${PN}.zip"
-
-LICENSE="libf2c"
-SLOT="0"
-KEYWORDS="alpha amd64 ppc ppc64 sparc x86"
-IUSE=""
-
-DEPEND="virtual/libc
- app-arch/unzip"
-
-S="${WORKDIR}/${PN}"
-
-src_unpack() {
- unpack ${A}
- cd "${S}"
- epatch "${FILESDIR}"/${P}-shared-object.patch
-}
-
-src_compile() {
- emake -f makefile.u all \
- CFLAGS="${CFLAGS}" \
- CC="$(tc-getCC)" \
- || die
-}
-
-src_install () {
- dolib.a libf2c.a
- dolib libf2c.so
- insinto /usr/include
- doins f2c.h
- dodoc README Notice
-}
diff --git a/dev-libs/libf2c/libf2c-20090407.ebuild b/dev-libs/libf2c/libf2c-20090407.ebuild
new file mode 100644
index 000000000000..8f0edc89d680
--- /dev/null
+++ b/dev-libs/libf2c/libf2c-20090407.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/libf2c/libf2c-20090407.ebuild,v 1.1 2009/04/07 12:16:44 bicatali Exp $
+
+EAPI=2
+inherit toolchain-funcs eutils
+
+DESCRIPTION="Library that converts FORTRAN to C source."
+HOMEPAGE="ftp://ftp.netlib.org/f2c/index.html"
+# copy this one and rename it on the gentoo mirrors
+#SRC_URI="ftp://ftp.netlib.org/f2c/${PN}.zip"
+SRC_URI="mirror://gentoo/${P}.zip"
+
+LICENSE="libf2c"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE="static"
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/20051004-add-ofiles-dep.patch
+ epatch "${FILESDIR}"/${PV}-link-shared-libf2c-correctly.patch
+}
+
+src_compile() {
+ emake \
+ -f makefile.u \
+ libf2c.so \
+ CFLAGS="${CFLAGS} -fPIC" \
+ CC="$(tc-getCC)" \
+ || die "libf2c.so failed"
+
+ # Clean up files so we can recompile without PIC for the static lib
+ if use static; then
+ rm *.o || die "clean failed"
+ emake \
+ -f makefile.u \
+ all \
+ CFLAGS="${CFLAGS}" \
+ CC="$(tc-getCC)" \
+ || die "all failed"
+ fi
+}
+
+src_install () {
+ dolib libf2c.so.2 || die "dolib failed"
+ dosym libf2c.so.2 /usr/$(get_libdir)/libf2c.so
+ if use static; then
+ dolib.a libf2c.a || die "dolib.a failed"
+ fi
+ insinto /usr/include
+ doins f2c.h || die "f2c.h install failed"
+ dodoc README Notice || die "doc install failed"
+}