1 |
hasufell 13/07/29 15:04:55 |
2 |
|
3 |
Added: paraview-4.0.1-Protobuf.patch |
4 |
Log: |
5 |
use system protobuf, potentially fixing bug 471130 |
6 |
|
7 |
(Portage version: 2.2.0_alpha190/cvs/Linux x86_64, signed Manifest commit with key E73C35B3) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 sci-visualization/paraview/files/paraview-4.0.1-Protobuf.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-visualization/paraview/files/paraview-4.0.1-Protobuf.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-visualization/paraview/files/paraview-4.0.1-Protobuf.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: paraview-4.0.1-Protobuf.patch |
16 |
=================================================================== |
17 |
http://paraview.org/Bug/view.php?id=13656 |
18 |
|
19 |
diff -up ParaView/ParaViewCore/ServerImplementation/Core/CMakeLists.txt.Protobuf ParaView/ParaViewCore/ServerImplementation/Core/CMakeLists.txt |
20 |
--- ParaView/ParaViewCore/ServerImplementation/Core/CMakeLists.txt.Protobuf 2012-11-08 07:51:51.000000000 -0700 |
21 |
+++ ParaView/ParaViewCore/ServerImplementation/Core/CMakeLists.txt 2012-11-13 15:17:53.980027098 -0700 |
22 |
@@ -81,16 +81,24 @@ |
23 |
#------------------------------------------------------------------------------ |
24 |
# Generate the protbuf message file. |
25 |
#------------------------------------------------------------------------------ |
26 |
-get_target_property(PROTOC_LOCATION protoc_compiler LOCATION) |
27 |
+if (VTK_USE_SYSTEM_PROTOBUF) |
28 |
+ set (_PROTOC_COMPILER protoc) |
29 |
+ set (_PROTOC_DEPEND "") |
30 |
+else() |
31 |
+ set (_PROTOC_COMPILER protoc_compiler) |
32 |
+ set (_PROTOC_DEPEND ${_PROTOC_COMPILER}) |
33 |
+endif() |
34 |
+ |
35 |
+get_target_property(PROTOC_LOCATION ${_PROTOC_COMPILER} LOCATION) |
36 |
add_custom_command( |
37 |
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/vtkPVMessage.pb.h |
38 |
${CMAKE_CURRENT_BINARY_DIR}/vtkPVMessage.pb.cc |
39 |
|
40 |
- COMMAND protoc_compiler |
41 |
+ COMMAND ${_PROTOC_COMPILER} |
42 |
"--cpp_out=dllexport_decl=VTKPVSERVERIMPLEMENTATIONCORE_EXPORT:${CMAKE_CURRENT_BINARY_DIR}" |
43 |
--proto_path "@CMAKE_CURRENT_SOURCE_DIR@" |
44 |
"${CMAKE_CURRENT_SOURCE_DIR}/vtkPVMessage.proto" |
45 |
- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/vtkPVMessage.proto protoc_compiler |
46 |
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/vtkPVMessage.proto ${_PROTOC_DEPEND} |
47 |
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} |
48 |
) |
49 |
|
50 |
@@ -109,5 +117,9 @@ |
51 |
vtk_module_library(vtkPVServerImplementationCore |
52 |
${Module_SRCS}) |
53 |
|
54 |
+if (VTK_USE_SYSTEM_PROTOBUF) |
55 |
+ target_link_libraries(vtkPVServerImplementationCore ${CMAKE_THREAD_LIBS_INIT}) |
56 |
+endif() |
57 |
+ |
58 |
add_dependencies(vtkPVServerImplementationCore |
59 |
protobuf_code_generation) |
60 |
diff -up ParaView/ThirdParty/protobuf/CMakeLists.txt.Protobuf ParaView/ThirdParty/protobuf/CMakeLists.txt |
61 |
--- ParaView/ThirdParty/protobuf/CMakeLists.txt.Protobuf 2012-11-08 07:51:51.000000000 -0700 |
62 |
+++ ParaView/ThirdParty/protobuf/CMakeLists.txt 2012-11-13 15:09:31.526673020 -0700 |
63 |
@@ -34,7 +34,7 @@ |
64 |
set (PROTOBUF_INSTALL_LIB_DIR ${VTK_INSTALL_LIBRARY_DIR}) |
65 |
set (PROTOBUF_INSTALL_EXPORT_NAME ${VTK_INSTALL_EXPORT_NAME}) |
66 |
|
67 |
-vtk_module_third_party(protobuf |
68 |
+vtk_module_third_party(Protobuf |
69 |
INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/vtkprotobuf/src |
70 |
LIBRARIES protobuf |
71 |
) |
72 |
@@ -42,10 +42,12 @@ |
73 |
# protobuf exports it's build-dir targets to a custom file |
74 |
# (PROTOBUF_EXPORTS.cmake). We don't care much about that. We export |
75 |
# build-dir targets ourselves. |
76 |
-vtk_target_export(protobuf) |
77 |
-vtk_target_export(protobuf-lite) |
78 |
-if (NOT CMAKE_CROSSCOMPILING) |
79 |
- vtk_compile_tools_target_export(protoc_compiler) |
80 |
+if (NOT VTK_USE_SYSTEM_PROTOBUF) |
81 |
+ vtk_target_export(protobuf) |
82 |
+ vtk_target_export(protobuf-lite) |
83 |
+ if (NOT CMAKE_CROSSCOMPILING) |
84 |
+ vtk_compile_tools_target_export(protoc_compiler) |
85 |
+ endif() |
86 |
endif() |
87 |
|
88 |
# All these exports don't add any install rules. However we make protobuf itself |