- Add versionize-shlibs.patch, delete static-utf8-ranges.patch
* Build the libutf8_range and libutf8_validity as shared library to conform to SLPP OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/protobuf?expand=0&rev=197
This commit is contained in:
parent
b9b3068a94
commit
02a9bd1d89
@ -1,3 +1,4 @@
|
||||
libprotobuf28_3_0
|
||||
libprotoc28_3_0
|
||||
libprotobuf-lite28_3_0
|
||||
libutf8_range-28_3_0
|
||||
|
@ -4,6 +4,13 @@ Mon Oct 28 08:20:17 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||
- python: switch to pypi package to get the cythonized component
|
||||
- drop python-protobuf-setup_py.patch (obsolete)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Oct 26 08:40:48 UTC 2024 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
- Add versionize-shlibs.patch, delete static-utf8-ranges.patch
|
||||
* Build the libutf8_range and libutf8_validity as shared library
|
||||
to conform to SLPP
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 25 15:24:11 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
|
@ -4,6 +4,13 @@ Mon Oct 28 08:20:17 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||
- python: switch to pypi package to get the cythonized component
|
||||
- drop python-protobuf-setup_py.patch (obsolete)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Oct 26 08:40:48 UTC 2024 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
- Add versionize-shlibs.patch, delete static-utf8-ranges.patch
|
||||
* Build the libutf8_range and libutf8_validity as shared library
|
||||
to conform to SLPP
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 25 15:24:11 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
|
@ -74,7 +74,7 @@ Group: Development/Libraries/C and C++
|
||||
URL: https://github.com/protocolbuffers/protobuf
|
||||
Source0: https://github.com/protocolbuffers/protobuf/releases/download/v%{version}/%{tarname}-%{version}.tar.gz
|
||||
Source1: baselibs.conf
|
||||
Patch0: static-utf8-ranges.patch
|
||||
Patch1: versionize-shlibs.patch
|
||||
BuildRequires: cmake
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: gcc%{?with_gcc}-c++
|
||||
@ -152,11 +152,20 @@ Protocol Buffers are a way of encoding structured data in an efficient yet
|
||||
extensible format. Google uses Protocol Buffers for almost all of its internal
|
||||
RPC protocols and file formats.
|
||||
|
||||
%package -n libutf8_range-%{sover}
|
||||
Summary: UTF-8 validation libraries from Protobuf
|
||||
Group: System/Libraries
|
||||
|
||||
%description -n libutf8_range-%{sover}
|
||||
UTF-8 string validation library with optional SIMD acceleration (armv8a NEON,
|
||||
SSE4 and AVX2).
|
||||
|
||||
%package devel
|
||||
Summary: Header files, libraries and development documentation for %{name}
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: libprotobuf%{sover} = %{version}
|
||||
Requires: libprotobuf-lite%{sover}
|
||||
Requires: libprotobuf-lite%{sover} = %{version}
|
||||
Requires: libutf8_range-%{sover} = %{version}
|
||||
Conflicts: protobuf2-devel
|
||||
Conflicts: protobuf21-devel
|
||||
Provides: libprotobuf-devel = %{version}
|
||||
@ -194,6 +203,9 @@ export CC=gcc-%{with_gcc}
|
||||
%install
|
||||
%cmake_install
|
||||
install -Dm 0644 editors/proto.vim %{buildroot}%{_datadir}/vim/site/syntax/proto.vim
|
||||
# manual ln that we could not manage to get into versionize-shlibs.patch
|
||||
ln -s libutf8_range-%{version}.0.so %{buildroot}/%{_libdir}/libutf8_range.so
|
||||
ln -s libutf8_validity-%{version}.0.so %{buildroot}/%{_libdir}/libutf8_validity.so
|
||||
|
||||
# create maven metadata for the protoc executable
|
||||
install -dm 0755 %{buildroot}%{_datadir}/maven-metadata
|
||||
@ -222,10 +234,13 @@ __PROTOBUF__
|
||||
%postun -n libprotoc%{sover} -p /sbin/ldconfig
|
||||
%post -n libprotobuf-lite%{sover} -p /sbin/ldconfig
|
||||
%postun -n libprotobuf-lite%{sover} -p /sbin/ldconfig
|
||||
%post -n libutf8_range-%{sover} -p /sbin/ldconfig
|
||||
%postun -n libutf8_range-%{sover} -p /sbin/ldconfig
|
||||
%else
|
||||
%ldconfig_scriptlets -n libprotobuf%{sover}
|
||||
%ldconfig_scriptlets -n libprotoc%{sover}
|
||||
%ldconfig_scriptlets -n libprotobuf-lite%{sover}
|
||||
%ldconfig_scriptlets -n libutf8_range-%{sover}
|
||||
%endif
|
||||
|
||||
%files -n libprotobuf%{sover}
|
||||
@ -240,6 +255,11 @@ __PROTOBUF__
|
||||
%license LICENSE
|
||||
%{_libdir}/libprotobuf-lite.so.%{version}.0
|
||||
|
||||
%files -n libutf8_range-%{sover}
|
||||
%license LICENSE
|
||||
%{_libdir}/libutf8_range-%{version}.0.so
|
||||
%{_libdir}/libutf8_validity-%{version}.0.so
|
||||
|
||||
%files devel
|
||||
%license LICENSE
|
||||
%doc CONTRIBUTORS.txt README.md
|
||||
@ -264,8 +284,8 @@ __PROTOBUF__
|
||||
%{_libdir}/libprotobuf.so
|
||||
%{_libdir}/libprotoc.so
|
||||
%{_libdir}/libupb.a
|
||||
%{_libdir}/libutf8_range.a
|
||||
%{_libdir}/libutf8_validity.a
|
||||
%{_libdir}/libutf8_range.so
|
||||
%{_libdir}/libutf8_validity.so
|
||||
%{_datadir}/vim
|
||||
%{_datadir}/maven-metadata
|
||||
|
||||
|
@ -4,6 +4,13 @@ Mon Oct 28 08:20:17 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||
- python: switch to pypi package to get the cythonized component
|
||||
- drop python-protobuf-setup_py.patch (obsolete)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Oct 26 08:40:48 UTC 2024 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
- Add versionize-shlibs.patch, delete static-utf8-ranges.patch
|
||||
* Build the libutf8_range and libutf8_validity as shared library
|
||||
to conform to SLPP
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 25 15:24:11 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
|
@ -1,18 +0,0 @@
|
||||
--- protobuf-28.2/third_party/utf8_range/CMakeLists.txt 2024-10-24 21:35:09.113008070 +0200
|
||||
+++ protobuf-28.2/third_party/utf8_range/CMakeLists.txt 2024-10-24 21:35:43.123256664 +0200
|
||||
@@ -11,13 +11,13 @@
|
||||
|
||||
##
|
||||
# Create the lightweight C library
|
||||
-add_library (utf8_range
|
||||
+add_library (utf8_range STATIC
|
||||
utf8_range.c
|
||||
)
|
||||
|
||||
##
|
||||
# A heavier-weight C++ wrapper that supports Abseil.
|
||||
-add_library (utf8_validity utf8_validity.cc utf8_range.c)
|
||||
+add_library (utf8_validity STATIC utf8_validity.cc utf8_range.c)
|
||||
|
||||
# Load Abseil dependency.
|
||||
if (NOT TARGET absl::strings)
|
32
versionize-shlibs.patch
Normal file
32
versionize-shlibs.patch
Normal file
@ -0,0 +1,32 @@
|
||||
From: Jan Engelhardt <jengelh@inai.de>
|
||||
Date: 2024-10-28 10:10:20.918922623 +0100
|
||||
References: https://github.com/protocolbuffers/protobuf/pull/19009
|
||||
|
||||
Unversioned libraries are strongly discouraged. Use
|
||||
https://en.opensuse.org/openSUSE:Shared_library_packaging_policy#When_there_is_no_versioning
|
||||
method 1 to remedy. Though utf8_range has a version of its own ("1.0"
|
||||
visible through the .pc file) and gets third_party/-like treatment,
|
||||
protobuf is the authoritative repository for it, using the protobuf
|
||||
version for our SONAME seems acceptable.
|
||||
|
||||
This openSUSE patch follows SLPP's naming provisions and so is
|
||||
slightly different from PR19009 while the PR is unmerged.
|
||||
|
||||
---
|
||||
third_party/utf8_range/CMakeLists.txt | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
Index: protobuf-28.3/third_party/utf8_range/CMakeLists.txt
|
||||
===================================================================
|
||||
--- protobuf-28.3.orig/third_party/utf8_range/CMakeLists.txt
|
||||
+++ protobuf-28.3/third_party/utf8_range/CMakeLists.txt
|
||||
@@ -19,6 +19,9 @@ add_library (utf8_range
|
||||
# A heavier-weight C++ wrapper that supports Abseil.
|
||||
add_library (utf8_validity utf8_validity.cc utf8_range.c)
|
||||
|
||||
+set_target_properties(utf8_range PROPERTIES OUTPUT_NAME ${LIB_PREFIX}utf8_range-${protobuf_VERSION})
|
||||
+set_target_properties(utf8_validity PROPERTIES OUTPUT_NAME ${LIB_PREFIX}utf8_validity-${protobuf_VERSION})
|
||||
+
|
||||
# Load Abseil dependency.
|
||||
if (NOT TARGET absl::strings)
|
||||
if (NOT ABSL_ROOT_DIR)
|
Loading…
x
Reference in New Issue
Block a user