1 # Copyright 1999-2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit bash-completion-r1 elisp-common
8 DESCRIPTION="Stores, retrieves, generates, and synchronizes passwords securely"
9 HOMEPAGE="https://www.passwordstore.org/"
10 SRC_URI="https://git.zx2c4.com/password-store/snapshot/password-store-${PV}.tar.xz"
11 S="${WORKDIR}/password-store-${PV}"
15 KEYWORDS="amd64 ~arm arm64 ppc64 ~riscv x86 ~arm64-macos ~x64-macos"
16 IUSE="+git wayland X emacs dmenu importers"
20 media-gfx/qrencode[png(+)]
23 wayland? ( gui-apps/wl-clipboard )
25 elibc_Darwin? ( app-misc/getopt )
26 dmenu? ( x11-misc/dmenu x11-misc/xdotool )
27 emacs? ( >=app-editors/emacs-23.1:* >=app-emacs/f-0.11.0 >=app-emacs/s-1.9.0 >=app-emacs/with-editor-2.5.11 )
33 use elibc_Darwin || return
36 sed -i -e 's/openssl base64/base64/g' src/platform/darwin.sh || die
37 # host getopt isn't cool, and we aren't brew (rip out brew reference)
38 sed -i -e '/^GETOPT=/s/=.*$/=getopt-long/' src/platform/darwin.sh || die
39 # make sure we can find "mount"
40 sed -i -e 's:mount -t:/sbin/mount -t:' src/platform/darwin.sh || die
44 use emacs && elisp-compile contrib/emacs/*.el
50 PREFIX="${EPREFIX}/usr" \
51 BASHCOMPDIR="$(get_bashcompdir)" \
56 use dmenu && dobin contrib/dmenu/passmenu
59 elisp-install ${PN} contrib/emacs/*.{el,elc}
60 elisp-site-file-install "${FILESDIR}/50${PN}-gentoo.el"
63 if use importers; then
64 exeinto /usr/share/${PN}/importers
65 doexe contrib/importers/*
70 use emacs && elisp-site-regen
71 if use importers; then
72 einfo "To import passwords from other password managers, you may use the"
73 einfo "various importer scripts found in:"
74 einfo " ${EROOT}/usr/share/${PN}/importers/"
79 use emacs && elisp-site-regen