Accepting request 708378 from home:pluskalm:branches:server:monitoring

- Add protobuf-c-namespace.patch to fix building with protobuf
  3.8.0

OBS-URL: https://build.opensuse.org/request/show/708378
OBS-URL: https://build.opensuse.org/package/show/server:monitoring/protobuf-c?expand=0&rev=23
This commit is contained in:
Jan Engelhardt 2019-06-07 15:40:26 +00:00 committed by Git OBS Bridge
parent 6ad269be07
commit b0c394a7f2
3 changed files with 37 additions and 7 deletions

View File

@ -0,0 +1,23 @@
From 080724364a5aad61728f8eba57677467bf329088 Mon Sep 17 00:00:00 2001
From: storyun <joowoni91@gmail.com>
Date: Wed, 19 Sep 2018 11:34:48 +0900
Subject: [PATCH] Invalid namespace
google::protobuf::message::Reflaction is not exist namespace.
---
t/generated-code2/cxx-generate-packed-data.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/t/generated-code2/cxx-generate-packed-data.cc b/t/generated-code2/cxx-generate-packed-data.cc
index 4fd3e25..0865d2e 100644
--- a/t/generated-code2/cxx-generate-packed-data.cc
+++ b/t/generated-code2/cxx-generate-packed-data.cc
@@ -998,7 +998,7 @@ static void dump_test_packed_repeated_enum (void)
static void dump_test_unknown_fields (void)
{
EmptyMess mess;
- const google::protobuf::Message::Reflection *reflection = mess.GetReflection();
+ const google::protobuf::Reflection *reflection = mess.GetReflection();
google::protobuf::UnknownFieldSet *fs = reflection->MutableUnknownFields(&mess);
#if GOOGLE_PROTOBUF_VERSION >= 2001000

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Jun 7 13:45:12 UTC 2019 - Martin Pluskal <mpluskal@suse.com>
- Add protobuf-c-namespace.patch to fix building with protobuf
3.8.0
-------------------------------------------------------------------
Tue May 14 11:15:56 UTC 2019 - Martin Liška <mliska@suse.cz>

View File

@ -17,17 +17,17 @@
#
%define sover 1
Name: protobuf-c
Version: 1.3.1
Release: 0
%define sover 1
Summary: C bindings for Google's Protocol Buffers
License: BSD-3-Clause
Group: Development/Tools/Other
URL: https://github.com/protobuf-c/protobuf-c
Source: https://github.com/protobuf-c/protobuf-c/releases/download/v%{version}/%{name}-%{version}.tar.gz
Source99: protobuf-c-rpmlintrc
Url: https://github.com/protobuf-c/protobuf-c
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Patch0: protobuf-c-namespace.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: gcc
@ -63,6 +63,7 @@ Buffers from pure C (not C++).
%prep
%setup -q
%patch0 -p1
%build
%define _lto_cflags %{nil}
@ -75,14 +76,14 @@ cmake \
-DCMAKE_INSTALL_PREFIX:PATH="%{_prefix}" \
-DCMAKE_SKIP_RPATH=TRUE \
-DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE \
-DCMAKE_STRIP="/usr/bin/touch" \
-DCMAKE_STRIP="%{_bindir}/touch" \
..
make %{?_smp_flags}
make %{?_smp_mflags}
popd #build
%else
autoreconf -fvi
%configure
make %{?_smp_flags}
make %{?_smp_mflags}
%endif
%install
@ -107,7 +108,7 @@ rm "%{buildroot}/%{_libdir}"/*.la
%files -n libprotobuf-c%{sover}
%defattr(-,root,root)
%doc LICENSE
%license LICENSE
%{_libdir}/libprotobuf-c.so.%{sover}
%{_libdir}/libprotobuf-c.so.%{sover}.*