public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sergey Torokhov" <torokhov-s-a@yandex.ru>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/proj/guru:dev commit in: dev-libs/ftl/
Date: Mon, 26 Apr 2021 19:32:08 +0000 (UTC)	[thread overview]
Message-ID: <1619465487.2ea4fa55f156bce9991c13ac5c0024af2364ebc2.SergeyTorokhov@gentoo> (raw)

commit:     2ea4fa55f156bce9991c13ac5c0024af2364ebc2
Author:     Sergey Torokhov <torokhov-s-a <AT> yandex <DOT> ru>
AuthorDate: Mon Apr 26 19:26:16 2021 +0000
Commit:     Sergey Torokhov <torokhov-s-a <AT> yandex <DOT> ru>
CommitDate: Mon Apr 26 19:31:27 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=2ea4fa55

dev-libs/ftl: fix intall build type as release instead of debug

As make options were not passed on install phase it recompiled
library in as BUILD=debug mode instead of 'release'.

Also gfortran command called directly as on install phase
it wasn't passed into make command.

Now build type and some other parameters passed in src_prepare
instead of src_compile and src_insall.

Closes: https://bugs.gentoo.org/785739

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

 dev-libs/ftl/ftl-1.0_p20210308.ebuild | 35 ++++++++++++++++++++++++++---------
 1 file changed, 26 insertions(+), 9 deletions(-)

diff --git a/dev-libs/ftl/ftl-1.0_p20210308.ebuild b/dev-libs/ftl/ftl-1.0_p20210308.ebuild
index 4cdbc8837..6981da492 100644
--- a/dev-libs/ftl/ftl-1.0_p20210308.ebuild
+++ b/dev-libs/ftl/ftl-1.0_p20210308.ebuild
@@ -34,10 +34,33 @@ pkg_setup() {
 src_prepare() {
 	default
 
+	case $(tc-getFC) in
+		*gfortran* )
+			sed -i -e '/gnu)/,/COMPILER =/ s:gfortran:'"$(tc-getFC)"':' \
+			-e '/gnu)/,/^\tFLAGS =/ s:(BUILDDIR):(BUILDDIR) '"${FCFLAGS}"':' \
+			-e '/gnu)/,/CXXCOMPILER =/ s:g++:'"$(tc-getCXX)"':' \
+			-e '/gnu)/,/CXXFLAGS =/ s:CXXFLAGS = .*:CXXFLAGS = '"${CXXFLAGS}"':' \
+			makefile || die
+			;;
+		*ifort* )
+			sed -i -e '/^PLATFORM/ s:gnu:intel:' \
+			-e '/intel)/,/COMPILER =/ s:ifort:'"$(tc-getFC)"':' \
+			-e '/intel)/,/^\tFLAGS =/ s:(BUILDDIR):(BUILDDIR) '"${FCFLAGS}"':' \
+			-e '/intel)/,/CXXCOMPILER =/ s:g++:'"$(tc-getCXX)"':' \
+			-e '/intel)/,/CXXFLAGS =/ s:CXXFLAGS = .*:CXXFLAGS = '"${CXXFLAGS}"':' \
+			makefile || die
+			;;
+		* )
+			die "Sorry, GNU gfortran or Intel ifort are currently supported in the ebuild"
+			;;
+	esac
+
 	# Replase install PREFIX, LIBDIR, add library soname
-	sed -i -e 's:PREFIX ?= /usr/local:PREFIX ?= '"${ED}"'/usr/:' \
+	sed -i -e '/^BUILD ?=/s:debug:release:' \
+		-e 's:PREFIX ?= /usr/local:PREFIX ?= '"${ED}"'/usr/:' \
 		-e 's:(PREFIX)/lib:(PREFIX)/'"$(get_libdir)"':' \
-		-e 's:SOLDFLAGS = -shared:SOLDFLAGS = -shared -Wl,-soname=libftl.so.1 '"${LDFLAGS}"':' makefile || die
+		-e 's:SOLDFLAGS = -shared:SOLDFLAGS = -shared -Wl,-soname=libftl.so.1 '"${LDFLAGS}"':' \
+		makefile || die
 }
 
 src_configure() {
@@ -45,13 +68,7 @@ src_configure() {
 }
 
 src_compile() {
-	emake \
-		BUILD=release \
-		USE_PCRE=$(usex pcre true false) \
-		COMPILER="$(tc-getFC)" \
-		FLAGS="${FCFLAGS}" \
-		CXXCOMPILER="$(tc-getCXX)" \
-		CXXFLAGS="${CXXFLAGS}"
+	emake USE_PCRE=$(usex pcre true false)
 }
 
 src_test() {


             reply	other threads:[~2021-04-26 19:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-26 19:32 Sergey Torokhov [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-06-02 21:06 [gentoo-commits] repo/proj/guru:dev commit in: dev-libs/ftl/ Sergey Torokhov
2023-05-16 21:56 Sergey Torokhov
2022-03-06 23:11 Sergey Torokhov
2022-03-06 23:11 Sergey Torokhov
2022-02-09 13:12 Anna Vyalkova
2021-04-28 21:25 Sergey Torokhov
2021-04-25 13:41 Sergey Torokhov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1619465487.2ea4fa55f156bce9991c13ac5c0024af2364ebc2.SergeyTorokhov@gentoo \
    --to=torokhov-s-a@yandex.ru \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox