Skip to content

Commit

Permalink
Merge pull request #52 from lgeiger/unix-fallback
Browse files Browse the repository at this point in the history
Fallback: Run zmq build script inside gyp file
  • Loading branch information
rgbkrk authored Oct 6, 2016
2 parents d715b41 + 46fed17 commit 587c1d7
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 40 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ zmq

npm-debug.log
prebuilds
zmq-build.log
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ os:
osx_image: xcode7.2

env:

matrix:
- NODE_VERSION="6"
global:
Expand All @@ -33,9 +32,8 @@ before_install:
- npm --version
- test "$(uname)" = "Darwin" || export CXX=g++-4.9 CC=gcc-4.9
- gcc --version
- sh build_libzmq.sh

install: env PKG_CONFIG_PATH=$ZMQ_PREFIX/lib/pkgconfig npm install
install: npm install

script: travis_retry npm test

Expand Down
29 changes: 10 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
**zmq-prebuilt**: Your ready to use, prebuilt [ØMQ](http://www.zeromq.org/)
bindings for [Node.js](https://nodejs.org/en/).

0MQ provides handy functionality when working with sockets. Yet,
installing dependencies on your operating system or building 0MQ from
Ø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.

**zmq-prebuilt** simplifies creating communications for a Node.js
application by providing well-tested, ready to use 0MQ bindings.
application by providing well-tested, ready to use ØMQ bindings.
zmq-prebuilt supports all major operating systems, including:

* OS X/Darwin 64-bit
Expand Down Expand Up @@ -45,39 +45,30 @@ Now, prepare to be amazed by the wonders of binaries.

## Usage

Replace `require(zmq)` in your code base with `zmq-prebuilt`. That's it.
Replace `require(zmq)` in your code base with `require(zmq-prebuilt)`. That's it.
The wonder of binaries begins.

----

## Installation - Contributors and Development

To set up `zmq-prebuilt` for development, fork this repository and
clone your fork to your system. Be sure you have `git-lfs` installed.
clone your fork to your system. Be sure you have Python 2 and `git-lfs` installed.

### Linux and OS X

*Prerequisites*
**Prerequisites for Linux and OS X**

If you are running on Linux or OS X, you will need to have `automake`,
`autoconf`, `wget` and `libtool` installed. For Linux, use your distribution's
`autoconf`, `pkg-config`, `wget` and `libtool` installed. For Linux, use your distribution's
package manager to install. On OS X, these can be installed using
[Homebrew](http://brew.sh) and using the Homebrew command `brew install`
command. For example, install `wget` with `brew install wget`.

Install a development version of `zmq-prebuilt` with the following:

```bash
./build_libzmq.sh
npm install
```
**Prerequisites for Windows**

### Windows
On Windows you'll need [Visual Studio 2013](https://www.microsoft.com/en-US/download/details.aspx?id=44914).

*Prerequisites*

On Windows you'll need a C++ compiler, preferably
[Visual Studio 2013](https://www.visualstudio.com/downloads/download-visual-studio-vs).
**Installation**

Install a development version of `zmq-prebuilt` with the following:

Expand Down
2 changes: 2 additions & 0 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
],
}],
['OS=="mac" or OS=="solaris"', {
'install_zmq': '<!(./build_libzmq.sh 2>&1 > zmq-build.log)',
'xcode_settings': {
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
'MACOSX_DEPLOYMENT_TARGET': '10.6',
Expand All @@ -36,6 +37,7 @@
['OS=="openbsd" or OS=="freebsd"', {
}],
['OS=="linux"', {
'install_zmq': '<!(./build_libzmq.sh 2>&1 > zmq-build.log)',
'libraries': [ '<(PRODUCT_DIR)/../../zmq/lib/libzmq.a' ],
'include_dirs': [ '<(PRODUCT_DIR)/../../zmq/include' ],
}],
Expand Down
16 changes: 0 additions & 16 deletions build.js

This file was deleted.

2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
},
"dependencies": {
"bindings": "~1.2.1",
"in-publish": "^2.0.0",
"nan": "~2.4.0",
"prebuild": "^4.2.2"
},
Expand All @@ -23,7 +22,6 @@
"node": ">=0.8"
},
"scripts": {
"prepublish": "in-publish && node build.js || echo 'Not in npm prepublish.'",
"install": "prebuild --install",
"test": "mocha --expose-gc --slow 300 --timeout 4000"
},
Expand Down

0 comments on commit 587c1d7

Please sign in to comment.