mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-08 06:32:59 -04:00
www-plugins/firefoxpwa: add 2.18.4
Signed-off-by: Filip Štamcar <projects@filips.si> Part-of: https://github.com/gentoo/guru/pull/499 Signed-off-by: David Roman <stkw0@disroot.org>
This commit is contained in:
committed by
David Roman
parent
bbf07a740c
commit
782fb13ea4
@@ -5,4 +5,6 @@ DIST firefoxpwa-2.18.0-crates.tar.xz 38164476 BLAKE2B 03e6b73a8593d898b51c2aa5c7
|
|||||||
DIST firefoxpwa-2.18.0.tar.gz 560595 BLAKE2B 5cb0428bf8a683db44d869d065a0f3063bca228d5c08581c77299ed53598b3d5019ec0fbb71e797dd3dbd5911bbacbdfce406028d1e20261d67bcf2280c532d0 SHA512 289b152de62417aa16010734319d6fb322d61b5246e952fc0f0cef759da77680bd8a009eb3838403150a3a6b4cdb8688dc93144428da64d41874fc2815f58620
|
DIST firefoxpwa-2.18.0.tar.gz 560595 BLAKE2B 5cb0428bf8a683db44d869d065a0f3063bca228d5c08581c77299ed53598b3d5019ec0fbb71e797dd3dbd5911bbacbdfce406028d1e20261d67bcf2280c532d0 SHA512 289b152de62417aa16010734319d6fb322d61b5246e952fc0f0cef759da77680bd8a009eb3838403150a3a6b4cdb8688dc93144428da64d41874fc2815f58620
|
||||||
DIST firefoxpwa-2.18.2-crates.tar.xz 36434064 BLAKE2B 819e7af82900a34d3ab48a0254dc63f3fd17e54b884d9b9e008ad8524bfc416767c5ec7096e3627c4d526c235ca40e92ed520a067343c811cf19fd10cb8ad754 SHA512 f176cc9c4da73275651e8bc766c66f1b62730e97abc837cfa7c2ea246da6d1eb8bab423647342cf8c4382cd3b8da6612eee931b096ba4b1f75393862be1888b6
|
DIST firefoxpwa-2.18.2-crates.tar.xz 36434064 BLAKE2B 819e7af82900a34d3ab48a0254dc63f3fd17e54b884d9b9e008ad8524bfc416767c5ec7096e3627c4d526c235ca40e92ed520a067343c811cf19fd10cb8ad754 SHA512 f176cc9c4da73275651e8bc766c66f1b62730e97abc837cfa7c2ea246da6d1eb8bab423647342cf8c4382cd3b8da6612eee931b096ba4b1f75393862be1888b6
|
||||||
DIST firefoxpwa-2.18.2.tar.gz 570988 BLAKE2B 18b1590a7b23855dd0610151f0247e438a005e1b0134c8bfd7353598298dd15dbd03955d204fb678b6648e59151106405a8b8935faa133ba60cdaf3fcb3e4e63 SHA512 bb16c7db69d4a829a2f9613a159fb300444707d115c0ac987b704be891adb2e3055f7a4d4cd79872ca797e9b8088f568c8a298f747c65e9468c9cac1b260329d
|
DIST firefoxpwa-2.18.2.tar.gz 570988 BLAKE2B 18b1590a7b23855dd0610151f0247e438a005e1b0134c8bfd7353598298dd15dbd03955d204fb678b6648e59151106405a8b8935faa133ba60cdaf3fcb3e4e63 SHA512 bb16c7db69d4a829a2f9613a159fb300444707d115c0ac987b704be891adb2e3055f7a4d4cd79872ca797e9b8088f568c8a298f747c65e9468c9cac1b260329d
|
||||||
|
DIST firefoxpwa-2.18.4-crates.tar.xz 36434064 BLAKE2B 819e7af82900a34d3ab48a0254dc63f3fd17e54b884d9b9e008ad8524bfc416767c5ec7096e3627c4d526c235ca40e92ed520a067343c811cf19fd10cb8ad754 SHA512 f176cc9c4da73275651e8bc766c66f1b62730e97abc837cfa7c2ea246da6d1eb8bab423647342cf8c4382cd3b8da6612eee931b096ba4b1f75393862be1888b6
|
||||||
|
DIST firefoxpwa-2.18.4.tar.gz 571745 BLAKE2B 67d2aac7b1131dbb9534d0955c6c175ad5dfec48856debbb24b633d278978f2c5b4a4f9b001871db77e5dec4744578b3521b530f1dcad390b234089a4560a94a SHA512 57bd430d0c52da6f8743f682e3d7b6e5ba8aafe092dd183d94bacec5b304713e5abc00fafa6df8596b9b1380140e4b7b5c5ade3bdb061f6472f9806839e5aba3
|
||||||
DIST mime-e3e2e55459d2989a3f4699566ff8f203a8720add.gh.tar.gz 22279 BLAKE2B 76215be308af32d324decd54afb37f8df4ef36aa1a19464f0870b6268fa800642febf923c863c6ca7c49bc178af42d9dc0f72867907b5f5dc33b840a308aebf7 SHA512 ba2ddb9566a76eb7888a00701ceb142487b1f1bd76449122b152e637de2d65fd3d54e445b7e125da9c80d289cff5351d8cb78468b6d2c61e653e4b2add992324
|
DIST mime-e3e2e55459d2989a3f4699566ff8f203a8720add.gh.tar.gz 22279 BLAKE2B 76215be308af32d324decd54afb37f8df4ef36aa1a19464f0870b6268fa800642febf923c863c6ca7c49bc178af42d9dc0f72867907b5f5dc33b840a308aebf7 SHA512 ba2ddb9566a76eb7888a00701ceb142487b1f1bd76449122b152e637de2d65fd3d54e445b7e125da9c80d289cff5351d8cb78468b6d2c61e653e4b2add992324
|
||||||
|
|||||||
169
www-plugins/firefoxpwa/firefoxpwa-2.18.4.ebuild
Normal file
169
www-plugins/firefoxpwa/firefoxpwa-2.18.4.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