6 Commits

Author SHA1 Message Date
Mike McQuaid
3982950e61 rubocop --auto-correct all hash-rocket usage. 2016-09-17 16:14:13 +01:00
William Woodruff
97a66aa513 os/mac: Update ruby-macho calls for compatibility with 0.2.5.
Closes #656.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-08-11 22:34:49 +02:00
William Woodruff
f3a6385c8c ruby_mach: Update cputype case block.
MachOFile#cputype now returns a Symbol.
2016-06-20 23:36:18 +02:00
Martin Afanasjew
9cf2710dc9 os/mac/*_mach: move shared code into 'SharedMachO' (#282)
Both the `CctoolsMachO` and `RubyMachO` module implement a common set of
methods that simplify querying `mach_data`. Move these into a shared
module, that gets included after either of these implementations is
loaded and included in `Pathname`.
2016-05-27 23:13:51 +02:00
Martin Afanasjew
c20809526c os/mac/ruby_mach: don't hide actual parse errors
The current approach of suppressing all output regardless of what the
error is makes it very hard to debug any issues and misread but valid
Mach-O files will be silently interpreted as non-Mach-O files instead.

Prefer to fail if we are a Homebrew developer or running on the bot
(`HOMEBREW_DEVELOPER=1`), so that problems will be noticed and fixed
before the silent failure leads to hard-to-diagnose user problems.

Closes Homebrew/homebrew#48817.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-02-25 21:54:42 +01:00
William Woodruff
afe0fde49c os/mac: optionally use ruby_macho.
- and branch for dylib_id_and_dylibs
- add branches for dylib id changing and change_install_name
- rename MachO module to HomebrewMachO to prevent namespace clashes
  with MachO in ruby-macho. this will eventually be replaced entirely
  with direct calls to ruby-macho methods
- break ruby-macho implementation out into separate RubyMachO module,
  and include either RubyMachO or CctoolsMachO (the original
  implementation) based on the HOMEBREW_RUBY_MACHO env var
- move ArchitectureListExtension and RubyMachO into separate files
- create {ruby_,cctools_,,}relocate.rb for isolation of different
  methods of mach-o relocation (ruby-macho vs. cctools)
- fill in require_install_name_tool? for ruby_relocate.rb
- rename {ruby_,cctools_,,}relocate.rb to keg, isolate requires in
  os/mac

Closes Homebrew/homebrew#45001.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2016-02-03 21:25:40 +00:00