commit:     da65dd6c6c427c1772e123a9d1750cfe1dc99a74
Author:     Filip Štamcar <projects <AT> filips <DOT> si>
AuthorDate: Sun Oct 26 16:40:25 2025 +0000
Commit:     David Roman <davidroman96 <AT> gmail <DOT> com>
CommitDate: Wed Oct 29 14:50:17 2025 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=da65dd6c

www-plugins/firefoxpwa: add 2.17.2

Signed-off-by: Filip Štamcar <projects <AT> filips.si>
Part-of: https://github.com/gentoo/guru/pull/387
Signed-off-by: David Roman <davidroman96 <AT> gmail.com>

 www-plugins/firefoxpwa/Manifest                 |   4 +
 www-plugins/firefoxpwa/firefoxpwa-2.17.2.ebuild | 170 ++++++++++++++++++++++++
 2 files changed, 174 insertions(+)

diff --git a/www-plugins/firefoxpwa/Manifest b/www-plugins/firefoxpwa/Manifest
index 3b721f7a4e..1de124c69b 100644
--- a/www-plugins/firefoxpwa/Manifest
+++ b/www-plugins/firefoxpwa/Manifest
@@ -1,4 +1,5 @@
 DIST WebAppManifestRS-477c5bbc7406eec01aea40e18338dafcec78c917.gh.tar.gz 21298 
BLAKE2B 
72d33de36f7958a766edb5010d6ac4ccc09fda24c5a336cc8b8a11c35a276f3be09ff4af3713ea688d5786a49553d6824450d970a46a71a2c5f345c19619ac12
 SHA512 
615539476c13ae1712fac766807070063005a48be96890b960cd437219d3966afcc638f3bb25c144384e0f6172738c2f7e63cc4568f6cd929790dfbab46df2c6
+DIST WebAppManifestRS-c3329f3378a0039c96bd2b3f32529ea6b438c350.gh.tar.gz 21247 
BLAKE2B 
a001dd5ab5ac660a8067ba433290a69a5226a6f34e943b3aee2501d9d7fc463fd40587f18ff251276fa61a198fc5f653422e74673b0cb12b7e9e7bf2488dfe2c
 SHA512 
7c98796631165ff83b6b1795b28844d850249de0aab5ec27ef51d81d7e3f2bcf6f7481e1e9dea2aa6b0e370b6e59f5c7cdf41d3d26dec893574581d8566baa73
 DIST ab_glyph-0.2.29.crate 20011 BLAKE2B 
ca385a4a5d4c1c33f37464a9a402b80c8af9747cc46a6d28abdfe04f1e278c4ef3ede9f660b325a6a26f34cecab709e3c77aa8cf3225aa0a03e5501139dd5913
 SHA512 
7549251e27a0b77a86d9c3cf2775a625d5f3bf43840abc85a5937f2393889a5100bb90b2392bcff9d082900dd00bf0211f4feaeea09ec1b01e3925875e529c12
 DIST ab_glyph-0.2.31.crate 20909 BLAKE2B 
309ae7a144dea07caa1e380906b7481ce7fbf729b7473e8aea550bc72156ecfd220335ad276106b84d79a0159c6d2bfe844a81040eb615955b604e80c7f636de
 SHA512 
7a9721e8e055f5dddd65a9102a5963ae708b60fa2d09348039247ef9a39983b6610ebde1977426fc8d5848b950d64c22587106845964ee223a62bf3ae7b7fcff
 DIST ab_glyph_rasterizer-0.1.8.crate 11010 BLAKE2B 
2a20fd3ff646559d704e214ae7c4e5b8297e20be0909c403c140edb67002665447a6a796e5ca5d71f5c8c55000489a14a101ec43dd90101be9c246d1a0138dc4
 SHA512 
6fd5ff2d068da84c4ac2e6e2c5ad6ab2f4926f1664afb8ba701b60a35c3bd7bf00b200b22c455ca15dfc7d4303c8caa0bb150c18dcce01ce107deaf323cde17f
@@ -134,6 +135,8 @@ DIST firefoxpwa-2.14.1.tar.gz 558077 BLAKE2B 
225b6cff2b0a66a39b42f274beb86f311d9
 DIST firefoxpwa-2.15.0.tar.gz 553132 BLAKE2B 
5d27c44e87ca0e2b13ee2ece76ff5963ab07f3ebe1230cb48ec548821f5b318e1cc96d16ee84a26cbc488fc36fb82890610ce1cef339c5bf5e6bca6db124c2b6
 SHA512 
aa9ca3dce073ee2d46ce62896cbdf378a8d5916c4a583a649c56e43b5118233a1371a993a2945a4e8fb404a6956169aa56c9ad2c41015a6479234c7ac5163837
 DIST firefoxpwa-2.17.1-crates.tar.xz 41370764 BLAKE2B 
c2d1000075eb96695afeae3602b0a1bed495599ed28c44cefd939f20bcb8eba4a9096527bafa43ad774b5064ee6912944fa4fb425e3d98fa2b4dec140b8611dc
 SHA512 
98db529176f224fcd9329be60a20479252e2d7e4531ef6d5dc6080d30ec925e5ab5640d50b301f5f5b42cecfca63250e27ba6bba97a65106dd37e3d1a1e558d6
 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 flate2-1.0.35.crate 109188 BLAKE2B 
8bd6e51c3bcc06044e5b8d7ead950c3beab6c6337052fd48e86175f0fc98c8d12804274308ee515dc6156bbedb2277dfa2706cdcd7baaf2a789122473248486e
 SHA512 
