[paraview] Use updated protobuf patch
Orion Poplawski
orion at fedoraproject.org
Mon Aug 12 20:42:15 UTC 2013
commit e633ee935c4e47bcf44fd332d81600f07f9697eb
Author: Orion Poplawski <orion at nwra.com>
Date: Mon Jul 29 15:05:30 2013 -0600
Use updated protobuf patch
...Protobuf.patch => paraview-4.0.1-Protobuf.patch | 52 ++++++++++++--------
paraview.spec | 3 +-
2 files changed, 34 insertions(+), 21 deletions(-)
---
diff --git a/paraview-Protobuf.patch b/paraview-4.0.1-Protobuf.patch
similarity index 66%
rename from paraview-Protobuf.patch
rename to paraview-4.0.1-Protobuf.patch
index 871ce12..6a09a1a 100644
--- a/paraview-Protobuf.patch
+++ b/paraview-4.0.1-Protobuf.patch
@@ -1,38 +1,50 @@
+http://paraview.org/Bug/view.php?id=13656
+
diff -up ParaView/ParaViewCore/ServerImplementation/Core/CMakeLists.txt.Protobuf ParaView/ParaViewCore/ServerImplementation/Core/CMakeLists.txt
---- ParaView/ParaViewCore/ServerImplementation/Core/CMakeLists.txt.Protobuf 2012-11-27 09:09:41.000000000 -0700
-+++ ParaView/ParaViewCore/ServerImplementation/Core/CMakeLists.txt 2012-11-27 13:00:36.072178577 -0700
-@@ -80,16 +80,16 @@ set (${vtk-module}_HDRS
+--- ParaView/ParaViewCore/ServerImplementation/Core/CMakeLists.txt.Protobuf 2012-11-08 07:51:51.000000000 -0700
++++ ParaView/ParaViewCore/ServerImplementation/Core/CMakeLists.txt 2012-11-13 15:17:53.980027098 -0700
+@@ -81,16 +81,24 @@
#------------------------------------------------------------------------------
# Generate the protbuf message file.
#------------------------------------------------------------------------------
-get_target_property(PROTOC_LOCATION protoc_compiler LOCATION)
-+get_target_property(PROTOC_LOCATION protoc LOCATION)
++if (VTK_USE_SYSTEM_PROTOBUF)
++ set (_PROTOC_COMPILER protoc)
++ set (_PROTOC_DEPEND "")
++else()
++ set (_PROTOC_COMPILER protoc_compiler)
++ set (_PROTOC_DEPEND ${_PROTOC_COMPILER})
++endif()
++
++get_target_property(PROTOC_LOCATION ${_PROTOC_COMPILER} LOCATION)
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/vtkPVMessage.pb.h
${CMAKE_CURRENT_BINARY_DIR}/vtkPVMessage.pb.cc
- COMMAND protoc_compiler
-+ COMMAND protoc
++ COMMAND ${_PROTOC_COMPILER}
"--cpp_out=dllexport_decl=VTKPVSERVERIMPLEMENTATIONCORE_EXPORT:${CMAKE_CURRENT_BINARY_DIR}"
--proto_path "@CMAKE_CURRENT_SOURCE_DIR@"
"${CMAKE_CURRENT_SOURCE_DIR}/vtkPVMessage.proto"
- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/vtkPVMessage.proto protoc_compiler
-+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/vtkPVMessage.proto
++ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/vtkPVMessage.proto ${_PROTOC_DEPEND}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
-@@ -108,5 +108,7 @@ endif()
+@@ -109,5 +117,9 @@
vtk_module_library(vtkPVServerImplementationCore
${Module_SRCS})
-+target_link_libraries(vtkPVServerImplementationCore -lpthread)
-+
++if (VTK_USE_SYSTEM_PROTOBUF)
++ target_link_libraries(vtkPVServerImplementationCore ${CMAKE_THREAD_LIBS_INIT})
++endif()
++
add_dependencies(vtkPVServerImplementationCore
protobuf_code_generation)
diff -up ParaView/ThirdParty/protobuf/CMakeLists.txt.Protobuf ParaView/ThirdParty/protobuf/CMakeLists.txt
---- ParaView/ThirdParty/protobuf/CMakeLists.txt.Protobuf 2012-11-27 09:09:45.000000000 -0700
-+++ ParaView/ThirdParty/protobuf/CMakeLists.txt 2012-11-27 13:02:04.535632175 -0700
-@@ -34,7 +34,7 @@ set (PROTOBUF_INSTALL_BIN_DIR ${VTK_INST
+--- ParaView/ThirdParty/protobuf/CMakeLists.txt.Protobuf 2012-11-08 07:51:51.000000000 -0700
++++ ParaView/ThirdParty/protobuf/CMakeLists.txt 2012-11-13 15:09:31.526673020 -0700
+@@ -34,7 +34,7 @@
set (PROTOBUF_INSTALL_LIB_DIR ${VTK_INSTALL_LIBRARY_DIR})
set (PROTOBUF_INSTALL_EXPORT_NAME ${VTK_INSTALL_EXPORT_NAME})
@@ -41,7 +53,7 @@ diff -up ParaView/ThirdParty/protobuf/CMakeLists.txt.Protobuf ParaView/ThirdPart
INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/vtkprotobuf/src
LIBRARIES protobuf
)
-@@ -42,11 +42,11 @@ vtk_module_third_party(protobuf
+@@ -42,10 +42,12 @@
# protobuf exports it's build-dir targets to a custom file
# (PROTOBUF_EXPORTS.cmake). We don't care much about that. We export
# build-dir targets ourselves.
@@ -49,12 +61,12 @@ diff -up ParaView/ThirdParty/protobuf/CMakeLists.txt.Protobuf ParaView/ThirdPart
-vtk_target_export(protobuf-lite)
-if (NOT CMAKE_CROSSCOMPILING)
- vtk_compile_tools_target_export(protoc_compiler)
--endif()
-+#vtk_target_export(protobuf)
-+#vtk_target_export(protobuf-lite)
-+#if (NOT CMAKE_CROSSCOMPILING)
-+# vtk_compile_tools_target_export(protoc_compiler)
-+#endif()
++if (NOT VTK_USE_SYSTEM_PROTOBUF)
++ vtk_target_export(protobuf)
++ vtk_target_export(protobuf-lite)
++ if (NOT CMAKE_CROSSCOMPILING)
++ vtk_compile_tools_target_export(protoc_compiler)
++ endif()
+ endif()
# All these exports don't add any install rules. However we make protobuf itself
- # install components at the right location by setting PROTOBUF_INSTALL_*
diff --git a/paraview.spec b/paraview.spec
index 0c7ab06..efb1039 100644
--- a/paraview.spec
+++ b/paraview.spec
@@ -28,7 +28,8 @@ Patch0: paraview-install.patch
#Patch to vtk (from vtk package) to use system libraries
Patch1: vtk-6.0.0-system.patch
# Capitalize Protobuf so it finds FindProtobuf.cmake
-Patch2: paraview-Protobuf.patch
+# http://paraview.org/Bug/view.php?id=13656
+Patch2: paraview-4.0.1-Protobuf.patch
#Patch to vtk to use system netcdf library
Patch3: vtk-6.0.0-netcdf.patch
More information about the scm-commits
mailing list