3 |
3 |
|
4 |
4 |
EAPI=8
|
5 |
5 |
|
6 |
|
DEB_PR="14"
|
|
6 |
FORTRAN_NEEDED=test
|
|
7 |
|
|
8 |
inherit autotools fortran-2 flag-o-matic
|
|
9 |
|
|
10 |
DEB_PR="1"
|
7 |
11 |
|
8 |
12 |
DESCRIPTION="Header file allowing to call Fortran routines from C and C++"
|
9 |
13 |
HOMEPAGE="https://www-zeus.desy.de/~burow/cfortran/"
|
10 |
14 |
SRC_URI="
|
11 |
15 |
mirror://debian/pool/main/c/${PN}/${PN}_${PV}.orig.tar.gz
|
12 |
|
mirror://debian/pool/main/c/${PN}/${PN}_${PV}-${DEB_PR}.diff.gz"
|
|
16 |
mirror://debian/pool/main/c/${PN}/${PN}_${PV}-${DEB_PR}.debian.tar.xz"
|
13 |
17 |
|
14 |
18 |
SLOT="0"
|
15 |
19 |
LICENSE="LGPL-2"
|
16 |
20 |
KEYWORDS="~alpha amd64 ~arm64 ~hppa ~ia64 ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x86-linux"
|
17 |
|
IUSE="examples"
|
|
21 |
IUSE="examples test"
|
|
22 |
|
|
23 |
RESTRICT="!test? ( test )"
|
18 |
24 |
|
19 |
|
PATCHES=( "${WORKDIR}"/${PN}_${PV}-${DEB_PR}.diff )
|
|
25 |
DOCS=( cfortran.doc )
|
20 |
26 |
|
21 |
|
src_unpack() {
|
|
27 |
src_prepare() {
|
|
28 |
eapply "${WORKDIR}"/debian/patches/*.patch
|
22 |
29 |
default
|
|
30 |
eautoreconf
|
|
31 |
|
23 |
32 |
if use examples; then
|
24 |
|
tar xvzf "${S}"/cfortran.examples.tar.gz || die
|
25 |
|
mv eg examples || die
|
26 |
|
ln -sfn sz1.c examples/sz1/sz1.C || die
|
27 |
|
ln -sfn pz.c examples/pz/pz.C || die
|
|
33 |
# The examples are also used as tests and it's tricky to clean up
|
|
34 |
# afterwards, just save a clean copy (sans Makefiles, as they only
|
|
35 |
# cover the test phase) before the tests are run.
|
|
36 |
cp -ar eg eg_src || die "Failed to preserve a clean copy of examples"
|
|
37 |
rm -f eg_src/Makefile{,.am,.in}
|
28 |
38 |
fi
|
29 |
39 |
}
|
30 |
40 |
|
31 |
|
src_install() {
|
32 |
|
insinto /usr/include/cfortran
|
33 |
|
doins cfortran.h
|
|
41 |
src_configure() {
|
|
42 |
use sparc && append-fflags $(test-flags-FC -fno-store-merging -fno-tree-slp-vectorize) # bug 818400
|
|
43 |
default
|
|
44 |
}
|
34 |
45 |
|
35 |
|
dosym cfortran/cfortran.h /usr/include/cfortran.h
|
|
46 |
src_install() {
|
|
47 |
default
|
36 |
48 |
|
37 |
|
dodoc cfortran.doc debian/{NEWS,changelog,copyright}
|
|
49 |
# For compatibility with older versions
|
|
50 |
dodir /usr/include/cfortran
|
|
51 |
dosym -r /usr/include/cfortran.h /usr/include/cfortran/cfortran.h
|
38 |
52 |
|
|
53 |
docinto debian
|
|
54 |
dodoc "${WORKDIR}"/debian/{NEWS,changelog,copyright}
|
39 |
55 |
docinto html
|
40 |
|
dodoc cfortran.html index.htm # cfortest.c cfortex.f
|
|
56 |
dodoc cfortran.html index.htm
|
41 |
57 |
|
42 |
58 |
if use examples; then
|
43 |
|
insinto /usr/share/${PN}
|
44 |
|
doins -r "${WORKDIR}"/examples
|
|
59 |
docinto examples
|
|
60 |
dodoc -r cfortest.c cfortex.f eg_src/*
|
45 |
61 |
fi
|
46 |
62 |
}
|