mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-23 16:49:10 -07:00
dev-libs/libf2c: Port to EAPI 7
Package-Manager: Portage-2.3.75, Repoman-2.3.17 Signed-off-by: David Seifert <soap@gentoo.org>
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
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
|
||||
--- a/makefile.u
|
||||
+++ b/makefile.u
|
||||
@@ -69,7 +69,9 @@
|
||||
OFILES = $(MISC) $(POW) $(CX) $(DCX) $(REAL) $(DBL) $(INT) \
|
||||
$(HALF) $(CMP) $(EFL) $(CHAR) $(I77) $(TIME)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--- makefile.u.orig 2008-07-07 23:27:41.000000000 -0700
|
||||
+++ makefile.u 2008-07-07 23:28:39.000000000 -0700
|
||||
--- a/makefile.u
|
||||
+++ b/makefile.u
|
||||
@@ -82,7 +82,7 @@
|
||||
## of "cc -shared".
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--- libf2c2-20090411.orig/f2c.h0
|
||||
+++ libf2c2-20090411/f2c.h0
|
||||
--- a/f2c.h0
|
||||
+++ b/f2c.h0
|
||||
@@ -7,21 +7,35 @@
|
||||
#ifndef F2C_INCLUDE
|
||||
#define F2C_INCLUDE
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--- arithchk.c
|
||||
+++ arithchk.c
|
||||
--- a/arithchk.c
|
||||
+++ b/arithchk.c
|
||||
@@ -122,7 +122,7 @@
|
||||
long Cray1;
|
||||
|
||||
|
||||
65
dev-libs/libf2c/files/libf2c-20130927-fix-buildsystem.patch
Normal file
65
dev-libs/libf2c/files/libf2c-20130927-fix-buildsystem.patch
Normal file
@@ -0,0 +1,65 @@
|
||||
--- a/makefile.u
|
||||
+++ b/makefile.u
|
||||
@@ -12,16 +12,12 @@
|
||||
# -fPIC
|
||||
# to the CFLAGS = line below.
|
||||
|
||||
-.SUFFIXES: .c .o
|
||||
-CC = cc
|
||||
SHELL = /bin/sh
|
||||
-CFLAGS = -O
|
||||
|
||||
# compile, then strip unnecessary symbols
|
||||
.c.o:
|
||||
- $(CC) -c -DSkip_f2c_Undefs $(CFLAGS) $*.c
|
||||
- ld -r -x -o $*.xxx $*.o
|
||||
- mv $*.xxx $*.o
|
||||
+ $(CC) -c $(CPPFLAGS) $(CFLAGS) -DSkip_f2c_Undefs $< -o $@
|
||||
+
|
||||
## Under Solaris (and other systems that do not understand ld -x),
|
||||
## omit -x in the ld line above.
|
||||
## If your system does not have the ld command, comment out
|
||||
@@ -74,8 +70,8 @@
|
||||
$(OFILES): f2c.h signal1.h sysdep1.h
|
||||
|
||||
libf2c.a: $(OFILES)
|
||||
- ar r libf2c.a $?
|
||||
- -ranlib libf2c.a
|
||||
+ $(AR) r libf2c.a $?
|
||||
+ $(RANLIB) libf2c.a
|
||||
|
||||
## Shared-library variant: the following rule works on Linux
|
||||
## systems. Details are system-dependent. Under Linux, -fPIC
|
||||
@@ -92,12 +88,6 @@
|
||||
|
||||
### If your system lacks ranlib, you don't need it; see README.
|
||||
|
||||
-f77vers.o: f77vers.c
|
||||
- $(CC) -c f77vers.c
|
||||
-
|
||||
-i77vers.o: i77vers.c
|
||||
- $(CC) -c i77vers.c
|
||||
-
|
||||
# To get an "f2c.h" for use with "f2c -C++", first "make hadd"
|
||||
hadd: f2c.h0 f2ch.add
|
||||
cat f2c.h0 f2ch.add >f2c.h
|
||||
@@ -125,7 +115,7 @@
|
||||
|
||||
install: libf2c.a
|
||||
cp libf2c.a $(LIBDIR)
|
||||
- -ranlib $(LIBDIR)/libf2c.a
|
||||
+ $(RANLIB) $(LIBDIR)/libf2c.a
|
||||
|
||||
clean:
|
||||
rm -f libf2c.a *.o arith.h signal1.h sysdep1.h
|
||||
@@ -185,8 +175,8 @@
|
||||
xwsne.o: fmt.h
|
||||
|
||||
arith.h: arithchk.c
|
||||
- $(CC) $(CFLAGS) -DNO_FPINIT arithchk.c -lm ||\
|
||||
- $(CC) -DNO_LONG_LONG $(CFLAGS) -DNO_FPINIT arithchk.c -lm
|
||||
+ $(CC) $(CPPFLAGS) $(CFLAGS) -DNO_FPINIT arithchk.c -lm ||\
|
||||
+ $(CC) -DNO_LONG_LONG $(CPPFLAGS) $(CFLAGS) -DNO_FPINIT arithchk.c -lm
|
||||
./a.out >arith.h
|
||||
rm -f a.out arithchk.o
|
||||
|
||||
55
dev-libs/libf2c/libf2c-20130927-r1.ebuild
Normal file
55
dev-libs/libf2c/libf2c-20130927-r1.ebuild
Normal file
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user