mdbxmou 0.1.33 → 0.1.34

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.
Files changed (2) hide show
  1. package/build.js +12 -0
  2. package/package.json +1 -1
package/build.js CHANGED
@@ -1,3 +1,4 @@
1
+
1
2
  var spawnSync = require('child_process').spawnSync;
2
3
  var fs = require('fs');
3
4
 
@@ -26,4 +27,15 @@ if (!fs.existsSync(versionFile)) {
26
27
  console.log('VERSION.json created successfully!');
27
28
  }
28
29
 
30
+ // Patch CMakeLists.txt line 56: if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git" -> if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git"
31
+ const cmakeFile = 'deps/libmdbx/CMakeLists.txt';
32
+ if (fs.existsSync(cmakeFile)) {
33
+ let cmakeContent = fs.readFileSync(cmakeFile, 'utf8').split('\n');
34
+ if (cmakeContent[55] && cmakeContent[55].trim().startsWith('if(EXISTS')) {
35
+ cmakeContent[55] = cmakeContent[55].replace('if(EXISTS', 'if(NOT EXISTS');
36
+ fs.writeFileSync(cmakeFile, cmakeContent.join('\n'));
37
+ console.log('Patched CMakeLists.txt line 56: if(NOT EXISTS ...');
38
+ }
39
+ }
40
+
29
41
  exec("npx cmake-js rebuild --config Release --CDMDBX_TXN_CHECKOWNER=OFF --CDMDBX_BUILD_CXX=ON --CDMDBX_ENABLE_TESTS=OFF --CDMDBX_BUILD_SHARED_LIBRARY=OFF --CDMDBX_BUILD_TOOLS=OFF --CDMDBX_INSTALL_STATIC=ON");
package/package.json CHANGED
@@ -26,7 +26,7 @@
26
26
  },
27
27
  "gypfile": true,
28
28
  "name": "mdbxmou",
29
- "version": "0.1.33",
29
+ "version": "0.1.34",
30
30
  "description": "Node bindings for mdbx",
31
31
  "repository": {
32
32
  "type": "git",