summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2023-04-26 02:54:52 -0400
committerIonen Wolkens <ionen@gentoo.org>2023-04-26 04:36:50 -0400
commitf77a3717a3fee29d668a19d373c37025f9cf9c26 (patch)
treeb5424c58c4d8bcbd034cf1e4a20b80bc5e6ebc22
parentapp-emulation/ruffle: add 0_p20230426 (diff)
downloadgentoo-f77a3717a3fee29d668a19d373c37025f9cf9c26.tar.gz
gentoo-f77a3717a3fee29d668a19d373c37025f9cf9c26.tar.bz2
gentoo-f77a3717a3fee29d668a19d373c37025f9cf9c26.zip
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 <ionen@gentoo.org>
-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}