Commit 59dda5dc authored by Gordon Ball's avatar Gordon Ball

Imported Upstream version 4.0.0

parents
root = true
[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
[*.js]
indent_style = space
indent_size = 2
[*.cc]
indent_style = space
indent_size = 2
*.swp
*.swo
*.o
build
*.lock*
binding.node
examples/stress-test-client
node_modules
Makefile.gyp
binding.Makefile
binding.target.gyp.mk
npm-debug.log
gyp-mac-tool
out/
zmq
docs
npm-debug.log
prebuilds
zmq-build.log
windows/lib/libzmq.lib
# Coverage directory used by tools like istanbul
coverage
.nyc_output
coverage.lcov
language: node_js
sudo: false
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-4.9
- g++-4.9
matrix:
include:
- node_js: "6"
env: DEPLOY="true"
- node_js: "6"
env: ELECTRON="1.4.10"
- os: osx
node_js: "6"
env: DEPLOY="true"
env:
global:
- GH_REF: github.com/nteract/zmq-prebuilt.git
- secure: AMY9chDNyNawxPhxAksCREhbQoOmphQKo2hDuYIPXBCUNF6Zik969QlB07TVjo+Bo0KVEbG4ANTdI0FkFIhg4MuJIWUkW30ZDyCSovUx8zyWB/7IN23A4Cx4p4ZnKjezTHUQpZ9InRIZzy9kOR+215IIBP6GfxbUY89eDA6ARElcv1rwDjZqSnLAxfie6v80vIbhWxNK4kQjiEyIez5eWBjRg4//dmb63TvJjc78GFTaqmh6lRIApAyA0uKka14XR/PJw5IpDR+0Q2omHl4t4zbu9MdVNYMSD+c6iNxOq3fqZJwnyJ1ELErbtR8oeKgZX1SOew5QTCUZWQsa+ySYTCzUnhWjhCgN6W0ciVtT2PslS/ZcvnrGGIxJAOmTZwINw8sAp8yYdY9QCJOGdB5ah2oUBLGKElcFGqSblohXUEM1tXeRchmpXiiAxnPNtxc6lkZzz6NxDl2OFXSmjMS4Cr8cA//Bn6gM04xRJyETy86/8KDoL+ENc7gkeiuYUOFqkAn5X8PrqPdsPmF7yA61IF1ru/OgtiuCh+eqnzZKBPImJo2KfUIqVuRi/6eUaDfWLT7d/J84Vbe3p2nPxoFd2pSw60f/lIkzFSRZx3vBjQiW2MVUN7ZTdawMOzE4TpIV7rDOkKe7qJJobquJEjd2X9Z+8JiTYXK2pPN2GceiqAM=
before_install:
- export DISPLAY=':99.0'
- Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- test "$(uname)" = "Darwin" || export CXX=g++-4.9 CC=gcc-4.9
install:
- '[ -z "$ELECTRON" ] || npm install electron@${ELECTRON}'
- 'if [[ -z "$ELECTRON" ]]; then npm install; else npm install --runtime=electron --target=${ELECTRON} --disturl=https://atom.io/download/electron; fi'
script: if [[ -z "$ELECTRON" ]]; then travis_retry npm run coverage; else travis_retry npm run test:electron; fi
after_success:
- bash ./scripts/publish_docs.sh
- 'if [[ $DEPLOY == true && $TRAVIS_OS_NAME == linux ]]; then bash <(curl -s https://codecov.io/bash); fi'
deploy:
provider: script
skip_cleanup: true
# Linking to prebuild directly since it doesn't work inside a npm script.
script:
- node_modules/prebuild/bin.js --all --strip -u $GH_TOKEN
on:
condition: "$DEPLOY = true"
tags: true
notifications:
slack:
secure: nklWvK1Mvoj5zly8PO0WmgQdakaSa5Ixwbxw4+1yyIKgyEUbyHzu0oySMAuyMPPV3nLaTaB/bwFxvrsUP6lxoO1CvQMUTrucLm3H5FXDDuTBBw5/tREFyuUy6XPeVsTPdL9ltrvCn8mTBYNZOM/3BWq6mV0XDHpxAIgE3FA2AUTrNoAxLqXC/V7ZmTnDYuH2T/cdeyP+Ri0UDuszUn/dzTM/fOSVpJ/J74JylJ5FH7x5z9lnD6T/916t8//i4tzoEaFkS4V7QgAj0Bta8BEMP0BN40Wap9UgXfrzafCnHDjcbKRoyVEs09kWMbrdY572EGiow2B+QOlYELLYCcD00VH71zDCpw1Ji6di3v+CxCzxFcNyZz8i/Hb8PIfYTyHV2C43X/doVzC3MVllw+d3IVTR0smn2jwjhr+szm9MDQcnUxq5zuOCiAMzE51hbhLQATUNQIiqsD0X+NK3o5urb/Fjb6I6q3MO7GJkuvsda1ni5OEPeFAlYKjvgBiwUZnc32uBHfd3iGzbdwzihSKreuIdVTCtmlnhVmM0ztg5E+BQ8SxWJPxLw5c+9ZaEja5bVCkZF4L3P/EcsdBQ1YmorsROgf/p+PsrnqKAy9zU/NynQQYODx28IPcuQgJbhzeTUEINnFej513BRnkREgjLY5bjXY6iLjKdlRo8kPVqrj8=
2.15.3 / 2016-6-3
=================
* 2.15.0 introduced a bug where request sockets could no longer batch up requests.
This release should fix that [ronkorving, jaleigh]
2.15.2 / 2016-5-22
==================
* 2.15.0 introduced a bug where some messages would not be received. This release
should fix that [ronkorving]
2.15.1 / 2016-5-8
=================
* Node.js 6 compatibility (NAN 2.3) [kkoopa]
2.15.0 / 2016-4-27
==================
* Dropped support for Node 0.8 [reqshark]
* Added unref/ref APIs to detach/attach sockets from/to the event loop [Joongi Kim]
* Improved message throughput 3-fold on ZMQ 4 [ronkorving]
* When bind or unbind failed, you could never try again (fixed) [ronkorving]
* Various travis configuration improvements [reqshark]
* Bumped NAN to 2.2.x [JanStevens]
2.14.0 / 2015-11-20
===================
* A socket.read() method was added to retrieve messages while paused [sshutovskyi]
* socket.send() now takes a callback as 3rd argument which is called once the message is sent [ronkorving]
* Now tested on Node.js 0.8, 0.10, 0.12, 4 and 5 [ronkorving]
2.13.0 / 2015-08-26
===================
* io.js 3.x compatible [kkoopa]
* corrections to type casting operations [kkoopa]
* "make clean" now also removes node_modules [reqshark]
2.12.0 / 2015-07-10
===================
* Massive improvements to monitoring code, with new documentation and tests [ValYouW]
* Improved documentation [reqshark]
* Updated bindings from ~1.1.1 to ~1.2.1 [reqshark]
* Test suite improvements [reqshark]
* Updated the Windows bundle to ZeroMQ 4.0.4 [kkoopa]
* License attribute added to package.json [pdehaan]
2.11.1 / 2015-05-21
===================
* io.js 2.x compatible [transcranial]
* replaced asserts with proper exceptions [reqshark]
2.11.0 / 2015-03-31
===================
* Added pause() and resume() APIs on sockets to allow backpressure [philip1986]
* Elegant handling of EINTR return codes [hurricaneLTG]
* Small performance improvements in send() and internal flush methods [ronkorving]
* Updated test suite to cover io.js and Node 0.12 (removed 0.11) [ronkorving]
* Added "make perf" for easy benchmarking [ronkorving]
2.10.0 / 2015-01-22
===================
* Added ZMQ_STREAM socket type [reqshark]
* Update NAN to io.js compatible 1.5.0 [kkoopa]
* Hitting open file descriptor limit now throws an error during zmq.socket() [briansorahan]
* More reliable benchmarking [maxired]
2.9.0 / 2015-01-05
==================
* More unit tests [bluebery and reqshark]
* More reliable testing [f34rdotcom and kkoopa]
* Improved ReadMe [dminkovsky and skibz]
* Support for zmq_proxy sockets [reqshark]
* Removed "docs" and related deps in favor of ReadMe [reqshark]
2.8.0 / 2014-08-27
==================
* Fixed: monitor API would keep CPU busy at 100% [f34rdotcom]
* Fixed: an exception during flush could render a socket unusable [ronkorving]
* Fixed: Travis changed behavior and broke our tests [ronkorving]
* Code cleanup [kkoopa and ronkorving]
* Removed legacy nextTick event emission during flush [utvara and ronkorving]
* Context API added: setMaxThreads, getMaxThreads, setMaxSockets, getMaxSockets [yoneal]
* Changed unit test suite to Mocha [skeggse and yoneal]
* NAN updated to ~1.3.0 [kkoopa]
2.7.0 / 2014-04-24
==================
* Fixed memory leak when closing socket [rasky]
* Fixed high water mark [soplwang, kkoopa]
* Added socket opts for zeromq 4.x security mechanisms [msealand]
* Use MakeCallback [kkoopa]
* Remove useless setImmediate [kkoopa]
* Use `zmq_msg_send` for ZMQ >= 4.0 [kkoopa]
* Expose the Socket class as zmq.Socket [tcr]
2.6.0 / 2014-01-23
==================
* Monitor support [f34rdotcom, dr-fozzy]
* Unbind support [kkoopa]
* Node 0.11.9 compatibility [kkoopa]
* Support for ZMQ 4 [atrniv]
* Fixed memory leak [utvara]
* OSX Homebrew support [jwalton]
* Fix unit tests [ryanlelek]
2.5.1 / 2013-08-28
==================
* Regression fix for IPC socket bind failure [christopherobin]
2.5.0 / 2013-08-20
==================
* Added testing against Node.js v0.11 [AlexeyKupershtokh]
* Add support for Joyent SmartMachines [JonGretar]
* Use pkg-config on OS X too [blalor]
* Patch for Node 0.11.3 [kkoopa]
* Fix for bind / connect / send problem [kkoopa]
* Fixed multiple bugs in perf tests and changed them to push/pull [ronkorving]
* Add definitions for building on openbsd & freebsd [Minjung]
2.4.0 / 2013-04-09
==================
* added: Windows support [mscdex]
* added: support for all options ever [AlexeyKupershtokh]
* fixed: prevent zeromq sockets from being destroyed by GC [AlexeyKupershtokh]
2.3.0 / 2013-03-15
==================
* added: xpub/xsub socket types [xla]
* added: support for zmq_disconnect [matehat]
* added: LAST_ENDPOINT socket option [ronkorving]
* added: local/remote_lat local/remote_thr perf test [wavded]
* fixed: tests improved [qubyte, jeremybarnes, ronkorving]
* fixed: Node v0.9.4+ compatibility [mscdex]
* fixed: SNDHWM and RCVHWM options were given the wrong type [freehaha]
* removed: waf support [mscdex]
2.2.0 / 2012-10-17
==================
* add support for pkg-config
* add libzmq 3.x support [aaudis]
* fix: prevent GC happening too soon for connect/bindSync
2.1.0 / 2012-06-29
==================
* fix require() for 0.8.0
* change: use uv_poll in place of IOWatcher
* remove stupid engines field
2.0.3 / 2012-03-14
==================
* Removed -Wall (libuv unused vars caused the build to fail...)
2.0.2 / 2012-02-16
==================
* Added back `.createSocket()` for BC. Closes #86
2.0.1 / 2012-01-26
==================
* Added `.zmqVersion` [patricklucas]
* Fixed multipart support [joshrtay]
Copyright (c) 2011 TJ Holowaychuk
Copyright (c) 2010, 2011 Justin Tulloss
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
# zeromq
[![codecov](https://codecov.io/gh/zeromq/zeromq.js/branch/master/graph/badge.svg)](https://codecov.io/gh/zeromq/zeromq.js)
[![](https://img.shields.io/badge/version-latest-blue.svg)](https://github.com/zeromq/zeromq.js)
[![Build Status](https://travis-ci.org/zeromq/zeromq.js.svg?branch=master)](https://travis-ci.org/zeromq/zeromq.js)
[![Build status](https://ci.appveyor.com/api/projects/status/6u7saauir2msxpou?svg=true)](https://ci.appveyor.com/project/zeromq/zeromq.js)
[![](https://img.shields.io/badge/version-stable-blue.svg)](https://github.com/zeromq/zeromq.js/releases)
[![Build Status](https://travis-ci.org/zeromq/zeromq.js.svg?branch=prebuilt-testing)](https://travis-ci.org/zeromq/zeromq.js)
[![Build status](https://ci.appveyor.com/api/projects/status/w189dgubmg9darun/branch/master?svg=true)](https://ci.appveyor.com/project/zeromq/zeromq-js/branch/prebuilt-testing)
[**Users**](#installation---users) | [**From Source**](#installation---from-source) | [**Contributors and Development**](#installation---contributors-and-development) | [**Maintainers**](#for-maintainers-creating-a-release)
**zeromq**: Your ready to use, prebuilt [ØMQ](http://www.zeromq.org/)
bindings for [Node.js](https://nodejs.org/en/).
ØMQ provides handy functionality when working with sockets. Yet,
installing dependencies on your operating system or building ØMQ from
source can lead to developer frustration.
**zeromq** simplifies creating communications for a Node.js
application by providing well-tested, ready to use ØMQ bindings.
zeromq supports all major operating systems, including:
* OS X/Darwin 64-bit
* Linux 64-bit
* Windows (64-bit and 32-bit)
Use **zeromq** and take advantage of the *elegant simplicity of binaries*.
## Installation - Users
We rely on [`prebuild`](https://github.com/mafintosh/prebuild).
Install `zeromq` with the following:
```bash
npm install zeromq
```
Now, prepare to be amazed by the wonders of binaries.
## Installation - From Source
If you want to use `zeromq` inside your [Electron](http://electron.atom.io/) application
or if you are working on a Linux 32-bit system, you have to build `zeromq` from source.
### Prerequisites
**Linux**
- `python` (`v2.7` recommended, `v3.x.x` is not supported)
- `make`
- A proper C/C++ compiler toolchain, like [GCC](https://gcc.gnu.org/)
Use your distribution's package manager to install.
**macOS**
- `python` (`v2.7` recommended, `v3.x.x` is not supported): already installed on Mac OS X
- `Xcode Command Line Tools`: Can be installed with `xcode-select --install`
**Windows**
- **Option 1:** Install all the required tools and configurations using Microsoft's [windows-build-tools](https://github.com/felixrieseberg/windows-build-tools) by running `npm install -g windows-build-tools` from an elevated PowerShell (run as Administrator).
- **Option 2:** Install dependencies and configuration manually
1. Visual C++ Build Environment:
* **Option 1:** Install [Visual C++ Build Tools](http://go.microsoft.com/fwlink/?LinkId=691126) using the *Default Install* option.
* **Option 2:** Install [Visual Studio 2015](https://www.visualstudio.com/products/visual-studio-community-vs) (or modify an existing installation) and select *Common Tools for Visual C++* during setup.
> :bulb: [Windows Vista / 7 only] requires [.NET Framework 4.5.1](http://www.microsoft.com/en-us/download/details.aspx?id=40773)
2. Install [Python 2.7](https://www.python.org/downloads/) or [Miniconda 2.7](http://conda.pydata.org/miniconda.html) (`v3.x.x` is not supported), and run `npm config set python python2.7`
3. Launch cmd, `npm config set msvs_version 2015`
### Installation
Now you can install `zeromq` with the following:
```bash
npm install zeromq
```
### Rebuilding for Electron
If you want to use `zeromq` inside your [Electron](http://electron.atom.io/) application
it needs to be rebuild against Electron headers.
We highly recommend [`electron-builder`](https://github.com/electron-userland/electron-builder)
which handles this automatically.
If you don't want to use `electron-builder` you can rebuild `zeromq` manually by running:
```
npm rebuild zeromq --runtime=electron --target=1.4.5 --disturl=https://atom.io/download/atom-shell --build-from-source
```
Where `target` is your desired Electron version.
You can find more information on the [Electron website](http://electron.atom.io/docs/tutorial/using-native-node-modules/).
## Installation - Contributors and Development
To set up `zeromq` for development, fork this repository and
clone your fork to your system.
Make sure you have the required [dependencies for building `zeromq` from source](#installation---from-source) installed.
Install a development version of `zeromq` with the following:
```bash
npm install
```
## Testing
Run the test suite using:
```bash
npm test
```
## Running an example application
Several example applications are found in the `examples` directory. Use
`node` to run an example. To run the 'subber' application, enter the
following:
```bash
node examples/subber.js
```
## Examples using zeromq
### Push/Pull
This example demonstrates how a producer pushes information onto a
socket and how a worker pulls information from the socket.
**producer.js**
```js
// producer.js
var zmq = require('zeromq')
, sock = zmq.socket('push');
sock.bindSync('tcp://127.0.0.1:3000');
console.log('Producer bound to port 3000');
setInterval(function(){
console.log('sending work');
sock.send('some work');
}, 500);
```
**worker.js**
```js
// worker.js
var zmq = require('zeromq')
, sock = zmq.socket('pull');
sock.connect('tcp://127.0.0.1:3000');
console.log('Worker connected to port 3000');
sock.on('message', function(msg){
console.log('work: %s', msg.toString());
});
```
### Pub/Sub
This example demonstrates using `zeromq` in a classic Pub/Sub,
Publisher/Subscriber, application.
**Publisher: pubber.js**
```js
// pubber.js
var zmq = require('zeromq')
, sock = zmq.socket('pub');
sock.bindSync('tcp://127.0.0.1:3000');
console.log('Publisher bound to port 3000');
setInterval(function(){
console.log('sending a multipart message envelope');
sock.send(['kitty cats', 'meow!']);
}, 500);
```
**Subscriber: subber.js**
```js
// subber.js
var zmq = require('zeromq')
, sock = zmq.socket('sub');
sock.connect('tcp://127.0.0.1:3000');
sock.subscribe('kitty cats');
console.log('Subscriber connected to port 3000');
sock.on('message', function(topic, message) {
console.log('received a message related to:', topic, 'containing message:', message);
});
```
## For maintainers: Creating a release
When making a release, do the following:
```bash
npm version minor && git push && git push --tags
```
Then, wait for the prebuilds to get uploaded for each OS. After the
prebuilds are uploaded, run the following to publish the release:
```bash
npm publish
```
To check if the binaries are packaged correctly, you can push a commit to
[`nteract/zmq-prebuilt-testing`](https://github.com/nteract/zmq-prebuilt-testing).
environment:
GITHUB_TOKEN:
secure: E1HpiZf9OJuc8XPGA57hJbCQlMWVCPVBePHiWF/BgmJ/+e/2OplyifiS/x8CJtcw
matrix:
- nodejs_version: "4"
deploy: "true"
- nodejs_version: "6"
electron: "1.4.10"
platform:
- x64
- x86
build: off
install:
- ps: Install-Product node $env:nodejs_version $env:platform
- IF DEFINED ELECTRON (npm install electron@%ELECTRON%)
- IF DEFINED ELECTRON (npm install --runtime=electron --target=%ELECTRON% --disturl=https://atom.io/download/electron) ELSE (npm install)
test_script:
- IF DEFINED ELECTRON (appveyor-retry call npm run test:electron) ELSE (appveyor-retry call npm test)
deploy_script:
- IF "%deploy%;%appveyor_repo_tag%"=="true;true" (node_modules\.bin\prebuild --all --strip -u %GITHUB_TOKEN%)
notifications:
- provider: Slack
auth_token:
secure: q6/gXUGl67pHWThEVtLaKpkxP2vIr5pzHT0FuUCRN5ZI9gBZdROM+OXUnBiyNodJLAC9tg8w4uccXFFoMgQYok4/8nJ9QKjq92mhEuShDEA=
channel: '#zmq-prebuilt'
This diff is collapsed.
{
'targets': [
{
'target_name': 'zmq',
'sources': [ 'binding.cc' ],
'include_dirs' : ["<!(node -e \"require('nan')\")"],
'cflags!': ['-fno-exceptions'],
'cflags_cc!': ['-fno-exceptions'],
'conditions': [
['OS=="win"', {
'msbuild_toolset': 'v140',
'defines': ['ZMQ_STATIC'],
'include_dirs': ['windows/include'],
'libraries': [
'<(PRODUCT_DIR)/../../windows/lib/libzmq',
'ws2_32.lib',
'iphlpapi'
],
}],
['OS=="mac" or OS=="solaris"', {
'xcode_settings': {
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
'MACOSX_DEPLOYMENT_TARGET': '10.9',
},
'libraries': [ '<(PRODUCT_DIR)/../../zmq/lib/libzmq.a' ],
'include_dirs': [ '<(PRODUCT_DIR)/../../zmq/include' ],
}],
['OS=="openbsd" or OS=="freebsd"', {
}],
['OS=="linux"', {
'libraries': [ '<(PRODUCT_DIR)/../../zmq/lib/libzmq.a' ],
'include_dirs': [ '<(PRODUCT_DIR)/../../zmq/include' ],
}],
]
}
]
}
comment: false
coverage:
status:
patch:
default:
target: '30'
project:
default:
target: auto
var zmq = require('../');
var sock = zmq.socket('push');
sock.bindSync('tcp://127.0.0.1:3000');
console.log('Producer bound to port 3000');
setInterval(function(){
console.log('sending work');
sock.send('some work');
}, 500);
var zmq = require('../');
var sock = zmq.socket('pub');
sock.bindSync('tcp://127.0.0.1:3000');
console.log('Publisher bound to port 3000');
setInterval(function(){
console.log('sending a multipart message envelope');
sock.send(['kitty cats', 'meow!']);
}, 500);
// minimal smoke test for appveyor
// while mocha tests don't run
var zmq = require('..');
var s = new zmq.socket('pub');
s.bind('tcp://127.0.0.1:0');
s.send('test');
setTimeout(function () {
s.close();
}, 1000);
var zmq = require('../');
var sock = zmq.socket('sub');
sock.connect('tcp://127.0.0.1:3000');
sock.subscribe('kitty cats');
console.log('Subscriber connected to port 3000');
sock.on('message', function(topic, message) {
console.log('received a message related to:', topic.toString(), 'containing message:', message.toString());
});
var zmq = require('../');
var sock = zmq.socket('pull');
sock.connect('tcp://127.0.0.1:3000');
console.log('Worker connected to port 3000');
sock.on('message', function(msg){
console.log('work: %s', msg.toString());
});
module.exports = require('./lib');
\ No newline at end of file
This diff is collapsed.
{
"name": "zeromq",
"version": "4.0.0",
"description": "Prebuilt bindings for node.js to ZeroMQ",
"main": "index",
"gypfile": true,
"repository": {
"type": "git",
"url": "https://github.com/zeromq/zeromq.js.git"
},
"dependencies": {
"nan": "^2.4.0",
"prebuild": "^5.0.0"
},
"devDependencies": {
"electron-mocha": "^3.2.1",
"jsdoc": "^3.4.2",
"mocha": "^3.2.0",
"nyc": "^10.0.0",
"semver": "^5.3.0",
"should": "^11.1.0"
},
"engines": {
"node": ">=0.10"
},
"scripts": {
"build:libzmq": "node scripts/preinstall.js",
"install": "prebuild --install --preinstall \"npm run build:libzmq\"",
"prebuild": "prebuild --all --strip",
"build:docs": "jsdoc -R README.md -d docs lib/*.js",
"postpublish": "./scripts/trigger_travis_build.sh",
"test": "mocha --expose-gc --slow 300",
"test:electron": "electron-mocha --slow 300",
"precoverage": "nyc npm run test",
"coverage": "nyc report --reporter=text-lcov > coverage/lcov.info"
},
"keywords": [
"zeromq",
"zmq",
"0mq",
"ømq",
"libzmq",
"native",
"binding",
"addon"
],
"license": "MIT",
"author": "Justin Tulloss <justin.tulloss@gmail.com> (http://justin.harmonize.fm)"
}
#!/bin/sh
set -e
if [ "$1" != "" ]; then
ZMQ=$1
else
echo "No ZMQ version given"
exit 1
fi
export MACOSX_DEPLOYMENT_TARGET=10.9
export BASE=$(dirname "$0")
export ZMQ_PREFIX="${BASE}/../zmq"
export ZMQ_SRC_DIR=zeromq-$ZMQ
cd "${ZMQ_PREFIX}"
export CFLAGS=-fPIC
export CXXFLAGS=-fPIC
export PKG_CONFIG_PATH="${ZMQ_PREFIX}/lib/pkgconfig"
test -d "${ZMQ_SRC_DIR}" || tar xzf zeromq-$ZMQ.tar.gz
cd "${ZMQ_SRC_DIR}"
test -f configure || ./autogen.sh
if [ "$ZMQ" = "4.1.6" ]; then
./configure "--prefix=${ZMQ_PREFIX}" --with-relaxed --enable-static --disable-shared ;
else
./configure "--prefix=${ZMQ_PREFIX}" --disable-pedantic --enable-static --disable-shared ;