bson 0.2.21 → 0.2.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/HISTORY CHANGED
@@ -1,3 +1,7 @@
1
+ 0.2.22 2015-07-23
2
+ -----------------
3
+ - Updated Nan to 1.8.x to support io.js and node 0.12.0
4
+
1
5
  0.2.21 2015-03-21
2
6
  -----------------
3
7
  - Updated Nan to 1.7.0 to support io.js and node 0.12.0
package/build/Makefile CHANGED
@@ -49,15 +49,7 @@ LDFLAGS.target ?= $(LDFLAGS)
49
49
  AR.target ?= $(AR)
50
50
 
51
51
  # C++ apps need to be linked with g++.
52
- #
53
- # Note: flock is used to seralize linking. Linking is a memory-intensive
54
- # process so running parallel links can often lead to thrashing. To disable
55
- # the serialization, override LINK via an envrionment variable as follows:
56
- #
57
- # export LINK=g++
58
- #
59
- # This will allow make to invoke N linker processes as specified in -jN.
60
- LINK ?= ./gyp-mac-tool flock $(builddir)/linker.lock $(CXX.target)
52
+ LINK ?= $(CXX.target)
61
53
 
62
54
  # TODO(evan): move all cross-compilation logic to gyp-time so we don't need
63
55
  # to replicate this environment fallback in make as well.
@@ -334,8 +326,8 @@ ifeq ($(strip $(foreach prefix,$(NO_LOAD),\
334
326
  endif
335
327
 
336
328
  quiet_cmd_regen_makefile = ACTION Regenerating $@
337
- cmd_regen_makefile = cd $(srcdir); /usr/local/lib/node_modules/pangyp/gyp/gyp_main.py -fmake --ignore-environment "--toplevel-dir=." -I/Users/christkv/coding/projects/js-bson/build/config.gypi -I/usr/local/lib/node_modules/pangyp/addon.gypi -I/Users/christkv/.node-gyp/1.6.1/common.gypi "--depth=." "-Goutput_dir=." "--generator-output=build" "-Dlibrary=shared_library" "-Dvisibility=default" "-Dnode_root_dir=/Users/christkv/.node-gyp/1.6.1" "-Druntime=iojs" "-Dmodule_root_dir=/Users/christkv/coding/projects/js-bson" binding.gyp
338
- Makefile: $(srcdir)/../../../.node-gyp/1.6.1/common.gypi $(srcdir)/build/config.gypi $(srcdir)/binding.gyp $(srcdir)/../../../../../usr/local/lib/node_modules/pangyp/addon.gypi
329
+ cmd_regen_makefile = cd $(srcdir); /usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py -fmake --ignore-environment "--toplevel-dir=." -I/Users/christkv/coding/projects/js-bson/build/config.gypi -I/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi -I/Users/christkv/.node-gyp/2.3.3/common.gypi "--depth=." "-Goutput_dir=." "--generator-output=build" "-Dlibrary=shared_library" "-Dvisibility=default" "-Dnode_root_dir=/Users/christkv/.node-gyp/2.3.3" "-Dmodule_root_dir=/Users/christkv/coding/projects/js-bson" binding.gyp
330
+ Makefile: $(srcdir)/../../../.node-gyp/2.3.3/common.gypi $(srcdir)/../../../../../usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi $(srcdir)/build/config.gypi $(srcdir)/binding.gyp
339
331
  $(call do_cmd,regen_makefile)
340
332
 
341
333
  # "all" is a concatenation of the "all" targets from all the included
@@ -1 +1 @@
1
- cmd_Release/bson.node := ./gyp-mac-tool flock ./Release/linker.lock c++ -bundle -Wl,-search_paths_first -mmacosx-version-min=10.5 -arch x86_64 -L./Release -o Release/bson.node Release/obj.target/bson/ext/bson.o -undefined dynamic_lookup
1
+ cmd_Release/bson.node := c++ -bundle -undefined dynamic_lookup -Wl,-search_paths_first -mmacosx-version-min=10.5 -arch x86_64 -L./Release -o Release/bson.node Release/obj.target/bson/ext/bson.o
@@ -1,36 +1,38 @@
1
- cmd_Release/obj.target/bson/ext/bson.o := c++ '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/christkv/.node-gyp/1.6.1/src -I/Users/christkv/.node-gyp/1.6.1/deps/uv/include -I/Users/christkv/.node-gyp/1.6.1/deps/v8/include -I../node_modules/nan -Os -gdwarf-2 -mmacosx-version-min=10.5 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=gnu++0x -fno-rtti -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/bson/ext/bson.o.d.raw -c -o Release/obj.target/bson/ext/bson.o ../ext/bson.cc
1
+ cmd_Release/obj.target/bson/ext/bson.o := c++ '-DNODE_GYP_MODULE_NAME=bson' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/christkv/.node-gyp/2.3.3/src -I/Users/christkv/.node-gyp/2.3.3/deps/uv/include -I/Users/christkv/.node-gyp/2.3.3/deps/v8/include -I../node_modules/nan -Os -gdwarf-2 -mmacosx-version-min=10.5 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=gnu++0x -fno-rtti -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/bson/ext/bson.o.d.raw -c -o Release/obj.target/bson/ext/bson.o ../ext/bson.cc
2
2
  Release/obj.target/bson/ext/bson.o: ../ext/bson.cc \
3
- /Users/christkv/.node-gyp/1.6.1/deps/v8/include/v8.h \
4
- /Users/christkv/.node-gyp/1.6.1/deps/v8/include/v8config.h \
5
- /Users/christkv/.node-gyp/1.6.1/src/node.h \
6
- /Users/christkv/.node-gyp/1.6.1/src/node_version.h \
7
- /Users/christkv/.node-gyp/1.6.1/src/node_buffer.h \
8
- /Users/christkv/.node-gyp/1.6.1/src/smalloc.h ../ext/bson.h \
9
- /Users/christkv/.node-gyp/1.6.1/src/node_object_wrap.h \
3
+ /Users/christkv/.node-gyp/2.3.3/deps/v8/include/v8.h \
4
+ /Users/christkv/.node-gyp/2.3.3/deps/v8/include/v8-version.h \
5
+ /Users/christkv/.node-gyp/2.3.3/deps/v8/include/v8config.h \
6
+ /Users/christkv/.node-gyp/2.3.3/src/node.h \
7
+ /Users/christkv/.node-gyp/2.3.3/src/node_version.h \
8
+ /Users/christkv/.node-gyp/2.3.3/src/node_buffer.h \
9
+ /Users/christkv/.node-gyp/2.3.3/src/smalloc.h ../ext/bson.h \
10
+ /Users/christkv/.node-gyp/2.3.3/src/node_object_wrap.h \
10
11
  ../node_modules/nan/nan.h \
11
- /Users/christkv/.node-gyp/1.6.1/deps/uv/include/uv.h \
12
- /Users/christkv/.node-gyp/1.6.1/deps/uv/include/uv-errno.h \
13
- /Users/christkv/.node-gyp/1.6.1/deps/uv/include/uv-version.h \
14
- /Users/christkv/.node-gyp/1.6.1/deps/uv/include/uv-unix.h \
15
- /Users/christkv/.node-gyp/1.6.1/deps/uv/include/uv-threadpool.h \
16
- /Users/christkv/.node-gyp/1.6.1/deps/uv/include/uv-darwin.h \
12
+ /Users/christkv/.node-gyp/2.3.3/deps/uv/include/uv.h \
13
+ /Users/christkv/.node-gyp/2.3.3/deps/uv/include/uv-errno.h \
14
+ /Users/christkv/.node-gyp/2.3.3/deps/uv/include/uv-version.h \
15
+ /Users/christkv/.node-gyp/2.3.3/deps/uv/include/uv-unix.h \
16
+ /Users/christkv/.node-gyp/2.3.3/deps/uv/include/uv-threadpool.h \
17
+ /Users/christkv/.node-gyp/2.3.3/deps/uv/include/uv-darwin.h \
17
18
  ../node_modules/nan/nan_new.h \
18
19
  ../node_modules/nan/nan_implementation_12_inl.h
19
20
  ../ext/bson.cc:
20
- /Users/christkv/.node-gyp/1.6.1/deps/v8/include/v8.h:
21
- /Users/christkv/.node-gyp/1.6.1/deps/v8/include/v8config.h:
22
- /Users/christkv/.node-gyp/1.6.1/src/node.h:
23
- /Users/christkv/.node-gyp/1.6.1/src/node_version.h:
24
- /Users/christkv/.node-gyp/1.6.1/src/node_buffer.h:
25
- /Users/christkv/.node-gyp/1.6.1/src/smalloc.h:
21
+ /Users/christkv/.node-gyp/2.3.3/deps/v8/include/v8.h:
22
+ /Users/christkv/.node-gyp/2.3.3/deps/v8/include/v8-version.h:
23
+ /Users/christkv/.node-gyp/2.3.3/deps/v8/include/v8config.h:
24
+ /Users/christkv/.node-gyp/2.3.3/src/node.h:
25
+ /Users/christkv/.node-gyp/2.3.3/src/node_version.h:
26
+ /Users/christkv/.node-gyp/2.3.3/src/node_buffer.h:
27
+ /Users/christkv/.node-gyp/2.3.3/src/smalloc.h:
26
28
  ../ext/bson.h:
27
- /Users/christkv/.node-gyp/1.6.1/src/node_object_wrap.h:
29
+ /Users/christkv/.node-gyp/2.3.3/src/node_object_wrap.h:
28
30
  ../node_modules/nan/nan.h:
29
- /Users/christkv/.node-gyp/1.6.1/deps/uv/include/uv.h:
30
- /Users/christkv/.node-gyp/1.6.1/deps/uv/include/uv-errno.h:
31
- /Users/christkv/.node-gyp/1.6.1/deps/uv/include/uv-version.h:
32
- /Users/christkv/.node-gyp/1.6.1/deps/uv/include/uv-unix.h:
33
- /Users/christkv/.node-gyp/1.6.1/deps/uv/include/uv-threadpool.h:
34
- /Users/christkv/.node-gyp/1.6.1/deps/uv/include/uv-darwin.h:
31
+ /Users/christkv/.node-gyp/2.3.3/deps/uv/include/uv.h:
32
+ /Users/christkv/.node-gyp/2.3.3/deps/uv/include/uv-errno.h:
33
+ /Users/christkv/.node-gyp/2.3.3/deps/uv/include/uv-version.h:
34
+ /Users/christkv/.node-gyp/2.3.3/deps/uv/include/uv-unix.h:
35
+ /Users/christkv/.node-gyp/2.3.3/deps/uv/include/uv-threadpool.h:
36
+ /Users/christkv/.node-gyp/2.3.3/deps/uv/include/uv-darwin.h:
35
37
  ../node_modules/nan/nan_new.h:
36
38
  ../node_modules/nan/nan_implementation_12_inl.h:
Binary file
@@ -3,6 +3,7 @@
3
3
  TOOLSET := target
4
4
  TARGET := bson
5
5
  DEFS_Debug := \
6
+ '-DNODE_GYP_MODULE_NAME=bson' \
6
7
  '-D_DARWIN_USE_64_BIT_INODE=1' \
7
8
  '-D_LARGEFILE_SOURCE' \
8
9
  '-D_FILE_OFFSET_BITS=64' \
@@ -39,12 +40,13 @@ CFLAGS_OBJC_Debug :=
39
40
  CFLAGS_OBJCC_Debug :=
40
41
 
41
42
  INCS_Debug := \
42
- -I/Users/christkv/.node-gyp/1.6.1/src \
43
- -I/Users/christkv/.node-gyp/1.6.1/deps/uv/include \
44
- -I/Users/christkv/.node-gyp/1.6.1/deps/v8/include \
43
+ -I/Users/christkv/.node-gyp/2.3.3/src \
44
+ -I/Users/christkv/.node-gyp/2.3.3/deps/uv/include \
45
+ -I/Users/christkv/.node-gyp/2.3.3/deps/v8/include \
45
46
  -I$(srcdir)/node_modules/nan
46
47
 
47
48
  DEFS_Release := \
49
+ '-DNODE_GYP_MODULE_NAME=bson' \
48
50
  '-D_DARWIN_USE_64_BIT_INODE=1' \
49
51
  '-D_LARGEFILE_SOURCE' \
50
52
  '-D_FILE_OFFSET_BITS=64' \
@@ -79,9 +81,9 @@ CFLAGS_OBJC_Release :=
79
81
  CFLAGS_OBJCC_Release :=
80
82
 
81
83
  INCS_Release := \
82
- -I/Users/christkv/.node-gyp/1.6.1/src \
83
- -I/Users/christkv/.node-gyp/1.6.1/deps/uv/include \
84
- -I/Users/christkv/.node-gyp/1.6.1/deps/v8/include \
84
+ -I/Users/christkv/.node-gyp/2.3.3/src \
85
+ -I/Users/christkv/.node-gyp/2.3.3/deps/uv/include \
86
+ -I/Users/christkv/.node-gyp/2.3.3/deps/v8/include \
85
87
  -I$(srcdir)/node_modules/nan
86
88
 
87
89
  OBJS := \
@@ -114,25 +116,28 @@ $(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.cc FORCE_DO_CMD
114
116
  # End of this set of suffix rules
115
117
  ### Rules for final target.
116
118
  LDFLAGS_Debug := \
119
+ -undefined dynamic_lookup \
117
120
  -Wl,-search_paths_first \
118
121
  -mmacosx-version-min=10.5 \
119
122
  -arch x86_64 \
120
123
  -L$(builddir)
121
124
 
122
125
  LIBTOOLFLAGS_Debug := \
126
+ -undefined dynamic_lookup \
123
127
  -Wl,-search_paths_first
124
128
 
125
129
  LDFLAGS_Release := \
130
+ -undefined dynamic_lookup \
126
131
  -Wl,-search_paths_first \
127
132
  -mmacosx-version-min=10.5 \
128
133
  -arch x86_64 \
129
134
  -L$(builddir)
130
135
 
131
136
  LIBTOOLFLAGS_Release := \
137
+ -undefined dynamic_lookup \
132
138
  -Wl,-search_paths_first
133
139
 
134
- LIBS := \
135
- -undefined dynamic_lookup
140
+ LIBS :=
136
141
 
137
142
  $(builddir)/bson.node: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))
138
143
  $(builddir)/bson.node: LIBS := $(LIBS)
package/build/config.gypi CHANGED
@@ -1,4 +1,4 @@
1
- # Do not edit. File was generated by pangyp's "configure" step
1
+ # Do not edit. File was generated by node-gyp's "configure" step
2
2
  {
3
3
  "target_defaults": {
4
4
  "cflags": [],
@@ -10,12 +10,12 @@
10
10
  "variables": {
11
11
  "host_arch": "x64",
12
12
  "icu_small": "false",
13
+ "llvm_version": "3.5",
13
14
  "node_install_npm": "true",
14
15
  "node_prefix": "/",
15
16
  "node_shared_http_parser": "false",
16
17
  "node_shared_libuv": "false",
17
18
  "node_shared_openssl": "false",
18
- "node_shared_v8": "false",
19
19
  "node_shared_zlib": "false",
20
20
  "node_tag": "",
21
21
  "node_use_dtrace": "true",
@@ -23,10 +23,10 @@
23
23
  "node_use_lttng": "false",
24
24
  "node_use_openssl": "true",
25
25
  "node_use_perfctr": "false",
26
+ "openssl_fips": "",
26
27
  "openssl_no_asm": 0,
27
28
  "python": "/usr/bin/python",
28
29
  "target_arch": "x64",
29
- "uv_library": "static_library",
30
30
  "uv_parent_path": "/deps/uv/",
31
31
  "uv_use_dtrace": "true",
32
32
  "v8_enable_gdbjit": 0,
@@ -34,10 +34,96 @@
34
34
  "v8_no_strict_aliasing": 1,
35
35
  "v8_optimized_debug": 0,
36
36
  "v8_random_seed": 0,
37
- "v8_use_snapshot": "false",
37
+ "v8_use_snapshot": 1,
38
38
  "want_separate_host_toolset": 0,
39
- "nodedir": "/Users/christkv/.node-gyp/1.6.1",
39
+ "nodedir": "/Users/christkv/.node-gyp/2.3.3",
40
40
  "copy_dev_lib": "true",
41
- "standalone_static_library": 1
41
+ "standalone_static_library": 1,
42
+ "save_dev": "",
43
+ "browser": "",
44
+ "viewer": "man",
45
+ "rollback": "true",
46
+ "usage": "",
47
+ "globalignorefile": "/usr/local/etc/npmignore",
48
+ "init_author_url": "",
49
+ "shell": "/bin/bash",
50
+ "parseable": "",
51
+ "shrinkwrap": "true",
52
+ "email": "christkv@gmail.com",
53
+ "init_license": "ISC",
54
+ "if_present": "",
55
+ "cache_max": "Infinity",
56
+ "init_author_email": "",
57
+ "sign_git_tag": "",
58
+ "cert": "",
59
+ "git_tag_version": "true",
60
+ "local_address": "",
61
+ "long": "",
62
+ "fetch_retries": "2",
63
+ "npat": "",
64
+ "registry": "https://registry.npmjs.org/",
65
+ "key": "",
66
+ "message": "%s",
67
+ "versions": "",
68
+ "globalconfig": "/usr/local/etc/npmrc",
69
+ "always_auth": "",
70
+ "spin": "true",
71
+ "cache_lock_retries": "10",
72
+ "cafile": "",
73
+ "heading": "npm",
74
+ "fetch_retry_mintimeout": "10000",
75
+ "proprietary_attribs": "true",
76
+ "access": "",
77
+ "json": "",
78
+ "description": "true",
79
+ "engine_strict": "",
80
+ "https_proxy": "",
81
+ "init_module": "/Users/christkv/.npm-init.js",
82
+ "userconfig": "/Users/christkv/.npmrc",
83
+ "node_version": "2.3.3",
84
+ "user": "",
85
+ "editor": "vi",
86
+ "save": "",
87
+ "tag": "latest",
88
+ "global": "",
89
+ "optional": "true",
90
+ "bin_links": "true",
91
+ "force": "",
92
+ "searchopts": "",
93
+ "depth": "Infinity",
94
+ "rebuild_bundle": "true",
95
+ "searchsort": "name",
96
+ "unicode": "true",
97
+ "fetch_retry_maxtimeout": "60000",
98
+ "ca": "",
99
+ "save_prefix": "^",
100
+ "strict_ssl": "true",
101
+ "tag_version_prefix": "v",
102
+ "dev": "",
103
+ "fetch_retry_factor": "10",
104
+ "group": "20",
105
+ "save_exact": "",
106
+ "cache_lock_stale": "60000",
107
+ "version": "",
108
+ "cache_min": "10",
109
+ "cache": "/Users/christkv/.npm",
110
+ "searchexclude": "",
111
+ "color": "true",
112
+ "save_optional": "",
113
+ "user_agent": "npm/2.11.3 node/v2.3.3 darwin x64",
114
+ "ignore_scripts": "",
115
+ "cache_lock_wait": "10000",
116
+ "production": "",
117
+ "save_bundle": "",
118
+ "init_version": "1.0.0",
119
+ "umask": "0022",
120
+ "git": "git",
121
+ "init_author_name": "",
122
+ "scope": "",
123
+ "onload_script": "",
124
+ "tmp": "/var/folders/f8/t_ptm_915cnfkwz8j4phfgw00000gp/T",
125
+ "unsafe_perm": "true",
126
+ "link": "",
127
+ "prefix": "/usr/local"
42
128
  }
43
129
  }
@@ -46,7 +46,7 @@ class MacTool(object):
46
46
  """Transforms a tool name like copy-info-plist to CopyInfoPlist"""
47
47
  return name_string.title().replace('-', '')
48
48
 
49
- def ExecCopyBundleResource(self, source, dest):
49
+ def ExecCopyBundleResource(self, source, dest, convert_to_binary):
50
50
  """Copies a resource file to the bundle/Resources directory, performing any
51
51
  necessary compilation on each resource."""
52
52
  extension = os.path.splitext(source)[1].lower()
@@ -63,7 +63,7 @@ class MacTool(object):
63
63
  elif extension == '.storyboard':
64
64
  return self._CopyXIBFile(source, dest)
65
65
  elif extension == '.strings':
66
- self._CopyStringsFile(source, dest)
66
+ self._CopyStringsFile(source, dest, convert_to_binary)
67
67
  else:
68
68
  shutil.copy(source, dest)
69
69
 
@@ -93,7 +93,11 @@ class MacTool(object):
93
93
  sys.stdout.write(line)
94
94
  return ibtoolout.returncode
95
95
 
96
- def _CopyStringsFile(self, source, dest):
96
+ def _ConvertToBinary(self, dest):
97
+ subprocess.check_call([
98
+ 'xcrun', 'plutil', '-convert', 'binary1', '-o', dest, dest])
99
+
100
+ def _CopyStringsFile(self, source, dest, convert_to_binary):
97
101
  """Copies a .strings file using iconv to reconvert the input into UTF-16."""
98
102
  input_code = self._DetectInputEncoding(source) or "UTF-8"
99
103
 
@@ -113,6 +117,9 @@ class MacTool(object):
113
117
  fp.write(s.decode(input_code).encode('UTF-16'))
114
118
  fp.close()
115
119
 
120
+ if convert_to_binary == 'True':
121
+ self._ConvertToBinary(dest)
122
+
116
123
  def _DetectInputEncoding(self, file_name):
117
124
  """Reads the first few bytes from file_name and tries to guess the text
118
125
  encoding. Returns None as a guess if it can't detect it."""
@@ -132,7 +139,7 @@ class MacTool(object):
132
139
  else:
133
140
  return None
134
141
 
135
- def ExecCopyInfoPlist(self, source, dest, *keys):
142
+ def ExecCopyInfoPlist(self, source, dest, convert_to_binary, *keys):
136
143
  """Copies the |source| Info.plist to the destination directory |dest|."""
137
144
  # Read the source Info.plist into memory.
138
145
  fd = open(source, 'r')
@@ -147,7 +154,7 @@ class MacTool(object):
147
154
 
148
155
  # Go through all the environment variables and replace them as variables in
149
156
  # the file.
150
- IDENT_RE = re.compile('[/\s]')
157
+ IDENT_RE = re.compile(r'[/\s]')
151
158
  for key in os.environ:
152
159
  if key.startswith('_'):
153
160
  continue
@@ -186,6 +193,9 @@ class MacTool(object):
186
193
  # "compiled".
187
194
  self._WritePkgInfo(dest)
188
195
 
196
+ if convert_to_binary == 'True':
197
+ self._ConvertToBinary(dest)
198
+
189
199
  def _WritePkgInfo(self, info_plist):
190
200
  """This writes the PkgInfo file from the data stored in Info.plist."""
191
201
  plist = plistlib.readPlist(info_plist)
@@ -220,11 +230,28 @@ class MacTool(object):
220
230
  """Calls libtool and filters out '/path/to/libtool: file: foo.o has no
221
231
  symbols'."""
222
232
  libtool_re = re.compile(r'^.*libtool: file: .* has no symbols$')
223
- libtoolout = subprocess.Popen(cmd_list, stderr=subprocess.PIPE)
233
+ libtool_re5 = re.compile(
234
+ r'^.*libtool: warning for library: ' +
235
+ r'.* the table of contents is empty ' +
236
+ r'\(no object file members in the library define global symbols\)$')
237
+ env = os.environ.copy()
238
+ # Ref:
239
+ # http://www.opensource.apple.com/source/cctools/cctools-809/misc/libtool.c
240
+ # The problem with this flag is that it resets the file mtime on the file to
241
+ # epoch=0, e.g. 1970-1-1 or 1969-12-31 depending on timezone.
242
+ env['ZERO_AR_DATE'] = '1'
243
+ libtoolout = subprocess.Popen(cmd_list, stderr=subprocess.PIPE, env=env)
224
244
  _, err = libtoolout.communicate()
225
245
  for line in err.splitlines():
226
- if not libtool_re.match(line):
246
+ if not libtool_re.match(line) and not libtool_re5.match(line):
227
247
  print >>sys.stderr, line
248
+ # Unconditionally touch the output .a file on the command line if present
249
+ # and the command succeeded. A bit hacky.
250
+ if not libtoolout.returncode:
251
+ for i in range(len(cmd_list) - 1):
252
+ if cmd_list[i] == "-o" and cmd_list[i+1].endswith('.a'):
253
+ os.utime(cmd_list[i+1], None)
254
+ break
228
255
  return libtoolout.returncode
229
256
 
230
257
  def ExecPackageFramework(self, framework, version):
@@ -263,6 +290,66 @@ class MacTool(object):
263
290
  os.remove(link)
264
291
  os.symlink(dest, link)
265
292
 
293
+ def ExecCompileXcassets(self, keys, *inputs):
294
+ """Compiles multiple .xcassets files into a single .car file.
295
+
296
+ This invokes 'actool' to compile all the inputs .xcassets files. The
297
+ |keys| arguments is a json-encoded dictionary of extra arguments to
298
+ pass to 'actool' when the asset catalogs contains an application icon
299
+ or a launch image.
300
+
301
+ Note that 'actool' does not create the Assets.car file if the asset
302
+ catalogs does not contains imageset.
303
+ """
304
+ command_line = [
305
+ 'xcrun', 'actool', '--output-format', 'human-readable-text',
306
+ '--compress-pngs', '--notices', '--warnings', '--errors',
307
+ ]
308
+ is_iphone_target = 'IPHONEOS_DEPLOYMENT_TARGET' in os.environ
309
+ if is_iphone_target:
310
+ platform = os.environ['CONFIGURATION'].split('-')[-1]
311
+ if platform not in ('iphoneos', 'iphonesimulator'):
312
+ platform = 'iphonesimulator'
313
+ command_line.extend([
314
+ '--platform', platform, '--target-device', 'iphone',
315
+ '--target-device', 'ipad', '--minimum-deployment-target',
316
+ os.environ['IPHONEOS_DEPLOYMENT_TARGET'], '--compile',
317
+ os.path.abspath(os.environ['CONTENTS_FOLDER_PATH']),
318
+ ])
319
+ else:
320
+ command_line.extend([
321
+ '--platform', 'macosx', '--target-device', 'mac',
322
+ '--minimum-deployment-target', os.environ['MACOSX_DEPLOYMENT_TARGET'],
323
+ '--compile',
324
+ os.path.abspath(os.environ['UNLOCALIZED_RESOURCES_FOLDER_PATH']),
325
+ ])
326
+ if keys:
327
+ keys = json.loads(keys)
328
+ for key, value in keys.iteritems():
329
+ arg_name = '--' + key
330
+ if isinstance(value, bool):
331
+ if value:
332
+ command_line.append(arg_name)
333
+ elif isinstance(value, list):
334
+ for v in value:
335
+ command_line.append(arg_name)
336
+ command_line.append(str(v))
337
+ else:
338
+ command_line.append(arg_name)
339
+ command_line.append(str(value))
340
+ # Note: actool crashes if inputs path are relative, so use os.path.abspath
341
+ # to get absolute path name for inputs.
342
+ command_line.extend(map(os.path.abspath, inputs))
343
+ subprocess.check_call(command_line)
344
+
345
+ def ExecMergeInfoPlist(self, output, *inputs):
346
+ """Merge multiple .plist files into a single .plist file."""
347
+ merged_plist = {}
348
+ for path in inputs:
349
+ plist = self._LoadPlistMaybeBinary(path)
350
+ self._MergePlist(merged_plist, plist)
351
+ plistlib.writePlist(merged_plist, output)
352
+
266
353
  def ExecCodeSignBundle(self, key, resource_rules, entitlements, provisioning):
267
354
  """Code sign a bundle.
268
355
 
@@ -399,6 +486,19 @@ class MacTool(object):
399
486
  'security', 'cms', '-D', '-i', profile_path, '-o', temp.name])
400
487
  return self._LoadPlistMaybeBinary(temp.name)
401
488
 
489
+ def _MergePlist(self, merged_plist, plist):
490
+ """Merge |plist| into |merged_plist|."""
491
+ for key, value in plist.iteritems():
492
+ if isinstance(value, dict):
493
+ merged_value = merged_plist.get(key, {})
494
+ if isinstance(merged_value, dict):
495
+ self._MergePlist(merged_value, value)
496
+ merged_plist[key] = merged_value
497
+ else:
498
+ merged_plist[key] = value
499
+ else:
500
+ merged_plist[key] = value
501
+
402
502
  def _LoadPlistMaybeBinary(self, plist_path):
403
503
  """Loads into a memory a plist possibly encoded in binary format.
404
504
 
package/builderror.log CHANGED
@@ -1,4 +1,28 @@
1
- xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
2
-
3
- xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
4
-
1
+ ../ext/bson.cc:825:17: warning: 'DecodeBytes' is deprecated: Use DecodeBytes(isolate, ...) [-Wdeprecated-declarations]
2
+ ssize_t len = DecodeBytes(args[0], BINARY);
3
+ ^
4
+ /Users/christkv/.node-gyp/2.3.3/src/node.h:318:32: note: 'DecodeBytes' has been explicitly marked deprecated here
5
+ inline ssize_t DecodeBytes(
6
+ ^
7
+ /Users/christkv/.node-gyp/2.3.3/src/node.h:66:42: note: expanded from macro 'NODE_DEPRECATED'
8
+ __attribute__((deprecated(message))) declarator
9
+ ^
10
+ ../ext/bson.cc:833:3: warning: 'DecodeWrite' is deprecated: Use DecodeWrite(isolate, ...) [-Wdeprecated-declarations]
11
+ DecodeWrite(data, len, args[0], BINARY);
12
+ ^
13
+ /Users/christkv/.node-gyp/2.3.3/src/node.h:331:32: note: 'DecodeWrite' has been explicitly marked deprecated here
14
+ inline ssize_t DecodeWrite(char* buf,
15
+ ^
16
+ /Users/christkv/.node-gyp/2.3.3/src/node.h:66:42: note: expanded from macro 'NODE_DEPRECATED'
17
+ __attribute__((deprecated(message))) declarator
18
+ ^
19
+ ../ext/bson.cc:928:28: warning: 'Encode' is deprecated: Use Encode(isolate, ...) [-Wdeprecated-declarations]
20
+ Local<Value> bin_value = Encode(serialized_object, object_size, BINARY)->ToString();
21
+ ^
22
+ /Users/christkv/.node-gyp/2.3.3/src/node.h:299:45: note: 'Encode' has been explicitly marked deprecated here
23
+ inline v8::Local<v8::Value> Encode(
24
+ ^
25
+ /Users/christkv/.node-gyp/2.3.3/src/node.h:66:42: note: expanded from macro 'NODE_DEPRECATED'
26
+ __attribute__((deprecated(message))) declarator
27
+ ^
28
+ 3 warnings generated.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  { "name" : "bson"
2
2
  , "description" : "A bson parser for node.js and the browser"
3
3
  , "keywords" : ["mongodb", "bson", "parser"]
4
- , "version" : "0.2.21"
4
+ , "version" : "0.2.22"
5
5
  , "author" : "Christian Amor Kvalheim <christkv@gmail.com>"
6
6
  , "contributors" : []
7
7
 
@@ -10,7 +10,7 @@
10
10
  , "bugs" : { "mail" : "node-mongodb-native@googlegroups.com"
11
11
  , "url" : "https://github.com/mongodb/js-bson/issues" }
12
12
  , "dependencies": {
13
- "nan": "1.7.0"
13
+ "nan": "~1.8"
14
14
  }
15
15
  , "devDependencies": {
16
16
  "nodeunit": "0.9.0"
File without changes