automatic version update by autodist [release 25.3-1mamba;Mon Feb 19 2024]
This commit is contained in:
parent
d75e092961
commit
7dd1bdd66e
16
protobuf-24.3-pep517.patch
Normal file
16
protobuf-24.3-pep517.patch
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
diff -ruN a/python/setup.py b/python/setup.py
|
||||||
|
--- a/python/setup.py 2022-12-13 01:03:12.000000000 +0100
|
||||||
|
+++ b/python/setup.py 2023-04-06 22:12:36.199029178 +0200
|
||||||
|
@@ -220,10 +220,10 @@
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
-if __name__ == '__main__':
|
||||||
|
+if True:
|
||||||
|
ext_module_list = []
|
||||||
|
warnings_as_errors = '--warnings_as_errors'
|
||||||
|
- if GetOptionFromArgv('--cpp_implementation'):
|
||||||
|
+ if True:
|
||||||
|
# Link libprotobuf.a and libprotobuf-lite.a statically with the
|
||||||
|
# extension. Note that those libraries have to be compiled with
|
||||||
|
# -fPIC for this to work.
|
25
protobuf-24.3-upstream-fix-Protobuf_PROTOC_EXECUTABLE.patch
Normal file
25
protobuf-24.3-upstream-fix-Protobuf_PROTOC_EXECUTABLE.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
From 2e62ef1eaa2e712afc5f87aa2c55d478fe96230d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Antonio Rojas <arojas@archlinux.org>
|
||||||
|
Date: Wed, 5 Jul 2023 13:03:11 +0200
|
||||||
|
Subject: [PATCH] Handle BUILD_TYPE=None in protobuf-module.cmake
|
||||||
|
|
||||||
|
Fixes Protobuf_PROTOC_EXECUTABLE being undefined in that case.
|
||||||
|
---
|
||||||
|
cmake/protobuf-module.cmake.in | 4 ++++
|
||||||
|
1 file changed, 4 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/cmake/protobuf-module.cmake.in b/cmake/protobuf-module.cmake.in
|
||||||
|
index 0bb05e38fad..e5b2b2e4b3a 100644
|
||||||
|
--- a/cmake/protobuf-module.cmake.in
|
||||||
|
+++ b/cmake/protobuf-module.cmake.in
|
||||||
|
@@ -153,6 +153,10 @@ if(NOT Protobuf_PROTOC_EXECUTABLE AND TARGET protobuf::protoc)
|
||||||
|
get_target_property(Protobuf_PROTOC_EXECUTABLE protobuf::protoc
|
||||||
|
IMPORTED_LOCATION_NOCONFIG)
|
||||||
|
endif()
|
||||||
|
+ if(NOT EXISTS "${Protobuf_PROTOC_EXECUTABLE}")
|
||||||
|
+ get_target_property(Protobuf_PROTOC_EXECUTABLE protobuf::protoc
|
||||||
|
+ IMPORTED_LOCATION_NONE)
|
||||||
|
+ endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Version info variable
|
36
protobuf-25.3-soversion.patch
Normal file
36
protobuf-25.3-soversion.patch
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
diff --git a/cmake/libprotobuf-lite.cmake b/cmake/libprotobuf-lite.cmake
|
||||||
|
index 9b1de677b4f..276c99c489e 100644
|
||||||
|
--- a/cmake/libprotobuf-lite.cmake
|
||||||
|
+++ b/cmake/libprotobuf-lite.cmake
|
||||||
|
@@ -30,6 +30,7 @@ if(protobuf_BUILD_SHARED_LIBS)
|
||||||
|
endif()
|
||||||
|
set_target_properties(libprotobuf-lite PROPERTIES
|
||||||
|
VERSION ${protobuf_VERSION}
|
||||||
|
+ SOVERSION ${protobuf_VERSION_MINOR}
|
||||||
|
OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
|
||||||
|
DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}")
|
||||||
|
add_library(protobuf::libprotobuf-lite ALIAS libprotobuf-lite)
|
||||||
|
diff --git a/cmake/libprotobuf.cmake b/cmake/libprotobuf.cmake
|
||||||
|
index aa3efc9a68a..0f34d20b97d 100644
|
||||||
|
--- a/cmake/libprotobuf.cmake
|
||||||
|
+++ b/cmake/libprotobuf.cmake
|
||||||
|
@@ -33,6 +33,7 @@ if(protobuf_BUILD_SHARED_LIBS)
|
||||||
|
endif()
|
||||||
|
set_target_properties(libprotobuf PROPERTIES
|
||||||
|
VERSION ${protobuf_VERSION}
|
||||||
|
+ SOVERSION ${protobuf_VERSION_MINOR}
|
||||||
|
OUTPUT_NAME ${LIB_PREFIX}protobuf
|
||||||
|
DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}")
|
||||||
|
add_library(protobuf::libprotobuf ALIAS libprotobuf)
|
||||||
|
diff --git a/cmake/libprotoc.cmake b/cmake/libprotoc.cmake
|
||||||
|
index 72b4a1abb92..91e8bbeb04e 100644
|
||||||
|
--- a/cmake/libprotoc.cmake
|
||||||
|
+++ b/cmake/libprotoc.cmake
|
||||||
|
@@ -24,6 +24,7 @@ endif()
|
||||||
|
set_target_properties(libprotoc PROPERTIES
|
||||||
|
COMPILE_DEFINITIONS LIBPROTOC_EXPORTS
|
||||||
|
VERSION ${protobuf_VERSION}
|
||||||
|
+ SOVERSION ${protobuf_VERSION_MINOR}
|
||||||
|
OUTPUT_NAME ${LIB_PREFIX}protoc
|
||||||
|
DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}")
|
||||||
|
add_library(protobuf::libprotoc ALIAS libprotoc)
|
101
protobuf.spec
101
protobuf.spec
@ -1,19 +1,22 @@
|
|||||||
Name: protobuf
|
Name: protobuf
|
||||||
Version: 21.12
|
Version: 25.3
|
||||||
Release: 2mamba
|
Release: 1mamba
|
||||||
Summary: A way of encoding structured data in an efficient yet extensible format
|
Summary: A way of encoding structured data in an efficient yet extensible format
|
||||||
Group: Development/Tools
|
Group: Development/Tools
|
||||||
Vendor: openmamba
|
Vendor: openmamba
|
||||||
Distribution: openmamba
|
Distribution: openmamba
|
||||||
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||||
URL: https://github.com/protocolbuffers/protobuf
|
URL: https://protobuf.dev/
|
||||||
Source: https://github.com/google/protobuf.git/v%{version}/protobuf-%{version}.tar.bz2
|
Source: https://github.com/protocolbuffers/protobuf.git/v%{version}/protobuf-%{version}.tar.bz2
|
||||||
|
Patch0: protobuf-24.3-pep517.patch
|
||||||
|
Patch1: protobuf-24.3-upstream-fix-Protobuf_PROTOC_EXECUTABLE.patch
|
||||||
|
Patch2: protobuf-25.3-soversion.patch
|
||||||
License: BSD
|
License: BSD
|
||||||
## AUTOBUILDREQ-BEGIN
|
## AUTOBUILDREQ-BEGIN
|
||||||
BuildRequires: glibc-devel
|
BuildRequires: glibc-devel
|
||||||
|
BuildRequires: libabseil-cpp-devel
|
||||||
BuildRequires: libgcc
|
BuildRequires: libgcc
|
||||||
BuildRequires: libpython3-devel
|
BuildRequires: libpython311-devel
|
||||||
BuildRequires: libpython310-devel
|
|
||||||
BuildRequires: libstdc++6-devel
|
BuildRequires: libstdc++6-devel
|
||||||
BuildRequires: libz-devel
|
BuildRequires: libz-devel
|
||||||
## AUTOBUILDREQ-END
|
## AUTOBUILDREQ-END
|
||||||
@ -47,65 +50,44 @@ Group: System/Libraries/Python
|
|||||||
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
|
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
|
||||||
Provides: python-protobuf
|
Provides: python-protobuf
|
||||||
Obsoletes: python-protobuf <= 21.12-1mamba
|
Obsoletes: python-protobuf <= 21.12-1mamba
|
||||||
|
Provides: python-protobuf-py310
|
||||||
|
Obsoletes: python-protobuf-py310 < 25.3
|
||||||
|
|
||||||
%description -n python-%{name}-py3
|
%description -n python-%{name}-py3
|
||||||
This package contains the python bindings to %{protobuf} library.
|
This package contains the python bindings to %{protobuf} library.
|
||||||
|
|
||||||
%package -n python-%{name}-py310
|
|
||||||
Summary: Python bindings for %{name}
|
|
||||||
Group: System/Libraries/Python
|
|
||||||
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
|
|
||||||
|
|
||||||
%description -n python-%{name}-py310
|
|
||||||
This package contains the python bindings to %{protobuf} library.
|
|
||||||
|
|
||||||
%debug_package
|
%debug_package
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
#-D -T
|
#-D -T
|
||||||
#:<< _EOF
|
#:<< _EOF
|
||||||
./autogen.sh
|
|
||||||
|
|
||||||
cp -a python python310
|
%define _default_patch_fuzz 2
|
||||||
|
%patch 0 -p1 -b .pep517
|
||||||
|
%patch 1 -p1 -b .upstream-fix-Protobuf_PROTOC_EXECUTABLE
|
||||||
|
%patch 2 -p1 -b .soversion
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure
|
%cmake \
|
||||||
|
-Dprotobuf_BUILD_SHARED_LIBS=ON \
|
||||||
|
-Dprotobuf_USE_EXTERNAL_GTEST=ON \
|
||||||
|
-Dprotobuf_ABSL_PROVIDER=package
|
||||||
|
|
||||||
%make \
|
%cmake_build
|
||||||
%ifarch arm
|
|
||||||
LDFLAGS="-latomic"
|
|
||||||
%endif
|
|
||||||
|
|
||||||
cd python
|
cd python
|
||||||
CFLAGS="%{optflags}" %{__python3} setup.py build
|
LDFLAGS+=" -L${PWD}/../build" \
|
||||||
|
PROTOC="${PWD}/../build/protoc" \
|
||||||
cd ../python310
|
CFLAGS="%{optflags}" \
|
||||||
CFLAGS="%{optflags}" %{__python310} setup.py build
|
%{__python3} -m build --no-isolation --wheel
|
||||||
|
|
||||||
%install
|
%install
|
||||||
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||||
%makeinstall
|
%cmake_install
|
||||||
|
|
||||||
cd python
|
cd python
|
||||||
%{__python3} setup.py install \
|
%{__python3} -m installer --destdir=%{buildroot} dist/*.whl
|
||||||
-O1 --skip-build \
|
|
||||||
--root="%{buildroot}" \
|
|
||||||
--install-headers=%{python3_inc} \
|
|
||||||
--install-lib=%{python3_sitearch} \
|
|
||||||
--record=%{name}.filelist
|
|
||||||
|
|
||||||
sed -i "\,\.egg-info/,d;s,.*/man/.*,&.gz," %{name}.filelist
|
|
||||||
|
|
||||||
cd ../python310
|
|
||||||
%{__python310} setup.py install \
|
|
||||||
-O1 --skip-build \
|
|
||||||
--root="%{buildroot}" \
|
|
||||||
--install-headers=%{python310_inc} \
|
|
||||||
--install-lib=%{python310_sitearch} \
|
|
||||||
--record=%{name}.filelist
|
|
||||||
|
|
||||||
sed -i "\,\.egg-info/,d;s,.*/man/.*,&.gz," %{name}.filelist
|
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||||
@ -115,7 +97,7 @@ sed -i "\,\.egg-info/,d;s,.*/man/.*,&.gz," %{name}.filelist
|
|||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{_bindir}/protoc
|
%{_bindir}/protoc*
|
||||||
|
|
||||||
%files -n lib%{name}
|
%files -n lib%{name}
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
@ -127,23 +109,32 @@ sed -i "\,\.egg-info/,d;s,.*/man/.*,&.gz," %{name}.filelist
|
|||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%dir %{_includedir}/google/protobuf
|
%dir %{_includedir}/google/protobuf
|
||||||
%{_includedir}/google/protobuf/*
|
%{_includedir}/google/protobuf/*
|
||||||
%{_libdir}/libprotobuf*.a
|
%{_includedir}/java/core/src/main/java/com/google/protobuf/java_features.proto
|
||||||
|
%{_includedir}/utf8_range.h
|
||||||
|
%{_includedir}/utf8_validity.h
|
||||||
%{_libdir}/libprotobuf*.so
|
%{_libdir}/libprotobuf*.so
|
||||||
%{_libdir}/libprotoc.a
|
|
||||||
%{_libdir}/libprotoc.so
|
%{_libdir}/libprotoc.so
|
||||||
|
%{_libdir}/libutf8_range.a
|
||||||
|
%{_libdir}/libutf8_validity.a
|
||||||
|
%dir %{_libdir}/cmake/protobuf
|
||||||
|
%{_libdir}/cmake/protobuf/protobuf-*.cmake
|
||||||
|
%dir %{_libdir}/cmake/utf8_range
|
||||||
|
%{_libdir}/cmake/utf8_range/utf8_range-*.cmake
|
||||||
%{_libdir}/pkgconfig/protobuf*.pc
|
%{_libdir}/pkgconfig/protobuf*.pc
|
||||||
|
%{_libdir}/pkgconfig/utf8_range.pc
|
||||||
|
|
||||||
%files -n python-%{name}-py3 -f python/%{name}.filelist
|
%files -n python-%{name}-py3
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%dir %{python3_sitearch}/protobuf-*-py*.egg-info
|
%{python3_sitearch}/protobuf-*-py*-nspkg.pth
|
||||||
%{python3_sitearch}/protobuf-*-py*.egg-info/*
|
%dir %{python3_sitearch}/protobuf-*.dist-info
|
||||||
|
%{python3_sitearch}/protobuf-*.dist-info/*
|
||||||
%files -n python-%{name}-py310 -f python310/%{name}.filelist
|
%dir %{python3_sitearch}/google/protobuf
|
||||||
%defattr(-,root,root)
|
%{python3_sitearch}/google/protobuf/*
|
||||||
%dir %{python310_sitearch}/protobuf-*-py*.egg-info
|
|
||||||
%{python310_sitearch}/protobuf-*-py*.egg-info/*
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Feb 19 2024 Automatic Build System <autodist@openmamba.org> 25.3-1mamba
|
||||||
|
- automatic version update by autodist
|
||||||
|
|
||||||
* Tue Jul 04 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 21.12-2mamba
|
* Tue Jul 04 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 21.12-2mamba
|
||||||
- added python 3.10 subpackage
|
- added python 3.10 subpackage
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user