diff --git a/711.patch b/711.patch deleted file mode 100644 index 353b832..0000000 --- a/711.patch +++ /dev/null @@ -1,59 +0,0 @@ ---- protobuf-c-1.5.0/protoc-c/c_file.cc 2024-10-21 20:22:31.574369622 +0200 -+++ protobuf-c-1.5.0/protoc-c/c_file.cc 2024-10-21 20:22:43.064450125 +0200 -@@ -117,14 +117,7 @@ - void FileGenerator::GenerateHeader(io::Printer* printer) { - std::string filename_identifier = FilenameIdentifier(file_->name()); - -- int min_header_version = 1000000; --#if GOOGLE_PROTOBUF_VERSION >= 4023000 -- if (FileDescriptorLegacy(file_).syntax() == FileDescriptorLegacy::SYNTAX_PROTO3) { --#else -- if (file_->syntax() == FileDescriptor::SYNTAX_PROTO3) { --#endif -- min_header_version = 1003000; -- } -+ const int min_header_version = 1003000; - - // Generate top of header. - printer->Print( ---- protobuf-c-1.5.0/protoc-c/c_helpers.h 2024-10-21 20:22:31.574369622 +0200 -+++ protobuf-c-1.5.0/protoc-c/c_helpers.h 2024-10-21 20:22:43.064450125 +0200 -@@ -70,10 +70,6 @@ - #include - #include - --#if GOOGLE_PROTOBUF_VERSION >= 4023000 --# include --#endif -- - namespace google { - namespace protobuf { - namespace compiler { -@@ -173,13 +169,21 @@ - int compare_name_indices_by_name(const void*, const void*); - - // Return the syntax version of the file containing the field. --// This wrapper is needed to be able to compile against protobuf2. - inline int FieldSyntax(const FieldDescriptor* field) { --#if GOOGLE_PROTOBUF_VERSION >= 4023000 -- return FileDescriptorLegacy(field->file()).syntax() == FileDescriptorLegacy::SYNTAX_PROTO3 ? 3 : 2; --#else -- return field->file()->syntax() == FileDescriptor::SYNTAX_PROTO3 ? 3 : 2; --#endif -+ auto proto = FileDescriptorProto(); -+ field->file()->CopyTo(&proto); -+ -+ if (proto.has_syntax()) { -+ auto syntax = proto.syntax(); -+ assert(syntax == "proto2" || syntax == "proto3"); -+ if (syntax == "proto2") { -+ return 2; -+ } else if (syntax == "proto3") { -+ return 3; -+ } -+ } -+ -+ return 2; - } - - // Work around changes in protobuf >= 22.x without breaking compilation against diff --git a/_scmsync.obsinfo b/_scmsync.obsinfo new file mode 100644 index 0000000..972d111 --- /dev/null +++ b/_scmsync.obsinfo @@ -0,0 +1,4 @@ +mtime: 1739145091 +commit: 5c2778b5293c15465359be6a2fb048b022a32455180904f5104e89d9698d4694 +url: https://src.opensuse.org/jengelh/protobuf-c +revision: master diff --git a/build.specials.obscpio b/build.specials.obscpio new file mode 100644 index 0000000..e093e2c --- /dev/null +++ b/build.specials.obscpio @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:147443428f8f687aabf4f59b5a85c8fdff4f2ec76f2902a8f5ac512bbe27bd91 +size 256 diff --git a/protobuf-c-1.5.0.tar.gz b/protobuf-c-1.5.0.tar.gz deleted file mode 100644 index f0ff93f..0000000 --- a/protobuf-c-1.5.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7b404c63361ed35b3667aec75cc37b54298d56dd2bcf369de3373212cc06fd98 -size 507251 diff --git a/protobuf-c-1.5.1.tar.gz b/protobuf-c-1.5.1.tar.gz new file mode 100644 index 0000000..da58e0d --- /dev/null +++ b/protobuf-c-1.5.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:20d1dc257da96f8ddff8be4dd9779215bbd0a6069ed53bbe9de38fa7629be06b +size 531693 diff --git a/protobuf-c.changes b/protobuf-c.changes index a1c5b66..cb12812 100644 --- a/protobuf-c.changes +++ b/protobuf-c.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Sun Feb 9 23:46:28 UTC 2025 - Jan Engelhardt + +- Update to release 1.5.1 + * Order `oneof` union members from largest to smallest + * Better compatibility with protobuf >= 26.0 +- Delete 711.patch (merged) + +------------------------------------------------------------------- +Sun Oct 27 11:25:31 UTC 2024 - Jan Engelhardt + +- Implement naming guidelines and rename libprotobuf-c-devel back + to just %name-devel. (The divergence came about on Nov 19 2021 + as a result of merging two subpackages.) + ------------------------------------------------------------------- Tue Oct 22 08:48:51 UTC 2024 - Fridrich Strba diff --git a/protobuf-c.spec b/protobuf-c.spec index adfcb77..fd4b606 100644 --- a/protobuf-c.spec +++ b/protobuf-c.spec @@ -1,7 +1,7 @@ # # spec file for package protobuf-c # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2025 SUSE LLC # Copyright (c) 2011 Pascal Bleser # Copyright (c) 2024 Andreas Stieger # @@ -20,14 +20,13 @@ %define sover 1 Name: protobuf-c -Version: 1.5.0 +Version: 1.5.1 Release: 0 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 -Patch0: 711.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: c++_compiler @@ -51,15 +50,17 @@ Group: System/Libraries This package provides a code generator and runtime libraries to use Protocol Buffers from pure C (not C++). -%package -n libprotobuf-c-devel -Summary: C bindings for Google's Protocol Buffers +%package devel +Summary: protobuf generator and headers Group: Development/Libraries/C and C++ Requires: libprotobuf-c%sover = %version Recommends: (protobuf-devel >= 2.6.0 with protobuf-devel < 22) -Provides: %name = %version -Obsoletes: %name <= 1.4.0 +Provides: protobuf-c = %version-%release +Obsoletes: protobuf-c <= %version-%release +Provides: libprotobuf-c-devel = %version-%release +Obsoletes: libprotobuf-c-devel <= %version-%release -%description -n libprotobuf-c-devel +%description devel This package provides a code generator and runtime libraries to use Protocol Buffers from pure C (not C++). @@ -88,7 +89,7 @@ make check %_libdir/libprotobuf-c.so.%sover %_libdir/libprotobuf-c.so.%sover.* -%files -n libprotobuf-c-devel +%files devel %license LICENSE %dir %_includedir/protobuf-c %dir %_includedir/google