diff options
author | David Michael <fedora.dm0@gmail.com> | 2020-12-25 21:50:51 -0500 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2020-12-28 12:35:46 -0500 |
commit | c726509edbce1bb066d87a43aaac8fdfb741c272 (patch) | |
tree | 29eb1ac209c57104e698dccda6e7a23777cb5bcd /dev-libs/libatasmart | |
parent | sys-firmware/seabios: update python compat (diff) | |
download | gentoo-c726509edbce1bb066d87a43aaac8fdfb741c272.tar.gz gentoo-c726509edbce1bb066d87a43aaac8fdfb741c272.tar.bz2 gentoo-c726509edbce1bb066d87a43aaac8fdfb741c272.zip |
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@gmail.com>
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'dev-libs/libatasmart')
-rw-r--r-- | dev-libs/libatasmart/libatasmart-0.19_p5.ebuild | 17 |
1 files 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 7da99e26ec24..8afa393021da 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 |