Commit graph

230 commits

Author SHA1 Message Date
Eric Lindvall
37c9a0465d Add test for MAKE_INSTALL_OPTS
Also fix the ordering of make install arguments
2014-01-22 11:55:01 -08:00
Eric Lindvall
93828a2d16 Add MAKE_INSTALL_OPTS configuration option 2014-01-21 19:29:02 -08:00
Eric Lindvall
60f2b2cd79 Add MAKE_INSTALL_OPTS for packages
Allows for passing environment variables specifically to the "make install"
step of package building.

This can be helpful for providing a different DESTDIR= to a ruby install from
the --prefix that is used
2014-01-21 16:03:46 -08:00
Marc Bellingrath
eed9b53d35 Run sed without the -E flag.
GNU sed version 4.1.5 on CentOS 5.8 does not support the -E flag:
$ sed -E
sed: invalid option -- E
2014-01-17 10:06:38 -05:00
Erik Michaels-Ober
9cd77be141 ruby-build 20140110.1 2014-01-09 22:03:06 +01:00
Erik Michaels-Ober
46720ecb0d ruby-build 20140110 2014-01-09 21:46:56 +01:00
Erik Michaels-Ober
7fbe5af432 ruby-build 20131226 2014-01-07 16:43:04 +01:00
Erik Michaels-Ober
69f8dcc8b7 ruby-build 20131225.1 2013-12-25 12:13:58 -05:00
Erik Michaels-Ober
7f398380ba ruby-build 20131225 2013-12-25 11:32:51 -05:00
Mislav Marohnić
963d33f5e6 ruby-build 20131220.1 2013-12-21 02:20:46 +01:00
Phil Smith
85b64c4a52 Fix JRuby install on systems with non-BSD sed
There doesn't seem to be a way to construct a sed invocation for
in-place editing that is compatible with both BSD and GNU sed.

http://stackoverflow.com/q/5694228/11687

Fixes #475
2013-12-21 02:07:06 +01:00
Mislav Marohnić
578f0c5c1c ruby-build 20131220 2013-12-20 19:28:36 +01:00
Thomas Seliger
76b632892b Transform JRuby shebangs to absolute paths, fixing recursion within rbenv
The default shebang for binstubs in a JRuby installation is
`#!/usr/bin/env jruby`. On a rbenv-managed JRuby, this will execute the
`jruby` rbenv shim. In a situation where a JRuby tool like `gem` is
executed from within a running rbenv by a rbenv plugin, (e.g.
rbenv-gemset) this can trigger another rbenv run to resolve the shim.
This can lead to endless recursion of rbenv calls.

Fixes #471, closes #473
References jf/rbenv-gemset#56
2013-12-20 19:23:36 +01:00
Mislav Marohnić
8ebfd1d0a9 Merge branch 'apply-patch'
Closes #469
2013-12-20 19:07:34 +01:00
Mislav Marohnić
57cb1e98c6 ruby-build 20131211 2013-12-12 00:42:15 +01:00
Mislav Marohnić
94c15a54f0 Auto-detect and link to Homebrew's readline
I thought this was not necessary, but a number of people had problems
when linking to OS X's "readline" (actually Editline wrapper):

- Some components of Pry wouldn't work
- Writing literal Unicode characters was not possible #379
- The compilation would downright fail in some cases #82 #461

Fixes #461
2013-12-12 00:03:47 +01:00
Mislav Marohnić
4351c46923 Add --patch flag to apply a Ruby patch from stdin
If `-p|--patch` flag was set while invoking `ruby-build` or
`rbenv install`, ruby-build will use `patch -p0 -i -` to apply a patch
from stdin to Ruby, Rubinius, or JRuby source code before running the
rest of `build_package_*` commands.

References #443
2013-12-11 21:16:47 +01:00
Mislav Marohnić
6f9647d7de Fix irb on rbx-2.2.1
Install the missing `rubysl-tracer` gem

References rubinius/rubinius#2780
2013-12-11 18:38:53 +01:00
Mislav Marohnić
392679a7fb Fix irb, rake, rdoc, ri for rbx-2.2.1
We symlink Rubinius' `PREFIX/gems/bin` into `PREFIX/bin` so that new
RubyGems binstubs get added to the main bin directory and therefore
become available to rbenv.

However, by throwing away `irb`, `rake`, `rdoc`, and `ri` binstubs
during this process (which are non-executable and have an invalid
shebang), we break the same commands in latest versions of Rubinius.

