| |
@@ -10,7 +10,12 @@
|
| |
%bcond_with doc_pdf
|
| |
|
| |
Name: flatbuffers
|
| |
- Version: 2.0.0
|
| |
+ Version: 2.0.6
|
| |
+ # The .so version is explicitly constructed from project version—search
|
| |
+ # CMakeLists.txt for FlatBuffers_Library_SONAME_MAJOR and
|
| |
+ # FlatBuffers_Library_SONAME_FULL—but we manually repeat the SOVERSION here,
|
| |
+ # and use the macro in the file lists, as a reminder to avoid undetected .so
|
| |
+ # version bumps.
|
| |
%global so_version 2
|
| |
Release: %autorelease
|
| |
Summary: Memory efficient serialization library
|
| |
@@ -27,16 +32,24 @@
|
| |
# The ninja backend should be slightly faster than make, with no disadvantages.
|
| |
BuildRequires: ninja-build
|
| |
%if %{with tests} && %{with grpctest}
|
| |
- BuildRequires: grpc-devel
|
| |
+ BuildRequires: cmake(absl)
|
| |
BuildRequires: cmake(protobuf)
|
| |
+ BuildRequires: grpc-devel
|
| |
%endif
|
| |
|
| |
BuildRequires: python3-devel
|
| |
|
| |
- # The library contains pieces of gRPC project, with some additions.
|
| |
- # It is not easy to identify the version, which was used to take the code,
|
| |
- # but it should be something after version 1.3.2. See this discussion for
|
| |
- # details: https://github.com/google/flatbuffers/pull/4305
|
| |
+ # From grpc/README.md:
|
| |
+ #
|
| |
+ # NOTE: files in `src/` are shared with the GRPC project, and maintained
|
| |
+ # there (any changes should be submitted to GRPC instead). These files are
|
| |
+ # copied from GRPC, and work with both the Protobuf and FlatBuffers code
|
| |
+ # generator.
|
| |
+ #
|
| |
+ # It’s not clearly documented which GPRC version is excerpted, but see
|
| |
+ # https://github.com/google/flatbuffers/pull/4305 for more details.
|
| |
+ #
|
| |
+ # It is not possible to unbundle this because private/internal APIs are used.
|
| |
Provides: bundled(grpc)
|
| |
|
| |
%global common_description %{expand: \
|
| |
@@ -62,6 +75,9 @@
|
| |
|
| |
%package compiler
|
| |
Summary: FlatBuffers compiler (flatc)
|
| |
+ # The flatc compiler does not link against the shared library, so this could
|
| |
+ # possibly be removed; we leave it for now to ensure there is no version skew
|
| |
+ # across subpackages.
|
| |
Requires: %{name}%{?_isa} = %{version}-%{release}
|
| |
|
| |
%description compiler
|
| |
@@ -125,6 +141,13 @@
|
| |
|
| |
%py3_shebang_fix samples
|
| |
|
| |
+ # flattests fails if out-of-source build directory is used
|
| |
+ # https://github.com/google/flatbuffers/issues/7282
|
| |
+ #
|
| |
+ # This downstream-only patch is not general; it makes assumptions about the
|
| |
+ # out-of-source build path and would break in-source builds.
|
| |
+ sed -r -i 's@//((include|monster)_test)@//../../tests/\1@g' tests/test.cpp
|
| |
+
|
| |
|
| |
%generate_buildrequires
|
| |
pushd python >/dev/null
|
| |
@@ -136,10 +159,9 @@
|
| |
# Needed for correct Python wheel version
|
| |
export VERSION='%{version}'
|
| |
%set_build_flags
|
| |
- # Without this, building the tests fails.
|
| |
- export CXXFLAGS="${CXXFLAGS} -Wno-error=maybe-uninitialized"
|
| |
%ifarch s390x
|
| |
- # Temporary workaround; report upstream if not fixed in a newer release
|
| |
+ # Compiling tests fails on s390x (big-endian) with -Werror=stringop-overflow
|
| |
+ # https://github.com/google/flatbuffers/issues/7366
|
| |
export CXXFLAGS="${CXXFLAGS} -Wno-error=stringop-overflow"
|
| |
%endif
|
| |
%cmake -GNinja \
|
| |
@@ -148,7 +170,7 @@
|
| |
-DFLATBUFFERS_BUILD_TESTS:BOOL=ON \
|
| |
%if %{with grpctest}
|
| |
-DFLATBUFFERS_BUILD_GRPCTEST:BOOL=ON \
|
| |
- -DGRPC_INSTALL_PATH:PATH=%{buildroot}%{_prefix} \
|
| |
+ -DGRPC_INSTALL_PATH:PATH=%{_prefix} \
|
| |
%endif
|
| |
%else
|
| |
-DFLATBUFFERS_BUILD_TESTS:BOOL=OFF \
|
| |
@@ -191,9 +213,9 @@
|
| |
|
| |
%files
|
| |
%license LICENSE.txt
|
| |
- %doc readme.md
|
| |
|
| |
- %{_libdir}/libflatbuffers.so.%{so_version}{,.*}
|
| |
+ %{_libdir}/libflatbuffers.so.%{so_version}
|
| |
+ %{_libdir}/libflatbuffers.so.%{version}
|
| |
|
| |
|
| |
%files devel
|
| |
@@ -212,11 +234,15 @@
|
| |
|
| |
%files doc
|
| |
%license LICENSE.txt
|
| |
- %doc samples
|
| |
+ %doc SECURITY.md
|
| |
+ %doc readme.md
|
| |
+
|
| |
%if %{with doc_pdf}
|
| |
%doc docs/latex/refman.pdf
|
| |
%endif
|
| |
|
| |
+ %doc samples/
|
| |
+
|
| |
|
| |
%files -n python3-flatbuffers -f %{pyproject_files}
|
| |
%license LICENSE.txt
|
| |