Skip to content
Create a gist now

Instantly share code, notes, and snippets.

Workaround for therubyracer Issue 158 (https://github.com/cowboyd/therubyracer/issues/158)
#!/bin/bash
LIBV8_PATH=/usr/local/rvm/gems/ruby-1.9.3-p194/gems/libv8-3.3.10.4/lib/libv8
echo "Installing devel/libexecinfo ( see 'ports/156993: lang/v8 missing dependency to devel/libexecinfo' at http://www.freebsd.org/cgi/query-pr.cgi?pr=156993 ) ..."
cd /usr/ports/
cd devel/libexecinfo
make install clean
echo "Sourcing RVM ..."
source /etc/profile.d/rvm.sh
cd ${LIBV8_PATH}/build/v8
echo "Backing up SConstruct ..."
cp SConstruct SConstruct_`date "+%Y-%m-%d"`
echo "Adding -fPIC flag ..."
echo 'WARNING: The sed command will affect the configuration for other operating systems as well!' >&2
sed -i "" "s/ 'CCFLAGS':.*\['-ansi'\],/ 'CCFLAGS' : \['-ansi', '-fPIC'\],/g" SConstruct
${LIBV8_PATH}/build/scons/install/bin/scons arch=x64
gem install therubyracer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.