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
|
$NetBSD: patch-gyp_common.gypi,v 1.5 2014/06/15 13:08:34 ryoon Exp $
--- gyp/common.gypi.orig 2014-05-21 10:51:27.000000000 +0000
+++ gyp/common.gypi
@@ -165,7 +165,7 @@
'compiler_host': 'gcc',
'compiler_host_version_int': 406, # GCC 4.6 or higher
}],
- ['target_platform=="Linux"', {
+ ['target_platform=="Linux" or target_platform=="NetBSD"', {
# enable_gtk_renderer represents if mozc_renderer is supported on Linux
# or not.
'compiler_target': 'gcc',
@@ -217,7 +217,7 @@
# server_dir represents the directory where mozc_server is
# installed. This option is only for Linux.
- 'server_dir%': '/usr/lib/mozc',
+ 'server_dir%': '@PREFIX@/libexec',
# Represents the directory where the source code of protobuf is
# extracted. This value is ignored when 'use_libprotobuf' is 1.
@@ -311,7 +311,7 @@
['channel_dev==1', {
'defines': ['CHANNEL_DEV'],
}],
- ['OS=="linux"', {
+ ['OS=="linux" or OS=="netbsd"', {
'ldflags': [
'<@(linux_ldflags)',
],
@@ -505,7 +505,7 @@
},
},
'conditions': [
- ['OS=="linux"', {
+ ['OS=="linux" or OS=="netbsd"', {
'cflags': [
'<@(debug_extra_cflags)',
],
@@ -552,7 +552,7 @@
},
},
'conditions': [
- ['OS=="linux"', {
+ ['OS=="linux" or OS=="netbsd"', {
'cflags': [
'<@(release_extra_cflags)',
],
@@ -808,6 +808,22 @@
}],
],
}],
+ ['OS=="netbsd"', {
+ 'defines': [
+ 'OS_NETBSD',
+ 'MOZC_SERVER_DIRECTORY="<@(server_dir)"',
+ ],
+ 'cflags': [
+ '<@(gcc_cflags)',
+ '-fPIC',
+ '-fno-exceptions',
+ ],
+ 'cflags_cc': [
+ # We use deprecated <hash_map> and <hash_set> instead of upcoming
+ # <unordered_map> and <unordered_set>.
+ '-Wno-deprecated',
+ ],
+ }],
['OS=="mac"', {
'defines': [
'OS_MACOSX',
|