From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 0FB3E158043 for ; Sun, 14 Apr 2024 15:11:26 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 114B5E2A04; Sun, 14 Apr 2024 15:11:25 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E3084E2A03 for ; Sun, 14 Apr 2024 15:11:24 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 03BBA3433B8 for ; Sun, 14 Apr 2024 15:11:24 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2F18116E0 for ; Sun, 14 Apr 2024 15:11:21 +0000 (UTC) From: "Julien Roy" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Julien Roy" Message-ID: <1713105267.8434ce99066795b5cea05b1b812e75ca87180485.julien@gentoo> Subject: [gentoo-commits] repo/proj/guru:master commit in: www-plugins/firefoxpwa/ X-VCS-Repository: repo/proj/guru X-VCS-Files: www-plugins/firefoxpwa/firefoxpwa-2.11.1.ebuild www-plugins/firefoxpwa/metadata.xml X-VCS-Directories: www-plugins/firefoxpwa/ X-VCS-Committer: julien X-VCS-Committer-Name: Julien Roy X-VCS-Revision: 8434ce99066795b5cea05b1b812e75ca87180485 X-VCS-Branch: master Date: Sun, 14 Apr 2024 15:11:21 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 45f6c622-9c45-4908-982e-d169938b730a X-Archives-Hash: de35ad0d5a99f8c822d62fb912afe094 commit: 8434ce99066795b5cea05b1b812e75ca87180485 Author: Anna (cybertailor) Vyalkova sysrq in> AuthorDate: Sun Apr 14 14:14:30 2024 +0000 Commit: Julien Roy jroy ca> CommitDate: Sun Apr 14 14:34:27 2024 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=8434ce99 www-plugins/firefoxpwa: add "static" use-flag This should be helpful for systems running fresh LibreSSL with outdated "openssl-sys" crate. Signed-off-by: Anna (cybertailor) Vyalkova sysrq.in> www-plugins/firefoxpwa/firefoxpwa-2.11.1.ebuild | 52 +++++++++++++++---------- www-plugins/firefoxpwa/metadata.xml | 8 ++-- 2 files changed, 36 insertions(+), 24 deletions(-) diff --git a/www-plugins/firefoxpwa/firefoxpwa-2.11.1.ebuild b/www-plugins/firefoxpwa/firefoxpwa-2.11.1.ebuild index be36afdc9a..981cd2e048 100644 --- a/www-plugins/firefoxpwa/firefoxpwa-2.11.1.ebuild +++ b/www-plugins/firefoxpwa/firefoxpwa-2.11.1.ebuild @@ -324,31 +324,30 @@ SRC_URI=" https://github.com/filips123/PWAsForFirefox/archive/v${PV}.tar.gz -> ${P}.tar.gz ${CARGO_CRATE_URIS} " +S="${WORKDIR}/PWAsForFirefox-${PV}/native" # Main project license LICENSE="MPL-2.0" - # Dependent crate licenses LICENSE+=" Apache-2.0 BSD-2 BSD MIT MPL-2.0 Unicode-DFS-2016 ZLIB" - SLOT="0" KEYWORDS="~amd64 ~arm ~arm64 ~x86" -IUSE="lto custom-cflags" +IUSE="custom-cflags lto static" # Add app-arch/bzip2 when it finally get pkg-config file -DEPEND="dev-libs/openssl:=" +DEPEND="!static? ( 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=" - virtual/pkgconfig lto? ( !custom-cflags? ( sys-devel/clang sys-devel/lld ) ) + !static? ( virtual/pkgconfig ) " QA_FLAGS_IGNORED=" @@ -356,8 +355,6 @@ QA_FLAGS_IGNORED=" usr/libexec/firefoxpwa-connector " -S="${WORKDIR}/PWAsForFirefox-${PV}/native" - src_prepare() { default @@ -368,24 +365,35 @@ src_prepare() { } src_configure() { - strip-flags - + # Setup toolchain export CARGO_PROFILE_RELEASE_LTO=$(usex lto true false) + strip-flags if use lto; then if ! use custom-cflags; then - # Fix -flto[=n] not being recognized by clang. - tc-is-gcc && is-flag "-flto=*" && replace-flags "-flto=*" "-flto" 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 - export PKG_CONFIG_ALLOW_CROSS=1 - export OPENSSL_NO_VENDOR=1 + # Ask to use system dependencies + if ! use static; then + export OPENSSL_NO_VENDOR=1 + export PKG_CONFIG_ALLOW_CROSS=1 + fi + + # Configure features + local myfeatures=( + $(usev static) + ) cargo_src_configure } @@ -425,18 +433,22 @@ src_install() { } pkg_postinst() { - echo "You have successfully installed the native part of the PWAsForFirefox project" - echo "You should also install the Firefox extension if you haven't already" - echo "Download: https://addons.mozilla.org/firefox/addon/pwas-for-firefox/" + 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:" + elog "\thttps://addons.mozilla.org/firefox/addon/pwas-for-firefox/" + fi xdg_pkg_postinst } pkg_postrm() { - if [[ ! ${REPLACING_VERSIONS} ]]; then - echo "Runtime, profiles and web apps are still installed in user directories" - echo "You can remove them manually after this package is uninstalled" - echo "Doing that will remove all installed web apps and their data" + 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 diff --git a/www-plugins/firefoxpwa/metadata.xml b/www-plugins/firefoxpwa/metadata.xml index b472562d1b..270cd1ba2a 100644 --- a/www-plugins/firefoxpwa/metadata.xml +++ b/www-plugins/firefoxpwa/metadata.xml @@ -5,6 +5,10 @@ John-Henry Lim johnhenrylim12@gmail.com + + Anna + cyber+gentoo@sysrq.in + Progressive Web Apps (PWAs) are web apps that use web APIs and features along with progressive enhancement strategy to bring a native app-like user @@ -20,10 +24,6 @@ should also install the browser extension if you haven't already. You can download it from <https://addons.mozilla.org/firefox/addon/pwas-for-firefox/>. - - Enable Link Time Optimization (LTO). - Disable the default use of clang and lld with LTO and all other manipulations of CFLAGS. Disabling this may cause the build and/or LTO to fail. - Filip Ć tamcar