1 |
commit: 9f26ae965ae9d376913d8318c9733093ffb2a585 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jul 1 15:55:52 2017 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jul 1 15:56:33 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9f26ae96 |
7 |
|
8 |
net-vpn/kvpnc: Fix build with GCC-6 |
9 |
|
10 |
Patches kindly borrowed from Debian. |
11 |
|
12 |
Gentoo-bug: 623050 |
13 |
|
14 |
Package-Manager: Portage-2.3.6, Repoman-2.3.1 |
15 |
|
16 |
net-vpn/kvpnc/files/kvpnc-0.9.6a-gcc6.patch | 53 +++++++++++++++++++++++++ |
17 |
net-vpn/kvpnc/files/kvpnc-0.9.6a-kicon.patch | 59 ++++++++++++++++++++++++++++ |
18 |
net-vpn/kvpnc/kvpnc-0.9.6a-r3.ebuild | 57 +++++++++++++++++++++++++++ |
19 |
3 files changed, 169 insertions(+) |
20 |
|
21 |
diff --git a/net-vpn/kvpnc/files/kvpnc-0.9.6a-gcc6.patch b/net-vpn/kvpnc/files/kvpnc-0.9.6a-gcc6.patch |
22 |
new file mode 100644 |
23 |
index 00000000000..ba086a6337c |
24 |
--- /dev/null |
25 |
+++ b/net-vpn/kvpnc/files/kvpnc-0.9.6a-gcc6.patch |
26 |
@@ -0,0 +1,53 @@ |
27 |
+Author: Pino Toscano <pino@×××.org> |
28 |
+Description: remove extra bool parameter for KConfigGroup::deleteEntry() |
29 |
+ unneeded, and it does not match any of the actual signatures of the |
30 |
+ function |
31 |
+Bug-Debian: https://bugs.debian.org/811679 |
32 |
+Applied-Upstream: commit:1452683 |
33 |
+ |
34 |
+--- a/src/kvpncconfig.cpp |
35 |
++++ b/src/kvpncconfig.cpp |
36 |
+@@ -4305,7 +4305,7 @@ |
37 |
+ appPointer->processEvents(); |
38 |
+ |
39 |
+ if (useKwallet && KWallet::Wallet::isEnabled()) |
40 |
+- configgroup.deleteEntry("First use of Kwallet", false); |
41 |
++ configgroup.deleteEntry("First use of Kwallet"); |
42 |
+ |
43 |
+ |
44 |
+ /* = user data = */ |
45 |
+Author: Pino Toscano <pino@×××.org> |
46 |
+Description: do not return bool for QString |
47 |
+ GCC 6 cannot convert them |
48 |
+Bug-Debian: https://bugs.debian.org/811679 |
49 |
+Applied-Upstream: commit:1452682 |
50 |
+ |
51 |
+--- a/src/utils.cpp |
52 |
++++ b/src/utils.cpp |
53 |
+@@ -914,7 +914,7 @@ |
54 |
+ NameAndPidOfProgramListenProcess->start(proc, args); |
55 |
+ if (!NameAndPidOfProgramListenProcess->waitForStarted()) { |
56 |
+ kError() << "netstat fails!" << endl; |
57 |
+- return false; |
58 |
++ return ""; |
59 |
+ } else { |
60 |
+ NameAndPidOfProgramListenProcess->waitForFinished(); |
61 |
+ |
62 |
+@@ -946,7 +946,7 @@ |
63 |
+ GetEmailAddressOfCertProcess->start(proc, args); |
64 |
+ if (!GetEmailAddressOfCertProcess->waitForStarted()) { |
65 |
+ kError() << "GetEmailAddressOfCertProcess" << endl; |
66 |
+- return false; |
67 |
++ return ""; |
68 |
+ } else { |
69 |
+ GetEmailAddressOfCertProcess->waitForFinished(); |
70 |
+ disconnect(GetEmailAddressOfCertProcess, SIGNAL(readyReadStandardOutput()), this, SLOT(readOutGetEmailAddressOfCert())); |
71 |
+@@ -1159,7 +1159,7 @@ |
72 |
+ GetHostnameProcess->start(proc, args); |
73 |
+ if (!GetHostnameProcess->waitForStarted()) { |
74 |
+ kError() << "Unable to start getHostname process!" << endl; |
75 |
+- return false; |
76 |
++ return ""; |
77 |
+ } else { |
78 |
+ GetHostnameProcess->waitForFinished(); |
79 |
+ return Hostname; |
80 |
|
81 |
diff --git a/net-vpn/kvpnc/files/kvpnc-0.9.6a-kicon.patch b/net-vpn/kvpnc/files/kvpnc-0.9.6a-kicon.patch |
82 |
new file mode 100644 |
83 |
index 00000000000..d898dafbaba |
84 |
--- /dev/null |
85 |
+++ b/net-vpn/kvpnc/files/kvpnc-0.9.6a-kicon.patch |
86 |
@@ -0,0 +1,59 @@ |
87 |
+Author: Christoph Feck <cfeck@×××.org> |
88 |
+Description: Use KIcon to set window icons |
89 |
+Bug: https://bugs.kde.org/show_bug.cgi?id=246016 |
90 |
+Bug-Debian: https://bugs.debian.org/599094 |
91 |
+Applied-Upstream: commit:1180094 |
92 |
+ |
93 |
+--- a/src/kvpnc.cpp |
94 |
++++ b/src/kvpnc.cpp |
95 |
+@@ -320,10 +320,7 @@ KVpnc::~KVpnc() |
96 |
+ |
97 |
+ void KVpnc::initAction() |
98 |
+ { |
99 |
+- disconnectedIcon = KIconLoader::global()->loadIcon("disconnected", KIconLoader::NoGroup); |
100 |
+- connectedIcon = KIconLoader::global()->loadIcon("connected", KIconLoader::NoGroup); |
101 |
+- connectingIcon = KIconLoader::global()->loadIcon("connecting" , KIconLoader::NoGroup); |
102 |
+- setWindowIcon(disconnectedIcon); |
103 |
++ setWindowIcon(KIcon("disconnected")); |
104 |
+ |
105 |
+ (void*) KStandardAction::quit(this, SLOT(quitCalled()), actionCollection()); |
106 |
+ |
107 |
+@@ -17449,7 +17446,7 @@ void KVpnc::setGuiStatus(int status) |
108 |
+ QString ConnectionStatus = i18n("unknown"); |
109 |
+ QString Username = ""; |
110 |
+ if (status == KVpncEnum::connected) { |
111 |
+- setWindowIcon(connectedIcon); |
112 |
++ setWindowIcon(KIcon("connected")); |
113 |
+ |
114 |
+ durationString = (i18n("%1:%2:%3" , QString().sprintf("%02u", hour) , QString().sprintf("%02u", min) , QString().sprintf("%02u", sec))); |
115 |
+ QString ConnectMsg = ""; |
116 |
+@@ -17502,7 +17499,7 @@ void KVpnc::setGuiStatus(int status) |
117 |
+ |
118 |
+ } |
119 |
+ else if (status == KVpncEnum::connecting) { |
120 |
+- setWindowIcon(connectingIcon); |
121 |
++ setWindowIcon(KIcon("connecting")); |
122 |
+ mw->buttonConnect->setEnabled(false); |
123 |
+ mw->buttonDisconnect->setEnabled(true); |
124 |
+ mw->SessionCombo->setEnabled(false); |
125 |
+@@ -17531,7 +17528,7 @@ void KVpnc::setGuiStatus(int status) |
126 |
+ connectClicked(); |
127 |
+ |
128 |
+ } else if (status == KVpncEnum::disconnected) { |
129 |
+- setWindowIcon(disconnectedIcon); |
130 |
++ setWindowIcon(KIcon("disconnected")); |
131 |
+ mw->buttonConnect->setEnabled(true); |
132 |
+ mw->buttonDisconnect->setEnabled(false); |
133 |
+ DisconnectAction->setEnabled(false); |
134 |
+--- a/src/kvpnc.h |
135 |
++++ b/src/kvpnc.h |
136 |
+@@ -286,9 +286,6 @@ private: |
137 |
+ |
138 |
+ int TimeOutProcess; //< for timeout |
139 |
+ int ConnectingProcess; //< for killing process |
140 |
+- QPixmap connectedIcon; |
141 |
+- QPixmap disconnectedIcon; |
142 |
+- QPixmap connectingIcon; |
143 |
+ QPixmap connectingStatusPixmap; |
144 |
+ QPixmap disconnectedStatusPixmap; |
145 |
+ QPixmap connectedStatusPixmap; |
146 |
|
147 |
diff --git a/net-vpn/kvpnc/kvpnc-0.9.6a-r3.ebuild b/net-vpn/kvpnc/kvpnc-0.9.6a-r3.ebuild |
148 |
new file mode 100644 |
149 |
index 00000000000..15e16bc297e |
150 |
--- /dev/null |
151 |
+++ b/net-vpn/kvpnc/kvpnc-0.9.6a-r3.ebuild |
152 |
@@ -0,0 +1,57 @@ |
153 |
+# Copyright 1999-2017 Gentoo Foundation |
154 |
+# Distributed under the terms of the GNU General Public License v2 |
155 |
+ |
156 |
+EAPI=6 |
157 |
+ |
158 |
+# QT3SUPPORT_REQUIRED |
159 |
+KDE_LINGUAS="ar br cs da de el en_GB eo es et eu fr ga gl hi hne it ja ka lt |
160 |
+ms nb nds nl nn pa pl pt pt_BR ro ru sv tr uk zh_CN zh_TW" |
161 |
+inherit kde4-base |
162 |
+ |
163 |
+DESCRIPTION="KDELibs4-based frontend for various VPN clients" |
164 |
+HOMEPAGE="https://userbase.kde.org/KVpnc" |
165 |
+SRC_URI="http://download.gna.org/kvpnc/${P}-kde4.tar.bz2 |
166 |
+ http://download.gna.org/kvpnc/${P/a}-kde4-locale.tar.bz2" |
167 |
+ |
168 |
+LICENSE="GPL-2" |
169 |
+SLOT="4" |
170 |
+KEYWORDS="~amd64 ~x86" |
171 |
+IUSE="debug" |
172 |
+ |
173 |
+RDEPEND=" |
174 |
+ dev-libs/libgcrypt:0 |
175 |
+" |
176 |
+DEPEND="${RDEPEND} |
177 |
+ sys-devel/gettext |
178 |
+" |
179 |
+ |
180 |
+S=${WORKDIR}/${P}-kde4 |
181 |
+ |
182 |
+PATCHES=( |
183 |
+ "${FILESDIR}/${P}-scriptsec.patch" |
184 |
+ "${FILESDIR}/${P}-gcc47.patch" |
185 |
+ "${FILESDIR}/${P}-ifconfig.patch" |
186 |
+ "${FILESDIR}/${P}-gcc6.patch" |
187 |
+ "${FILESDIR}/${P}-kicon.patch" |
188 |
+) |
189 |
+ |
190 |
+src_prepare() { |
191 |
+ mv -vf "${WORKDIR}"/${P/a}-kde4-locale/po . || die |
192 |
+ |
193 |
+ echo "find_package ( Msgfmt REQUIRED )" >> CMakeLists.txt || die |
194 |
+ echo "find_package ( Gettext REQUIRED )" >> CMakeLists.txt || die |
195 |
+ echo "add_subdirectory ( po )" >> CMakeLists.txt || die |
196 |
+ |
197 |
+ sed -i \ |
198 |
+ -e "s:0.9.2-svn:${PV}:" \ |
199 |
+ CMakeLists.txt || die |
200 |
+ |
201 |
+ kde4-base_src_prepare |
202 |
+} |
203 |
+ |
204 |
+src_configure() { |
205 |
+ local mycmakeargs=( |
206 |
+ -DWITH_libgcrypt=ON |
207 |
+ ) |
208 |
+ kde4-base_src_configure |
209 |
+} |