THRIFT-459. Ruby installation always tries to write to /Library/Ruby/site
This patch adds a RUBY_PREFIX option similiar to JAVA_PREFIX or PY_PREFIX.
Patch: Matthieu Imbert
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@943698 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/rb/Makefile.am b/lib/rb/Makefile.am
index 9cfffc7..da45ed5 100644
--- a/lib/rb/Makefile.am
+++ b/lib/rb/Makefile.am
@@ -29,7 +29,7 @@
spec
all-local:
- $(RUBY) setup.rb config
+ if [ -n "$(RUBY_PREFIX)" ] ; then $(RUBY) setup.rb config --prefix=$(DESTDIR)$(RUBY_PREFIX) --rbdir='$$libdir/ruby' --sodir='$$libdir/ruby' ; elif [ -n "$(DESTDIR)" ] ; then $(RUBY) setup.rb config --prefix=$(DESTDIR) ; else $(RUBY) setup.rb config ; fi
$(RUBY) setup.rb setup
install-exec-hook: