[gentoo-commits] repo/gentoo:master commit in: x11-misc/barrier/, x11-misc/barrier/files/
commit: 08d877a77504fcaebc4653dbd4988c6ea9d1bd17 Author: Sam James gentoo org> AuthorDate: Fri Mar 17 22:45:41 2023 + Commit: Sam James gentoo org> CommitDate: Fri Mar 17 23:56:12 2023 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=08d877a7 x11-misc/barrier: fix build w/ gcc 13 Closes: https://bugs.gentoo.org/895088 Signed-off-by: Sam James gentoo.org> x11-misc/barrier/barrier-2.4.0.ebuild | 3 +- x11-misc/barrier/files/barrier-2.4.0-gcc-13.patch | 38 +++ 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/x11-misc/barrier/barrier-2.4.0.ebuild b/x11-misc/barrier/barrier-2.4.0.ebuild index f086465e0601..0c587b0c8a91 100644 --- a/x11-misc/barrier/barrier-2.4.0.ebuild +++ b/x11-misc/barrier/barrier-2.4.0.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -43,6 +43,7 @@ DEPEND=" PATCHES=( "${FILESDIR}"/${P}-includes.patch + "${FILESDIR}"/${P}-gcc-13.patch ) DOCS=( diff --git a/x11-misc/barrier/files/barrier-2.4.0-gcc-13.patch b/x11-misc/barrier/files/barrier-2.4.0-gcc-13.patch new file mode 100644 index ..5b1759049143 --- /dev/null +++ b/x11-misc/barrier/files/barrier-2.4.0-gcc-13.patch @@ -0,0 +1,38 @@ +https://bugs.gentoo.org/895088 +https://github.com/debauchee/barrier/pull/1886 + +From d376d23d534e053a160c32ee1170d237a2f3d6bd Mon Sep 17 00:00:00 2001 +From: "Benjamin A. Beasley" +Date: Thu, 26 Jan 2023 09:25:59 -0500 +Subject: [PATCH] Add missing #include directives needed for GCC 13 + +--- + src/lib/base/String.h | 1 + + src/lib/net/FingerprintData.h | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/src/lib/base/String.h b/src/lib/base/String.h +index 9c5a53bac4..fa37f8f0dc 100644 +--- a/src/lib/base/String.h b/src/lib/base/String.h +@@ -18,6 +18,7 @@ + + #pragma once + ++#include + #include "common/common.h" + #include "common/stdstring.h" + +diff --git a/src/lib/net/FingerprintData.h b/src/lib/net/FingerprintData.h +index 938a69538d..522a481353 100644 +--- a/src/lib/net/FingerprintData.h b/src/lib/net/FingerprintData.h +@@ -18,6 +18,7 @@ + #ifndef BARRIER_LIB_NET_FINGERPRINT_DATA_H + #define BARRIER_LIB_NET_FINGERPRINT_DATA_H + ++#include + #include + #include + +
[gentoo-commits] repo/gentoo:master commit in: x11-misc/barrier/
commit: 8d4a5179af62b2bfe04446103bb1a7b44e087a99 Author: Jakov Smolić gentoo org> AuthorDate: Wed Apr 27 07:25:56 2022 + Commit: Jakov Smolić gentoo org> CommitDate: Wed Apr 27 07:25:56 2022 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8d4a5179 x11-misc/barrier: Stabilize 2.4.0 x86, #827930 Signed-off-by: Jakov Smolić gentoo.org> x11-misc/barrier/barrier-2.4.0.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x11-misc/barrier/barrier-2.4.0.ebuild b/x11-misc/barrier/barrier-2.4.0.ebuild index cb05267cea7e..f086465e0601 100644 --- a/x11-misc/barrier/barrier-2.4.0.ebuild +++ b/x11-misc/barrier/barrier-2.4.0.ebuild @@ -11,7 +11,7 @@ SRC_URI="https://github.com/debauchee/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz LICENSE="GPL-2" SLOT="0" -KEYWORDS="amd64 ~x86" +KEYWORDS="amd64 x86" IUSE="gui test" RESTRICT="!test? ( test )"
[gentoo-commits] repo/gentoo:master commit in: x11-misc/barrier/
commit: 1d23667a2ac2769c07551e6f4f6c09840028ccf8 Author: Sam James gentoo org> AuthorDate: Sat Apr 23 01:53:03 2022 + Commit: Sam James gentoo org> CommitDate: Sat Apr 23 01:53:03 2022 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1d23667a x11-misc/barrier: Stabilize 2.4.0 amd64, #827930 Signed-off-by: Sam James gentoo.org> x11-misc/barrier/barrier-2.4.0.ebuild | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x11-misc/barrier/barrier-2.4.0.ebuild b/x11-misc/barrier/barrier-2.4.0.ebuild index 5acabd7ab66d..cb05267cea7e 100644 --- a/x11-misc/barrier/barrier-2.4.0.ebuild +++ b/x11-misc/barrier/barrier-2.4.0.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -11,7 +11,7 @@ SRC_URI="https://github.com/debauchee/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz LICENSE="GPL-2" SLOT="0" -KEYWORDS="~amd64 ~x86" +KEYWORDS="amd64 ~x86" IUSE="gui test" RESTRICT="!test? ( test )"
[gentoo-commits] repo/gentoo:master commit in: x11-misc/barrier/files/, x11-misc/barrier/
commit: 637b9e78ba884167eaba3211a49d7266555de924 Author: James Le Cuirot gentoo org> AuthorDate: Tue Nov 2 22:35:22 2021 + Commit: James Le Cuirot gentoo org> CommitDate: Tue Nov 2 22:36:06 2021 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=637b9e78 x11-misc/barrier: Drop and old vulnerable 2.3.3 Bug: https://bugs.gentoo.org/821337 Signed-off-by: James Le Cuirot gentoo.org> x11-misc/barrier/Manifest| 1 - x11-misc/barrier/barrier-2.3.3.ebuild| 82 - x11-misc/barrier/files/barrier-2.3.3-gtest.patch | 116 -- x11-misc/barrier/files/barrier-2.3.3-tests.patch | 150 --- 4 files changed, 349 deletions(-) diff --git a/x11-misc/barrier/Manifest b/x11-misc/barrier/Manifest index 3fc454b5951..c3e1ba04644 100644 --- a/x11-misc/barrier/Manifest +++ b/x11-misc/barrier/Manifest @@ -1,2 +1 @@ -DIST barrier-2.3.3.tar.gz 5465909 BLAKE2B 3f881526f53113e48f1ea2e1592ebf2e932a8296fcba331243678963945001e7700dddc3bf8957f85285aec02c3d3700d31786cef291862a9b21780ee9e96cd6 SHA512 1ac945ce090d5bbdae7bab7d4ca802cc2d54c1644a12088203b240e38078d32d3b30ae2f764ba27d66c9d709e430b0eb1b4576314d99dd6177d8b88d19b89777 DIST barrier-2.4.0.tar.gz 5572043 BLAKE2B e3eee306324a661a655b31e3179b7daf3fb199553a581059c67113f9597fb41d6af00fa3090d20c7d0b1d7420764454a512e91d8180ea663c3f99b89c663417f SHA512 dff8d95c358688952baee0bbbf56b818e40a6c0483d58f6cadd8ab5d0cefc92a37b0751bfd70868686e1716c729871ae00a30ee9b0ba944f531dfb742449 diff --git a/x11-misc/barrier/barrier-2.3.3.ebuild b/x11-misc/barrier/barrier-2.3.3.ebuild deleted file mode 100644 index 33d180e0a5d..000 --- a/x11-misc/barrier/barrier-2.3.3.ebuild +++ /dev/null @@ -1,82 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit desktop virtualx xdg cmake - -DESCRIPTION="Share a mouse and keyboard between computers (fork of Synergy)" -HOMEPAGE="https://github.com/debauchee/barrier"; -SRC_URI="https://github.com/debauchee/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="gui test" -RESTRICT="!test? ( test )" - -RDEPEND=" - net-misc/curl - x11-libs/libICE - x11-libs/libSM - x11-libs/libX11 - x11-libs/libXext - x11-libs/libXi - x11-libs/libXinerama - x11-libs/libXrandr - x11-libs/libXtst - gui? ( - dev-qt/qtcore:5 - dev-qt/qtgui:5 - dev-qt/qtnetwork:5 - dev-qt/qtwidgets:5 - net-dns/avahi[mdnsresponder-compat] - ) - dev-libs/openssl:0= -" -DEPEND=" - ${RDEPEND} - dev-cpp/gtest - x11-base/xorg-proto -" - -PATCHES=( - "${FILESDIR}"/${P}-tests.patch - "${FILESDIR}"/${P}-gtest.patch -) - -DOCS=( - ChangeLog - README.md - doc/${PN}.conf.example{,-advanced,-basic} -) - -src_configure() { - local mycmakeargs=( - -DBARRIER_BUILD_GUI=$(usex gui) - -DBARRIER_BUILD_INSTALLER=OFF - -DBARRIER_BUILD_TESTS=$(usex test) - -DBARRIER_REVISION= - -DBARRIER_USE_EXTERNAL_GTEST=ON - -DBARRIER_VERSION_STAGE=gentoo - ) - - cmake_src_configure -} - -src_test() { - "${BUILD_DIR}"/bin/unittests || die - virtx "${BUILD_DIR}"/bin/integtests || die -} - -src_install() { - cmake_src_install - einstalldocs - doman doc/${PN}{c,s}.1 - - if use gui; then - doicon -s scalable res/${PN}.svg - doicon -s 256 res/${PN}.png - make_desktop_entry ${PN} Barrier ${PN} Utility - fi -} diff --git a/x11-misc/barrier/files/barrier-2.3.3-gtest.patch b/x11-misc/barrier/files/barrier-2.3.3-gtest.patch deleted file mode 100644 index 363f8c2c02c..000 --- a/x11-misc/barrier/files/barrier-2.3.3-gtest.patch +++ /dev/null @@ -1,116 +0,0 @@ -From bd1db368b333783697d686c82c42e48c4bec8b9e Mon Sep 17 00:00:00 2001 -From: James Le Cuirot -Date: Fri, 21 Aug 2020 23:13:58 +0100 -Subject: [PATCH] Add BARRIER_USE_EXTERNAL_GTEST CMake option to use external - GTest - - CMakeLists.txt | 1 + - src/test/CMakeLists.txt| 38 -- - src/test/integtests/CMakeLists.txt | 4 +--- - src/test/unittests/CMakeLists.txt | 4 +--- - 4 files changed, 29 insertions(+), 18 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 4947d20f..18b242db 100644 a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -21,6 +21,7 @@ project (barrier C CXX) - option (BARRIER_BUILD_GUI "Build the GUI" ON) - option (BARRIER_BUILD_INSTALLER "Build the installer" ON) - option (BARRIER_BUILD_TESTS "Build the tests" ON) -+option (BARRIER_USE_EXTERNAL_GTEST "Use external installation of Google Test framework" OFF) - - set (CMAKE_EXPORT_COMPILE_COMMANDS ON) - se
[gentoo-commits] repo/gentoo:master commit in: x11-misc/barrier/files/, x11-misc/barrier/
commit: 23c07da7a8d7acd22ea09c586fcbe61d31ff6c8f Author: James Le Cuirot gentoo org> AuthorDate: Tue Nov 2 22:32:40 2021 + Commit: James Le Cuirot gentoo org> CommitDate: Tue Nov 2 22:36:02 2021 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=23c07da7 x11-misc/barrier: Version bump to 2.4.0, EAPI 8 Bug: https://bugs.gentoo.org/821337 Signed-off-by: James Le Cuirot gentoo.org> x11-misc/barrier/Manifest | 1 + x11-misc/barrier/barrier-2.4.0.ebuild | 82 ++ .../barrier/files/barrier-2.4.0-includes.patch | 39 ++ 3 files changed, 122 insertions(+) diff --git a/x11-misc/barrier/Manifest b/x11-misc/barrier/Manifest index a1a891888b1..3fc454b5951 100644 --- a/x11-misc/barrier/Manifest +++ b/x11-misc/barrier/Manifest @@ -1 +1,2 @@ DIST barrier-2.3.3.tar.gz 5465909 BLAKE2B 3f881526f53113e48f1ea2e1592ebf2e932a8296fcba331243678963945001e7700dddc3bf8957f85285aec02c3d3700d31786cef291862a9b21780ee9e96cd6 SHA512 1ac945ce090d5bbdae7bab7d4ca802cc2d54c1644a12088203b240e38078d32d3b30ae2f764ba27d66c9d709e430b0eb1b4576314d99dd6177d8b88d19b89777 +DIST barrier-2.4.0.tar.gz 5572043 BLAKE2B e3eee306324a661a655b31e3179b7daf3fb199553a581059c67113f9597fb41d6af00fa3090d20c7d0b1d7420764454a512e91d8180ea663c3f99b89c663417f SHA512 dff8d95c358688952baee0bbbf56b818e40a6c0483d58f6cadd8ab5d0cefc92a37b0751bfd70868686e1716c729871ae00a30ee9b0ba944f531dfb742449 diff --git a/x11-misc/barrier/barrier-2.4.0.ebuild b/x11-misc/barrier/barrier-2.4.0.ebuild new file mode 100644 index 000..5acabd7ab66 --- /dev/null +++ b/x11-misc/barrier/barrier-2.4.0.ebuild @@ -0,0 +1,82 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit desktop virtualx xdg cmake + +DESCRIPTION="Share a mouse and keyboard between computers (fork of Synergy)" +HOMEPAGE="https://github.com/debauchee/barrier"; +SRC_URI="https://github.com/debauchee/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="gui test" +RESTRICT="!test? ( test )" + +RDEPEND=" + net-misc/curl + x11-libs/libICE + x11-libs/libSM + x11-libs/libX11 + x11-libs/libXext + x11-libs/libXi + x11-libs/libXinerama + x11-libs/libXrandr + x11-libs/libXtst + gui? ( + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtnetwork:5 + dev-qt/qtwidgets:5 + net-dns/avahi[mdnsresponder-compat] + ) + dev-libs/openssl:0= +" +DEPEND=" + ${RDEPEND} + dev-cpp/gtest + dev-cpp/gulrak-filesystem + x11-base/xorg-proto +" + +PATCHES=( + "${FILESDIR}"/${P}-includes.patch +) + +DOCS=( + ChangeLog + README.md + doc/${PN}.conf.example{,-advanced,-basic} +) + +src_configure() { + local mycmakeargs=( + -DBARRIER_BUILD_GUI=$(usex gui) + -DBARRIER_BUILD_INSTALLER=OFF + -DBARRIER_BUILD_TESTS=$(usex test) + -DBARRIER_REVISION= + -DBARRIER_USE_EXTERNAL_GTEST=ON + -DBARRIER_VERSION_STAGE=gentoo + ) + + cmake_src_configure +} + +src_test() { + "${BUILD_DIR}"/bin/unittests || die + virtx "${BUILD_DIR}"/bin/integtests || die +} + +src_install() { + cmake_src_install + einstalldocs + doman doc/${PN}{c,s}.1 + + if use gui; then + doicon -s scalable res/${PN}.svg + doicon -s 256 res/${PN}.png + make_desktop_entry ${PN} Barrier ${PN} Utility + fi +} diff --git a/x11-misc/barrier/files/barrier-2.4.0-includes.patch b/x11-misc/barrier/files/barrier-2.4.0-includes.patch new file mode 100644 index 000..048a3b06809 --- /dev/null +++ b/x11-misc/barrier/files/barrier-2.4.0-includes.patch @@ -0,0 +1,39 @@ +From aa0a2998e8894716644ea5fb29fc6f0165add956 Mon Sep 17 00:00:00 2001 +From: James Le Cuirot +Date: Tue, 2 Nov 2021 20:59:51 + +Subject: [PATCH] Add missing cstddef includes for NULL + +--- + src/lib/base/Event.cpp | 2 ++ + src/lib/base/Event.h | 2 ++ + 2 files changed, 4 insertions(+) + +diff --git a/src/lib/base/Event.cpp b/src/lib/base/Event.cpp +index cc548fc6..08c5e98f 100644 +--- a/src/lib/base/Event.cpp b/src/lib/base/Event.cpp +@@ -19,6 +19,8 @@ + #include "base/Event.h" + #include "base/EventQueue.h" + ++#include ++ + // + // Event + // +diff --git a/src/lib/base/Event.h b/src/lib/base/Event.h +index 38a2cf11..cb00dccb 100644 +--- a/src/lib/base/Event.h b/src/lib/base/Event.h +@@ -21,6 +21,8 @@ + #include "common/basic_types.h" + #include "common/stdmap.h" + ++#include ++ + class EventData { + public: + EventData() { } +-- +2.32.0 +
[gentoo-commits] repo/gentoo:master commit in: x11-misc/barrier/
commit: 8ad5d5d871aba59c573b4d17e03b6675e2a92133 Author: Mikle Kolyada gentoo org> AuthorDate: Sat May 1 09:52:39 2021 + Commit: Mikle Kolyada gentoo org> CommitDate: Sat May 1 09:53:15 2021 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8ad5d5d8 x11-misc/barrier: remove libressl support Package-Manager: Portage-3.0.18, Repoman-3.0.2 Signed-off-by: Mikle Kolyada gentoo.org> x11-misc/barrier/barrier-2.3.3.ebuild | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/x11-misc/barrier/barrier-2.3.3.ebuild b/x11-misc/barrier/barrier-2.3.3.ebuild index 6825e6d91ef..33d180e0a5d 100644 --- a/x11-misc/barrier/barrier-2.3.3.ebuild +++ b/x11-misc/barrier/barrier-2.3.3.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -12,7 +12,7 @@ SRC_URI="https://github.com/debauchee/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~x86" -IUSE="gui libressl test" +IUSE="gui test" RESTRICT="!test? ( test )" RDEPEND=" @@ -32,8 +32,7 @@ RDEPEND=" dev-qt/qtwidgets:5 net-dns/avahi[mdnsresponder-compat] ) - !libressl? ( dev-libs/openssl:0= ) - libressl? ( dev-libs/libressl:0= ) + dev-libs/openssl:0= " DEPEND=" ${RDEPEND}
[gentoo-commits] repo/gentoo:master commit in: x11-misc/barrier/
commit: 41ff1e68262074e14119efb6e1db6501f717d53f Author: Thomas Deutschmann gentoo org> AuthorDate: Sat Sep 5 16:34:38 2020 + Commit: Thomas Deutschmann gentoo org> CommitDate: Sat Sep 5 16:34:49 2020 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=41ff1e68 x11-misc/barrier: x86 keyworded (bug #740204) Package-Manager: Portage-3.0.4, Repoman-3.0.1 Signed-off-by: Thomas Deutschmann gentoo.org> x11-misc/barrier/barrier-2.3.3.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x11-misc/barrier/barrier-2.3.3.ebuild b/x11-misc/barrier/barrier-2.3.3.ebuild index 50208361961..6825e6d91ef 100644 --- a/x11-misc/barrier/barrier-2.3.3.ebuild +++ b/x11-misc/barrier/barrier-2.3.3.ebuild @@ -11,7 +11,7 @@ SRC_URI="https://github.com/debauchee/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz LICENSE="GPL-2" SLOT="0" -KEYWORDS="~amd64" +KEYWORDS="~amd64 ~x86" IUSE="gui libressl test" RESTRICT="!test? ( test )"
[gentoo-commits] repo/gentoo:master commit in: x11-misc/barrier/files/, x11-misc/barrier/
commit: 0d24ffca3adf690947b888f71d513716c75ad3da Author: James Le Cuirot gentoo org> AuthorDate: Sat Aug 22 15:52:37 2020 + Commit: James Le Cuirot gentoo org> CommitDate: Sat Aug 22 15:53:29 2020 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0d24ffca x11-misc/barrier: Drop old 2.3.2 Package-Manager: Portage-3.0.4, Repoman-3.0.1 Signed-off-by: James Le Cuirot gentoo.org> x11-misc/barrier/Manifest | 1 - x11-misc/barrier/barrier-2.3.2-r1.ebuild | 76 .../barrier/files/barrier-2.3.2-inf-loop.patch | 132 - .../barrier/files/barrier-2.3.2-no-avahi.patch | 25 x11-misc/barrier/files/barrier-2.3.2-pthread.patch | 115 -- .../barrier/files/barrier-2.3.2-qt-gui-only.patch | 45 --- 6 files changed, 394 deletions(-) diff --git a/x11-misc/barrier/Manifest b/x11-misc/barrier/Manifest index 8870062b2d6..a1a891888b1 100644 --- a/x11-misc/barrier/Manifest +++ b/x11-misc/barrier/Manifest @@ -1,2 +1 @@ -DIST barrier-2.3.2.tar.gz 7244128 BLAKE2B 263be99ffb692e5b8e3e3450565fbaf5c5e2f23beca4beaf5d699547933be1bcdcbf1ed6b9ce8bd53f2a5dbb1eba3fc0649062020fcff0e8d34ff2ad52cb SHA512 0452244afc3294aaafd89f18d2472e24fb2fc62426e7be91ab4ffceca4697c7acb8f4438fc299835f1312f0ada83911679abe6b8e1268631130c5877e193ff83 DIST barrier-2.3.3.tar.gz 5465909 BLAKE2B 3f881526f53113e48f1ea2e1592ebf2e932a8296fcba331243678963945001e7700dddc3bf8957f85285aec02c3d3700d31786cef291862a9b21780ee9e96cd6 SHA512 1ac945ce090d5bbdae7bab7d4ca802cc2d54c1644a12088203b240e38078d32d3b30ae2f764ba27d66c9d709e430b0eb1b4576314d99dd6177d8b88d19b89777 diff --git a/x11-misc/barrier/barrier-2.3.2-r1.ebuild b/x11-misc/barrier/barrier-2.3.2-r1.ebuild deleted file mode 100644 index 62b3dd6a5f9..000 --- a/x11-misc/barrier/barrier-2.3.2-r1.ebuild +++ /dev/null @@ -1,76 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit desktop xdg cmake - -DESCRIPTION="Share a mouse and keyboard between computers (fork of Synergy)" -HOMEPAGE="https://github.com/debauchee/barrier"; -SRC_URI="https://github.com/debauchee/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64" -IUSE="gui libressl" - -RDEPEND=" - net-misc/curl - x11-libs/libICE - x11-libs/libSM - x11-libs/libX11 - x11-libs/libXext - x11-libs/libXi - x11-libs/libXinerama - x11-libs/libXrandr - x11-libs/libXtst - gui? ( - dev-qt/qtcore:5 - dev-qt/qtgui:5 - dev-qt/qtnetwork:5 - dev-qt/qtwidgets:5 - net-dns/avahi[mdnsresponder-compat] - ) - !libressl? ( dev-libs/openssl:0= ) - libressl? ( dev-libs/libressl:0= ) -" -DEPEND=" - ${RDEPEND} - x11-base/xorg-proto -" - -PATCHES=( - "${FILESDIR}"/${P}-inf-loop.patch - "${FILESDIR}"/${P}-no-avahi.patch - "${FILESDIR}"/${P}-pthread.patch - "${FILESDIR}"/${P}-qt-gui-only.patch -) - -DOCS=( - ChangeLog - README.md - doc/${PN}.conf.example{,-advanced,-basic} -) - -src_configure() { - local mycmakeargs=( - -DBARRIER_BUILD_GUI=$(usex gui) - -DBARRIER_BUILD_INSTALLER=OFF - -DBARRIER_REVISION= - -DBARRIER_VERSION_STAGE=gentoo - ) - - cmake_src_configure -} - -src_install() { - cmake_src_install - einstalldocs - doman doc/${PN}{c,s}.1 - - if use gui; then - doicon -s scalable res/${PN}.svg - doicon -s 256 res/${PN}.png - make_desktop_entry ${PN} Barrier ${PN} Utility - fi -} diff --git a/x11-misc/barrier/files/barrier-2.3.2-inf-loop.patch b/x11-misc/barrier/files/barrier-2.3.2-inf-loop.patch deleted file mode 100644 index 125b903e58e..000 --- a/x11-misc/barrier/files/barrier-2.3.2-inf-loop.patch +++ /dev/null @@ -1,132 +0,0 @@ -From c79120c049d825fedeed70d5a1a9dc64d17ce9f0 Mon Sep 17 00:00:00 2001 -From: Vasily Galkin -Date: Sun, 9 Feb 2020 23:27:26 +0300 -Subject: [PATCH] Fix infinite loop on fast TCP disconnection - -The commit a841b28 changed the condition for removing job from processing. -New flag MultiplexerJobStatus::continue_servicing become used -instead of checking pointer for NULL. -However for cases when TCPSocket::newJob() returns nullptr -the behaviour changed: earlier the job was removed, but after change -it is called again, since MultiplexerJobStatus equal to {true, nullptr} -means "run this job again". - -This leads to problem with eating CPU and RAM on linux -https://github.com/debauchee/barrier/issues/470 - -There is similar windows problem, but not sure it is related. -https://github.com/debauchee/barrier/issues/552 - -Since it looks that the goal of a841b28 was only clarifying -object ownership and not changing job deletion be
[gentoo-commits] repo/gentoo:master commit in: x11-misc/barrier/, x11-misc/barrier/files/
commit: ebd3037d307585561792b7527ff3050f193fc88e Author: James Le Cuirot gentoo org> AuthorDate: Sat Aug 22 15:51:10 2020 + Commit: James Le Cuirot gentoo org> CommitDate: Sat Aug 22 15:53:25 2020 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ebd3037d x11-misc/barrier: Version bump to 2.3.3 Closes: https://bugs.gentoo.org/736814 Package-Manager: Portage-3.0.4, Repoman-3.0.1 Signed-off-by: James Le Cuirot gentoo.org> x11-misc/barrier/Manifest| 1 + x11-misc/barrier/barrier-2.3.3.ebuild| 83 + x11-misc/barrier/files/barrier-2.3.3-gtest.patch | 116 ++ x11-misc/barrier/files/barrier-2.3.3-tests.patch | 150 +++ 4 files changed, 350 insertions(+) diff --git a/x11-misc/barrier/Manifest b/x11-misc/barrier/Manifest index 7630b04f56f..8870062b2d6 100644 --- a/x11-misc/barrier/Manifest +++ b/x11-misc/barrier/Manifest @@ -1 +1,2 @@ DIST barrier-2.3.2.tar.gz 7244128 BLAKE2B 263be99ffb692e5b8e3e3450565fbaf5c5e2f23beca4beaf5d699547933be1bcdcbf1ed6b9ce8bd53f2a5dbb1eba3fc0649062020fcff0e8d34ff2ad52cb SHA512 0452244afc3294aaafd89f18d2472e24fb2fc62426e7be91ab4ffceca4697c7acb8f4438fc299835f1312f0ada83911679abe6b8e1268631130c5877e193ff83 +DIST barrier-2.3.3.tar.gz 5465909 BLAKE2B 3f881526f53113e48f1ea2e1592ebf2e932a8296fcba331243678963945001e7700dddc3bf8957f85285aec02c3d3700d31786cef291862a9b21780ee9e96cd6 SHA512 1ac945ce090d5bbdae7bab7d4ca802cc2d54c1644a12088203b240e38078d32d3b30ae2f764ba27d66c9d709e430b0eb1b4576314d99dd6177d8b88d19b89777 diff --git a/x11-misc/barrier/barrier-2.3.3.ebuild b/x11-misc/barrier/barrier-2.3.3.ebuild new file mode 100644 index 000..50208361961 --- /dev/null +++ b/x11-misc/barrier/barrier-2.3.3.ebuild @@ -0,0 +1,83 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit desktop virtualx xdg cmake + +DESCRIPTION="Share a mouse and keyboard between computers (fork of Synergy)" +HOMEPAGE="https://github.com/debauchee/barrier"; +SRC_URI="https://github.com/debauchee/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64" +IUSE="gui libressl test" +RESTRICT="!test? ( test )" + +RDEPEND=" + net-misc/curl + x11-libs/libICE + x11-libs/libSM + x11-libs/libX11 + x11-libs/libXext + x11-libs/libXi + x11-libs/libXinerama + x11-libs/libXrandr + x11-libs/libXtst + gui? ( + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtnetwork:5 + dev-qt/qtwidgets:5 + net-dns/avahi[mdnsresponder-compat] + ) + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) +" +DEPEND=" + ${RDEPEND} + dev-cpp/gtest + x11-base/xorg-proto +" + +PATCHES=( + "${FILESDIR}"/${P}-tests.patch + "${FILESDIR}"/${P}-gtest.patch +) + +DOCS=( + ChangeLog + README.md + doc/${PN}.conf.example{,-advanced,-basic} +) + +src_configure() { + local mycmakeargs=( + -DBARRIER_BUILD_GUI=$(usex gui) + -DBARRIER_BUILD_INSTALLER=OFF + -DBARRIER_BUILD_TESTS=$(usex test) + -DBARRIER_REVISION= + -DBARRIER_USE_EXTERNAL_GTEST=ON + -DBARRIER_VERSION_STAGE=gentoo + ) + + cmake_src_configure +} + +src_test() { + "${BUILD_DIR}"/bin/unittests || die + virtx "${BUILD_DIR}"/bin/integtests || die +} + +src_install() { + cmake_src_install + einstalldocs + doman doc/${PN}{c,s}.1 + + if use gui; then + doicon -s scalable res/${PN}.svg + doicon -s 256 res/${PN}.png + make_desktop_entry ${PN} Barrier ${PN} Utility + fi +} diff --git a/x11-misc/barrier/files/barrier-2.3.3-gtest.patch b/x11-misc/barrier/files/barrier-2.3.3-gtest.patch new file mode 100644 index 000..363f8c2c02c --- /dev/null +++ b/x11-misc/barrier/files/barrier-2.3.3-gtest.patch @@ -0,0 +1,116 @@ +From bd1db368b333783697d686c82c42e48c4bec8b9e Mon Sep 17 00:00:00 2001 +From: James Le Cuirot +Date: Fri, 21 Aug 2020 23:13:58 +0100 +Subject: [PATCH] Add BARRIER_USE_EXTERNAL_GTEST CMake option to use external + GTest + +--- + CMakeLists.txt | 1 + + src/test/CMakeLists.txt| 38 -- + src/test/integtests/CMakeLists.txt | 4 +--- + src/test/unittests/CMakeLists.txt | 4 +--- + 4 files changed, 29 insertions(+), 18 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4947d20f..18b242db 100644 +--- a/CMakeLists.txt b/CMakeLists.txt +@@ -21,6 +21,7 @@ project (barrier C CXX) + option (BARRIER_BUILD_GUI "Build the GUI" ON) + option (BARRIER_BUILD_INSTALLER "Build the installer" ON) + option (BARRIER_BUILD_TESTS "Build the tests" ON) ++option (BARRIER_USE_EXTERNAL_GTEST "Use extern
[gentoo-commits] repo/gentoo:master commit in: x11-misc/barrier/files/, x11-misc/barrier/
commit: 03833d38596a5dfbe33dc54ecac6e11821a321ea Author: James Le Cuirot gentoo org> AuthorDate: Tue Mar 17 22:55:58 2020 + Commit: James Le Cuirot gentoo org> CommitDate: Tue Mar 17 22:56:23 2020 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=03833d38 x11-misc/barrier: Fix USE=-gui build when Qt5 is not installed Closes: https://bugs.gentoo.org/712276 Package-Manager: Portage-2.3.94, Repoman-2.3.20 Signed-off-by: James Le Cuirot gentoo.org> x11-misc/barrier/barrier-2.3.2-r1.ebuild | 1 + .../barrier/files/barrier-2.3.2-qt-gui-only.patch | 45 ++ 2 files changed, 46 insertions(+) diff --git a/x11-misc/barrier/barrier-2.3.2-r1.ebuild b/x11-misc/barrier/barrier-2.3.2-r1.ebuild index 4b553a9888e..62b3dd6a5f9 100644 --- a/x11-misc/barrier/barrier-2.3.2-r1.ebuild +++ b/x11-misc/barrier/barrier-2.3.2-r1.ebuild @@ -43,6 +43,7 @@ PATCHES=( "${FILESDIR}"/${P}-inf-loop.patch "${FILESDIR}"/${P}-no-avahi.patch "${FILESDIR}"/${P}-pthread.patch + "${FILESDIR}"/${P}-qt-gui-only.patch ) DOCS=( diff --git a/x11-misc/barrier/files/barrier-2.3.2-qt-gui-only.patch b/x11-misc/barrier/files/barrier-2.3.2-qt-gui-only.patch new file mode 100644 index 000..bcfe3138610 --- /dev/null +++ b/x11-misc/barrier/files/barrier-2.3.2-qt-gui-only.patch @@ -0,0 +1,45 @@ +From af0ce63733e040d6220aaa2157190015d4a9b0fd Mon Sep 17 00:00:00 2001 +From: James Le Cuirot +Date: Tue, 17 Mar 2020 22:45:20 + +Subject: [PATCH] Only require Qt5 when building the GUI + +Commit 6c888437 made Qt5 mandatory for all builds when it is only +required for the GUI. There's already a find_package call in src/gui, +it just needed the REQUIRED flag to be added. +--- + CMakeLists.txt | 6 -- + src/gui/CMakeLists.txt | 2 +- + 2 files changed, 1 insertion(+), 7 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8e10776e..ee0835ec 100644 +--- a/CMakeLists.txt b/CMakeLists.txt +@@ -357,12 +357,6 @@ else() + set (OPENSSL_LIBS ${lib_ssl} ${lib_crypto}) + endif() + +- +-# Check we have the *required* Qt5 libs. +-find_package(Qt5Core REQUIRED) +-find_package(Qt5Network REQUIRED) +-find_package(Qt5Widgets REQUIRED) +- + # + # Configure_file... but for directories, recursively. + # +diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt +index 4988fe6a..f29fd910 100644 +--- a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt +@@ -1,6 +1,6 @@ + cmake_minimum_required (VERSION 3.4) + +-find_package (Qt5 COMPONENTS Core Widgets Network) ++find_package (Qt5 REQUIRED COMPONENTS Core Widgets Network) + set (CMAKE_AUTOMOC ON) + set (CMAKE_AUTORCC ON) + set (CMAKE_AUTOUIC ON) +-- +2.25.1 +
[gentoo-commits] repo/gentoo:master commit in: x11-misc/barrier/, x11-misc/barrier/files/
commit: a70bd894c4d44702fd4631669ef7326f5901d0d3 Author: James Le Cuirot gentoo org> AuthorDate: Wed Mar 11 23:19:18 2020 + Commit: James Le Cuirot gentoo org> CommitDate: Wed Mar 11 23:20:31 2020 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a70bd894 x11-misc/barrier: Patch around USE=-gui and infinite loop issues These patches are already merged upstream. Closes: https://bugs.gentoo.org/712140 Package-Manager: Portage-2.3.93, Repoman-2.3.20 Signed-off-by: James Le Cuirot gentoo.org> ...arrier-2.3.2.ebuild => barrier-2.3.2-r1.ebuild} | 2 + .../barrier/files/barrier-2.3.2-inf-loop.patch | 132 + .../barrier/files/barrier-2.3.2-no-avahi.patch | 25 3 files changed, 159 insertions(+) diff --git a/x11-misc/barrier/barrier-2.3.2.ebuild b/x11-misc/barrier/barrier-2.3.2-r1.ebuild similarity index 95% rename from x11-misc/barrier/barrier-2.3.2.ebuild rename to x11-misc/barrier/barrier-2.3.2-r1.ebuild index e5595798265..4b553a9888e 100644 --- a/x11-misc/barrier/barrier-2.3.2.ebuild +++ b/x11-misc/barrier/barrier-2.3.2-r1.ebuild @@ -40,6 +40,8 @@ DEPEND=" " PATCHES=( + "${FILESDIR}"/${P}-inf-loop.patch + "${FILESDIR}"/${P}-no-avahi.patch "${FILESDIR}"/${P}-pthread.patch ) diff --git a/x11-misc/barrier/files/barrier-2.3.2-inf-loop.patch b/x11-misc/barrier/files/barrier-2.3.2-inf-loop.patch new file mode 100644 index 000..125b903e58e --- /dev/null +++ b/x11-misc/barrier/files/barrier-2.3.2-inf-loop.patch @@ -0,0 +1,132 @@ +From c79120c049d825fedeed70d5a1a9dc64d17ce9f0 Mon Sep 17 00:00:00 2001 +From: Vasily Galkin +Date: Sun, 9 Feb 2020 23:27:26 +0300 +Subject: [PATCH] Fix infinite loop on fast TCP disconnection + +The commit a841b28 changed the condition for removing job from processing. +New flag MultiplexerJobStatus::continue_servicing become used +instead of checking pointer for NULL. +However for cases when TCPSocket::newJob() returns nullptr +the behaviour changed: earlier the job was removed, but after change +it is called again, since MultiplexerJobStatus equal to {true, nullptr} +means "run this job again". + +This leads to problem with eating CPU and RAM on linux +https://github.com/debauchee/barrier/issues/470 + +There is similar windows problem, but not sure it is related. +https://github.com/debauchee/barrier/issues/552 + +Since it looks that the goal of a841b28 was only clarifying +object ownership and not changing job deletion behaviour, +this commit tries to get original behaviour and fix the bugs above +by returning {false, nullptr} instead of {true, nullptr} +when TCPSocket::newJob() returns nullptr. +--- + src/lib/net/SecureSocket.cpp | 4 ++-- + src/lib/net/TCPSocket.cpp| 25 + + src/lib/net/TCPSocket.h | 3 ++- + 3 files changed, 17 insertions(+), 15 deletions(-) + +diff --git a/src/lib/net/SecureSocket.cpp b/src/lib/net/SecureSocket.cpp +index 99f626e8..92abea3c 100644 +--- a/src/lib/net/SecureSocket.cpp b/src/lib/net/SecureSocket.cpp +@@ -761,7 +761,7 @@ MultiplexerJobStatus SecureSocket::serviceConnect(ISocketMultiplexerJob* job, + // If status > 0, success + if (status > 0) { + sendEvent(m_events->forIDataSocket().secureConnected()); +-return {true, newJob()}; ++return newJobOrStopServicing(); + } + + // Retry case +@@ -793,7 +793,7 @@ MultiplexerJobStatus SecureSocket::serviceAccept(ISocketMultiplexerJob* job, + // If status > 0, success + if (status > 0) { + sendEvent(m_events->forClientListener().accepted()); +-return {true, newJob()}; ++return newJobOrStopServicing(); + } + + // Retry case +diff --git a/src/lib/net/TCPSocket.cpp b/src/lib/net/TCPSocket.cpp +index 4f4251ad..09a8f17e 100644 +--- a/src/lib/net/TCPSocket.cpp b/src/lib/net/TCPSocket.cpp +@@ -403,6 +403,15 @@ void TCPSocket::setJob(std::unique_ptr&& job) + } + } + ++MultiplexerJobStatus TCPSocket::newJobOrStopServicing() ++{ ++auto new_job = newJob(); ++if (new_job) ++return {true, std::move(new_job)}; ++else ++return {false, {}}; ++} ++ + std::unique_ptr TCPSocket::newJob() + { + // note -- must have m_mutex locked on entry +@@ -519,22 +528,14 @@ MultiplexerJobStatus TCPSocket::serviceConnecting(ISocketMultiplexerJob* job, bo + catch (XArchNetwork& e) { + sendConnectionFailedEvent(e.what()); + onDisconnected(); +-auto new_job = newJob(); +-if (new_job) +-return {true, std::move(new_job)}; +-else +-return {false, {}}; ++return newJobOrStopServicing(); + } + } + + if (write) { + sendEvent(m_events->forIDataSocket().connected()); + onConnected(); +-auto new_job = newJob(); +-if (new_job) +-return {true, std::move(new_job)}; +-else +-return {false, {}}; +
[gentoo-commits] repo/gentoo:master commit in: x11-misc/barrier/, x11-misc/barrier/files/
commit: eaf2c3827ffcfe39e5e5eb7dbe13a653095ffdc7 Author: James Le Cuirot gentoo org> AuthorDate: Tue Mar 10 23:30:59 2020 + Commit: James Le Cuirot gentoo org> CommitDate: Tue Mar 10 23:30:59 2020 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eaf2c382 x11-misc/barrier: New package Package-Manager: Portage-2.3.93, Repoman-2.3.20 Signed-off-by: James Le Cuirot gentoo.org> x11-misc/barrier/Manifest | 1 + x11-misc/barrier/barrier-2.3.2.ebuild | 73 + x11-misc/barrier/files/barrier-2.3.2-pthread.patch | 115 + x11-misc/barrier/metadata.xml | 11 ++ 4 files changed, 200 insertions(+) diff --git a/x11-misc/barrier/Manifest b/x11-misc/barrier/Manifest new file mode 100644 index 000..7630b04f56f --- /dev/null +++ b/x11-misc/barrier/Manifest @@ -0,0 +1 @@ +DIST barrier-2.3.2.tar.gz 7244128 BLAKE2B 263be99ffb692e5b8e3e3450565fbaf5c5e2f23beca4beaf5d699547933be1bcdcbf1ed6b9ce8bd53f2a5dbb1eba3fc0649062020fcff0e8d34ff2ad52cb SHA512 0452244afc3294aaafd89f18d2472e24fb2fc62426e7be91ab4ffceca4697c7acb8f4438fc299835f1312f0ada83911679abe6b8e1268631130c5877e193ff83 diff --git a/x11-misc/barrier/barrier-2.3.2.ebuild b/x11-misc/barrier/barrier-2.3.2.ebuild new file mode 100644 index 000..e5595798265 --- /dev/null +++ b/x11-misc/barrier/barrier-2.3.2.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit desktop xdg cmake + +DESCRIPTION="Share a mouse and keyboard between computers (fork of Synergy)" +HOMEPAGE="https://github.com/debauchee/barrier"; +SRC_URI="https://github.com/debauchee/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64" +IUSE="gui libressl" + +RDEPEND=" + net-misc/curl + x11-libs/libICE + x11-libs/libSM + x11-libs/libX11 + x11-libs/libXext + x11-libs/libXi + x11-libs/libXinerama + x11-libs/libXrandr + x11-libs/libXtst + gui? ( + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtnetwork:5 + dev-qt/qtwidgets:5 + net-dns/avahi[mdnsresponder-compat] + ) + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) +" +DEPEND=" + ${RDEPEND} + x11-base/xorg-proto +" + +PATCHES=( + "${FILESDIR}"/${P}-pthread.patch +) + +DOCS=( + ChangeLog + README.md + doc/${PN}.conf.example{,-advanced,-basic} +) + +src_configure() { + local mycmakeargs=( + -DBARRIER_BUILD_GUI=$(usex gui) + -DBARRIER_BUILD_INSTALLER=OFF + -DBARRIER_REVISION= + -DBARRIER_VERSION_STAGE=gentoo + ) + + cmake_src_configure +} + +src_install() { + cmake_src_install + einstalldocs + doman doc/${PN}{c,s}.1 + + if use gui; then + doicon -s scalable res/${PN}.svg + doicon -s 256 res/${PN}.png + make_desktop_entry ${PN} Barrier ${PN} Utility + fi +} diff --git a/x11-misc/barrier/files/barrier-2.3.2-pthread.patch b/x11-misc/barrier/files/barrier-2.3.2-pthread.patch new file mode 100644 index 000..d29844843e4 --- /dev/null +++ b/x11-misc/barrier/files/barrier-2.3.2-pthread.patch @@ -0,0 +1,115 @@ +From a0b3124f80f5696cbf070b3b714533ab4012398d Mon Sep 17 00:00:00 2001 +From: James Le Cuirot +Date: Tue, 10 Mar 2020 21:10:48 + +Subject: [PATCH] Use -pthread flag and simplify pthread build logic + +Sometimes -lpthread is not enough. This has caused build failures on +Gentoo Linux in the past. + +The logic also seems needlessly complex. We check for HAVE_PTHREAD on +UNIX platforms even though CMake errors out if pthreads are not +found. Similarly, we have a fallback for HAVE_PTHREAD_SIGNAL being +false even though we always set it to true. +--- + CMakeLists.txt | 11 --- + res/config.h.in| 6 -- + src/lib/arch/Arch.h| 4 +--- + src/lib/arch/unix/ArchMultithreadPosix.cpp | 13 - + 4 files changed, 5 insertions(+), 29 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8e10776e..ae7ccb21 100644 +--- a/CMakeLists.txt b/CMakeLists.txt +@@ -123,12 +123,10 @@ if (UNIX) + check_type_size (short SIZEOF_SHORT) + + # pthread is used on both Linux and Mac +-check_library_exists ("pthread" pthread_create "" HAVE_PTHREAD) +-if (HAVE_PTHREAD) +-list (APPEND libs pthread) +-else() +-message (FATAL_ERROR "Missing library: pthread") +-endif() ++set (CMAKE_THREAD_PREFER_PTHREAD TRUE) ++set (THREADS_PREFER_PTHREAD_FLAG TRUE) ++find_package (Threads REQUIRED) ++list (APPEND libs Threads::Threads) + + # curl is used on both Linux and Mac + find_packa