This change ensures that these binstubs get preserved, their shebang
corrected to `#!PREFIX/bin/rbx`, their executable bit flipped on, and
copied over to the main bin directory.

Fixes #468
2013-12-11 18:38:49 +01:00
Erik Michaels-Ober
a2d9ac49d1 ruby-build 20131206 2013-12-07 10:15:04 +01:00
Sam Stephenson
458d333167 ruby-build 20131122.1 2013-11-22 19:13:46 -06:00
Sam Stephenson
5ae03b8394 ruby-build 20131122 2013-11-22 17:30:31 -06:00
Mislav Marohnić
dc6239175a Merge branch 'rbx-ruby-18' 2013-11-22 15:01:32 +01:00
Mislav Marohnić
2fa587bcfe Fix installing Rubinius 2.0 with Ruby 1.8
Fixes #429, references rubinius/rubinius#2693
2013-11-22 14:23:44 +01:00
Erik Michaels-Ober
49c1070495 ruby-build 20131115 2013-11-15 16:05:55 +02:00
Kelley Reynolds
35f9c62d1d Handle the case when there is no processor info in /proc/cpuinfo
`grep -c` would correctly output "0", which is handled specially later
on, but would also exit with a nonzero status which would abort the
script. Piping the output to `wc` to do the counting makes the exit
status of grep irrelevant.

Fixes #447
2013-11-13 16:30:11 +01:00
Mislav Marohnić
cb33dc8f6a ruby-build 20131030 2013-10-30 02:45:06 +01:00
Mislav Marohnić
8b6616b8a7 Install the Rubinius bundle in isolation
Makes sure that installing Rubinius won't touch other gems outside the
build directory.
2013-10-29 14:13:34 +01:00
Mislav Marohnić
c0dc8908e1 Fix false "BUILD FAILED" message when installing Rubinius
Installing Rubinius would print "BUILD FAILED" at the `bundle` step but
the installation would proceed nevertheless and finish successfully.

It turns out that the `command ...` expression will trigger the ERR trap
on failure even when it's a part of `||` list or a condition inside an
`if` statement. This defies how the ERR trap is supposed to work, so the
workaround is to execute it in a subshell which doesn't inherit the ERR
trap of its parent.
2013-10-29 14:03:26 +01:00
Mislav Marohnić
8e16aab892 Fix installing REE on OS X 10.8+ with no XQuartz
This is a regression introduced by
d13ae0ad52

References #267
2013-10-29 01:39:28 +01:00
Mislav Marohnić
64726421f9 ruby-build 20131028 2013-10-28 01:17:20 +01:00
Mislav Marohnić
d9cd8a1ae3 Abort early if TMPDIR is non-writable or non-executable
Fixes #148
2013-10-28 00:44:15 +01:00
Mislav Marohnić
d13ae0ad52 Enable compiling Ruby 1.8 on OS X 10.8+ without extra flags
Because OS X Mountain Lion removed X Windows, compiling Ruby 1.8 would
fail unless the user installed XQuartz manually and passed:

    CPPFLAGS=-I/opt/X11/include rbenv install 1.8.7-p374

This auto-detects if `/opt/X11/include` is present on the system and
configures CPPFLAGS accordingly. However if XQuartz was never installed,
we simply configure Ruby using `--without-tk`.

Fixes #193 #207

References 353246926c
2013-10-28 00:25:02 +01:00
Mislav Marohnić
6c08c56d3a Detect number of CPU cores used for make
Alt. implementation of #401, #434
2013-10-27 22:24:12 +01:00
Mislav Marohnić
50bf60f9c2 Really fix installing Ruby 2.1.0 from trunk
The problem wasn't in quoting as per 0b5206172, but in the fact that
Ruby trunk added a LDFLAGS checker that aborts if any of the paths
listed in it are missing:
3636f8c0f5

This is probably a bug in Ruby, but for now a simple workaround is to
iterate through paths in LDFLAGS and ensure they exist.

References #441
2013-10-27 21:32:18 +01:00
SHIBATA Hiroshi
0b52061728 Fix installing Ruby 2.1.0 from trunk
Stop quoting in LDFLAGS and CPPFLAGS. Ruby trunk chokes on it:
3636f8c0f5

