Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-misc/synergy/files/, x11-misc/synergy/
Date: Sat, 12 May 2018 11:21:58
Message-Id: 1526124080.5dd1f7a3908dec9ae6cf6773acd8ec3b33fc0b2c.asturm@gentoo
1 commit: 5dd1f7a3908dec9ae6cf6773acd8ec3b33fc0b2c
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Fri May 11 21:57:30 2018 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Sat May 12 11:21:20 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5dd1f7a3
7
8 x11-misc/synergy: 1.9.1 version bump, Qt4 -> Qt5
9
10 Bug: https://bugs.gentoo.org/649572
11 Bug: https://bugs.gentoo.org/653468
12 Package-Manager: Portage-2.3.36, Repoman-2.3.9
13
14 x11-misc/synergy/Manifest | 1 +
15 .../files/synergy-1.9.1-cmake-version.patch | 57 ++++++++++++
16 x11-misc/synergy/files/synergy-1.9.1-gtest.patch | 28 ++++++
17 .../files/synergy-1.9.1-internal-gmock-gtest.patch | 23 +++++
18 x11-misc/synergy/files/synergy-1.9.1-pthread.patch | 11 +++
19 x11-misc/synergy/files/synergy-1.9.1-qt-5.11.patch | 31 +++++++
20 x11-misc/synergy/synergy-1.9.1.ebuild | 103 +++++++++++++++++++++
21 7 files changed, 254 insertions(+)
22
23 diff --git a/x11-misc/synergy/Manifest b/x11-misc/synergy/Manifest
24 index fb8fff4beb8..7fd062f77f5 100644
25 --- a/x11-misc/synergy/Manifest
26 +++ b/x11-misc/synergy/Manifest
27 @@ -1,5 +1,6 @@
28 DIST synergy-1.6.3.tar.gz 4405517 BLAKE2B 46a56a9833ac0132d0fefcbeefccbc440d3d4e123eceb4ccb04eedadd6fa9dec9abb6f7770d6739b576006783a8890788d53027d9d5a5b245ef6b14dc704e72b SHA512 de67b0663c5ef411570f163208b2a295a8f16537dcc37a41a31039a2d01de083410c023b7f255664eb0c84f0290473690b638934082c2276ddce594126861165
29 DIST synergy-1.8.6.tar.gz 13497043 BLAKE2B f74f6d48203bc49d7a74cf2f951ea506a1887b659e34954651d2a8333e604e3e41e04b5e6b6115b8b8ded6e94fbad004b0673465cb0734a57d137992f432a3c4 SHA512 e0816c280c77d4a865f4b7d4a9081963032a156bfb6da51e6b67a6fc41f8f18b097d3fc7c96218db268c36d0148021f9ddba95fe56daff8bfc54219dbdfe14a5
30 DIST synergy-1.8.8.tar.gz 13498599 BLAKE2B 40c52ed036ef21594d330f1b4e32b647bdb3076147d40f2437f649a54700cb4a7822137587c129f9bede26a93e872961135ee27dfb3b8f4256153a5e982737a1 SHA512 b4909930af7da10d877297e674df4c042ec54333eed585334da4a8c834c0ca3ad7c93fd2436c7d8d2f0e9e039d7bd385bb9e8a8c706750cbab3c3664a9b16bc6
31 +DIST synergy-1.9.1.tar.gz 6694745 BLAKE2B d7e19fd3e55e60b6a41dffa04d6a53c897c0a7e4895ff65ddfae18b06892959e8c7e56092b3d49f123768b3ce92d59fc890afe756192b3625db664b5fa19331e SHA512 83301f2d035bd91578cf83e335d721748791f62c85252156fd27d09db7b5216a745cfa81c06b27995d1785e676ee4c75f795b5fad2b9a700a981d27d05e5a8fe
32 DIST synergy-2.0.0.tar.gz 5892923 BLAKE2B 661f42031499c9c1b2cbb90d9af45f5210c8e1b109f62cfc1cbdedf264f8c358c394005f4a040a8071773d538383adf3e85a059bc54ff67284aaf86990e0a6fa SHA512 69b8e4ea9d22f5699d3a0761cf9811d0689b06a920056b4b4dde466767ec89caaaa8c5736a78d0857ebfb814aaa3bf07591feaf0e64e0555949c5ee6d6974a13
33 DIST synergy.png 26910 BLAKE2B aa9c5c7c0647937eadc82edbdf7a5a374dd25e9450d6861f1092d8569155e38b3d0729bafb69809e62660802d471899c472a0c9d2066e4b7fcec379f34470535 SHA512 0b5a1813c71fd2923adca4cf7b0f840fc37c73a2f18ad68f8bb2fd2ea312d9a884e2e2bcd78f6dd0f13d1f31ea3991379e141ec62d970a18c3a9c46b26720c5d
34
35 diff --git a/x11-misc/synergy/files/synergy-1.9.1-cmake-version.patch b/x11-misc/synergy/files/synergy-1.9.1-cmake-version.patch
36 new file mode 100644
37 index 00000000000..da7a603119d
38 --- /dev/null
39 +++ b/x11-misc/synergy/files/synergy-1.9.1-cmake-version.patch
40 @@ -0,0 +1,57 @@
41 +--- a/cmake/Version.cmake 2018-04-10 12:18:42.000000000 +0200
42 ++++ b/cmake/Version.cmake 2018-05-11 23:29:24.499906356 +0200
43 +@@ -23,7 +23,7 @@
44 + if (DEFINED ENV{SYNERGY_VERSION_PATCH})
45 + set (SYNERGY_VERSION_PATCH $ENV{SYNERGY_VERSION_PATCH})
46 + else()
47 +- set (SYNERGY_VERSION_PATCH 0)
48 ++ set (SYNERGY_VERSION_PATCH 1)
49 + message (WARNING "Synergy version wasn't set. Set to ${SYNERGY_VERSION_MAJOR}.${SYNERGY_VERSION_MINOR}.${SYNERGY_VERSION_PATCH}")
50 + endif()
51 + endif()
52 +@@ -36,29 +36,6 @@
53 + endif()
54 + endif()
55 +
56 +-if (NOT DEFINED SYNERGY_REVISION)
57 +- if (DEFINED ENV{GIT_COMMIT})
58 +- string (SUBSTRING $ENV{GIT_COMMIT} 0 8 SYNERGY_REVISION)
59 +- elseif (SYNERGY_VERSION_STAGE STREQUAL "snapshot")
60 +- execute_process (
61 +- COMMAND git rev-parse --short=8 HEAD
62 +- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
63 +- OUTPUT_VARIABLE SYNERGY_REVISION
64 +- OUTPUT_STRIP_TRAILING_WHITESPACE
65 +- )
66 +- endif()
67 +-endif()
68 +-
69 +-if (DEFINED SYNERGY_REVISION)
70 +- string(LENGTH ${SYNERGY_REVISION} SYNERGY_REVISION_LENGTH)
71 +- if (NOT ((SYNERGY_REVISION MATCHES "^[a-f0-9]+") AND (SYNERGY_REVISION_LENGTH EQUAL "8")))
72 +- message (FATAL_ERROR "SYNERGY_REVISION ('${SYNERGY_REVISION}') should be a short commit hash")
73 +- endif()
74 +- unset (SYNERGY_REVISION_LENGTH)
75 +-else()
76 +- set (SYNERGY_REVISION "0badc0de")
77 +-endif()
78 +-
79 + if (DEFINED ENV{BUILD_NUMBER})
80 + set (SYNERGY_BUILD_NUMBER $ENV{BUILD_NUMBER})
81 + else()
82 +@@ -66,7 +43,6 @@
83 + endif()
84 +
85 + string (TIMESTAMP SYNERGY_BUILD_DATE "%Y%m%d" UTC)
86 +-set (SYNERGY_SNAPSHOT_INFO ".${SYNERGY_VERSION_STAGE}.${SYNERGY_REVISION}")
87 +
88 + if (SYNERGY_VERSION_STAGE STREQUAL "snapshot")
89 + set (SYNERGY_VERSION_TAG "${SYNERGY_VERSION_STAGE}.b${SYNERGY_BUILD_NUMBER}-${SYNERGY_REVISION}")
90 +@@ -80,7 +56,6 @@
91 +
92 + add_definitions (-DSYNERGY_VERSION="${SYNERGY_VERSION}")
93 + add_definitions (-DSYNERGY_VERSION_STRING="${SYNERGY_VERSION_STRING}")
94 +-add_definitions (-DSYNERGY_REVISION="${SYNERGY_REVISION}")
95 + add_definitions (-DSYNERGY_BUILD_DATE="${SYNERGY_BUILD_DATE}")
96 + add_definitions (-DSYNERGY_BUILD_NUMBER=${SYNERGY_BUILD_NUMBER})
97 +
98
99 diff --git a/x11-misc/synergy/files/synergy-1.9.1-gtest.patch b/x11-misc/synergy/files/synergy-1.9.1-gtest.patch
100 new file mode 100644
101 index 00000000000..f7a5e614e81
102 --- /dev/null
103 +++ b/x11-misc/synergy/files/synergy-1.9.1-gtest.patch
104 @@ -0,0 +1,28 @@
105 +--- a/src/lib/synergy/KeyMap.h
106 ++++ b/src/lib/synergy/KeyMap.h
107 +@@ -24,7 +24,9 @@
108 + #include "common/stdset.h"
109 + #include "common/stdvector.h"
110 +
111 ++#if WITH_GENTOO_TEST
112 + #include <gtest/gtest_prod.h>
113 ++#endif
114 +
115 + namespace synergy {
116 +
117 +@@ -327,6 +329,7 @@
118 + //@}
119 +
120 +
121 ++#if WITH_GENTOO_TEST
122 + private:
123 + FRIEND_TEST(KeyMapTests,
124 + findBestKey_requiredDown_matchExactFirstItem);
125 +@@ -341,6 +344,7 @@
126 + FRIEND_TEST(KeyMapTests,
127 + findBestKey_onlyOneRequiredDown_matchTwoRequiredChangesItem);
128 + FRIEND_TEST(KeyMapTests, findBestKey_noRequiredDown_cannotMatch);
129 ++#endif
130 +
131 + private:
132 + //! Ways to synthesize a key
133
134 diff --git a/x11-misc/synergy/files/synergy-1.9.1-internal-gmock-gtest.patch b/x11-misc/synergy/files/synergy-1.9.1-internal-gmock-gtest.patch
135 new file mode 100644
136 index 00000000000..bc8a9613057
137 --- /dev/null
138 +++ b/x11-misc/synergy/files/synergy-1.9.1-internal-gmock-gtest.patch
139 @@ -0,0 +1,23 @@
140 +--- a/src/test/CMakeLists.txt
141 ++++ b/src/test/CMakeLists.txt
142 +@@ -14,20 +14,5 @@
143 + # You should have received a copy of the GNU General Public License
144 + # along with this program. If not, see <http://www.gnu.org/licenses/>.
145 +
146 +-include_directories(
147 +- ../../ext/gtest
148 +- ../../ext/gtest/include
149 +- ../../ext/gmock
150 +- ../../ext/gmock/include)
151 +-
152 +-add_library(gtest STATIC ../../ext/gtest/src/gtest-all.cc)
153 +-add_library(gmock STATIC ../../ext/gmock/src/gmock-all.cc)
154 +-
155 +-if (UNIX)
156 +- # ignore warnings in gtest and gmock
157 +- set_target_properties(gtest PROPERTIES COMPILE_FLAGS "-w")
158 +- set_target_properties(gmock PROPERTIES COMPILE_FLAGS "-w")
159 +-endif()
160 +-
161 + add_subdirectory(integtests)
162 + add_subdirectory(unittests)
163
164 diff --git a/x11-misc/synergy/files/synergy-1.9.1-pthread.patch b/x11-misc/synergy/files/synergy-1.9.1-pthread.patch
165 new file mode 100644
166 index 00000000000..46ae6e1588b
167 --- /dev/null
168 +++ b/x11-misc/synergy/files/synergy-1.9.1-pthread.patch
169 @@ -0,0 +1,11 @@
170 +--- a/CMakeLists.txt
171 ++++ b/CMakeLists.txt
172 +@@ -141,6 +141,8 @@
173 + check_library_exists ("pthread" pthread_create "" HAVE_PTHREAD)
174 + if (HAVE_PTHREAD)
175 + list (APPEND libs pthread)
176 ++ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread")
177 ++ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
178 + else()
179 + message (FATAL_ERROR "Missing library: pthread")
180 + endif()
181
182 diff --git a/x11-misc/synergy/files/synergy-1.9.1-qt-5.11.patch b/x11-misc/synergy/files/synergy-1.9.1-qt-5.11.patch
183 new file mode 100644
184 index 00000000000..7a706a084d0
185 --- /dev/null
186 +++ b/x11-misc/synergy/files/synergy-1.9.1-qt-5.11.patch
187 @@ -0,0 +1,31 @@
188 +--- a/src/gui/CMakeLists.txt 2018-05-11 23:30:26.425509147 +0200
189 ++++ b/src/gui/CMakeLists.txt 2018-05-11 23:31:53.237354182 +0200
190 +@@ -39,7 +39,7 @@
191 + target_link_libraries (synergy dns_sd)
192 + endif()
193 +
194 +-qt5_use_modules (synergy Core Widgets Network)
195 ++target_link_libraries (synergy Qt5::Core Qt5::Widgets Qt5::Network)
196 + target_compile_definitions (synergy PRIVATE -DSYNERGY_VERSION_STAGE="${SYNERGY_VERSION_STAGE}")
197 + target_compile_definitions (synergy PRIVATE -DSYNERGY_REVISION="${SYNERGY_REVISION}")
198 +
199 +--- a/src/gui/src/ActionDialog.cpp 2018-04-10 12:18:42.000000000 +0200
200 ++++ b/src/gui/src/ActionDialog.cpp 2018-05-11 23:33:50.814498692 +0200
201 +@@ -25,6 +25,7 @@
202 +
203 + #include <QtCore>
204 + #include <QtGui>
205 ++#include <QButtonGroup>
206 +
207 + ActionDialog::ActionDialog(QWidget* parent, ServerConfig& config, Hotkey& hotkey, Action& action) :
208 + QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint),
209 +--- a/src/gui/src/ScreenSetupView.cpp 2018-04-10 12:18:42.000000000 +0200
210 ++++ b/src/gui/src/ScreenSetupView.cpp 2018-05-11 23:35:33.304496343 +0200
211 +@@ -22,6 +22,7 @@
212 +
213 + #include <QtCore>
214 + #include <QtGui>
215 ++#include <QHeaderView>
216 +
217 + ScreenSetupView::ScreenSetupView(QWidget* parent) :
218 + QTableView(parent)
219
220 diff --git a/x11-misc/synergy/synergy-1.9.1.ebuild b/x11-misc/synergy/synergy-1.9.1.ebuild
221 new file mode 100644
222 index 00000000000..dda9e9c3a8d
223 --- /dev/null
224 +++ b/x11-misc/synergy/synergy-1.9.1.ebuild
225 @@ -0,0 +1,103 @@
226 +# Copyright 1999-2018 Gentoo Foundation
227 +# Distributed under the terms of the GNU General Public License v2
228 +
229 +EAPI=6
230 +
231 +inherit cmake-utils desktop gnome2-utils
232 +
233 +DESCRIPTION="Lets you easily share a single mouse and keyboard between multiple computers"
234 +HOMEPAGE="https://symless.com/synergy https://github.com/symless/synergy-core"
235 +SRC_URI="
236 + https://github.com/symless/${PN}-core/archive/v${PV}-stable.tar.gz -> ${P}.tar.gz
237 + https://dev.gentoo.org/~jer/${PN}.png
238 +"
239 +
240 +LICENSE="GPL-2"
241 +SLOT="0"
242 +KEYWORDS="~alpha ~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos ~sparc-solaris ~x86-solaris"
243 +IUSE="libressl qt5"
244 +RESTRICT="test"
245 +
246 +S=${WORKDIR}/${PN}-core-${PV}-stable
247 +
248 +COMMON_DEPEND="
249 + !libressl? ( dev-libs/openssl:* )
250 + libressl? ( dev-libs/libressl )
251 + net-misc/curl
252 + x11-libs/libICE
253 + x11-libs/libSM
254 + x11-libs/libX11
255 + x11-libs/libXext
256 + x11-libs/libXi
257 + x11-libs/libXinerama
258 + x11-libs/libXrandr
259 + x11-libs/libXtst
260 + qt5? (
261 + dev-qt/qtcore:5
262 + dev-qt/qtgui:5
263 + dev-qt/qtnetwork:5
264 + dev-qt/qtwidgets:5
265 + net-dns/avahi[mdnsresponder-compat]
266 + )
267 +"
268 +DEPEND="
269 + ${COMMON_DEPEND}
270 + x11-proto/kbproto
271 + x11-proto/randrproto
272 + x11-proto/xextproto
273 + x11-proto/xineramaproto
274 + x11-proto/xproto
275 +"
276 +RDEPEND="
277 + ${COMMON_DEPEND}
278 + qt5? ( !x11-misc/qsynergy )
279 +"
280 +
281 +DOCS=( ChangeLog doc/synergy.conf.example{,-advanced,-basic} )
282 +
283 +PATCHES=(
284 + "${FILESDIR}"/${P}-pthread.patch
285 + "${FILESDIR}"/${P}-internal-gmock-gtest.patch
286 + "${FILESDIR}"/${P}-gtest.patch
287 + "${FILESDIR}"/${P}-cmake-version.patch
288 + "${FILESDIR}"/${P}-qt-5.11.patch
289 +)
290 +
291 +src_configure() {
292 + local mycmakeargs=(
293 + -DSYNERGY_BUILD_LEGACY_GUI=$(usex qt5)
294 + -DSYNERGY_BUILD_LEGACY_INSTALLER=OFF
295 + )
296 +
297 + cmake-utils_src_configure
298 +}
299 +
300 +src_install () {
301 + dobin "${BUILD_DIR}"/bin/{synergy{c,s},syntool}
302 +
303 + if use qt5 ; then
304 + newbin "${BUILD_DIR}"/bin/${PN} qsynergy
305 + newicon -s 256 "${DISTDIR}"/${PN}.png q${PN}.png
306 + make_desktop_entry q${PN} ${PN/s/S} q${PN} Utility;
307 + fi
308 +
309 + insinto /etc
310 + newins doc/synergy.conf.example synergy.conf
311 +
312 + newman doc/${PN}c.man ${PN}c.1
313 + newman doc/${PN}s.man ${PN}s.1
314 +
315 + einstalldocs
316 +}
317 +
318 +pkg_preinst() {
319 + use qt5 && gnome2_icon_savelist
320 +}
321 +
322 +pkg_postinst() {
323 + use qt5 && gnome2_icon_cache_update
324 +}
325 +
326 +pkg_postrm() {
327 + use qt5 && gnome2_icon_cache_update
328 +}