blob: 0f8698781159d9b40721cfd68db5fff588222fe3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
# Copyright 2021-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
RUST_MIN_VER=1.88.0
inherit cargo desktop optfeature xdg
MY_PV=nightly-${PV:3:4}-${PV:7:2}-${PV:9:2}
MY_P=${PN}-${MY_PV}
DESCRIPTION="Flash Player emulator written in Rust"
HOMEPAGE="https://ruffle.rs/"
SRC_URI="
https://github.com/ruffle-rs/ruffle/archive/refs/tags/${MY_PV}.tar.gz
-> ${MY_P}.tar.gz
https://distfiles.gentoo.org/pub/dev/ionen@gentoo.org/${MY_P}-vendor.tar.xz
"
S=${WORKDIR}/${MY_P}
LICENSE="|| ( Apache-2.0 MIT )"
LICENSE+="
Apache-2.0 BSD-2 BSD CC0-1.0 ISC MIT MPL-2.0 OFL-1.1 openssl
UbuntuFontLicense-1.0 Unicode-3.0 ZLIB BZIP2
" # crates
SLOT="0"
KEYWORDS="amd64"
IUSE="test"
RESTRICT="!test? ( test )"
# X/wayland libraries are dlopen'ed and are unneeded to build, assume
# users will have whichever they need rather than do USE or optfeatures
RDEPEND="
media-libs/alsa-lib
virtual/libudev:=
"
DEPEND="${RDEPEND}"
BDEPEND="
virtual/jre:*
virtual/pkgconfig
"
QA_FLAGS_IGNORED="usr/bin/${PN}.*"
src_configure() {
local workspaces=(
ruffle_{desktop,scanner}
exporter
$(usev test tests)
)
cargo_src_configure "${workspaces[@]/#/--package=}"
}
src_install() {
dodoc README.md
newicon web/packages/extension/assets/images/icon180.png ${PN}.png
make_desktop_entry --eapi9 ${PN} -n ${PN^} -c "AudioVideo;Player;Emulator;" \
-e "MimeType=application/x-shockwave-flash;application/vnd.adobe.flash.movie;"
cd "$(cargo_target_dir)" || die
newbin ${PN}_desktop ${PN}
newbin exporter ${PN}_exporter
dobin ${PN}_scanner
}
pkg_postinst() {
xdg_pkg_postinst
if [[ ! ${REPLACING_VERSIONS} ]]; then
elog "${PN} is experimental software that is still under heavy development"
elog "and only receiving nightly releases. Plans in Gentoo is to update"
elog "roughly every 3+ months if no known major regressions (feel free"
elog "to report if you feel a newer nightly right away)."
elog
elog "There is currently no plans to support wasm builds / browser"
elog "extensions, this provides the desktop viewer and other tools."
fi
optfeature "h264 video decoding" media-libs/openh264
optfeature "the in-application file picker" sys-apps/xdg-desktop-portal
}
|