forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Dennis Lamm <[email protected]> Signed-off-by: Dennis Lamm <[email protected]>
- Loading branch information
1 parent
f3fdffa
commit a8d5701
Showing
3 changed files
with
87 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
DIST libarcus-4.6.1.tar.gz 31938 BLAKE2B c1da0181e07f297549df92ed23848343f0dadf94af7ce64ff2661e5c09c68768d47180aff505f2a225af2d49e493b8511ac9560a9b51a4eef98d6da82566b093 SHA512 3c56133fee2eb152f0557a1860d1d298b44a021a53247687ce938949c49e1999c3e2287552e67ff65a58bf6aecbd82c8412da394f83a9981bfa68d29e9501250 | ||
DIST libarcus-4.7.0.tar.gz 31944 BLAKE2B 93cd7e8dab674b1e145c0fd15bcc8901982e9c26f82fa5b6b9582568701b70edeb1a589e1e1c94f9e14100d08b12580e58aa1724917b88f9c099f12ca47e4e57 SHA512 5eb8e84ff8e87966fc3ff1d71ec69f8fece493e25e022f7f1ba7ef218e75b5be86cededc28faf57634b09617990f62247e6cd6f373f940cf145ee6d8e8635374 | ||
DIST libarcus-4.8.0.tar.gz 31906 BLAKE2B 677fafa3875834c7602bc85b7246f50ed0dc49e886814c4562ce41a1a7baecfb4fb0bac42aada5339fe73cbd3fc5ac3b28076bf72a1e24591a947d747c6eb794 SHA512 44db9b48ab6be08c30f2121d68197a7347eaf3ee255649969a773afbe45ec2433e2cc082aa72f6d40dad7ea28345da858471fff9a129365a4e848df8c8c07689 |
30 changes: 30 additions & 0 deletions
30
dev-libs/libarcus/files/libarcus-4.8.0-deprecated-protobuf-calls.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- a/src/Socket_p.h | ||
+++ b/src/Socket_p.h | ||
@@ -128,9 +128,6 @@ | ||
|
||
static const int keep_alive_rate = 500; //Number of milliseconds between sending keepalive packets | ||
|
||
- // This value determines when protobuf should warn about very large messages. | ||
- static const int message_size_warning = 400 * 1048576; | ||
- | ||
// This value determines when protobuf should error out because the message is too large. | ||
// Due to the way Protobuf is implemented, messages large than 512MiB will cause issues. | ||
static const int message_size_maximum = 500 * 1048576; | ||
@@ -362,7 +359,7 @@ | ||
return; | ||
} | ||
|
||
- uint32_t message_size = message->ByteSize(); | ||
+ uint32_t message_size = message->ByteSizeLong(); | ||
if(platform_socket.writeUInt32(message_size) == -1) | ||
{ | ||
error(ErrorCode::SendFailedError, "Could not send message size"); | ||
@@ -548,7 +545,7 @@ | ||
|
||
google::protobuf::io::ArrayInputStream array(wire_message->data, wire_message->size); | ||
google::protobuf::io::CodedInputStream stream(&array); | ||
- stream.SetTotalBytesLimit(message_size_maximum, message_size_warning); | ||
+ stream.SetTotalBytesLimit(message_size_maximum); | ||
if(!message->ParseFromCodedStream(&stream)) | ||
{ | ||
error(ErrorCode::ParseFailedError, "Failed to parse message:" + std::string(wire_message->data)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Copyright 1999-2020 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=7 | ||
|
||
PYTHON_COMPAT=( python3_{6,7,8} ) | ||
|
||
inherit cmake python-single-r1 | ||
|
||
MY_PN="libArcus" | ||
|
||
DESCRIPTION="This library facilitates communication between Cura and its backend" | ||
HOMEPAGE="https://github.com/Ultimaker/libArcus" | ||
SRC_URI="https://github.com/Ultimaker/${MY_PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" | ||
|
||
LICENSE="LGPL-3" | ||
SLOT="0/3" | ||
KEYWORDS="~amd64 ~arm64 ~x86" | ||
IUSE="examples +python static-libs" | ||
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" | ||
|
||
RDEPEND="${PYTHON_DEPS} | ||
dev-libs/protobuf:= | ||
$(python_gen_cond_dep ' | ||
dev-python/sip[${PYTHON_MULTI_USEDEP}] | ||
python? ( dev-python/protobuf-python[${PYTHON_MULTI_USEDEP}] ) | ||
')" | ||
DEPEND="${RDEPEND}" | ||
|
||
S="${WORKDIR}/${MY_PN}-${PV}" | ||
|
||
PATCHES=( | ||
"${FILESDIR}"/${P}-deprecated-protobuf-calls.patch | ||
) | ||
|
||
pkg_setup() { | ||
use python && python-single-r1_pkg_setup | ||
} | ||
|
||
src_prepare() { | ||
# Find SIP for current python version, not the latest installed | ||
sed -i "s/find_package(Python3 3.4 REQUIRED/find_package(Python3 ${EPYTHON##python} EXACT REQUIRED/g" \ | ||
CMakeLists.txt cmake/FindSIP.cmake || die | ||
|
||
cmake_src_prepare | ||
} | ||
|
||
src_configure() { | ||
local mycmakeargs=( | ||
-DBUILD_EXAMPLES=$(usex examples ON OFF) | ||
-DBUILD_PYTHON=$(usex python ON OFF) | ||
-DBUILD_STATIC=$(usex static-libs ON OFF) | ||
) | ||
|
||
cmake_src_configure | ||
} |