mirror of
https://anongit.gentoo.org/git/repo/gentoo.git
synced 2026-05-06 07:27:03 -04:00
dev-lang/cfortran: Mark as C17
Header uses a lot of macro magic to generate correct interopt. This includes usage C functions with empty arg lists to use as polymorphic functions. C23 fails this usage. Can't be fixed without large amounts of macro modifications. Best to mark as C17 so tests run. Closes: https://bugs.gentoo.org/963032 Signed-off-by: NHOrus <jy6x2b32pie9@yahoo.com> Part-of: https://github.com/gentoo/gentoo/pull/45904 Closes: https://github.com/gentoo/gentoo/pull/45904 Signed-off-by: Alexander Puck Neuwirth <apn-pucky@gentoo.org>
This commit is contained in:
committed by
Alexander Puck Neuwirth
parent
3180e99fc3
commit
d58870c5fd
@@ -0,0 +1,66 @@
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
FORTRAN_NEEDED=test
|
||||
|
||||
inherit autotools fortran-2 flag-o-matic
|
||||
|
||||
DEB_PR="1"
|
||||
|
||||
# https://github.com/bastien-roucaries/cfortran is for the Debian fork
|
||||
DESCRIPTION="Header file allowing to call Fortran routines from C and C++"
|
||||
HOMEPAGE="https://www-zeus.desy.de/~burow/cfortran/ https://github.com/bastien-roucaries/cfortran"
|
||||
SRC_URI="mirror://debian/pool/main/c/${PN}/${PN}_${PV}.orig.tar.gz"
|
||||
SRC_URI+=" mirror://debian/pool/main/c/${PN}/${PN}_${PV}-${DEB_PR}.debian.tar.xz"
|
||||
|
||||
LICENSE="LGPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
|
||||
IUSE="examples test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
if [[ -d "${WORKDIR}"/debian/patches ]] ; then
|
||||
eapply "${WORKDIR}"/debian/patches/
|
||||
fi
|
||||
|
||||
eautoreconf
|
||||
|
||||
if use examples; then
|
||||
# The examples are also used as tests and it's tricky to clean up
|
||||
# afterwards, just save a clean copy (sans Makefiles, as they only
|
||||
# cover the test phase) before the tests are run.
|
||||
cp -ar eg eg_src || die "Failed to preserve a clean copy of examples"
|
||||
rm -f eg_src/Makefile{,.am,.in}
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
use sparc && append-fflags $(test-flags-FC -fno-store-merging -fno-tree-slp-vectorize) # bug #818400
|
||||
# bug #866560
|
||||
filter-lto
|
||||
append-flags -fno-strict-aliasing
|
||||
append-cflags $(test-flags-CC -fcommon) # bug #899452
|
||||
append-cflags -std=gnu17 # bug #963032
|
||||
default
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
# For compatibility with older versions
|
||||
dodir /usr/include/cfortran
|
||||
dosym -r /usr/include/cfortran.h /usr/include/cfortran/cfortran.h
|
||||
|
||||
docinto debian
|
||||
dodoc "${WORKDIR}"/debian/{NEWS,changelog,copyright}
|
||||
|
||||
if use examples; then
|
||||
docinto examples
|
||||
dodoc -r cfortest.c cfortex.f eg_src/*
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user