diff --git a/.gitignore b/.gitignore index 497ea0d..3ec62ff 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /protobuf-3.11.4-all.tar.gz /protobuf-3.12.3-all.tar.gz /protobuf-3.13.0-all.tar.gz +/protobuf-3.14.0-all.tar.gz diff --git a/mingw-protobuf.spec b/mingw-protobuf.spec index fe5404b..4696a42 100644 --- a/mingw-protobuf.spec +++ b/mingw-protobuf.spec @@ -3,15 +3,20 @@ %global pkgname protobuf Name: mingw-%{pkgname} -Version: 3.13.0 -Release: 3%{?dist} +Version: 3.14.0 +Release: 1%{?dist} Summary: MinGW Windows protobuf library BuildArch: noarch License: BSD URL: https://github.com/protocolbuffers/protobuf -Source: https://github.com/protocolbuffers/protobuf/archive/v%{version}/%{pkgname}-%{version}-all.tar.gz - +Source0: https://github.com/protocolbuffers/protobuf/archive/v%{version}/%{pkgname}-%{version}-all.tar.gz +# Disable some constexpr constructors, it triggers +# error: call to non-'constexpr' function 'google::protobuf::internal::WrappedMutex::WrappedMutex()' +# note: 'google::protobuf::internal::WrappedMutex::WrappedMutex()' is not usable as a 'constexpr' function because: +# note: defaulted constructor calls non-'constexpr' 'std::mutex::mutex()' +# TODO: Revisit with mingw-w64-8.0.0 and gcc-11 +Patch0: protobuf_constexpr.patch BuildRequires: autoconf automake libtool BuildRequires: gcc-c++ @@ -103,9 +108,9 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %files -n mingw32-%{pkgname} %license LICENSE -%{mingw32_bindir}/libprotobuf-24.dll -%{mingw32_bindir}/libprotobuf-lite-24.dll -%{mingw32_bindir}/libprotoc-24.dll +%{mingw32_bindir}/libprotobuf-25.dll +%{mingw32_bindir}/libprotobuf-lite-25.dll +%{mingw32_bindir}/libprotoc-25.dll %dir %{mingw32_includedir}/google %{mingw32_includedir}/google/protobuf/ %{mingw32_libdir}/pkgconfig/protobuf-lite.pc @@ -125,9 +130,9 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %files -n mingw64-%{pkgname} %license LICENSE -%{mingw64_bindir}/libprotobuf-24.dll -%{mingw64_bindir}/libprotobuf-lite-24.dll -%{mingw64_bindir}/libprotoc-24.dll +%{mingw64_bindir}/libprotobuf-25.dll +%{mingw64_bindir}/libprotobuf-lite-25.dll +%{mingw64_bindir}/libprotoc-25.dll %dir %{mingw64_includedir}/google %{mingw64_includedir}/google/protobuf/ %{mingw64_libdir}/pkgconfig/protobuf-lite.pc @@ -146,6 +151,9 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %changelog +* Sun Jan 17 2021 Sandro Mani - 3.14.0-1 +- Update to 3.14.0 + * Thu Jan 14 08:33:00 CET 2021 Adrian Reber - 3.13.0-3 - Rebuilt for protobuf 3.14 diff --git a/protobuf_constexpr.patch b/protobuf_constexpr.patch new file mode 100644 index 0000000..2fb8d49 --- /dev/null +++ b/protobuf_constexpr.patch @@ -0,0 +1,12 @@ +diff -rupN protobuf-3.14.0/src/google/protobuf/port_def.inc protobuf-3.14.0-new/src/google/protobuf/port_def.inc +--- protobuf-3.14.0/src/google/protobuf/port_def.inc 2020-11-13 21:53:39.000000000 +0100 ++++ protobuf-3.14.0-new/src/google/protobuf/port_def.inc 2021-01-17 20:50:07.711557917 +0100 +@@ -563,7 +563,7 @@ + // Some constructors can't be constexpr under MSVC, but given that MSVC will not + // do constant initialization of globals anyway we can omit `constexpr` from + // them. These constructors are marked with PROTOBUF_MAYBE_CONSTEXPR +-#if defined(_MSC_VER) ++#if defined(_MSC_VER) || defined(__MINGW32__) + #define PROTOBUF_MAYBE_CONSTEXPR + #else + #define PROTOBUF_MAYBE_CONSTEXPR constexpr diff --git a/sources b/sources index 288703a..5c2cb1b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (protobuf-3.13.0-all.tar.gz) = 514efa65fc8a36bc0791e6d39bdfb07b2689e9c2a4b82536c657859b800e7bc1e1a0ae86a7ee33f30c43a473a49b5c346ce830ac0057b6da104ed37f90b8b0fd +SHA512 (protobuf-3.14.0-all.tar.gz) = 9dabba81119cb6196ef5de382a1032c57f6e69038f4dce0156f8671b98e51bb5095915fb6d05bb5a8ad8b17b559e652e1e9a392dd30c7ed8dcf1d986c137be11