Skip to content

Commit

Permalink
Merge pull request #289 from DavidVujic/use_zookeeper_3_6_3
Browse files Browse the repository at this point in the history
feat: Use ZooKeper client v3.6.3
  • Loading branch information
DavidVujic authored Dec 29, 2021
2 parents 78d7ee0 + 7729f93 commit 9a58819
Show file tree
Hide file tree
Showing 9 changed files with 167 additions and 109 deletions.
190 changes: 113 additions & 77 deletions binding.gyp
Original file line number Diff line number Diff line change
@@ -1,82 +1,118 @@
{
'variables': {
'platform': '<(OS)',
"variables": {
"platform": "<(OS)"
},
"targets": [
{
"target_name": "zookeeper",
"dependencies": [
"libzk"
],
"sources": [
"src/node-zk.cpp"
],
"cflags": [
"-w",
"-O0"
],
"conditions": [
[
"OS==\"mac\"",
{
"include_dirs": [
"<(module_root_dir)/deps/zookeeper-client-c/include",
"<(module_root_dir)/deps/zookeeper-client-c/generated",
"<!(node -e \"require('nan')\")"
],
"libraries": [
"<(module_root_dir)/deps/zookeeper-client-c/.libs/libzookeeper_st.a"
],
"xcode_settings": {
"GCC_ENABLE_CPP_EXCEPTIONS": "YES",
"MACOSX_DEPLOYMENT_TARGET": "<!(sw_vers -productVersion)"
}
}
],
[
"OS==\"linux\"",
{
"include_dirs": [
"<(module_root_dir)/deps/zookeeper-client-c/include",
"<(module_root_dir)/deps/zookeeper-client-c/generated",
"<!(node -e \"require('nan')\")"
],
"libraries": [
"<(module_root_dir)/deps/zookeeper-client-c/.libs/libzookeeper_st.a"
]
}
],
[
"OS==\"win\"",
{
"defines": [
"WIN32",
"USE_STATIC_LIB"
],
"msvs_settings": {
"VCLinkerTool": {
"IgnoreDefaultLibraryNames": [
"msvcrtd.lib",
"msvcmrtd.lib",
"libcmt.lib"
]
}
},
"include_dirs": [
"<(module_root_dir)/deps/zookeeper-client-c/include",
"<(module_root_dir)/deps/zookeeper-client-c/generated",
"<!(node -e \"require('nan')\")"
],
"libraries": [
"<(module_root_dir)/deps/zookeeper-client-c/Debug/zookeeper.lib",
"<(module_root_dir)/deps/zookeeper-client-c/Debug/hashtable.lib",
"msvcrt.lib",
"msvcmrt.lib",
"Ws2_32.lib",
"Mswsock.lib",
"AdvApi32.lib"
]
}
]
]
},
"targets": [{
"target_name": "zookeeper",
'dependencies': ['libzk'],
"sources": ["src/node-zk.cpp"],
'cflags': ['-w', '-O0'],
'conditions': [
['OS=="solaris"', {
'cflags': ['-Wno-strict-aliasing'],
'defines': ['_POSIX_PTHREAD_SEMANTICS'],
'include_dirs': [
'/opt/local/include/zookeeper',
'<!(node -e "require(\'nan\')")'
],
'ldflags': ['-lzookeeper_st'],
}],
['OS=="mac"',{
'include_dirs': [
'<(module_root_dir)/deps/zookeeper-client-c/include',
'<(module_root_dir)/deps/zookeeper-client-c/generated',
'<!(node -e "require(\'nan\')")'
],
'libraries': ['<(module_root_dir)/deps/zookeeper-client-c/.libs/libzookeeper_st.a'],
'xcode_settings': {
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
'MACOSX_DEPLOYMENT_TARGET': '<!(sw_vers -productVersion)'
}
}],['OS=="linux"',{
'include_dirs': [
'<(module_root_dir)/deps/zookeeper-client-c/include',
'<(module_root_dir)/deps/zookeeper-client-c/generated',
'<!(node -e "require(\'nan\')")'
],
'libraries': ['<(module_root_dir)/deps/zookeeper-client-c/.libs/libzookeeper_st.a'],
}],['OS=="win"',{
'defines': ['WIN32', 'USE_STATIC_LIB'],
'msvs_settings': {
'VCLinkerTool':{
'IgnoreDefaultLibraryNames': ['msvcrtd.lib', 'msvcmrtd.lib', 'libcmt.lib'],
}
},
'include_dirs': [
'<(module_root_dir)/deps/zookeeper-client-c/include',
'<(module_root_dir)/deps/zookeeper-client-c/generated',
'<!(node -e "require(\'nan\')")'
],
'libraries': [
'<(module_root_dir)/deps/zookeeper-client-c/Debug/zookeeper.lib',
'<(module_root_dir)/deps/zookeeper-client-c/Debug/hashtable.lib',
'msvcrt.lib',
'msvcmrt.lib',
'Ws2_32.lib',
'Mswsock.lib',
'AdvApi32.lib'
],
}]
]},
{
"target_name": "libzk",
"type": "none",
"actions": [
{
'target_name': 'libzk',
'type': 'none',
'actions': [{
'action_name': 'build_zk_client_lib',
'inputs': [''],
'outputs': [''],
'action': ['node', 'scripts/build.js']
}]
},
"action_name": "build_zk_client_lib",
"inputs": [
""
],
"outputs": [
""
],
"action": [
"node",
"scripts/build.js"
]
}
]
},
{
"target_name": "after_build",
"type": "none",
"dependencies": [
"zookeeper"
],
"copies": [
{
'target_name': 'after_build',
'type': 'none',
'dependencies': ['zookeeper'],
'copies': [
{
'files': ['<(PRODUCT_DIR)/zookeeper.node'],
'destination': '<(module_root_dir)/build'
}
]
}],
"files": [
"<(PRODUCT_DIR)/zookeeper.node"
],
"destination": "<(module_root_dir)/build"
}
]
}
]
}
2 changes: 1 addition & 1 deletion deps/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This guide is extracted from the [official docs](https://github.com/apache/zookeeper/blob/master/zookeeper-client/zookeeper-client-c/README)

1 Download the source code
2 Navigate to the root folder: run ant compile_jute
2 Navigate to the `zookeeper-jute` folder and run `mvn compile`
3 Navigate to the zookeeper-client-c folder: run autoreconf -if
4 compress the entire zookeeper-client-c folder and name it `zookeeper-client-c.tar.gz`
* On Mac OS X: `COPYFILE_DISABLE=1 tar -czvf zookeeper-client-c.tar.gz zookeeper-client-c`
Expand Down
Binary file modified deps/zookeeper-client-c.tar.gz
Binary file not shown.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
"eslint-config-airbnb-base": "14.x",
"eslint-plugin-import": "2.x",
"log4js": "6.x",
"node-gyp": "^7.1.2",
"prebuildify": "^4.1.1",
"node-gyp": "8.4.1",
"prebuildify": "5.0.0",
"proxyquire": "2.x",
"sinon": "9.x",
"typescript": "^4.0.5",
Expand Down
Binary file modified prebuilds/darwin-x64/node.abi83.node
Binary file not shown.
Binary file modified prebuilds/darwin-x64/node.abi93.node
Binary file not shown.
Binary file modified prebuilds/win32-x64/node.abi83.node
Binary file not shown.
Binary file modified prebuilds/win32-x64/node.abi93.node
Binary file not shown.
80 changes: 51 additions & 29 deletions tests/components/binding.gyp
Original file line number Diff line number Diff line change
@@ -1,34 +1,56 @@
{
'variables': {
'platform': '<(OS)',
"variables": {
"platform": "<(OS)"
},
"targets": [{
"target_name": "converters",
"sources": ["wrappers/node-converters.cpp"],
'cflags': ['-Wall', '-O0'],
'conditions': [
['OS=="mac"', {
'xcode_settings': {
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
'MACOSX_DEPLOYMENT_TARGET': '<!(sw_vers -productVersion)'
}
}],
['OS=="win"',{
'defines': ['WIN32', 'USE_STATIC_LIB'],
'msvs_settings': {
'VCLinkerTool':{
'IgnoreDefaultLibraryNames': ['msvcrtd.lib', 'msvcmrtd.lib', 'libcmt.lib'],
"targets": [
{
"target_name": "converters",
"sources": [
"wrappers/node-converters.cpp"
],
"cflags": [
"-Wall",
"-O0"
],
"conditions": [
[
"OS==\"mac\"",
{
"xcode_settings": {
"GCC_ENABLE_CPP_EXCEPTIONS": "YES",
"MACOSX_DEPLOYMENT_TARGET": "<!(sw_vers -productVersion)"
}
},
'libraries': [
'msvcrt.lib',
'msvcmrt.lib',
'Ws2_32.lib',
'Mswsock.lib',
'AdvApi32.lib'
}
],
}]
],
'include_dirs': ['<!(node -e "require(\'nan\')")']
}]
[
"OS==\"win\"",
{
"defines": [
"WIN32",
"USE_STATIC_LIB"
],
"msvs_settings": {
"VCLinkerTool": {
"IgnoreDefaultLibraryNames": [
"msvcrtd.lib",
"msvcmrtd.lib",
"libcmt.lib"
]
}
},
"libraries": [
"msvcrt.lib",
"msvcmrt.lib",
"Ws2_32.lib",
"Mswsock.lib",
"AdvApi32.lib"
]
}
]
],
"include_dirs": [
"<!(node -e \"require('nan')\")"
]
}
]
}

0 comments on commit 9a58819

Please sign in to comment.