From f77a3717a3fee29d668a19d373c37025f9cf9c26 Mon Sep 17 00:00:00 2001 From: Ionen Wolkens Date: Wed, 26 Apr 2023 02:54:52 -0400 Subject: app-emulation/ruffle: sync live, add duplicate sources workaround Bit hacky but it builds again with this. Also changed handling of packages/workspaces given upstream has set a desktop-only default to simplify things for normal users, but that won't even run tests nor build the other tools (--bins does not work so well anymore, so specifying exact packages). Signed-off-by: Ionen Wolkens --- app-emulation/ruffle/ruffle-9999.ebuild | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/app-emulation/ruffle/ruffle-9999.ebuild b/app-emulation/ruffle/ruffle-9999.ebuild index 5abbe4507eac..afafabcc1607 100644 --- a/app-emulation/ruffle/ruffle-9999.ebuild +++ b/app-emulation/ruffle/ruffle-9999.ebuild @@ -9,7 +9,7 @@ DESCRIPTION="Flash Player emulator written in Rust" HOMEPAGE="https://ruffle.rs/" EGIT_REPO_URI="https://github.com/ruffle-rs/ruffle.git" -LICENSE="Apache-2.0 BSD BSD-2 Boost-1.0 CC0-1.0 ISC MIT MPL-2.0 Unicode-DFS-2016 ZLIB curl" +LICENSE="Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD BSD-2 Boost-1.0 CC0-1.0 ISC MIT MPL-2.0 Unicode-DFS-2016 ZLIB curl" SLOT="0" # dlopen: libX* (see winit+x11-dl crates) @@ -17,8 +17,6 @@ RDEPEND=" dev-libs/glib:2 dev-libs/openssl:= media-libs/alsa-lib - media-libs/fontconfig - media-libs/freetype sys-libs/zlib:= x11-libs/gtk+:3 x11-libs/libX11 @@ -41,13 +39,33 @@ QA_FLAGS_IGNORED="usr/bin/${PN}.*" src_unpack() { git-r3_src_unpack + + # hack: cargo_live_src_unpack (currently) fails due to dasp being + # vendored from two sources, roughly merge with a patch directive + # https://github.com/rust-lang/cargo/issues/10310 + local rev=$(sed -En '/^dasp =/s/.*, rev = "([a-z0-9]+).*/\1/p' \ + "${S}"/core/Cargo.toml) # skip || die + if [[ ${rev} ]]; then + cat >> "${S}"/Cargo.toml <<-EOF || die + [patch.crates-io] + dasp_sample = { git = "https://github.com/RustAudio/dasp", rev = "${rev}" } + EOF + else + eqawarn "dasp hack either needs an update or removal" + fi + cargo_live_src_unpack } -src_compile() { - filter-lto # does not play well with C code in crates +src_configure() { + filter-lto # TODO: cleanup after bug #893658 - cargo_src_compile --bins # note: configure --bins would skip tests + if use test; then + # tests will be skipped if don't build everything + cargo_src_configure --workspace + else + cargo_src_configure --package={ruffle_{desktop,scanner},exporter} + fi } src_test() { @@ -61,6 +79,7 @@ src_install() { make_desktop_entry ${PN} ${PN^} ${PN} "AudioVideo;Player;Emulator;" \ "MimeType=application/x-shockwave-flash;application/vnd.adobe.flash.movie;" + # TODO: swap with /gentoo after https://github.com/gentoo/gentoo/pull/29510 cd target/$(usex debug{,} release) || die newbin ${PN}_desktop ${PN} -- cgit v1.2.3-65-gdbad