Gentoo Archives: gentoo-proxy-maint

From: "Michał Górny" <mgorny@g.o>
To: "Haelwenn (lanodan) Monnier" <contact@×××××××××.me>, gentoo-proxy-maint@l.g.o
Subject: Re: [gentoo-proxy-maint] [PATCH] www-plugins/passff-host: Fix for firefox-bin with no-symlink-lib
Date: Fri, 28 Jun 2019 08:31:58
Message-Id: 20db0e2245db6bf90784756d6030e6f17c7bf99d.camel@gentoo.org
In Reply to: [gentoo-proxy-maint] [PATCH] www-plugins/passff-host: Fix for firefox-bin with no-symlink-lib by "Haelwenn (lanodan) Monnier"
1 On Fri, 2019-06-28 at 08:48 +0200, Haelwenn (lanodan) Monnier wrote:
2 > Closes: https://bugs.gentoo.org/show_bug.cgi?id=687746
3 > Signed-off-by: Haelwenn (lanodan) Monnier <contact@×××××××××.me>
4 > ---
5 > ...sff-host-1.2.0.ebuild => passff-host-1.2.0-r1.ebuild} | 9 ++++++++-
6 > 1 file changed, 8 insertions(+), 1 deletion(-)
7 > rename www-plugins/passff-host/{passff-host-1.2.0.ebuild => passff-host-1.2.0-r1.ebuild} (84%)
8 >
9 > diff --git a/www-plugins/passff-host/passff-host-1.2.0.ebuild b/www-plugins/passff-host/passff-host-1.2.0-r1.ebuild
10 > similarity index 84%
11 > rename from www-plugins/passff-host/passff-host-1.2.0.ebuild
12 > rename to www-plugins/passff-host/passff-host-1.2.0-r1.ebuild
13 > index f42fb96ba19..75bebf643b8 100644
14 > --- a/www-plugins/passff-host/passff-host-1.2.0.ebuild
15 > +++ b/www-plugins/passff-host/passff-host-1.2.0-r1.ebuild
16 > @@ -1,52 +1,59 @@
17 > # Copyright 2018-2019 Gentoo Authors
18 > # Distributed under the terms of the GNU General Public License v2
19 >
20 > EAPI=7
21 >
22 > PYTHON_COMPAT=( python3_5 python3_6 python3_7 )
23 >
24 > inherit python-single-r1
25 >
26 > DESCRIPTION="Host app for the PassFF WebExtension"
27 > HOMEPAGE="https://github.com/passff/passff-host"
28 >
29 > SRC_URI="
30 > https://github.com/passff/passff-host/releases/download/${PV}/passff.py -> ${P}.py
31 > https://github.com/passff/passff-host/releases/download/${PV}/passff.json -> ${P}.json
32 > "
33 >
34 > LICENSE="GPL-2"
35 > SLOT="0"
36 > KEYWORDS="~amd64 ~x86"
37 > IUSE="chrome chromium firefox vivaldi"
38 > REQUIRED_USE="|| ( chrome chromium firefox vivaldi )"
39 >
40 > S="${WORKDIR}"
41 >
42 > src_unpack() {
43 > cp "${DISTDIR}/${P}.json" . || die
44 > cp "${DISTDIR}/${P}.py" . || die
45 > }
46 >
47 > src_prepare() {
48 > default
49 > python_fix_shebang "${P}.py"
50 > }
51 >
52 > src_install() {
53 > local target_dirs=()
54 >
55 > use chrome && target_dirs+=( "/etc/opt/chrome/native-messaging-hosts" )
56 > use chromium && target_dirs+=( "/etc/chromium/native-messaging-hosts" )
57 > - use firefox && target_dirs+=( "/usr/$(get_libdir)/mozilla/native-messaging-hosts" )
58 > + if use firefox; then
59 > + target_dirs+=( "/usr/$(get_libdir)/mozilla/native-messaging-hosts" )
60 > +
61 > + # firefox-bin compatibility
62 > + if [[ "$(get_libdir)" != "lib" ]]; then
63 > + target_dirs+=( "/usr/lib/mozilla/native-messaging-hosts" )
64 > + fi
65 > + fi
66
67 Wouldn't this break the migration? I think this will cause unsymlink-
68 lib to detect collision if this package is installed before the switch.
69
70 > use vivaldi && target_dirs+=( "/etc/vivaldi/native-messaging-hosts" )
71 >
72 > for target_dir in "${target_dirs[@]}"; do
73 > sed "s;PLACEHOLDER;${target_dir}/passff.py;g" "${P}.json" > "passff.json" || die
74 >
75 > insinto "${target_dir}"
76 > doins passff.json
77 > exeinto "${target_dir}"
78 > newexe "${P}.py" passff.py
79 > done
80 > }
81
82 --
83 Best regards,
84 Michał Górny

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-proxy-maint] [PATCH] www-plugins/passff-host: Fix for firefox-bin with no-symlink-lib "Haelwenn (lanodan) Monnier" <contact@×××××××××.me>