Gentoo Archives: gentoo-commits

From: "Manuel Rüger" <mrueg@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] dev/mrueg:master commit in: app-admin/passwordsafe/, app-admin/passwordsafe/files/
Date: Tue, 02 Feb 2016 18:52:28
Message-Id: 1454439126.315ee9f0a2a4d1089913190623cafae3c23c0dab.mrueg@gentoo
1 commit: 315ee9f0a2a4d1089913190623cafae3c23c0dab
2 Author: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
3 AuthorDate: Tue Feb 2 18:52:06 2016 +0000
4 Commit: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
5 CommitDate: Tue Feb 2 18:52:06 2016 +0000
6 URL: https://gitweb.gentoo.org/dev/mrueg.git/commit/?id=315ee9f0
7
8 app-admin/passwordsafe: Version bump. Remove old
9
10 Package-Manager: portage-2.2.27
11
12 app-admin/passwordsafe/Manifest | 2 +-
13 .../passwordsafe-0.98_beta-fix-noyubikey.patch | 37 +++++++++++++++
14 .../files/passwordsafe-0.98_beta-fix-yubikey.patch | 23 ++++++++++
15 app-admin/passwordsafe/metadata.xml | 1 +
16 ...7_beta.ebuild => passwordsafe-0.98_beta.ebuild} | 53 +++++++++-------------
17 5 files changed, 83 insertions(+), 33 deletions(-)
18
19 diff --git a/app-admin/passwordsafe/Manifest b/app-admin/passwordsafe/Manifest
20 index 8d1437c..38029bd 100644
21 --- a/app-admin/passwordsafe/Manifest
22 +++ b/app-admin/passwordsafe/Manifest
23 @@ -1 +1 @@
24 -DIST passwordsafe-0.97_beta.tar.gz 13732972 SHA256 c19a7fff668d0459f304d83e6ddb75f52760d10ad2d015e5bb3446a920d88bd9 SHA512 f507fb3a3b3646c707be589a89442e58da47cc11f3675b6cedb6f57d40178ff5eb3ec9ba6443be6aec708ebbfbfb412fa7b641436c0b42d2e42b4238b3fbcae0 WHIRLPOOL dd344efca6625cc5cb8c0df1396ccfa1610c77c6636d459ad50088b749badba48fd67d688ca150a6f8e102542a01939a6514acd75ebaa3cec987bb2bd178bcf3
25 +DIST passwordsafe-0.98_beta.tar.gz 13833262 SHA256 a15afcd6a6b3a13ba9651cd488d7268044fbb9db3bc002972cc845c5ba85ec56 SHA512 dc15906638e71c9feceb68c6e1bf9c2682e26dba8e35e7fc4b64ccb997b8b3d8e97af7938cc224ea9ed7e3910b657f4f7900d3768c6d25ffd26c65e3fd3c9cf9 WHIRLPOOL bdc016a2c0cdda1ba0a96e6118d2e9c28c6cd3ae521377ebed04c7e00cd590059a900b6999d0d30729a45b157c1bc37e3734b08a38a7ee4acc46582b16452c41
26
27 diff --git a/app-admin/passwordsafe/files/passwordsafe-0.98_beta-fix-noyubikey.patch b/app-admin/passwordsafe/files/passwordsafe-0.98_beta-fix-noyubikey.patch
28 new file mode 100644
29 index 0000000..0cd407c
30 --- /dev/null
31 +++ b/app-admin/passwordsafe/files/passwordsafe-0.98_beta-fix-noyubikey.patch
32 @@ -0,0 +1,37 @@
33 +From e12b2f64717efa18589784f78894303ebaedf2a5 Mon Sep 17 00:00:00 2001
34 +From: Vladimir Timofeev <vovkasm@×××××.com>
35 +Date: Fri, 29 Jan 2016 02:44:12 +0300
36 +Subject: [PATCH] Fix cmake build on Linux without yubikey lib (NO_YUBI option)
37 +
38 +---
39 + src/os/CMakeLists.txt | 6 +++++-
40 + 1 file changed, 5 insertions(+), 1 deletion(-)
41 +
42 +diff --git a/src/os/CMakeLists.txt b/src/os/CMakeLists.txt
43 +index dfdcd6a..652bd47 100644
44 +--- a/src/os/CMakeLists.txt
45 ++++ b/src/os/CMakeLists.txt
46 +@@ -46,7 +46,6 @@ if (WIN32)
47 + elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
48 + set (OS_SRCS
49 + linux/KeySend.cpp
50 +- linux/PWYubi.cpp
51 + linux/UUID.cpp
52 + linux/debug.cpp
53 + linux/dir.cpp
54 +@@ -65,10 +64,15 @@ if (WIN32)
55 + linux/utf8conv.cpp
56 + linux/xsendstring.cpp
57 + )
58 ++ set (OS_YUBI_SRC linux/PWYubi.cpp)
59 + else()
60 + message (FATAL_ERROR "Unsupported OS "
61 + ${CMAKE_SYSTEM_NAME}
62 + " - can't build OS library")
63 + endif()
64 +
65 ++if(HAVE_YKPERS_H)
66 ++ list(APPEND OS_SRC ${OS_YUBI_SRC})
67 ++endif()
68 ++
69 + add_library(os ${OS_SRCS})
70
71 diff --git a/app-admin/passwordsafe/files/passwordsafe-0.98_beta-fix-yubikey.patch b/app-admin/passwordsafe/files/passwordsafe-0.98_beta-fix-yubikey.patch
72 new file mode 100644
73 index 0000000..4b1e70b
74 --- /dev/null
75 +++ b/app-admin/passwordsafe/files/passwordsafe-0.98_beta-fix-yubikey.patch
76 @@ -0,0 +1,23 @@
77 +From 747a241892b1deb8ba12216ac23656dea8b4400d Mon Sep 17 00:00:00 2001
78 +From: =?UTF-8?q?Manuel=20R=C3=BCger?= <manuel@××××.eu>
79 +Date: Tue, 2 Feb 2016 19:42:07 +0100
80 +Subject: [PATCH] Fix cmake build on Linux with yubikey lib
81 +
82 +Commit e12b2f64717efa18589784f78894303ebaedf2a5 included a typo that resulted in a failing build of pwsafe with Yubikey support on Linux.
83 +---
84 + src/os/CMakeLists.txt | 2 +-
85 + 1 file changed, 1 insertion(+), 1 deletion(-)
86 +
87 +diff --git a/src/os/CMakeLists.txt b/src/os/CMakeLists.txt
88 +index 652bd47..a5597b0 100644
89 +--- a/src/os/CMakeLists.txt
90 ++++ b/src/os/CMakeLists.txt
91 +@@ -72,7 +72,7 @@ else()
92 + endif()
93 +
94 + if(HAVE_YKPERS_H)
95 +- list(APPEND OS_SRC ${OS_YUBI_SRC})
96 ++ list(APPEND OS_SRCS ${OS_YUBI_SRC})
97 + endif()
98 +
99 + add_library(os ${OS_SRCS})
100
101 diff --git a/app-admin/passwordsafe/metadata.xml b/app-admin/passwordsafe/metadata.xml
102 index a0ac2db..015554e 100644
103 --- a/app-admin/passwordsafe/metadata.xml
104 +++ b/app-admin/passwordsafe/metadata.xml
105 @@ -8,5 +8,6 @@
106 <use>
107 <flag name="minimal">Avoid collision with app-misc/pwsafe</flag>
108 <flag name="yubikey">Enable support for Yubikey</flag>
109 + <flag name="xml">Enable XML import support</flag>
110 </use>
111 </pkgmetadata>
112
113 diff --git a/app-admin/passwordsafe/passwordsafe-0.97_beta.ebuild b/app-admin/passwordsafe/passwordsafe-0.98_beta.ebuild
114 similarity index 69%
115 rename from app-admin/passwordsafe/passwordsafe-0.97_beta.ebuild
116 rename to app-admin/passwordsafe/passwordsafe-0.98_beta.ebuild
117 index e6f730d..dac9adf 100644
118 --- a/app-admin/passwordsafe/passwordsafe-0.97_beta.ebuild
119 +++ b/app-admin/passwordsafe/passwordsafe-0.98_beta.ebuild
120 @@ -1,4 +1,4 @@
121 -# Copyright 1999-2015 Gentoo Foundation
122 +# Copyright 1999-2016 Gentoo Foundation
123 # Distributed under the terms of the GNU General Public License v2
124 # $Id$
125
126 @@ -6,7 +6,7 @@ EAPI=5
127
128 WX_GTK_VER="3.0"
129
130 -inherit eutils flag-o-matic wxwidgets
131 +inherit eutils flag-o-matic wxwidgets cmake-utils
132
133 MY_PV="${PV/_beta/BETA}"
134 DESCRIPTION="Password manager with wxGTK based frontend"
135 @@ -16,9 +16,9 @@ SRC_URI="https://github.com/pwsafe/pwsafe/archive/${MY_PV}.tar.gz -> ${P}.tar.gz
136 LICENSE="Artistic-2"
137 SLOT="0"
138 KEYWORDS="~amd64"
139 -IUSE="minimal yubikey"
140 +IUSE="minimal yubikey +xml"
141
142 -RDEPEND="dev-libs/xerces-c
143 +RDEPEND="xml? ( dev-libs/xerces-c )
144 sys-apps/util-linux
145 sys-devel/gettext
146 x11-libs/libXt
147 @@ -36,53 +36,33 @@ pkg_pretend() {
148 }
149
150 src_prepare() {
151 - # remove hard coded compilers and compiler flags
152 - sed -e '/^export CXXFLAGS/d' -i Makefile.linux || die
153 - sed -i src/core/Makefile src/os/linux/Makefile src/ui/wxWidgets/Makefile \
154 - -e 's/-O[0-3]\?//g' -e 's/-g(gdb)\?//g' \
155 - -e '/^CC=/d' -e '/^CXX=/d' || die
156 -
157 - # generator for the version.h only adds \r breaking the c file
158 - cp src/ui/wxWidgets/version.in src/ui/wxWidgets/version.h || die
159 -
160 # binary name pwsafe is in use by app-misc/pwsafe, we use passwordsafe
161 # instead. Perform required changes in linking files
162 sed -i install/desktop/pwsafe.desktop -e "s/pwsafe/${PN}/g" || die
163 sed -i docs/pwsafe.1 \
164 -e 's/PWSAFE/PASSWORDSAFE/' \
165 -e "s/^.B pwsafe/.B ${PN}/" || die
166 + epatch "${FILESDIR}"/${P}-fix-noyubikey.patch\
167 + "${FILESDIR}"/${P}-fix-yubikey.patch
168 }
169
170 src_configure() {
171 - if ! use yubikey ; then
172 - export NO_YUBI=1
173 - fi
174 -
175 need-wxwidgets unicode
176
177 - strip-flags
178 - append-cxxflags -std=c++11
179 -}
180 + local mycmakeargs=( $(usex yubikey '' '-DNO_YUBI=ON')
181 + $(usex xml '' '-DNO_XML=ON') )
182
183 -src_compile() {
184 - emake unicoderelease help I18N
185 + cmake-utils_src_configure
186 }
187
188 src_install() {
189 + pushd "${BUILD_DIR}" || die
190 if use minimal; then
191 - newbin src/ui/wxWidgets/GCCUnicodeRelease/pwsafe ${PN}
192 + newbin pwsafe ${PN}
193 else
194 - dobin src/ui/wxWidgets/GCCUnicodeRelease/pwsafe
195 + dobin pwsafe
196 dosym pwsafe /usr/bin/${PN}
197 fi
198 -
199 - newman docs/pwsafe.1 ${PN}.1
200 -
201 - dodoc README.txt docs/{ReleaseNotes.txt,ChangeLog.txt}
202 -
203 - insinto /usr/share/pwsafe/xml
204 - doins xml/*
205 -
206 insinto /usr/share/locale
207 doins -r src/ui/wxWidgets/I18N/mos/*
208
209 @@ -93,6 +73,15 @@ src_install() {
210 insinto /usr/share/doc/${PN}/help
211 doins help/*.zip
212
213 + popd || die
214 +
215 + newman docs/pwsafe.1 ${PN}.1
216 +
217 + dodoc README.txt docs/{ReleaseNotes.txt,ChangeLog.txt}
218 +
219 + insinto /usr/share/pwsafe/xml
220 + doins xml/*
221 +
222 newicon install/graphics/pwsafe.png ${PN}.png
223 newmenu install/desktop/pwsafe.desktop ${PN}.desktop
224 }