mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-04-07 03:10:15 -04:00
www-plugins/firefoxpwa: add 2.18.0
Signed-off-by: Filip Štamcar <projects@filips.si> Part-of: https://github.com/gentoo/guru/pull/408 Signed-off-by: David Roman <davidroman96@gmail.com>
This commit is contained in:
committed by
David Roman
parent
75819d6231
commit
674d3c0fc6
@@ -93,6 +93,8 @@ DIST firefoxpwa-2.17.1-crates.tar.xz 41370764 BLAKE2B c2d1000075eb96695afeae3602
|
||||
DIST firefoxpwa-2.17.1.tar.gz 556832 BLAKE2B a30ad1e60d2cbbe26b7b66d5144ab1bb3fdb5188e619a8be6289bcdb3c2b22fe25fb8c796d047a0a95359f44f4f43bd013ba8fecc1bd08ce774b98978c1ca811 SHA512 8eb9e168fd51820d5e961bc9c081e64a19d0c22a77c9838586f3a708ddfef9f233016d76259d79bfe26871cd054e5095256cfaa22d9657cdafbacff61519dd99
|
||||
DIST firefoxpwa-2.17.2-crates.tar.xz 37768108 BLAKE2B a3eae27a858607167715737a3a247bf7ff0a9ed257ad1f9e154952220289e06159fd98eb9483d84d57d375b7f80f9baa1d12f33b41ec2aa3589c944ed12c8476 SHA512 777e6c6edfbd9cdd75c328cb8d658a60e952149ed7ab8eb19b5555f3c67a05d069dcc4a5b6eab7ee7443d41e16f8828643785fd3f1e3a19aa607f4894b655272
|
||||
DIST firefoxpwa-2.17.2.tar.gz 557008 BLAKE2B 8bd5a4ee3435fb24b92bcee506231021b43d5ef2251a9cabe93d92536bfbe514b23cb766b891b952be829fd149e7568b1d998b7f2204a328945adef66a3ab939 SHA512 fe7e4a2beb9fc05780b9121bf8f048a91f752399dcddad0f56e989df4030b207a7cf88f19339ee7eae2fda3eecbd5458b783d1c9373319e2c64e42c2b626c41d
|
||||
DIST firefoxpwa-2.18.0-crates.tar.xz 38164476 BLAKE2B 03e6b73a8593d898b51c2aa5c747fd2d58a859fe00c075dc4a037d5ab26597cff6f4353ad83db5c9f70ebdb6370887e78f19779c5752abdff77a80481f294d57 SHA512 4057a4738ade1d57fb69eeab20aeac1732f52736260d96c612d3928bd649e8d77af80c93d8f46bc1ca949e8e4e047a0117e692804b3cad43e057ba9bda5b9712
|
||||
DIST firefoxpwa-2.18.0.tar.gz 560595 BLAKE2B 5cb0428bf8a683db44d869d065a0f3063bca228d5c08581c77299ed53598b3d5019ec0fbb71e797dd3dbd5911bbacbdfce406028d1e20261d67bcf2280c532d0 SHA512 289b152de62417aa16010734319d6fb322d61b5246e952fc0f0cef759da77680bd8a009eb3838403150a3a6b4cdb8688dc93144428da64d41874fc2815f58620
|
||||
DIST flate2-1.1.2.crate 76495 BLAKE2B 0266329bcd766be392e09ab75a135bea7cb44e9d9f1eebcabbd4aa3615d66688add24628326dad8e0e03182f0a4d65a3e23db9e7ea8c71b1775d575cef3f1e8c SHA512 467f7d6680510cf3c960e4e466876a97e5416e3605e0d4b52781547295e52f2b0e778fc06a6636ff43d9f6e47734e5835172178c4d6b85bbff597f8748d0d87d
|
||||
DIST float-cmp-0.9.0.crate 10102 BLAKE2B 46bce5f7e838a947bbbdd22b085435e795b67fd23479780f65bf1586a70e7a35f04f9af086be98bff24e2583eeac7c9688727a2ddbd1ce978526dc01abf67dfd SHA512 f8dad12ecf8a278769054fd78794999dae8dedbcfde5e77bdf6cea12fdeaadeeb2f1f3ca62df9aadc1bc3f61457236c4854d6d6923ad6d03ae7f23af600572e8
|
||||
DIST fnv-1.0.7.crate 11266 BLAKE2B 81da85889c91b6567e0f555e37dd915f1bd919719d1ca10c31a6861d7aec29a49ae9c1e8bc500791bf9d6b8dbb318c096d04872c5872a4b1f7d45fbd8e12842d SHA512 2195a4b34a78e2dd9838caf0ee556bf87cbb4a8ef5505aac663b614eb59dcfc0c40f432463ede41ecca57bfe7711f72673d39a85fe03d426f1324097d5628334
|
||||
|
||||
169
www-plugins/firefoxpwa/firefoxpwa-2.18.0.ebuild
Normal file
169
www-plugins/firefoxpwa/firefoxpwa-2.18.0.ebuild
Normal file
@@ -0,0 +1,169 @@
|
||||
# Copyright 2023-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
CRATES="
|
||||
"
|
||||
|
||||
declare -A GIT_CRATES=(
|
||||
[mime-parse]='https://github.com/filips123/mime;e3e2e55459d2989a3f4699566ff8f203a8720add;mime-%commit%/mime-parse'
|
||||
[mime]='https://github.com/filips123/mime;e3e2e55459d2989a3f4699566ff8f203a8720add;mime-%commit%'
|
||||
[web_app_manifest]='https://github.com/filips123/WebAppManifestRS;c3329f3378a0039c96bd2b3f32529ea6b438c350;WebAppManifestRS-%commit%'
|
||||
)
|
||||
|
||||
inherit cargo desktop flag-o-matic shell-completion toolchain-funcs xdg
|
||||
|
||||
DESCRIPTION="A tool to install, manage and use PWAs in Mozilla Firefox (native component)"
|
||||
HOMEPAGE="https://pwasforfirefox.filips.si/"
|
||||
|
||||
SRC_URI="
|
||||
https://github.com/filips123/PWAsForFirefox/archive/v${PV}.tar.gz -> ${P}.tar.gz
|
||||
"
|
||||
|
||||
if [[ ${PKGBUMPING} != ${PVR} ]]; then
|
||||
SRC_URI+="
|
||||
https://github.com/filips123/PWAsForFirefox/releases/download/v${PV}/firefoxpwa-${PV}-crates.tar.xz
|
||||
${CARGO_CRATE_URIS}
|
||||
"
|
||||
fi
|
||||
|
||||
S="${WORKDIR}/PWAsForFirefox-${PV}/native"
|
||||
|
||||
# Main project license
|
||||
LICENSE="MPL-2.0"
|
||||
|
||||
# Dependent crate licenses
|
||||
LICENSE+="
|
||||
Apache-2.0 BSD-2 BSD ISC MIT MPL-2.0 UoI-NCSA Unicode-3.0 ZLIB
|
||||
"
|
||||
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm64"
|
||||
IUSE="custom-cflags lto static"
|
||||
|
||||
DEPEND="
|
||||
!static? (
|
||||
app-arch/zstd:=
|
||||
app-arch/xz-utils:=
|
||||
dev-libs/openssl:=
|
||||
)
|
||||
"
|
||||
RDEPEND="${DEPEND}"
|
||||
# As Rust produces LLVM IR when using LTO, lld is needed to link. Furthermore,
|
||||
# as some crates contain C code, clang should be used to compile them to produce
|
||||
# compatible IR.
|
||||
BDEPEND="
|
||||
lto? (
|
||||
!custom-cflags? (
|
||||
llvm-core/clang
|
||||
llvm-core/lld
|
||||
)
|
||||
)
|
||||
!static? ( virtual/pkgconfig )
|
||||
"
|
||||
|
||||
QA_FLAGS_IGNORED="
|
||||
usr/bin/firefoxpwa
|
||||
usr/libexec/firefoxpwa-connector
|
||||
"
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# Set version in source files as per build instructions
|
||||
sed -i "s/version = \"0.0.0\"/version = \"${PV}\"/g" Cargo.toml || die
|
||||
sed -i "s/DISTRIBUTION_VERSION = '0.0.0'/DISTRIBUTION_VERSION = '${PV}'/g" \
|
||||
userchrome/profile/chrome/pwa/chrome.sys.mjs || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# Setup toolchain
|
||||
export CARGO_PROFILE_RELEASE_LTO=$(usex lto true false)
|
||||
strip-flags
|
||||
|
||||
if use lto; then
|
||||
if ! use custom-cflags; then
|
||||
CC="${CHOST}-clang"
|
||||
CXX="${CHOST}-clang++"
|
||||
RUSTFLAGS="-Clinker=clang -Clink-arg=-fuse-ld=lld ${RUSTFLAGS}"
|
||||
|
||||
# Fix -flto[=n] not being recognized by clang
|
||||
if tc-is-clang && is-flag "-flto=*"; then
|
||||
replace-flags "-flto=*" "-flto"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
filter-lto
|
||||
fi
|
||||
|
||||
# Ask to use system dependencies
|
||||
if ! use static; then
|
||||
export PKG_CONFIG_ALLOW_CROSS=1
|
||||
export ZSTD_SYS_USE_PKG_CONFIG=1
|
||||
export OPENSSL_NO_VENDOR=1
|
||||
fi
|
||||
|
||||
# Configure features
|
||||
local myfeatures=(
|
||||
$(usev static)
|
||||
)
|
||||
|
||||
cargo_src_configure
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# Executables
|
||||
dobin $(cargo_target_dir)/firefoxpwa
|
||||
exeinto /usr/libexec
|
||||
doexe $(cargo_target_dir)/firefoxpwa-connector
|
||||
|
||||
# Manifest
|
||||
local target_dirs=( /usr/lib{,64}/mozilla/native-messaging-hosts )
|
||||
for target_dir in "${target_dirs[@]}"; do
|
||||
insinto "${target_dir}"
|
||||
newins manifests/linux.json firefoxpwa.json
|
||||
done
|
||||
|
||||
# Completions
|
||||
newbashcomp $(cargo_target_dir)/completions/firefoxpwa.bash firefoxpwa
|
||||
dofishcomp $(cargo_target_dir)/completions/firefoxpwa.fish
|
||||
dozshcomp $(cargo_target_dir)/completions/_firefoxpwa
|
||||
|
||||
# UserChrome
|
||||
insinto /usr/share/firefoxpwa
|
||||
doins -r ./userchrome
|
||||
|
||||
# Documentation
|
||||
dodoc ../README.md
|
||||
newdoc ../native/README.md README-NATIVE.md
|
||||
newdoc ../extension/README.md README-EXTENSION.md
|
||||
|
||||
# AppStream Metadata
|
||||
insinto /usr/share/metainfo
|
||||
doins packages/appstream/si.filips.FirefoxPWA.metainfo.xml
|
||||
|
||||
# Icon
|
||||
doicon -s scalable packages/appstream/si.filips.FirefoxPWA.svg
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if [[ ! ${REPLACING_VERSIONS} ]]; then
|
||||
elog "You have successfully installed the native part of the PWAsForFirefox project."
|
||||
elog "You should also install the Firefox extension if you haven't already."
|
||||
elog
|
||||
elog "Download: https://addons.mozilla.org/firefox/addon/pwas-for-firefox/"
|
||||
fi
|
||||
|
||||
xdg_pkg_postinst
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
if [[ ! ${REPLACED_BY_VERSION} ]]; then
|
||||
elog "Runtime, profiles and web apps are still installed in user directories."
|
||||
elog "You can remove them manually after this package is uninstalled."
|
||||
elog "Doing that will remove all installed web apps and their data."
|
||||
fi
|
||||
|
||||
xdg_pkg_postrm
|
||||
}
|
||||
Reference in New Issue
Block a user