summaryrefslogtreecommitdiff
path: root/japanese/mozc-server/files/patch-src-gyp_common.gypi
blob: 64edadcbeffeedb3e1afec7c3ea2644d5b93914e (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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
--- src/gyp/common.gypi.orig	2016-03-13 11:22:55.000000000 +0900
+++ src/gyp/common.gypi	2016-05-11 00:09:18.009062000 +0900
@@ -109,7 +109,7 @@
     ],
     # Libraries for GNU/Linux environment.
     'linux_ldflags': [
-      '-pthread',
+      '-lpthread',
     ],
 
     # Extra defines
@@ -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',
@@ -415,7 +423,7 @@
           },
         },
         'conditions': [
-          ['OS=="linux"', {
+          ['OS=="linux" or OS=="freebsd"', {
             'cflags': [
               '<@(debug_extra_cflags)',
             ],
@@ -481,7 +489,7 @@
           },
         },
         'conditions': [
-          ['OS=="linux"', {
+          ['OS=="linux" or OS=="freebsd"', {
             'cflags': [
               '<@(release_extra_cflags)',
             ],
@@ -533,17 +541,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)',
             ],
           }],
         ],
@@ -553,17 +564,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)',
             ],
           }],
         ],
@@ -578,7 +592,7 @@
       ['channel_dev==1', {
         'defines': ['CHANNEL_DEV'],
       }],
-      ['OS=="linux"', {
+      ['OS=="linux" or OS=="freebsd"', {
         'ldflags': [
           '<@(linux_ldflags)',
         ],
@@ -694,21 +708,34 @@
           },
         },
       }],
-      ['OS=="linux"', {
+      ['OS=="linux" or OS=="freebsd"', {
         '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=="Linux"', {
             # OS_LINUX is defined always (target and host).
-            'defines': ['OS_LINUX',],
+            'defines': [
+		'OS_LINUX',
+		'OS_FREEBSD',
+		'LOCALBASE="<@(localbase)"',
+		],
           }],
           ['target_platform=="Android"', {
             'defines': ['NO_USAGE_REWRITER'],