Skip to content

Commit 587c1d7

Browse files
authored
Merge pull request #52 from lgeiger/unix-fallback
Fallback: Run zmq build script inside gyp file
2 parents d715b41 + 46fed17 commit 587c1d7

6 files changed

Lines changed: 14 additions & 40 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ zmq
1616

1717
npm-debug.log
1818
prebuilds
19+
zmq-build.log

.travis.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ os:
1818
osx_image: xcode7.2
1919

2020
env:
21-
2221
matrix:
2322
- NODE_VERSION="6"
2423
global:
@@ -33,9 +32,8 @@ before_install:
3332
- npm --version
3433
- test "$(uname)" = "Darwin" || export CXX=g++-4.9 CC=gcc-4.9
3534
- gcc --version
36-
- sh build_libzmq.sh
3735

38-
install: env PKG_CONFIG_PATH=$ZMQ_PREFIX/lib/pkgconfig npm install
36+
install: npm install
3937

4038
script: travis_retry npm test
4139

README.md

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
**zmq-prebuilt**: Your ready to use, prebuilt [ØMQ](http://www.zeromq.org/)
1313
bindings for [Node.js](https://nodejs.org/en/).
1414

15-
0MQ provides handy functionality when working with sockets. Yet,
16-
installing dependencies on your operating system or building 0MQ from
15+
ØMQ provides handy functionality when working with sockets. Yet,
16+
installing dependencies on your operating system or building ØMQ from
1717
source can lead to developer frustration.
1818

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

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

4646
## Usage
4747

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

5151
----
5252

5353
## Installation - Contributors and Development
5454

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

58-
### Linux and OS X
59-
60-
*Prerequisites*
58+
**Prerequisites for Linux and OS X**
6159

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

68-
Install a development version of `zmq-prebuilt` with the following:
69-
70-
```bash
71-
./build_libzmq.sh
72-
npm install
73-
```
66+
**Prerequisites for Windows**
7467

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

77-
*Prerequisites*
7870

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

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

binding.gyp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
],
2727
}],
2828
['OS=="mac" or OS=="solaris"', {
29+
'install_zmq': '<!(./build_libzmq.sh 2>&1 > zmq-build.log)',
2930
'xcode_settings': {
3031
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
3132
'MACOSX_DEPLOYMENT_TARGET': '10.6',
@@ -36,6 +37,7 @@
3637
['OS=="openbsd" or OS=="freebsd"', {
3738
}],
3839
['OS=="linux"', {
40+
'install_zmq': '<!(./build_libzmq.sh 2>&1 > zmq-build.log)',
3941
'libraries': [ '<(PRODUCT_DIR)/../../zmq/lib/libzmq.a' ],
4042
'include_dirs': [ '<(PRODUCT_DIR)/../../zmq/include' ],
4143
}],

build.js

Lines changed: 0 additions & 16 deletions
This file was deleted.

package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
},
1111
"dependencies": {
1212
"bindings": "~1.2.1",
13-
"in-publish": "^2.0.0",
1413
"nan": "~2.4.0",
1514
"prebuild": "^4.2.2"
1615
},
@@ -23,7 +22,6 @@
2322
"node": ">=0.8"
2423
},
2524
"scripts": {
26-
"prepublish": "in-publish && node build.js || echo 'Not in npm prepublish.'",
2725
"install": "prebuild --install",
2826
"test": "mocha --expose-gc --slow 300 --timeout 4000"
2927
},

0 commit comments

Comments
 (0)