Skip to content

Commit b593952

Browse files
committed
Describe build process and dependencies a bit better in the README.
Also: the name of the package is `php-embed`. The git repo is `node-php-embed` because I like to keep my personal projects organized that way, but there's no need for an extra `node` prefix in general.
1 parent 5d85650 commit b593952

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

README.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# node-php-embed
1+
# php-embed
22
[![NPM][NPM1]][NPM2]
33

44
[![Build Status][1]][2] [![dependency status][3]][4] [![dev dependency status][5]][6]
@@ -232,6 +232,11 @@ In both cases the module is automatically built with npm's internal
232232
version of `node-gyp`, and thus your system must meet
233233
[node-gyp's requirements](https://github.com/TooTallNate/node-gyp#installation).
234234

235+
The prebuilt binaries are built using g++-5 on Linux, and so you will
236+
need to have the appropriate versions of the C++ standard library
237+
available. Something like `apt-get install g++-5` should suffice on
238+
Debian/Ubuntu.
239+
235240
It is also possible to make your own build of `php-embed` from its
236241
source instead of its npm package ([see below](#building-from-the-source)).
237242

@@ -261,6 +266,24 @@ install the `-dev` package with your package manager, e.g.
261266
`apt-get install libphp5-embed php5-dev` for
262267
Debian/Ubuntu.
263268

269+
You will also need a C++11 compiler. We perform builds using
270+
clang-3.5 and g++-5; both of these are known to work. (Use
271+
`apt-get install g++-5` to install g++-5 if `g++ --version`
272+
reveals that you have an older version of `g++`.) To ensure
273+
that `npm`/`node-pre-gyp` use your preferred compiler, you may
274+
need to do something like:
275+
276+
```sh
277+
export CXX="g++-5"
278+
export CC="gcc-5"
279+
```
280+
On Mac OSX, you need to limit support to OS X 10.7 and above in order
281+
to get C++11 support. Something like the following should work:
282+
283+
```sh
284+
export MACOSX_DEPLOYMENT_TARGET=10.7 ;
285+
```
286+
264287
Developers hacking on the code will probably want to use:
265288

266289
node-pre-gyp --debug build
@@ -304,7 +327,7 @@ ignored in the `valgrind` report.
304327
# License
305328
Copyright (c) 2015 C. Scott Ananian.
306329

307-
`node-php-embed` is licensed using the same
330+
`php-embed` is licensed using the same
308331
[license](http://www.php.net/license/3_01.txt) as PHP itself.
309332

310333
[NPM1]: https://nodei.co/npm/php-embed.png

0 commit comments

Comments
 (0)