[mozc] Update the patch to fix the build issue
Akira TAGOH
tagoh at fedoraproject.org
Wed Apr 17 03:44:50 UTC 2013
commit 0b0481bbefebe9ae92d7cbddd5c21a563340c409
Author: Akira TAGOH <tagoh at redhat.com>
Date: Wed Apr 17 12:44:44 2013 +0900
Update the patch to fix the build issue
mozc-fix-use-libprotobuf.patch | 94 +++++++++++++++++++++++++++++++++++++--
1 files changed, 89 insertions(+), 5 deletions(-)
---
diff --git a/mozc-fix-use-libprotobuf.patch b/mozc-fix-use-libprotobuf.patch
index dde52bd..984e97d 100644
--- a/mozc-fix-use-libprotobuf.patch
+++ b/mozc-fix-use-libprotobuf.patch
@@ -1,8 +1,8 @@
-Index: protobuf/genproto.gypi
-===================================================================
---- protobuf/genproto.gypi (revision 153)
-+++ protobuf/genproto.gypi (working copy)
-@@ -33,7 +33,7 @@
+Index: protobuf/genproto.gypi
+===================================================================
+--- protobuf/genproto.gypi (revision 153)
++++ protobuf/genproto.gypi (working copy)
+@@ -33,7 +33,7 @@
'wrapper_path': '<(DEPTH)/build_tools/protoc_wrapper.py',
},
'conditions': [
@@ -11,3 +11,87 @@ Index: protobuf/genproto.gypi
'variables': {
'protoc_command%': '<(mozc_build_tools_dir)/protoc<(EXECUTABLE_SUFFIX)',
},
+Index: build_tools/protoc_wrapper.py
+===================================================================
+--- build_tools/protoc_wrapper.py (revision 153)
++++ build_tools/protoc_wrapper.py (working copy)
+@@ -30,10 +30,11 @@
+
+ """Script to invoke protoc with considering project root directory.
+
+- % python protoc_wrapper.py \
+- --protoc_path=/usr/bin/protoc \
+- --proto=my_data.proto \
+- --cpp_out=../out/debug/gen \
++ % python protoc_wrapper.py \
++ --protoc_command=protoc \
++ --protoc_dir=/usr/bin (optional) \
++ --proto=my_data.proto \
++ --cpp_out=../out/debug/gen \
+ --project_root=../
+ """
+
+@@ -47,7 +48,8 @@
+ def ParseOption():
+ """Parse command line options."""
+ parser = optparse.OptionParser()
+- parser.add_option('--protoc_path', dest='protoc_path', help='path to protoc')
++ parser.add_option('--protoc_command', dest='protoc_command', help='name of protoc')
++ parser.add_option('--protoc_dir', dest='protoc_dir', help='directory of protoc')
+ parser.add_option('--proto', dest='proto', help='path of the *.proto file')
+ parser.add_option('--cpp_out', dest='cpp_out', default='.',
+ help='path where cpp files should be generated')
+@@ -65,7 +67,9 @@
+
+ # Convert to absolute paths before changing the current directory.
+ project_root = os.path.abspath(opts.project_root)
+- protoc_path = os.path.abspath(opts.protoc_path)
++ protoc_path = opts.protoc_command
++ if opts.protoc_dir:
++ protoc_path = os.path.join(os.path.abspath(opts.protoc_dir), protoc_path)
+ cpp_out = os.path.abspath(opts.cpp_out)
+
+ # The path of proto file should be recalculated as a relative path from
+Index: protobuf/genproto.gypi
+===================================================================
+--- protobuf/genproto.gypi (revision 153)
++++ protobuf/genproto.gypi (working copy)
+@@ -31,21 +31,22 @@
+ {
+ 'variables': {
+ 'wrapper_path': '<(DEPTH)/build_tools/protoc_wrapper.py',
++ 'protoc_command': 'protoc<(EXECUTABLE_SUFFIX)',
+ },
+ 'conditions': [
+- ['target_platform!="linux"', {
++ ['target_platform!="Linux"', {
+ 'variables': {
+- 'protoc_command%': '<(mozc_build_tools_dir)/protoc<(EXECUTABLE_SUFFIX)',
++ 'protoc_wrapper_additional_options': ['--protoc_dir=<(mozc_build_tools_dir)'],
+ },
+ }, { # else
+ 'conditions': [
+ ['use_libprotobuf==0', {
+ 'variables': {
+- 'protoc_command%': '<(mozc_build_tools_dir)/protoc<(EXECUTABLE_SUFFIX)',
++ 'protoc_wrapper_additional_options': ['--protoc_dir=<(mozc_build_tools_dir)'],
+ },
+ }, { # else
+ 'variables': {
+- 'protoc_command%': 'protoc<(EXECUTABLE_SUFFIX)',
++ 'protoc_wrapper_additional_options': [],
+ },
+ }],
+ ],
+@@ -65,9 +66,10 @@
+ 'action': [
+ 'python', '<(wrapper_path)',
+ '--project_root=<(DEPTH)',
+- '--protoc_path=<(protoc_command)',
++ '--protoc_command=<(protoc_command)',
+ '--proto=<(RULE_INPUT_PATH)',
+ '--cpp_out=<(proto_out_dir)',
++ '<@(protoc_wrapper_additional_options)',
+ ],
+ 'message': 'Generating C++ code from <(RULE_INPUT_PATH)',
+ },
More information about the scm-commits
mailing list