--- /Users/ycy/gentoo/usr/portage/app-admin/pass/pass-1.4.2.ebuild 2013-04-16 16:02:21.000000000 +0800 +++ pass-1.4.2.ebuild 2013-08-16 00:17:19.000000000 +0800 @@ -4,7 +4,7 @@ EAPI=4 -inherit bash-completion-r1 +inherit bash-completion-r1 eutils DESCRIPTION="Stores, retrieves, generates, and synchronizes passwords securely using gpg, pwgen, and git" HOMEPAGE="http://zx2c4.com/projects/password-store/" @@ -13,12 +13,14 @@ SLOT="0" LICENSE="GPL-2" KEYWORDS="~x86 ~amd64" -IUSE="+git X zsh-completion fish-completion" +IUSE="+git X zsh-completion fish-completion x86-macos x64-macos" RDEPEND=" app-crypt/gnupg app-admin/pwgen app-text/tree + x86-macos? ( app-misc/getopt sys-apps/coreutils ) + x64-macos? ( app-misc/getopt sys-apps/coreutils ) git? ( dev-vcs/git ) X? ( x11-misc/xclip ) zsh-completion? ( app-shells/zsh ) @@ -27,6 +29,15 @@ S="${WORKDIR}/password-store-${PV}" +src_prepare() { + epatch "${FILESDIR}/${P}-darwin.patch" + if use x86-macos || use x64-macos ; then + sed -i -e \ + "s|.*platform-defined-functions.*|source $EPREFIX/usr/share/pass/platform.sh|" \ + src/password-store.sh + fi +} + src_compile() { :; } @@ -44,4 +55,9 @@ insinto /usr/share/fish/completions newins contrib/pass.fish-completion pass.fish fi + + if use x86-macos || use x64-macos; then + insinto /usr/share/pass + newins src/platform/darwin.sh platform.sh + fi }