Closes #441
2013-10-27 20:42:50 +01:00
Mislav Marohnić
51000d5e56 Add test for automatic fetching of rake gem 2013-10-26 18:28:53 +02:00
Mislav Marohnić
9aab127f75 Install Rake and Bundler in isolation when missing
Some Rubies need Rake or Bundler for the installation process. However,
since the host Ruby version might not have those gems installed, install
them in a temporary GEM_HOME and add their executables to PATH.

Fixes #426
2013-10-26 17:39:55 +02:00
Mislav Marohnić
730a8164d5 Use rake from the current bundle for Rubinius
Rake might not be available on the system, but if there is a Gemfile,
assume that it bundles rake.
2013-10-26 15:48:25 +02:00
Mislav Marohnić
f27c561388 Recursive copying fixes and tests
Use the `cp -f` flag to force unlinking non-writable files.

Closes #384
2013-10-26 08:20:44 +02:00
Jeremy Stephens
273bc17fe7 Force copying files for mruby
When installing mruby-dev, the cp command doesn't use the force flag.
This causes an issue when using a custom build configuration (via
MRUBY_CONFIG environment variable) and installing mrbgems from Github,
as the pack files in the git repositories are read-only.
2013-10-26 08:05:06 +02:00
Mislav Marohnić
51d8e5125c Prefer control flow to chaining grouped expressions
Helps avoid the pitfall where ERR trap has no effect.
See 262eb1658c
2013-10-26 06:43:54 +02:00
Mislav Marohnić
262eb1658c Clearer error message when HTTP download fails
Previously, if `http get` failed, the `download_tarball` function would
still continue since the ERR trap had no effect at that point.

Given a script in the form of `{ ... } || return 1`, the expressions
that are the part of the first group are not subject to ERR trap since
they are non-last in a chain of expressions.

However, since we still can't count on the ERR trap taking effect in
this phase, better just rewrite the function to manually abort.

Fixes #394
2013-10-26 06:32:03 +02:00
Fabian M. Borschel
e466bfeab0 Set default MAKE=gmake on FreeBSD 2013-10-26 05:33:57 +02:00
Mislav Marohnić
b37427b688 Support relative path as install prefix
Fixes #110
2013-10-26 05:24:25 +02:00
Mislav Marohnić
42aa6ccfcc Merge master into docwhat-homebrew-yaml
Conflicts:
	share/ruby-build/1.9.1-p378
	share/ruby-build/1.9.1-p430
	share/ruby-build/1.9.2-p0
	share/ruby-build/1.9.2-p180
	share/ruby-build/1.9.2-p290
	share/ruby-build/1.9.2-p318
	share/ruby-build/1.9.2-p320
	share/ruby-build/1.9.3-p0
	share/ruby-build/1.9.3-p125
	share/ruby-build/1.9.3-p194
	share/ruby-build/1.9.3-p286
	share/ruby-build/1.9.3-p327
	share/ruby-build/1.9.3-p362
	share/ruby-build/1.9.3-p374
	share/ruby-build/1.9.3-p385
	share/ruby-build/1.9.3-p392
	share/ruby-build/1.9.3-p429
	share/ruby-build/1.9.3-p448
	share/ruby-build/1.9.3-preview1
	share/ruby-build/1.9.3-rc1
	share/ruby-build/2.0.0-preview1
2013-10-24 22:28:57 +02:00
Erik Michaels-Ober
59df40be9e ruby-build 20131024 2013-10-24 06:51:38 -07:00
Mislav Marohnić
9f77dfc4d5 Merge pull request #433 from sstephenson/rbx-fix
Fix Rubinius gem binstubs path
2013-10-23 07:39:30 -07:00
Mislav Marohnić
f859d9a3b4 Fix Rubinius 2.1.x on Linux by supporting bz2 archives
`tar` on OS X auto-detects the type of compression used, so it doesn't
care whether `-z` or `-j` flags were passed to it for extraction.
However, since latest Rubinius archives are compressed with bzip2, we
must handle this distinction explicitly for the sake of other platforms.

fixes #470
2013-10-23 16:27:49 +02:00
Mislav Marohnić
dbd8c71d17 Fix Rubinius gem binstubs path
Rubinius 2 insists that it installs RubyGems binstubs into
`PREFIX/gems/bin` instead of `PREFIX/bin`.

This creates complexity for rbenv rehash and exec processes, so we
symlink `gems/bin` into `bin` and have RubyGems create binstubs at a
location that is consistent with other Ruby implementations.

See sstephenson/rbenv#178, sstephenson/rbenv#461
2013-10-20 02:18:29 +02:00