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.7 2015/07/31 13:07:05 ryoon Exp $
--- gyp/common.gypi.orig 2015-06-07 07:16:23.000000000 +0000
+++ gyp/common.gypi
@@ -158,7 +158,7 @@
'compiler_host': 'clang',
'compiler_host_version_int': 304, # Clang 3.4 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': 'clang',
@@ -206,7 +206,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.
@@ -300,7 +300,7 @@
['channel_dev==1', {
'defines': ['CHANNEL_DEV'],
}],
- ['OS=="linux"', {
+ ['OS=="linux" or OS=="netbsd"', {
'ldflags': [
'<@(linux_ldflags)',
],
@@ -523,7 +523,7 @@
},
},
'conditions': [
- ['OS=="linux"', {
+ ['OS=="linux" or OS=="netbsd"', {
'cflags': [
'<@(debug_extra_cflags)',
],
@@ -589,7 +589,7 @@
},
},
'conditions': [
- ['OS=="linux"', {
+ ['OS=="linux" or OS=="netbsd"', {
'cflags': [
'<@(release_extra_cflags)',
],
@@ -814,6 +814,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',
|