commit:     93a18600bec69cd32cffd8a7e098bb65bc25252a
Author:     Lucio Sauer <watermanpaint <AT> posteo <DOT> net>
AuthorDate: Wed Jun 12 14:53:26 2024 +0000
Commit:     Lucio Sauer <watermanpaint <AT> posteo <DOT> net>
CommitDate: Wed Jun 12 15:07:44 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=93a18600

dev-libs/dmd_core: simplify native build

Since 375da3684e685c6fd8367ffcf37e090526d55e4d, cargo eclass sets
CARGO_BUILD_TARGET, which allows us to drop all logic related to
`--target`.

Fix /path/to/to-be-installed-lib.a for debug builds

Closes: https://bugs.gentoo.org/901139
Signed-off-by: Lucio Sauer <watermanpaint <AT> posteo.net>

 dev-libs/dmd_core/dmd_core-0.6.2.ebuild | 18 ++----------------
 1 file changed, 2 insertions(+), 16 deletions(-)

diff --git a/dev-libs/dmd_core/dmd_core-0.6.2.ebuild 
b/dev-libs/dmd_core/dmd_core-0.6.2.ebuild
index 574eccd2d..f170b68df 100644
--- a/dev-libs/dmd_core/dmd_core-0.6.2.ebuild
+++ b/dev-libs/dmd_core/dmd_core-0.6.2.ebuild
@@ -8,7 +8,7 @@ [email protected]
 [email protected]
 "
 
-inherit cargo toolchain-funcs
+inherit cargo
 
 DESCRIPTION="Core logic for an AT&T / Teletype DMD 5620 terminal emulator"
 HOMEPAGE="https://github.com/sethm/dmd_core";
@@ -24,22 +24,8 @@ RESTRICT="test"
 
 BDEPEND=">=virtual/rust-1.47.0"
 
-set_target_arch() {
-       case "$(tc-arch)" in
-               amd64) target_arch=x86_64 ;;
-       esac
-}
-
-src_compile() {
-       local target_arch
-       set_target_arch
-       cargo_src_compile --target ${target_arch}-unknown-linux-gnu
-}
-
 src_install() {
-       local target_arch
-       set_target_arch
-       dolib.a 
"${S}"/target/${target_arch}-unknown-linux-gnu/release/lib${PN}.a
+       dolib.a target/$(usex debug debug release)/lib${PN}.a
        insinto /usr/$(get_libdir)/pkgconfig
        cp "${FILESDIR}/dmd_core.pc" "${S}" || die "failed to copy pkgconfig 
file"
        sed -i "s/%VERSION%/${PV}/g" "${S}/dmd_core.pc" || die "failed to set 
version in pkgconfig file"

Reply via email to