public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Mike Gilbert" <floppym@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/libatasmart/
Date: Mon, 28 Dec 2020 17:35:51 +0000 (UTC)	[thread overview]
Message-ID: <1609176946.c726509edbce1bb066d87a43aaac8fdfb741c272.floppym@gentoo> (raw)

commit:     c726509edbce1bb066d87a43aaac8fdfb741c272
Author:     David Michael <fedora.dm0 <AT> gmail <DOT> com>
AuthorDate: Sat Dec 26 02:50:51 2020 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Mon Dec 28 17:35:46 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c726509e

dev-libs/libatasmart: support cross-compiling

The strpool directory must be compiled natively.  The build system
makes an attempt to handle this by setting CC, AM_CFLAGS, etc., but
configure substitutes CFLAGS directly, so it winds up with CBUILD
CC and CHOST CFLAGS which breaks everything.  This just runs emake
in that directory while overriding flags with command arguments.

Package-Manager: Portage-3.0.9, Repoman-3.0.2
Signed-off-by: David Michael <fedora.dm0 <AT> gmail.com>
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 dev-libs/libatasmart/libatasmart-0.19_p5.ebuild | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/dev-libs/libatasmart/libatasmart-0.19_p5.ebuild b/dev-libs/libatasmart/libatasmart-0.19_p5.ebuild
index 7da99e26ec2..8afa393021d 100644
--- a/dev-libs/libatasmart/libatasmart-0.19_p5.ebuild
+++ b/dev-libs/libatasmart/libatasmart-0.19_p5.ebuild
@@ -3,6 +3,8 @@
 
 EAPI=7
 
+inherit toolchain-funcs
+
 DESCRIPTION="A small and lightweight parser library for ATA S.M.A.R.T. hard disks"
 HOMEPAGE="https://salsa.debian.org/utopia-team/libatasmart"
 SRC_URI="mirror://debian/pool/main/liba/${PN}/${PN}_${PV/_p*}.orig.tar.xz
@@ -15,9 +17,7 @@ IUSE="static-libs"
 
 RDEPEND="virtual/libudev:="
 DEPEND="${RDEPEND}"
-BDEPEND="
-	virtual/pkgconfig
-"
+BDEPEND="virtual/pkgconfig"
 
 S="${WORKDIR}/${P/_p*}"
 
@@ -34,6 +34,17 @@ src_configure() {
 	econf $(use_enable static-libs static)
 }
 
+src_compile() {
+	if tc-is-cross-compiler; then
+		tc-export_build_env
+		emake -C strpool strpool \
+			CFLAGS="${BUILD_CFLAGS}" \
+			CPPFLAGS="${BUILD_CPPFLAGS}" \
+			LDFLAGS="${BUILD_LDFLAGS}"
+	fi
+	emake
+}
+
 src_install() {
 	default
 	find "${ED}" -type f -name "*.la" -delete || die


             reply	other threads:[~2020-12-28 17:35 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-28 17:35 Mike Gilbert [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-05-26  4:45 [gentoo-commits] repo/gentoo:master commit in: dev-libs/libatasmart/ WANG Xuerui
2021-05-27 14:34 Yixun Lan
2019-12-14 23:05 Pacho Ramos
2019-11-25  7:30 Sergei Trofimovich
2019-11-23  1:54 Aaron Bauman
2019-11-22 13:44 Matt Turner
2019-11-22 10:01 Mikle Kolyada
2019-11-20 13:23 Agostino Sarubbo
2019-11-20 11:48 Agostino Sarubbo
2019-11-20 11:27 Agostino Sarubbo
2019-11-20 11:16 Agostino Sarubbo
2019-10-14 14:23 Lars Wendler
2019-10-14 14:23 Lars Wendler
2019-05-22 21:20 Aaron Bauman
2018-04-03 21:02 Matt Turner
2017-11-05 22:16 Sergei Trofimovich
2017-10-28 14:15 Manuel Rüger
2017-10-27 13:49 Thomas Deutschmann
2017-10-05  8:37 Sergei Trofimovich
2017-09-19 19:46 Markus Meier
2017-09-15 15:38 Tobias Klausmann
2017-09-10 20:46 Sergei Trofimovich
2017-09-09 11:53 Sergei Trofimovich
2017-02-19  3:06 Michael Palimaka
2016-12-16  8:42 Fabian Groffen
2016-11-13  0:30 Gilles Dartiguelongue
2016-09-29 15:51 Michael Palimaka

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=1609176946.c726509edbce1bb066d87a43aaac8fdfb741c272.floppym@gentoo \
    --to=floppym@gentoo.org \
    --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