dev-libs/ftl: add 1.0_p20220209

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>
This commit is contained in:
Anna (cybertailor) Vyalkova
2022-02-09 18:11:51 +05:00
parent b4c64697ef
commit 97e843d182
2 changed files with 67 additions and 0 deletions

View File

@@ -1 +1,2 @@
DIST ftl-1.0_p20210308.tar.gz 732263 BLAKE2B 2a369b809f2b0d77ffe002d2e9ffaffabcb4f12565c0bb5bcbcce5899bac030dd127427dd8f89b3595d98441b9b145daf8661ed9c46977ac6667f774bb748e91 SHA512 9a1777da96fbde00669586899658d63a64b19252e90a01ccc0440e0f79f948ddd9dc118774365e227a75b80edf4c784760164268efb2d1f69000fe68ac5eb5b9
DIST ftl-1.0_p20220209.tar.gz 732360 BLAKE2B 154d7124678852dc56087c51cd7bdbb2ffa7f6a628c959f760835b420cc5bdb74bfd4e4b0e9e0d822a26eff9b100102849b1952d9ff0f5f6cf6991859eedff4a SHA512 0673ac4116c3bc9d3e55188b0d0d663f83c2e9958888780e966516c0421a08f276443ed6de637f178edb07e59c37472eb48d892aa3cbded4db68803e8bc1fa10

View File

@@ -0,0 +1,66 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
FORTRAN_STANDARD="2003"
inherit flag-o-matic fortran-2 toolchain-funcs
COMMIT="69fa39bbf9441d1686e65b7e19b1606f8cab4b9f"
DESCRIPTION="The Fortran Template Library (FTL) is a general purpose library for Fortran 2003"
HOMEPAGE="https://github.com/SCM-NV/ftl"
SRC_URI="https://github.com/SCM-NV/${PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/${PN}-${COMMIT}"
LICENSE="LGPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="pcre test"
RESTRICT="!test? ( test )"
REQUIRED_USE="test? ( pcre )" # Some tests fail if 'pcre' is disabled
RDEPEND="pcre? ( dev-libs/libpcre:3 )"
DEPEND="${RDEPEND}"
BDEPEND="virtual/pkgconfig"
get_platform() {
case $(tc-getFC) in
*gfortran*) echo "gnu" ;;
*ifort*) echo "intel" ;;
*nagfor*) echo "nag" ;;
*) die "Unsupported compiler: $(tc-getFC)" ;;
esac
}
src_configure() {
filter-flags -fpch-preprocess
}
src_compile() {
emake_args=(
FC=$(tc-getFC)
CXX=$(tc-getCXX)
PLATFORM=$(get_platform)
BUILD=custom
USE_PCRE=$(usex pcre true false)
)
emake "${emake_args[@]}"
}
src_test() {
emake_args=(
FC=$(tc-getFC)
CXX=$(tc-getCXX)
PLATFORM=$(get_platform)
BUILD=custom
USE_PCRE=$(usex pcre true false)
)
emake "${emake_args[@]}" test
}
src_install() {
emake DESTDIR="${D}" PREFIX="${EPREFIX}"/usr LIBDIR=$(get_libdir) install
einstalldocs
}