SHA256
1
0
forked from pool/grpc

- Update to new upstream release 1.7.3

OBS-URL: https://build.opensuse.org/package/show/devel:tools/grpc?expand=0&rev=4
This commit is contained in:
Jan Engelhardt 2017-12-12 00:04:33 +00:00 committed by Git OBS Bridge
parent b91482bb44
commit 7c58e3b91c
8 changed files with 70 additions and 95 deletions

26
grpc-build.diff Normal file
View File

@ -0,0 +1,26 @@
From: Jan Engelhardt <jengelh@inai.de>
Date: 2017-12-12 00:32:39.501708666 +0100
openSUSE's c-ares has no c-aresConfig.cmake or c-ares-config.cmake.
Work around it.
---
CMakeLists.txt | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
Index: grpc-1.7.3/CMakeLists.txt
===================================================================
--- grpc-1.7.3.orig/CMakeLists.txt
+++ grpc-1.7.3/CMakeLists.txt
@@ -144,11 +144,7 @@ if("${gRPC_CARES_PROVIDER}" STREQUAL "mo
set(gRPC_INSTALL FALSE)
endif()
elseif("${gRPC_CARES_PROVIDER}" STREQUAL "package")
- find_package(c-ares REQUIRED CONFIG)
- if(TARGET c-ares::cares)
- set(_gRPC_CARES_LIBRARIES c-ares::cares)
- endif()
- set(_gRPC_FIND_CARES "if(NOT c-ares_FOUND)\n find_package(c-ares CONFIG)\nendif()")
+ set(_gRPC_CARES_LIBRARIES -lcares)
endif()
if("${gRPC_PROTOBUF_PROVIDER}" STREQUAL "module")

View File

@ -1,24 +0,0 @@
[ 12s] CMakeFiles/grpc_plugin_support.dir/src/compiler/csharp_generator.cc.o: In function `grpc_csharp_generator::(anonymous namespace)::GetMethodRequestParamMaybe(google::protobuf::MethodDescriptor const*, bool)':
[ 12s] /home/abuild/rpmbuild/BUILD/grpc-1.2.3/src/compiler/csharp_generator.cc:236: undefined reference to `google::protobuf::compiler::csharp::GetClassName[abi:cxx11](google::protobuf::Descriptor const*)'
---
CMakeLists.txt | 5 +++++
1 file changed, 5 insertions(+)
Index: grpc-1.2.3/CMakeLists.txt
===================================================================
--- grpc-1.2.3.orig/CMakeLists.txt
+++ grpc-1.2.3/CMakeLists.txt
@@ -166,6 +166,11 @@ elseif("${gRPC_PROTOBUF_PROVIDER}" STREQ
set(_gRPC_FIND_PROTOBUF "if(NOT protobuf_FOUND)\n find_package(protobuf CONFIG)\nendif()")
else()
find_package(Protobuf MODULE)
+ if(PROTOBUF_FOUND)
+ set(_gRPC_PROTOBUF_PROTOC_LIBRARIES ${PROTOBUF_PROTOC_LIBRARIES})
+ set(_gRPC_PROTOBUF_PROTOC ${PROTOBUF_PROTOC_EXECUTABLE})
+ set(_gRPC_PROTOBUF_LIBRARIES ${PROTOBUF_LIBRARIES})
+ endif()
set(_gRPC_FIND_PROTOBUF "if(NOT Protobuf_FOUND)\n find_package(Protobuf)\nendif()")
endif()
endif()

View File

@ -7,11 +7,11 @@ Unversioned libraries are an ABI nightmare, so work around that in short order.
CMakeLists.txt | 10 ++++++++++
1 file changed, 10 insertions(+)
Index: grpc-1.2.3/CMakeLists.txt
Index: grpc-1.7.3/CMakeLists.txt
===================================================================
--- grpc-1.2.3.orig/CMakeLists.txt
+++ grpc-1.2.3/CMakeLists.txt
@@ -735,6 +735,7 @@ add_library(gpr
--- grpc-1.7.3.orig/CMakeLists.txt
+++ grpc-1.7.3/CMakeLists.txt
@@ -825,6 +825,7 @@ add_library(gpr
src/core/lib/support/tmpfile_windows.c
src/core/lib/support/wrap_memcpy.c
)
@ -19,31 +19,31 @@ Index: grpc-1.2.3/CMakeLists.txt
if(WIN32 AND MSVC)
set_target_properties(gpr PROPERTIES COMPILE_PDB_NAME "gpr"
@@ -1083,6 +1084,7 @@ add_library(grpc
src/core/ext/census/tracing.c
@@ -1217,6 +1218,7 @@ add_library(grpc
src/core/ext/filters/workarounds/workaround_utils.c
src/core/plugin_registry/grpc_plugin_registry.c
)
+set_target_properties(grpc PROPERTIES OUTPUT_NAME "grpc-${PACKAGE_VERSION}")
if(WIN32 AND MSVC)
set_target_properties(grpc PROPERTIES COMPILE_PDB_NAME "grpc"
@@ -1364,6 +1366,7 @@ add_library(grpc_cronet
src/core/ext/load_reporting/load_reporting_filter.c
@@ -1530,6 +1532,7 @@ add_library(grpc_cronet
src/core/ext/filters/load_reporting/server_load_reporting_plugin.c
src/core/plugin_registry/grpc_cronet_plugin_registry.c
)
+set_target_properties(grpc_cronet PROPERTIES OUTPUT_NAME "grpc_cronet-${PACKAGE_VERSION}")
if(WIN32 AND MSVC)
set_target_properties(grpc_cronet PROPERTIES COMPILE_PDB_NAME "grpc_cronet"
@@ -1909,6 +1912,7 @@ add_library(grpc_unsecure
src/core/ext/census/tracing.c
@@ -2380,6 +2383,7 @@ add_library(grpc_unsecure
src/core/ext/filters/workarounds/workaround_utils.c
src/core/plugin_registry/grpc_unsecure_plugin_registry.c
)
+set_target_properties(grpc_unsecure PROPERTIES OUTPUT_NAME "grpc_unsecure-${PACKAGE_VERSION}")
if(WIN32 AND MSVC)
set_target_properties(grpc_unsecure PROPERTIES COMPILE_PDB_NAME "grpc_unsecure"
@@ -2110,6 +2114,7 @@ add_library(grpc++
@@ -2595,6 +2599,7 @@ add_library(grpc++
src/cpp/util/time_cc.cc
src/cpp/codegen/codegen_init.cc
)
@ -51,7 +51,7 @@ Index: grpc-1.2.3/CMakeLists.txt
if(WIN32 AND MSVC)
set_target_properties(grpc++ PROPERTIES COMPILE_PDB_NAME "grpc++"
@@ -2479,6 +2484,7 @@ add_library(grpc++_cronet
@@ -3094,6 +3099,7 @@ add_library(grpc++_cronet
third_party/nanopb/pb_decode.c
third_party/nanopb/pb_encode.c
)
@ -59,7 +59,7 @@ Index: grpc-1.2.3/CMakeLists.txt
if(WIN32 AND MSVC)
set_target_properties(grpc++_cronet PROPERTIES COMPILE_PDB_NAME "grpc++_cronet"
@@ -2700,6 +2706,7 @@ add_library(grpc++_reflection
@@ -3420,6 +3426,7 @@ add_library(grpc++_reflection
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/reflection/v1alpha/reflection.pb.h
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/reflection/v1alpha/reflection.grpc.pb.h
)
@ -67,15 +67,15 @@ Index: grpc-1.2.3/CMakeLists.txt
if(WIN32 AND MSVC)
set_target_properties(grpc++_reflection PROPERTIES COMPILE_PDB_NAME "grpc++_reflection"
@@ -2967,6 +2974,7 @@ add_library(grpc++_unsecure
src/cpp/util/time_cc.cc
@@ -3547,6 +3554,7 @@ add_library(grpc++_test_util
test/cpp/util/test_credentials_provider.cc
src/cpp/codegen/codegen_init.cc
)
+set_target_properties(grpc++_unsecure PROPERTIES OUTPUT_NAME "grpc++_unsecure-${PACKAGE_VERSION}")
if(WIN32 AND MSVC)
set_target_properties(grpc++_unsecure PROPERTIES COMPILE_PDB_NAME "grpc++_unsecure"
@@ -3226,6 +3234,7 @@ add_library(grpc_plugin_support
set_target_properties(grpc++_test_util PROPERTIES COMPILE_PDB_NAME "grpc++_test_util"
@@ -4156,6 +4164,7 @@ add_library(grpc_plugin_support
src/compiler/python_generator.cc
src/compiler/ruby_generator.cc
)
@ -83,7 +83,7 @@ Index: grpc-1.2.3/CMakeLists.txt
if(WIN32 AND MSVC)
set_target_properties(grpc_plugin_support PROPERTIES COMPILE_PDB_NAME "grpc_plugin_support"
@@ -3703,6 +3712,7 @@ endif (gRPC_BUILD_TESTS)
@@ -4665,6 +4674,7 @@ endif (gRPC_BUILD_TESTS)
add_library(grpc_csharp_ext SHARED
src/csharp/ext/grpc_csharp_ext.c
)

View File

@ -1,37 +0,0 @@
[ 24s] CMakeFiles/grpc_unsecure.dir/src/core/lib/compression/message_compress.c.o: In function `zlib_compress':
[ 24s] /home/abuild/rpmbuild/BUILD/grpc-1.2.3/src/core/lib/compression/message_compress.c:112: undefined reference to `deflateInit2_'
---
CMakeLists.txt | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
Index: grpc-1.2.3/CMakeLists.txt
===================================================================
--- grpc-1.2.3.orig/CMakeLists.txt
+++ grpc-1.2.3/CMakeLists.txt
@@ -121,7 +121,7 @@ if("${gRPC_ZLIB_PROVIDER}" STREQUAL "mod
elseif("${gRPC_ZLIB_PROVIDER}" STREQUAL "package")
find_package(ZLIB)
if(TARGET ZLIB::ZLIB)
- set(_gRPC_ZLIB_LIBRARIES ZLIB::ZLIB)
+ set(_gRPC_ZLIB_LIBRARIES ${ZLIB_LIBRARIES})
endif()
set(_gRPC_FIND_ZLIB "if(NOT ZLIB_FOUND)\n find_package(ZLIB)\nendif()")
endif()
@@ -242,7 +242,7 @@ if(NOT MSVC)
endif()
if(UNIX)
- set(_gRPC_ALLTARGETS_LIBRARIES dl rt m pthread)
+ set(_gRPC_ALLTARGETS_LIBRARIES dl rt m pthread z)
endif()
if(WIN32 AND MSVC)
@@ -1392,6 +1392,7 @@ target_link_libraries(grpc_cronet
${_gRPC_BASELIB_LIBRARIES}
${_gRPC_SSL_LIBRARIES}
${_gRPC_ALLTARGETS_LIBRARIES}
+ ${ZLIB_LIBRARIES}
gpr
)

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Dec 11 23:23:19 UTC 2017 - jengelh@inai.de
- Update to new upstream release 1.7.3
- Drop grpc-zlib.diff, grpc-protobuf.diff (fix included upstream)
-------------------------------------------------------------------
Wed Apr 19 11:57:55 UTC 2017 - jengelh@inai.de

View File

@ -16,23 +16,23 @@
#
%define lname libgrpc-1_2_3
%define lname libgrpc-1_7_3
Name: grpc
Version: 1.2.3
Version: 1.7.3
Release: 0
Summary: HTTP/2-based Remote Procedure Call implementation
License: BSD-3-Clause
License: Apache-2.0
Group: Development/Tools/Building
Url: http://grpc.io/
Source: https://github.com/grpc/grpc/archive/v%version.tar.gz
Patch1: grpc-protobuf.diff
Patch2: grpc-zlib.diff
Patch3: grpc-versioning.diff
Patch1: grpc-build.diff
Patch2: grpc-versioning.diff
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: pkg-config
BuildRequires: pkgconfig(libcares)
BuildRequires: pkgconfig(openssl) >= 1.0.1
BuildRequires: pkgconfig(protobuf) >= 3
BuildRequires: pkgconfig(protobuf) >= 3.5
BuildRequires: pkgconfig(zlib)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -61,7 +61,7 @@ applications that want to make use of the gRPC reference implementation.
%prep
%setup -q
%patch -P 1 -P 2 -P 3 -p1
%patch -P 1 -P 2 -p1
%build
make LIBDIR=x CONFIG=opt \
@ -70,7 +70,11 @@ make LIBDIR=x CONFIG=opt \
%cmake \
-DgRPC_PROTOBUF_PROVIDER=package \
-DgRPC_SSL_PROVIDER=package \
-DgRPC_ZLIB_PROVIDER=package
-DgRPC_ZLIB_PROVIDER=package \
-DgRPC_CARES_PROVIDER=package \
-DgRPC_INSTALL_BINDIR="%_bindir" \
-DgRPC_INSTALL_INCLUDEDIR="%_includedir" \
-DgRPC_INSTALL_LIBDIR="%_libdir"
#[ 36%] Running gRPC C++ protocol buffer compiler on src/proto/grpc/reflection/v1alpha/reflection.proto
#cd /home/abuild/rpmbuild/BUILD/grpc-1.2.3 && /usr/bin/protoc --grpc_out=/home/abuild/rpmbuild/BUILD/grpc-1.2.3/build/gens --cpp_out=/home/abuild/rpmbuild/BUILD/grpc-1.2.3/build/gens --plugin=protoc-gen-grpc=/home/abuild/rpmbuild/BUILD/grpc-1.2.3/build/grpc_cpp_plugin -I . src/proto/grpc/reflection/v1alpha/reflection.proto
@ -88,16 +92,16 @@ for i in "$b/%_libdir"/libg*-%version.so; do
ln -s "${i##*/}" "${i%%-%version.so}.so"
done
%post -n libgrpc-1_2_3 -p /sbin/ldconfig
%postun -n libgrpc-1_2_3 -p /sbin/ldconfig
%post -n %lname -p /sbin/ldconfig
%postun -n %lname -p /sbin/ldconfig
%files -n libgrpc-1_2_3
%files -n %lname
%defattr(-,root,root)
%_libdir/libg*-%version.so
%files devel
%defattr(-,root,root)
%doc LICENSE PATENTS
%doc LICENSE
%_bindir/*
%_includedir/*
%_libdir/cmake/

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e07ac5a2c657c25d5628529ec051f2ae3fa69a1d8802125810cba0c35fed9adf
size 4453354

3
v1.7.3.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e31107f5ee6970525a2b48dd6392613a32d7eeb69c6151cde8f64272c179c866
size 4728599