diff --git a/protobuf-c-namespace.patch b/protobuf-c-namespace.patch new file mode 100644 index 0000000..557349b --- /dev/null +++ b/protobuf-c-namespace.patch @@ -0,0 +1,23 @@ +From 080724364a5aad61728f8eba57677467bf329088 Mon Sep 17 00:00:00 2001 +From: storyun +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 diff --git a/protobuf-c.changes b/protobuf-c.changes index b418135..834be5d 100644 --- a/protobuf-c.changes +++ b/protobuf-c.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Jun 7 13:45:12 UTC 2019 - Martin Pluskal + +- Add protobuf-c-namespace.patch to fix building with protobuf + 3.8.0 + ------------------------------------------------------------------- Tue May 14 11:15:56 UTC 2019 - Martin Liška diff --git a/protobuf-c.spec b/protobuf-c.spec index e6812c3..9ca03a7 100644 --- a/protobuf-c.spec +++ b/protobuf-c.spec @@ -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}.*