summaryrefslogtreecommitdiff
path: root/app-emulation/ruffle/ruffle-9999.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-04-26 12:14:51 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-04-26 12:14:51 +0100
commit218cd7b08b8b97198d02f1ba811d540421367139 (patch)
tree8e54a3dcab9a16b30e15a9789d23933365fdd62c /app-emulation/ruffle/ruffle-9999.ebuild
parentd5d36fc823b7189d033e69314ae2764f1eed9168 (diff)
gentoo auto-resync : 26:04:2023 - 12:14:51
Diffstat (limited to 'app-emulation/ruffle/ruffle-9999.ebuild')
-rw-r--r--app-emulation/ruffle/ruffle-9999.ebuild31
1 files 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}