aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Richard Brown <rbrown@exherbo.org> 2006-11-13 22:31:26 +0000
committerAvatar Richard Brown <rbrown@exherbo.org> 2006-11-13 22:31:26 +0000
commiteb6396007efea32c14dbe4ced7dd26bf274e18a8 (patch)
tree991ffcc6478638bf27b08b032879c5dedeaeb164
parent30c80d334f363b0ac6767f06d7539666ccc77361 (diff)
downloadpaludis-eb6396007efea32c14dbe4ced7dd26bf274e18a8.tar.gz
paludis-eb6396007efea32c14dbe4ced7dd26bf274e18a8.tar.xz
Don't hard code the location of the ruby interpreter in .rb files.
Allow the environment to override the ruby interpreter the bindings are compiled against.
-rw-r--r--configure.ac7
-rw-r--r--ruby/Makefile.am2
-rw-r--r--ruby/demos/find_unused_distfiles.rb2
-rw-r--r--ruby/demos/version_spec_distributions.rb2
-rw-r--r--ruby/dep_atom_TEST.rb2
-rw-r--r--ruby/environment_TEST.rb2
-rw-r--r--ruby/log_TEST.rb2
-rw-r--r--ruby/mask_reasons_TEST.rb2
-rw-r--r--ruby/package_database_TEST.rb2
-rw-r--r--ruby/package_database_entry_TEST.rb2
-rw-r--r--ruby/portage_dep_parser_TEST.rb2
-rw-r--r--ruby/qualified_package_name_TEST.rb2
-rw-r--r--ruby/repository_TEST.rb2
-rw-r--r--ruby/version_metadata_TEST.rb2
-rw-r--r--ruby/version_spec_TEST.rb2
15 files changed, 18 insertions, 17 deletions
diff --git a/configure.ac b/configure.ac
index 3970804..ddca617 100644
--- a/configure.ac
+++ b/configure.ac
@@ -582,6 +582,7 @@ AM_CONDITIONAL([ENABLE_GTK], test "x$enable_gtk" = "xyes")
dnl }}}
dnl {{{ ruby interface
+AC_ARG_VAR(RUBY,path to ruby interpreter)
AC_MSG_CHECKING([whether to build the ruby interface])
AC_ARG_ENABLE([ruby],
AS_HELP_STRING([--enable-ruby], [Enable ruby interface (default: disable)]),
@@ -596,7 +597,7 @@ if test "x$enable_ruby" = "xyes" ; then
fi
AC_MSG_CHECKING([for Ruby archdir])
- RUBY_ARCHDIR=`ruby -r rbconfig -e 'puts Config::CONFIG@<:@"archdir"@:>@'`
+ RUBY_ARCHDIR=`$RUBY -r rbconfig -e 'puts Config::CONFIG@<:@"archdir"@:>@'`
if test "x$RUBY_ARCHDIR" = "x" ; then
AC_MSG_ERROR([Could not find Ruby archdir])
fi
@@ -604,7 +605,7 @@ if test "x$enable_ruby" = "xyes" ; then
AC_SUBST([RUBY_ARCHDIR])
AC_MSG_CHECKING([for Ruby sitearchdir])
- RUBY_SITEARCHDIR=`ruby -r rbconfig -e 'puts Config::CONFIG@<:@"sitearchdir"@:>@'`
+ RUBY_SITEARCHDIR=`$RUBY -r rbconfig -e 'puts Config::CONFIG@<:@"sitearchdir"@:>@'`
if test "x$RUBY_SITEARCHDIR" = "x" ; then
AC_MSG_ERROR([Could not find Ruby sitearchdir])
fi
@@ -612,7 +613,7 @@ if test "x$enable_ruby" = "xyes" ; then
AC_SUBST([RUBY_SITEARCHDIR])
AC_MSG_CHECKING([for Ruby soname])
- RUBY_SONAME=`ruby -r rbconfig -e 'puts Config::CONFIG@<:@"RUBY_SO_NAME"@:>@'`
+ RUBY_SONAME=`$RUBY -r rbconfig -e 'puts Config::CONFIG@<:@"RUBY_SO_NAME"@:>@'`
if test "x$RUBY_SONAME" = "x" ; then
AC_MSG_ERROR([Could not find Ruby soname])
fi
diff --git a/ruby/Makefile.am b/ruby/Makefile.am
index a02053f..9326a8e 100644
--- a/ruby/Makefile.am
+++ b/ruby/Makefile.am
@@ -61,7 +61,7 @@ TESTS_ENVIRONMENT = env \
\`$(top_srcdir)/ebuild/utils/canonicalise $(top_builddir)/paludis/environment/default/.libs\`: \
\`$(top_srcdir)/ebuild/utils/canonicalise $(top_builddir)/paludis/environment/no_config/.libs\`" \
| tr -d ' '` \
- bash $(top_srcdir)/test/run_test.sh "ruby -I ./.libs/"
+ bash $(top_srcdir)/test/run_test.sh "$(RUBY) -I ./.libs/"
if ENABLE_RUBY
diff --git a/ruby/demos/find_unused_distfiles.rb b/ruby/demos/find_unused_distfiles.rb
index 6fcc6cc..97d5f8c 100644
--- a/ruby/demos/find_unused_distfiles.rb
+++ b/ruby/demos/find_unused_distfiles.rb
@@ -1,4 +1,4 @@
-#!/usr/bin/ruby
+#!/usr/bin/env ruby
# vim: set sw=4 sts=4 et tw=80 :
require 'Paludis'
diff --git a/ruby/demos/version_spec_distributions.rb b/ruby/demos/version_spec_distributions.rb
index 1a30249..cb23257 100644
--- a/ruby/demos/version_spec_distributions.rb
+++ b/ruby/demos/version_spec_distributions.rb
@@ -1,4 +1,4 @@
-#!/usr/bin/ruby
+#!/usr/bin/env ruby
# vim: set sw=4 sts=4 et tw=80 :
require 'Paludis'
diff --git a/ruby/dep_atom_TEST.rb b/ruby/dep_atom_TEST.rb
index edf125b..a948888 100644
--- a/ruby/dep_atom_TEST.rb
+++ b/ruby/dep_atom_TEST.rb
@@ -1,4 +1,4 @@
-#!/usr/bin/ruby
+#!/usr/bin/env ruby
# vim: set sw=4 sts=4 et tw=80 :
#
diff --git a/ruby/environment_TEST.rb b/ruby/environment_TEST.rb
index 9217146..5426506 100644
--- a/ruby/environment_TEST.rb
+++ b/ruby/environment_TEST.rb
@@ -1,4 +1,4 @@
-#!/usr/bin/ruby
+#!/usr/bin/env ruby
# vim: set sw=4 sts=4 et tw=80 :
#
diff --git a/ruby/log_TEST.rb b/ruby/log_TEST.rb
index ed48d48..b064af7 100644
--- a/ruby/log_TEST.rb
+++ b/ruby/log_TEST.rb
@@ -1,4 +1,4 @@
-#!/usr/bin/ruby
+#!/usr/bin/env ruby
# vim: set sw=4 sts=4 et tw=80 :
#
diff --git a/ruby/mask_reasons_TEST.rb b/ruby/mask_reasons_TEST.rb
index 9be2b62..748f50b 100644
--- a/ruby/mask_reasons_TEST.rb
+++ b/ruby/mask_reasons_TEST.rb
@@ -1,4 +1,4 @@
-#!/usr/bin/ruby
+#!/usr/bin/env ruby
# vim: set sw=4 sts=4 et tw=80 :
#
diff --git a/ruby/package_database_TEST.rb b/ruby/package_database_TEST.rb
index 3304549..8aafd97 100644
--- a/ruby/package_database_TEST.rb
+++ b/ruby/package_database_TEST.rb
@@ -1,4 +1,4 @@
-#!/usr/bin/ruby
+#!/usr/bin/env ruby
# vim: set sw=4 sts=4 et tw=80 :
#
diff --git a/ruby/package_database_entry_TEST.rb b/ruby/package_database_entry_TEST.rb
index 99a4fb8..99e2cfb 100644
--- a/ruby/package_database_entry_TEST.rb
+++ b/ruby/package_database_entry_TEST.rb
@@ -1,4 +1,4 @@
-#!/usr/bin/ruby
+#!/usr/bin/env ruby
# vim: set sw=4 sts=4 et tw=80 :
#
# Copyright (c) 2006 Ciaran McCreesh <ciaranm@ciaranm.org>
diff --git a/ruby/portage_dep_parser_TEST.rb b/ruby/portage_dep_parser_TEST.rb
index e9b68ff..9c4c960 100644
--- a/ruby/portage_dep_parser_TEST.rb
+++ b/ruby/portage_dep_parser_TEST.rb
@@ -1,4 +1,4 @@
-#!/usr/bin/ruby
+#!/usr/bin/env ruby
# vim: set sw=4 sts=4 et tw=80 :
#
diff --git a/ruby/qualified_package_name_TEST.rb b/ruby/qualified_package_name_TEST.rb
index 8404bd3..7013362 100644
--- a/ruby/qualified_package_name_TEST.rb
+++ b/ruby/qualified_package_name_TEST.rb
@@ -1,4 +1,4 @@
-#!/usr/bin/ruby
+#!/usr/bin/env ruby
# vim: set sw=4 sts=4 et tw=80 :
#
diff --git a/ruby/repository_TEST.rb b/ruby/repository_TEST.rb
index 06d0262..d05f612 100644
--- a/ruby/repository_TEST.rb
+++ b/ruby/repository_TEST.rb
@@ -1,4 +1,4 @@
-#!/usr/bin/ruby
+#!/usr/bin/env ruby
# vim: set sw=4 sts=4 et tw=80 :
#
diff --git a/ruby/version_metadata_TEST.rb b/ruby/version_metadata_TEST.rb
index ba17836..c11bc19 100644
--- a/ruby/version_metadata_TEST.rb
+++ b/ruby/version_metadata_TEST.rb
@@ -1,4 +1,4 @@
-#!/usr/bin/ruby
+#!/usr/bin/env ruby
# vim: set sw=4 sts=4 et tw=80 :
#
diff --git a/ruby/version_spec_TEST.rb b/ruby/version_spec_TEST.rb
index 746af15..0878e95 100644
--- a/ruby/version_spec_TEST.rb
+++ b/ruby/version_spec_TEST.rb
@@ -1,4 +1,4 @@
-#!/usr/bin/ruby
+#!/usr/bin/env ruby
# vim: set sw=4 sts=4 et tw=80 :
#