aa2c4f0ad46cfbc7d2bfbdffd226eaa37f5223a34d132d8fb2dfd04c20d15a96c4882cc377fd72afbc7d13e512f5e9934386b0390a0ab2b171d081335c58fad4
 DIST flate2-1.1.2.crate 76495 BLAKE2B 
0266329bcd766be392e09ab75a135bea7cb44e9d9f1eebcabbd4aa3615d66688add24628326dad8e0e03182f0a4d65a3e23db9e7ea8c71b1775d575cef3f1e8c
 SHA512 
467f7d6680510cf3c960e4e466876a97e5416e3605e0d4b52781547295e52f2b0e778fc06a6636ff43d9f6e47734e5835172178c4d6b85bbff597f8748d0d87d
 DIST float-cmp-0.9.0.crate 10102 BLAKE2B 
46bce5f7e838a947bbbdd22b085435e795b67fd23479780f65bf1586a70e7a35f04f9af086be98bff24e2583eeac7c9688727a2ddbd1ce978526dc01abf67dfd
 SHA512 
f8dad12ecf8a278769054fd78794999dae8dedbcfde5e77bdf6cea12fdeaadeeb2f1f3ca62df9aadc1bc3f61457236c4854d6d6923ad6d03ae7f23af600572e8
@@ -258,6 +261,7 @@ DIST memmap2-0.9.5.crate 33280 BLAKE2B 
cffb232e313c40c6a698ad6c9e6bf140193cf1cd4
 DIST memmap2-0.9.7.crate 33915 BLAKE2B 
06ba09bf99678190e868579b2fb65a641249a1cf98ca95a2b234399ca3d00120254ccf2e0b602911246b9d00d7d95e01f1de690ea669ebda1701f31d70450c81
 SHA512 
4c05c87787f7f0fe99aedb601c7eb59c49e0441b7eb79226358dc9b9102e5ce0481e13bc48feeb201ac2866a1fd0126ae875154ca73c411b6abf445e9682248e
 DIST mime-0.3.17.crate 15712 BLAKE2B 
abb892b75b40657d356b6b53b9a45b2c822a05873453e919f2bbfeed9e5c06104f24db9cef2716f302198020870eaf96b2c62aff55cc11d8ca4f4f614d7c8e17
 SHA512 
e6d2ca92bb58fc747c1bb65a7f9023e5dbf4b94966003a72e4913bcaaeccdd6752725cdbd5081e0fd69d9e8f364d79664fcbe70061737d5c39e5b3e3a154a0d1
 DIST mime-57416f447a10c3343df7fe80deb0ae8a7c77cf0a.gh.tar.gz 22313 BLAKE2B 
a659e06d1316c7b5102f4a87f02bc35cb05947ff496167cc5acf9ba038c2091ef732bd43f298d9897aee2ce9e0f0e58253a5b06a1105251c0cdbb869db9410b8
 SHA512 
0d6726f66e34c83895b92928da4b8a1284d5e1d98bc7b01af1036fd92b0299fbc1dbcd0605c2323619db5cb807dcdcdb76da0026058c74c07e54959be1c75dde
+DIST mime-e3e2e55459d2989a3f4699566ff8f203a8720add.gh.tar.gz 22279 BLAKE2B 
76215be308af32d324decd54afb37f8df4ef36aa1a19464f0870b6268fa800642febf923c863c6ca7c49bc178af42d9dc0f72867907b5f5dc33b840a308aebf7
 SHA512 
ba2ddb9566a76eb7888a00701ceb142487b1f1bd76449122b152e637de2d65fd3d54e445b7e125da9c80d289cff5351d8cb78468b6d2c61e653e4b2add992324
 DIST minimal-lexical-0.2.1.crate 94841 BLAKE2B 
e6b8919b80d938d0b98d60d4f5f29ce43d77ebfcf8b18bde08909141915c6ef4f0d07a543538d4f3ba8527a9f55926d4a8e83473248469d087e80b274d701d61
 SHA512 
385fab51884bdcc7b0f2728a219ab164d0dc8efe42160b918f2c09f79ecf853fb12bda006d11e649f097bae1499dcd41ddf2a8784ee7d178cf2c28059e46078c
 DIST miniz_oxide-0.3.7.crate 44996 BLAKE2B 
0e89ec4131e7abdadaa9feb6019b31853976a34434216e0f89ddab519559d0e1feaf2228fbc09906e51fb0242a18abe1a67a5362e080c19fc7cd00c2f95f08ae
 SHA512 
d4eff239f8d6e947b94619e80fe03ed32aabd1a6393f63145d70ed7f08c51c45c7261d8157bf61c78d1637ea1f71ef15f9813ec733efd8afe6aa14810888718e
 DIST miniz_oxide-0.8.4.crate 66701 BLAKE2B 
ebeca295f242ceda3c26c04e250be45793bc7e3d542f28be6f440154fe1dc1f4887023ebdcac0f64a9f9890f91f9ae57ce84866bf9bfa8efe01fd0ee527cb92e
 SHA512 
ee79ced73006f9a99fcbf461633c8effce685dc2642964714002c2de5612f1f9146ea5b7a0d27400629ae3d0f04848ad08e2b9057cad74b06c312675bfd3a33f

diff --git a/www-plugins/firefoxpwa/firefoxpwa-2.17.2.ebuild 
b/www-plugins/firefoxpwa/firefoxpwa-2.17.2.ebuild
new file mode 100644
index 0000000000..1ca037808f
--- /dev/null
+++ b/www-plugins/firefoxpwa/firefoxpwa-2.17.2.ebuild
@@ -0,0 +1,170 @@
+# 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 Apache-2.0-with-LLVM-exceptions 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
+}

Reply via email to