Subject: | Full Mac OS X installation instructions |
Date: | Mon, 28 Jul 2014 23:04:00 -0500 |
To: | bug-JavaScript-V8 [...] rt.cpan.org |
From: | "Richard Faasen" <richie765 [...] gmail.com> |
I found this module very useful, unfortunately it doesn't install right
out of the box due to changes to the V8 API. The following are detailed
instructions for installing on OS X, perhaps it could be placed into the
POD.
Install proper GCC
---
brew install apple-gcc42
Install correct V8 version (3.15.11)
---
cd /usr/local/Library/Formula
git show e3ca3099c97ec26c66331c2100eaee87a1125092:Library/Formula/v8.rb
Show quoted text
> /tmp/v8.rb
brew unlink v8
brew install /tmp/v8.rb
cd /usr/local/lib
cp libv8.dylib libv8perl.dylib
chmod +w libv8perl.dylib
install_name_tool -id /usr/local/lib/libv8perl.dylib libv8perl.dylib
chmod -w libv8perl.dylib
Unpack CPAN package and make some changes
---
cpanm --look JavaScript::V8
vi Makefile.PL
Line 10: Change v8 to v8perl
Line 16: Change g++ to g++-4.2
Line 25: Change -lv8 to -lv8perl
Compile and install
---
V8_DIR=/usr/local/Cellar/v8/3.15.11 perl Makefile.PL
make
make test
make install