Gentoo Archives: gentoo-commits

From: Dennis Lamm <expeditioneer@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/libarcus/, dev-libs/libarcus/files/
Date: Mon, 30 Nov 2020 18:37:55
Message-Id: 1606761457.a8d57019e0c5031d613cfdf9fc7353c8089d9b2a.expeditioneer@gentoo
1 commit: a8d57019e0c5031d613cfdf9fc7353c8089d9b2a
2 Author: Dennis Lamm <expeditioneer <AT> gentoo <DOT> org>
3 AuthorDate: Sun Nov 29 08:23:00 2020 +0000
4 Commit: Dennis Lamm <expeditioneer <AT> gentoo <DOT> org>
5 CommitDate: Mon Nov 30 18:37:37 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a8d57019
7
8 dev-libs/libarcus: bump to 4.8.0
9
10 Signed-off-by: Dennis Lamm <expeditoneer <AT> gentoo.org>
11 Signed-off-by: Dennis Lamm <expeditioneer <AT> gentoo.org>
12
13 dev-libs/libarcus/Manifest | 1 +
14 .../libarcus-4.8.0-deprecated-protobuf-calls.patch | 30 ++++++++++++
15 dev-libs/libarcus/libarcus-4.8.0.ebuild | 56 ++++++++++++++++++++++
16 3 files changed, 87 insertions(+)
17
18 diff --git a/dev-libs/libarcus/Manifest b/dev-libs/libarcus/Manifest
19 index d8ca478bc09..9bba1d63eee 100644
20 --- a/dev-libs/libarcus/Manifest
21 +++ b/dev-libs/libarcus/Manifest
22 @@ -1,2 +1,3 @@
23 DIST libarcus-4.6.1.tar.gz 31938 BLAKE2B c1da0181e07f297549df92ed23848343f0dadf94af7ce64ff2661e5c09c68768d47180aff505f2a225af2d49e493b8511ac9560a9b51a4eef98d6da82566b093 SHA512 3c56133fee2eb152f0557a1860d1d298b44a021a53247687ce938949c49e1999c3e2287552e67ff65a58bf6aecbd82c8412da394f83a9981bfa68d29e9501250
24 DIST libarcus-4.7.0.tar.gz 31944 BLAKE2B 93cd7e8dab674b1e145c0fd15bcc8901982e9c26f82fa5b6b9582568701b70edeb1a589e1e1c94f9e14100d08b12580e58aa1724917b88f9c099f12ca47e4e57 SHA512 5eb8e84ff8e87966fc3ff1d71ec69f8fece493e25e022f7f1ba7ef218e75b5be86cededc28faf57634b09617990f62247e6cd6f373f940cf145ee6d8e8635374
25 +DIST libarcus-4.8.0.tar.gz 31906 BLAKE2B 677fafa3875834c7602bc85b7246f50ed0dc49e886814c4562ce41a1a7baecfb4fb0bac42aada5339fe73cbd3fc5ac3b28076bf72a1e24591a947d747c6eb794 SHA512 44db9b48ab6be08c30f2121d68197a7347eaf3ee255649969a773afbe45ec2433e2cc082aa72f6d40dad7ea28345da858471fff9a129365a4e848df8c8c07689
26
27 diff --git a/dev-libs/libarcus/files/libarcus-4.8.0-deprecated-protobuf-calls.patch b/dev-libs/libarcus/files/libarcus-4.8.0-deprecated-protobuf-calls.patch
28 new file mode 100644
29 index 00000000000..659885d406e
30 --- /dev/null
31 +++ b/dev-libs/libarcus/files/libarcus-4.8.0-deprecated-protobuf-calls.patch
32 @@ -0,0 +1,30 @@
33 +--- a/src/Socket_p.h
34 ++++ b/src/Socket_p.h
35 +@@ -128,9 +128,6 @@
36 +
37 + static const int keep_alive_rate = 500; //Number of milliseconds between sending keepalive packets
38 +
39 +- // This value determines when protobuf should warn about very large messages.
40 +- static const int message_size_warning = 400 * 1048576;
41 +-
42 + // This value determines when protobuf should error out because the message is too large.
43 + // Due to the way Protobuf is implemented, messages large than 512MiB will cause issues.
44 + static const int message_size_maximum = 500 * 1048576;
45 +@@ -362,7 +359,7 @@
46 + return;
47 + }
48 +
49 +- uint32_t message_size = message->ByteSize();
50 ++ uint32_t message_size = message->ByteSizeLong();
51 + if(platform_socket.writeUInt32(message_size) == -1)
52 + {
53 + error(ErrorCode::SendFailedError, "Could not send message size");
54 +@@ -548,7 +545,7 @@
55 +
56 + google::protobuf::io::ArrayInputStream array(wire_message->data, wire_message->size);
57 + google::protobuf::io::CodedInputStream stream(&array);
58 +- stream.SetTotalBytesLimit(message_size_maximum, message_size_warning);
59 ++ stream.SetTotalBytesLimit(message_size_maximum);
60 + if(!message->ParseFromCodedStream(&stream))
61 + {
62 + error(ErrorCode::ParseFailedError, "Failed to parse message:" + std::string(wire_message->data));
63
64 diff --git a/dev-libs/libarcus/libarcus-4.8.0.ebuild b/dev-libs/libarcus/libarcus-4.8.0.ebuild
65 new file mode 100644
66 index 00000000000..b4abce1942f
67 --- /dev/null
68 +++ b/dev-libs/libarcus/libarcus-4.8.0.ebuild
69 @@ -0,0 +1,56 @@
70 +# Copyright 1999-2020 Gentoo Authors
71 +# Distributed under the terms of the GNU General Public License v2
72 +
73 +EAPI=7
74 +
75 +PYTHON_COMPAT=( python3_{6,7,8} )
76 +
77 +inherit cmake python-single-r1
78 +
79 +MY_PN="libArcus"
80 +
81 +DESCRIPTION="This library facilitates communication between Cura and its backend"
82 +HOMEPAGE="https://github.com/Ultimaker/libArcus"
83 +SRC_URI="https://github.com/Ultimaker/${MY_PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
84 +
85 +LICENSE="LGPL-3"
86 +SLOT="0/3"
87 +KEYWORDS="~amd64 ~arm64 ~x86"
88 +IUSE="examples +python static-libs"
89 +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
90 +
91 +RDEPEND="${PYTHON_DEPS}
92 + dev-libs/protobuf:=
93 + $(python_gen_cond_dep '
94 + dev-python/sip[${PYTHON_MULTI_USEDEP}]
95 + python? ( dev-python/protobuf-python[${PYTHON_MULTI_USEDEP}] )
96 + ')"
97 +DEPEND="${RDEPEND}"
98 +
99 +S="${WORKDIR}/${MY_PN}-${PV}"
100 +
101 +PATCHES=(
102 + "${FILESDIR}"/${P}-deprecated-protobuf-calls.patch
103 +)
104 +
105 +pkg_setup() {
106 + use python && python-single-r1_pkg_setup
107 +}
108 +
109 +src_prepare() {
110 + # Find SIP for current python version, not the latest installed
111 + sed -i "s/find_package(Python3 3.4 REQUIRED/find_package(Python3 ${EPYTHON##python} EXACT REQUIRED/g" \
112 + CMakeLists.txt cmake/FindSIP.cmake || die
113 +
114 + cmake_src_prepare
115 +}
116 +
117 +src_configure() {
118 + local mycmakeargs=(
119 + -DBUILD_EXAMPLES=$(usex examples ON OFF)
120 + -DBUILD_PYTHON=$(usex python ON OFF)
121 + -DBUILD_STATIC=$(usex static-libs ON OFF)
122 + )
123 +
124 + cmake_src_configure
125 +}