summaryrefslogtreecommitdiff
path: root/japanese/mozc-server/files/patch-src-gyp_common.gypi
blob: d639e0e1b1f12636b294f5357d9e4325b6101b70 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
--- src/gyp/common.gypi.orig	2015-06-07 16:16:23.000000000 +0900
+++ src/gyp/common.gypi	2015-07-13 04:02:55.631402000 +0900
@@ -161,9 +161,9 @@
       ['target_platform=="Linux"', {
         # enable_gtk_renderer represents if mozc_renderer is supported on Linux
         # or not.
-        'compiler_target': 'clang',
+        'compiler_target': '<(compiler_target)',
         'compiler_target_version_int': 304,  # Clang 3.4 or higher
-        'compiler_host': 'clang',
+        'compiler_host': '<(compiler_host)',
         'compiler_host_version_int': 304,  # Clang 3.4 or higher
         'enable_gtk_renderer%': 1,
       }, {  # else
@@ -208,6 +208,14 @@
     # installed. This option is only for Linux.
     'server_dir%': '/usr/lib/mozc',
 
+    # renderer_dir represents the directory where mozc_renderer is
+    # installed. This option is only for Linux.
+    'renderer_dir%': '/usr/lib/mozc',
+
+    # tool_dir represents the directory where mozc_tool is
+    # installed. This option is only for Linux.
+    'tool_dir%': '/usr/lib/mozc',
+
     # Represents the directory where the source code of protobuf is
     # extracted. This value is ignored when 'use_libprotobuf' is 1.
     'protobuf_root': '<(third_party_dir)/protobuf',
@@ -641,17 +649,20 @@
           ['compiler_target=="clang"', {
             'cflags': [
               '-Wtype-limits',
+	      '<@(cflags)',
             ],
             'cflags_cc': [
               '-Wno-covered-switch-default',
               '-Wno-unnamed-type-template-args',
               '-Wno-c++11-narrowing',
-              '-std=gnu++0x',
+              '-std=c++11',
+	      '<@(cflags_cc)',
             ],
           }],
-          ['compiler_target=="clang" or compiler_target=="gcc"', {
+          ['compiler_host=="gcc"', {
             'cflags_cc': [
-              '-std=gnu++0x',
+              '-std=gnu++11',
+	      '<@(cflags_cc)',
             ],
           }],
         ],
@@ -661,17 +672,20 @@
           ['compiler_host=="clang"', {
             'cflags': [
               '-Wtype-limits',
+	      '<@(cflags)',
             ],
             'cflags_cc': [
               '-Wno-covered-switch-default',
               '-Wno-unnamed-type-template-args',
               '-Wno-c++11-narrowing',
-              '-std=gnu++0x',
+              '-std=c++11',
+	      '<@(cflags_cc)',
             ],
           }],
-          ['compiler_host=="clang" or compiler_host=="gcc"', {
+          ['compiler_host=="gcc"', {
             'cflags_cc': [
-              '-std=gnu++0x',
+              '-std=gnu++11',
+	      '<@(cflags_cc)',
             ],
           }],
         ],
@@ -764,16 +778,27 @@
       ['OS=="linux"', {
         'defines': [
           'OS_LINUX',
+          'OS_FREEBSD',
+          'LOCALBASE="<@(localbase)"',
         ],
         'cflags': [
           '<@(warning_cflags)',
           '-fPIC',
           '-fno-exceptions',
+	  '<@(cflags)',
         ],
         'cflags_cc': [
           # We use deprecated <hash_map> and <hash_set> instead of upcoming
           # <unordered_map> and <unordered_set>.
           '-Wno-deprecated',
+	  '<@(cflags_cc)',
+        ],
+        'include_dirs': [
+          '<@(include_dirs)'
+        ],
+        'ldflags': [
+          '<@(ldflags)',
+	  '-fstack-protector',
         ],
         'conditions': [
           ['target_platform!="NaCl"', {