commit:     99272340c56fe3cfa36bcda8e6e66f02ca9aacc9
Author:     Sergey Torokhov <torokhov-s-a <AT> yandex <DOT> ru>
AuthorDate: Sun Mar  6 23:03:10 2022 +0000
Commit:     Sergey Torokhov <torokhov-s-a <AT> yandex <DOT> ru>
CommitDate: Sun Mar  6 23:08:43 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=99272340

dev-libs/ftl: Add fortran-2_pkg_setup, LDFLAGS; fix install BUILD type

Closes: https://bugs.gentoo.org/833321
Closes: https://bugs.gentoo.org/833318

Signed-off-by: Sergey Torokhov <torokhov-s-a <AT> yandex.ru>

 ...1.0_p20220209.ebuild => ftl-1.0_p20220209-r1.ebuild} | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/dev-libs/ftl/ftl-1.0_p20220209.ebuild 
b/dev-libs/ftl/ftl-1.0_p20220209-r1.ebuild
similarity index 76%
rename from dev-libs/ftl/ftl-1.0_p20220209.ebuild
rename to dev-libs/ftl/ftl-1.0_p20220209-r1.ebuild
index f980fa998..2b3912325 100644
--- a/dev-libs/ftl/ftl-1.0_p20220209.ebuild
+++ b/dev-libs/ftl/ftl-1.0_p20220209-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -23,6 +23,11 @@ RDEPEND="pcre? ( dev-libs/libpcre:3 )"
 DEPEND="${RDEPEND}"
 BDEPEND="virtual/pkgconfig"
 
+# Checking of supported fortran standard version is required here
+pkg_setup() {
+       fortran-2_pkg_setup
+}
+
 get_platform() {
        case $(tc-getFC) in
                *gfortran*) echo "gnu" ;;
@@ -32,6 +37,13 @@ get_platform() {
        esac
 }
 
+src_prepare() {
+       default
+
+       # Pass LDFLAGS to respect it
+       sed -i '/SOLDFLAGS =/ s/$/ '"${LDFLAGS}"'/' makefile || die
+}
+
 src_configure() {
        filter-flags -fpch-preprocess
 }
@@ -61,6 +73,7 @@ src_test() {
 }
 
 src_install() {
-       emake DESTDIR="${D}" PREFIX="${EPREFIX}"/usr LIBDIR=$(get_libdir) 
install
+       # Set BUILD to custom as default type is debug
+       emake BUILD=custom DESTDIR="${D}" PREFIX="${EPREFIX}"/usr 
LIBDIR=$(get_libdir) install
        einstalldocs
 }

Reply via email to