mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-24 23:47:14 -08:00
media-libs/opencv: fix build with protobuf-34.2
Protobuf deprecated a member function; suggested replacement Patch puts this replacement inline. Bug: https://bugs.gentoo.org/976143 Signed-off-by: NHOrus <jy6x2b32pie9@yahoo.com> Part-of: https://codeberg.org/gentoo/gentoo/pulls/994 Merges: https://codeberg.org/gentoo/gentoo/pulls/994 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
https://bugs.gentoo.org/976143
|
||||
Protibuf deprecated proto2::FieldDescriptor::is_optional, with recommended replacement
|
||||
Upstream patch that adds said replacement:
|
||||
https://github.com/opencv/opencv/commit/61a3d7d25d2987b9c72e072ff9d38dbcbb31ab54
|
||||
--- a/modules/dnn/src/caffe/caffe_importer.cpp
|
||||
+++ b/modules/dnn/src/caffe/caffe_importer.cpp
|
||||
@@ -217,7 +217,7 @@
|
||||
|
||||
const google::protobuf::UnknownFieldSet& unknownFields = msgRefl->GetUnknownFields(msg);
|
||||
bool hasData = fd->is_required() ||
|
||||
- (fd->is_optional() && msgRefl->HasField(msg, fd)) ||
|
||||
+ ((!fd->is_required() && !fd->is_repeated()) && msgRefl->HasField(msg, fd)) ||
|
||||
(fd->is_repeated() && msgRefl->FieldSize(msg, fd) > 0) ||
|
||||
!unknownFields.empty();
|
||||
if (!hasData)
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user