Gentoo Archives: gentoo-commits

From: Michael Palimaka <kensington@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-admin/keepass/
Date: Wed, 08 May 2019 11:03:21
Message-Id: 1557313381.17307e5b041646355e89b7adcad84f5f8e25d829.kensington@gentoo
1 commit: 17307e5b041646355e89b7adcad84f5f8e25d829
2 Author: Michael Palimaka <kensington <AT> gentoo <DOT> org>
3 AuthorDate: Wed May 8 11:02:42 2019 +0000
4 Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org>
5 CommitDate: Wed May 8 11:03:01 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=17307e5b
7
8 app-admin/keepass: version bump 2.42.1
9
10 Package-Manager: Portage-2.3.62, Repoman-2.3.12
11 Signed-off-by: Michael Palimaka <kensington <AT> gentoo.org>
12
13 app-admin/keepass/Manifest | 1 +
14 app-admin/keepass/keepass-2.42.1.ebuild | 113 ++++++++++++++++++++++++++++++++
15 2 files changed, 114 insertions(+)
16
17 diff --git a/app-admin/keepass/Manifest b/app-admin/keepass/Manifest
18 index 909171f8610..93678d5edbd 100644
19 --- a/app-admin/keepass/Manifest
20 +++ b/app-admin/keepass/Manifest
21 @@ -1 +1,2 @@
22 DIST KeePass-2.41-Source.zip 5141195 BLAKE2B 7f61efa6d73fbfd5de283567a1673f5757619ebb81f3daa3fba82c887874f2cdb15f74221bf389013fe4cf19c83f00f87de2c596d22a22f5f38b5236dab01e44 SHA512 0d9398f529e004df6a4d3e0b8e34a1324b1806bf44987e9cb2d7535eaf02192662e72c89f1e41b7da01d23b0d686fbbca7a956ef7873fd8b1948847fbf5d27a5
23 +DIST KeePass-2.42.1-Source.zip 5163432 BLAKE2B c24a57da863c92d3f89663f33ed89c277e248c926067c14a6a7e3526e77c458e943e62c4b98a3d86595eea308d8744fd4a17da6d5456030a771e324a662abd9f SHA512 c87581afbaa516f637848db134a8d945db168bbbe97789a9a7424600d4188a21d2b1b3cf907a20577b2903ce8916b6b12355a3296ee1630a5b556c9170c4fa22
24
25 diff --git a/app-admin/keepass/keepass-2.42.1.ebuild b/app-admin/keepass/keepass-2.42.1.ebuild
26 new file mode 100644
27 index 00000000000..1dc244ea08c
28 --- /dev/null
29 +++ b/app-admin/keepass/keepass-2.42.1.ebuild
30 @@ -0,0 +1,113 @@
31 +# Copyright 1999-2019 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=6
35 +
36 +inherit eutils gnome2-utils xdg-utils
37 +
38 +MY_PN="KeePass"
39 +DESCRIPTION="A free, open source, light-weight and easy-to-use password manager"
40 +HOMEPAGE="https://keepass.info/"
41 +SRC_URI="mirror://sourceforge/${PN}/${MY_PN}-${PV}-Source.zip"
42 +
43 +LICENSE="GPL-2"
44 +SLOT="0"
45 +KEYWORDS="~amd64 ~x86"
46 +IUSE="aot"
47 +
48 +COMMON_DEPEND="dev-lang/mono"
49 +DEPEND="${COMMON_DEPEND}
50 + app-arch/unzip
51 +"
52 +RDEPEND="${COMMON_DEPEND}
53 + dev-dotnet/libgdiplus[cairo]
54 +"
55 +
56 +S="${WORKDIR}"
57 +PATCHES=( "${FILESDIR}/${PN}-2.36-xsl-path-detection.patch" )
58 +
59 +src_prepare() {
60 + # KeePass looks for some XSL files in the same folder as the executable,
61 + # we prefer to have it in /usr/share/KeePass. Apply patch using base function.
62 + # This XSL file will not be upstreamed since the KeePass creator said that
63 + # including this patch would break the Portable USB version of KeePass
64 + # (which keeps/looks for xsl files in its own folder)
65 + default
66 +
67 + # Switch into build dir so the mono prepration script works correctly
68 + pushd Build || die
69 + source PrepMonoDev.sh || die
70 + popd || die
71 +}
72 +
73 +src_compile() {
74 + export MONO_REGISTRY_PATH=/dev/null # bug 659808
75 +
76 + # Build with Release target
77 + xbuild /target:KeePass /property:Configuration=Release || die
78 +
79 + # Run Ahead Of Time compiler on the binary
80 + if use aot; then
81 + cp Ext/KeePass.exe.config Build/KeePass/Release/ || die
82 + mono --aot -O=all Build/KeePass/Release/KeePass.exe || die
83 + fi
84 +}
85 +
86 +src_install() {
87 + # Wrapper script to launch mono
88 + make_wrapper "${PN}" "mono /usr/$(get_libdir)/${PN}/KeePass.exe"
89 +
90 + # Some XSL files
91 + insinto "/usr/share/${PN}/XSL"
92 + doins Ext/XSL/*
93 +
94 + insinto "/usr/$(get_libdir)/${PN}"
95 + exeinto "/usr/$(get_libdir)/${PN}"
96 +
97 + doins Ext/KeePass.exe.config
98 +
99 + # Default configuration, simply says to use user-specific configuration
100 + doins Ext/KeePass.config.xml
101 +
102 + # The actual executable
103 + doexe Build/KeePass/Release/KeePass.exe
104 +
105 + # Copy the AOT compilation result
106 + if use aot; then
107 + doexe Build/KeePass/Release/KeePass.exe.so
108 + fi
109 +
110 + # Prepare the icons
111 + newicon -s 256 Ext/Icons_04_CB/Finals/plockb.png "${PN}.png"
112 + newicon -s 256 -t gnome -c mimetypes Ext/Icons_04_CB/Finals/plockb.png "application-x-${PN}2.png"
113 +
114 + # Create a desktop entry and associate it with the KeePass mime type
115 + make_desktop_entry "${PN}" "${MY_PN}" "${PN}" "System;Security" "MimeType=application/x-keepass2;\nStartupWMClass=KeePass2;"
116 +
117 + # MIME descriptor for .kdbx files
118 + insinto /usr/share/mime/packages
119 + doins "${FILESDIR}/${PN}.xml"
120 +
121 + # sed, because patching this really sucks
122 + sed -i 's/mono/mono --verify-all/g' "${D}/usr/bin/keepass" || die
123 +}
124 +
125 +pkg_postinst() {
126 + gnome2_icon_cache_update
127 + xdg_desktop_database_update
128 + xdg_mimeinfo_database_update
129 +
130 + if ! has_version x11-misc/xdotool ; then
131 + elog "Optional dependencies:"
132 + elog " x11-misc/xdotool (enables autotype/autofill)"
133 + fi
134 +
135 + elog "Some systems may experience issues with copy and paste operations."
136 + elog "If you encounter this, please install x11-misc/xsel."
137 +}
138 +
139 +pkg_postrm() {
140 + gnome2_icon_cache_update
141 + xdg_desktop_database_update
142 + xdg_mimeinfo_database_update
143 +}