Skip to content

Instantly share code, notes, and snippets.

@GSI
Created May 6, 2012 12:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GSI/2621916 to your computer and use it in GitHub Desktop.
Save GSI/2621916 to your computer and use it in GitHub Desktop.
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