51 Commits
Author SHA1 Message Date
Misty De Meo e395c66aa2 gcc7 7.1.0 2017-07-30 20:48:53 -07:00
Misty De Meo 09c9db3f2d gcc6 6.4.0 2017-07-30 18:07:28 -07:00
Misty De Meo 226e222fe2 llvm@3.8: fix compiler-rt builtins cmakelists 2017-07-20 21:04:20 -07:00
Misty De Meo 2ccf627754 llvm@3.8: fix compiler-rt installation 2017-07-20 20:58:10 -07:00
Misty De Meo 4047d76ab4 llvm@3.8: pass -f to patch 2017-07-20 20:57:48 -07:00
Misty De Meo fade58a34f llvm@3.8: fix patch command 2017-07-20 20:37:55 -07:00
Misty De Meo 8fa69c1cd4 llvm@3.8: remove macports-specific patch 2017-07-20 20:37:46 -07:00
Misty De Meo 175499dcf8 llvm@3.8: pipe input to patch 2017-07-20 20:33:37 -07:00
Misty De Meo 49c54369b1 llvm@3.8: fix passing block argument 2017-07-20 20:31:59 -07:00
Misty De Meo 7661b07faf llvm@3.8: move patches earlier in the build 2017-07-20 20:30:29 -07:00
Misty De Meo e4bf416ee1 llvm@3.8: fix loop, oops 2017-07-20 20:28:16 -07:00
Misty De Meo 610545ae9d llvm@3.8: needs python 2.7 to build 2017-07-20 20:26:33 -07:00
Misty De Meo 674190233a llvm@3.8: fix looping over patches 2017-07-20 20:25:54 -07:00
Misty De Meo f5c1b97146 llvm@3.8: fix patch resources 2017-07-20 20:22:58 -07:00
Misty De Meo 5916c13f14 llvm@3.8: work around applying patches 2017-07-20 20:15:39 -07:00
Misty De Meo 3d80370fe0 WIP: llvm@3.8 2017-07-20 20:03:01 -07:00
Misty De Meo 1236c7435f qemu: fix patch sha256
Fixes #521.
2017-07-03 10:23:28 -07:00
Misty De Meo 24972db79f gist-logs: fix user agent
Refs #518.
2017-06-17 22:18:25 -07:00
Misty De Meo 1975f0f33a Merge pull request #515 from mistydemeo/use_internal_sha256
Use internal Ruby 1.8.2 sha256
2017-05-30 09:11:29 -07:00
Misty De Meo 1964065a71 Use internal Ruby 1.8.2 sha256
Turns out this was here all along! Just with a slightly different
API from modern versions of Ruby.
2017-05-30 09:06:08 -07:00
Misty De Meo bddb767290 Only include RUBY_PATCHLEVEL if defined
Hotfix for #514.
2017-05-26 17:13:00 -07:00
Misty De Meo a460f2d1b5 Merge pull request #513 from mistydemeo/perl-fallbacks-sha256
Make sha256 resilient with platform-independent fallback.
2017-05-25 18:06:43 -07:00
Misty De Meo c307a32fb2 sha256: add homebrew/vendor openssl to the rotation 2017-05-25 18:03:48 -07:00
Geoff Nixon 9774dff598 Make sha256 resilient with platform-independent fallback. 2017-05-25 18:03:45 -07:00
Misty De Meo 3bd76c45ca Merge pull request #509 from mistydemeo/introduce_brew_sh
Introduce brew.sh
2017-05-25 18:03:19 -07:00
Misty De Meo 47b7bb4226 miniupnpc: needs ld64 on Tiger 2017-05-22 23:39:49 -07:00
Thomas Bernard 1fed6abaa3 miniupnpc: bump to version 2.0.20170509. Fixes CVE-2017-8798
also update homepage for https

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2017-05-22 23:39:00 -07:00
Misty De Meo 103cc7908a utils: remove merge blah 2017-05-11 00:04:31 -07:00
Misty De Meo 23c4d834f1 Revert "brew.sh: simplify HOMEBREW_OSX_VERSION_NUMERIC"
This reverts commit 549201c986.

This doesn't work on old versions of bash - printf doesn't do -v.
2017-05-11 00:02:53 -07:00
Misty De Meo 5d2497a719 os: needs a require 2017-05-11 00:00:51 -07:00
Xu Cheng 260b830fd9 move brew shell function to brew.sh 2017-05-10 23:58:55 -07:00
Mike McQuaid 143b7bee5f brew.sh: error out if no Ruby found.
This is a nicer error message than the `exec` failing at a later stage.
2017-05-10 23:57:24 -07:00
Max Nordlund 116fe7b2dc Implement the brew help command
This is also used by `brew <cmd> --help`. The basic idea is to have the
documentation as a top level comment in each command file. To find these
comments, they have to be like this `#:`.

This is also used by the `brew man` command to keep the documentation
DRY, and for that there are now a header and footer for the man page.
2017-05-10 23:55:18 -07:00
Martin Afanasjew b9d5136fb3 brew.sh: make sure to always use system 'awk'
This should prevent issues like #47 and make us more resilient.
2017-05-10 23:53:15 -07:00
Martin Afanasjew 1fcd5f3c24 brew.sh: tweak HOMEBREW_PROCESSOR on Linux
`uname -p` seems to be less useful on Linux (Debian 8 yields `unknown`),
thus prefer `uname -m` on those systems to determine the processor type.

Closes #35.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2017-05-10 23:53:07 -07:00
Martin Afanasjew 5bafc03354 brew.sh: fix HOMEBREW_OS_VERSION on Linux et al.
On Linux (and other non-OS X platforms), `HOMEBREW_OS_VERSION` was
*always* replaced with the product name, leading to less useful user
agent. E.g., on a reasonably up-to-date Debian system:
  Linuxbrew/0.9.9 (Linux; unknown Linuxbrew)

With this fix the user agent is instead (first if `lsb_release` is
available and outputs something, second otherwise):
  Linuxbrew/0.9.9 (Linux; unknown Debian GNU/Linux 8.3 (jessie))
  Linuxbrew/0.9.9 (Linux; unknown 3.16.0-4-amd64)
2017-05-10 23:52:59 -07:00
Martin Afanasjew 549201c986 brew.sh: simplify HOMEBREW_OSX_VERSION_NUMERIC
Use `printf -v` and strip out the unnecessary `echo`, thus avoiding two
unnecessary command substitutions.
2017-05-10 23:52:34 -07:00
Martin Afanasjew 1c4a0f33cf brew.sh: streamline setting HOMEBREW_{OSX,LINUX}
For uses like this one, `case` is much more compact and easier to read.
2017-05-10 23:52:19 -07:00
Misty De Meo 3b1f4e031b brew.sh: remember, we need those certs real bad 2017-05-10 23:49:58 -07:00
Mike McQuaid 8d435e616c Make Homebrew user agent consistent, use a slash.
Generally it seems user agents are all `software/version` but ours is
not. Also, set the user agent in a way that it's shared between Bash
and Ruby code.

Closes https://github.com/Homebrew/legacy-homebrew/pull/50480.
2017-05-10 23:47:00 -07:00
Mike McQuaid 1147bf3e92 Fix brew update user agent.
This needs to be `Homebrew $HOMEBREW_VERSION` so we can be adequately
filtered.

Closes Homebrew/homebrew#49961.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2017-05-10 23:41:50 -07:00
Xu Cheng bdc303e035 brew.sh: add tap-pin to sudo check list 2017-05-10 23:40:36 -07:00
Misty De Meo fde676c52f brew.sh: don't call xcode-select if it doesn't exist 2017-05-10 23:31:31 -07:00
Martin Afanasjew 7a4a90411a brew.sh: improve empty argument handling
Follow-up to Homebrew/homebrew#49327 that leaves empty argument handling to the Ruby code
(it is a bit more sophisticated and distinguished between `help` and an
empty argument list and treats them differently) instead of hard-wiring
the former to the `help` command.

Closes Homebrew/homebrew#49538.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2017-05-10 23:24:25 -07:00
Martin Afanasjew 09cd8a467d brew.sh: drop reference to removed 'update-ruby'
This is a follow-up fix to a minor oversight in Homebrew/homebrew#49523.
2017-05-10 23:24:13 -07:00
Misty De Meo b67e4d6f23 brew: print help when no commands given
Fixes Homebrew/homebrew#49325.

Closes Homebrew/homebrew#49327.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2017-05-10 23:23:57 -07:00
Misty De Meo d2d4cead91 Use /usr/bin/ruby for HOMEBREW_RUBY_PATH 2017-05-10 23:23:35 -07:00
Mike McQuaid dd55d98f84 bin/brew: move logic to Library.
`bin/brew` is getting a bit bloated and it's annoying to open all of
`HOMEBREW_PREFIX` in your editor of choice and have it search through
the `Cellar`. Let's instead keep the bare minimum in `bin/brew` and
move the rest to `Library`.

Closes Homebrew/homebrew#49185.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2017-05-10 23:16:33 -07:00
Mike McQuaid dc8d60d116 tap_constants: allow formulae to have @ in name.
Follow-up from #812 to fix handling fully-qualified versioned formulae
names.

Allows pulling https://github.com/Homebrew/homebrew-core/pull/971.
2017-05-09 21:34:12 -07:00
Misty De Meo 3304b115ae Import linkage checker 2017-05-09 21:14:15 -07:00
Misty De Meo 15aeaae83d Import GCC formulae dependencies
These were missed in the last PR.
2017-05-08 22:53:13 -07:00
29 changed files with 1709 additions and 119 deletions

No files matched your search

+30
View File
@@ -0,0 +1,30 @@
class CloogPpl015 < Formula
homepage "http://repo.or.cz/w/cloog-ppl.git"
url "ftp://gcc.gnu.org/pub/gcc/infrastructure/cloog-ppl-0.15.11.tar.gz"
mirror "http://gcc.cybermirror.org/infrastructure/cloog-ppl-0.15.11.tar.gz"
sha256 "7cd634d0b2b401b04096b545915ac67f883556e9a524e8e803a6bf6217a84d5f"
bottle do
cellar :any
sha256 "e80958bc126358051c2c40ba8b12aae5fa2e55a086dd103241f7469a6812df29" => :yosemite
sha256 "e18498773771e61e533c1521212ad4f2be43f62b5c00478c89fc52934850450f" => :mavericks
sha256 "ff20e10aa53c2650de8f008d8b6cd803ed1960e6d88282574c2217700ba0a81f" => :mountain_lion
end
keg_only "Conflicts with cloog in main repository."
depends_on "gmp4"
depends_on "ppl011"
def install
args = %W[
--disable-dependency-tracking
--prefix=#{prefix}
--with-gmp=#{Formula["gmp4"].opt_prefix}"
--with-ppl=#{Formula["ppl011"].opt_prefix}"
]
system "./configure", *args
system "make", "install"
end
end
+52
View File
@@ -0,0 +1,52 @@
class Cloog018 < Formula
desc "Generate code for scanning Z-polyhedra"
homepage "http://www.cloog.org/"
# Track gcc infrastructure releases.
url "http://www.bastoul.net/cloog/pages/download/count.php3?url=./cloog-0.18.0.tar.gz"
mirror "ftp://gcc.gnu.org/pub/gcc/infrastructure/cloog-0.18.0.tar.gz"
sha256 "1c4aa8dde7886be9cbe0f9069c334843b21028f61d344a2d685f88cb1dcf2228"
bottle do
cellar :any
revision 1
sha256 "95b8d981633d853151cae2efa07bcf6655e5af04dad88418087fc614de8f160d" => :el_capitan
sha256 "5befa09d6f42cebefe5085959a9d7267158bd9eb7a1d7d0a95c122c5377ccaa9" => :yosemite
sha256 "b64ee12cd97286090e012e25882119b82ce4dc9b8dbaacf7ac17f7570f327cfa" => :mavericks
end
keg_only "Conflicts with cloog in main repository."
depends_on "pkg-config" => :build
depends_on "gmp4"
depends_on "isl011"
def install
system "./configure", "--prefix=#{prefix}",
"--disable-dependency-tracking",
"--disable-silent-rules",
"--with-gmp-prefix=#{Formula["gmp4"].opt_prefix}",
"--with-isl-prefix=#{Formula["isl011"].opt_prefix}"
system "make", "install"
end
test do
cloog_source = <<-EOS.undent
c
0 2
0
1
1
0 2
0 0 0
0
0
EOS
assert_match "Generated from /dev/stdin by CLooG",
pipe_output("#{bin}/cloog /dev/stdin", cloog_source)
end
end
+3 -9
View File
@@ -21,15 +21,9 @@ class Gcc6 < Formula
desc "The GNU Compiler Collection"
homepage "https://gcc.gnu.org"
url "https://ftpmirror.gnu.org/gcc/gcc-6.2.0/gcc-6.2.0.tar.bz2"
mirror "https://ftp.gnu.org/gnu/gcc/gcc-6.2.0/gcc-6.2.0.tar.bz2"
sha256 "9944589fc722d3e66308c0ce5257788ebd7872982a718aa2516123940671b7c5"
bottle do
sha256 "c30c0898b73794434af820725d3b69d4f26e58357c6d2867028527ce31273b58" => :sierra
sha256 "b3b138b29d6705f85bf3d558795bd901c53929ac7935879ff4b7778f7f7b84c7" => :el_capitan
sha256 "0ffe5b97c65df653ea664514880fd72c01cf516b1409655a8c03e48a42275050" => :yosemite
end
url "https://ftp.gnu.org/gnu/gcc/gcc-6.4.0/gcc-6.4.0.tar.xz"
mirror "https://ftpmirror.gnu.org/gcc/gcc-6.4.0/gcc-6.4.0.tar.xz"
sha256 "850bf21eafdfe5cd5f6827148184c08c4a0852a37ccf36ce69855334d2c914d4"
# GCC's Go compiler is not currently supported on Mac OS X.
# See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46986
+213
View File
@@ -0,0 +1,213 @@
class Gcc7 < Formula
def arch
if Hardware::CPU.type == :intel
if MacOS.prefer_64_bit?
"x86_64"
else
"i686"
end
elsif Hardware::CPU.type == :ppc
if MacOS.prefer_64_bit?
"powerpc64"
else
"powerpc"
end
end
end
def osmajor
`uname -r`.chomp
end
desc "The GNU Compiler Collection"
homepage "https://gcc.gnu.org"
url "https://ftp.gnu.org/gnu/gcc/gcc-7.1.0/gcc-7.1.0.tar.bz2"
mirror "https://ftpmirror.gnu.org/gcc/gcc-7.1.0/gcc-7.1.0.tar.bz2"
sha256 "8a8136c235f64c6fef69cac0d73a46a1a09bb250776a050aec8f9fc880bebc17"
# GCC's Go compiler is not currently supported on Mac OS X.
# See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46986
option "with-java", "Build the gcj compiler"
option "with-all-languages", "Enable all compilers and languages, except Ada"
option "with-nls", "Build with native language support (localization)"
option "with-profiled-build", "Make use of profile guided optimization when bootstrapping GCC"
option "with-jit", "Build the jit compiler"
option "without-fortran", "Build without the gfortran compiler"
# enabling multilib on a host that can"t run 64-bit results in build failures
option "without-multilib", "Build without multilib support" if MacOS.prefer_64_bit?
depends_on "gmp"
depends_on "libmpc"
depends_on "mpfr"
depends_on "isl014"
depends_on "ecj" if build.with?("java") || build.with?("all-languages")
if MacOS.version < :leopard
# The as that comes with Tiger isn't capable of dealing with the
# PPC asm that comes in libitm
depends_on "cctools" => :build
end
# The bottles are built on systems with the CLT installed, and do not work
# out of the box on Xcode-only systems due to an incorrect sysroot.
def pour_bottle?
MacOS::CLT.installed?
end
# GCC bootstraps itself, so it is OK to have an incompatible C++ stdlib
cxxstdlib_check :skip
# Fix for libgccjit.so linkage on Darwin
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64089
# https://github.com/Homebrew/homebrew-core/issues/1872#issuecomment-225625332
# https://github.com/Homebrew/homebrew-core/issues/1872#issuecomment-225626490
patch do
url "https://raw.githubusercontent.com/Homebrew/formula-patches/e9e0ee09389a54cc4c8fe1c24ebca3cd765ed0ba/gcc/6.1.0-jit.patch"
sha256 "863957f90a934ee8f89707980473769cff47ca0663c3906992da6afb242fb220"
end
def install
# GCC will suffer build errors if forced to use a particular linker.
ENV.delete "LD"
if MacOS.version < :leopard
ENV["AS"] = ENV["AS_FOR_TARGET"] = "#{Formula["cctools"].bin}/as"
end
if build.with? "all-languages"
# Everything but Ada, which requires a pre-existing GCC Ada compiler
# (gnat) to bootstrap. GCC 4.6.0 add go as a language option, but it is
# currently only compilable on Linux.
languages = %w[c c++ fortran java objc obj-c++ jit]
else
# C, C++, ObjC compilers are always built
languages = %w[c c++ objc obj-c++]
languages << "fortran" if build.with? "fortran"
languages << "java" if build.with? "java"
languages << "jit" if build.with? "jit"
end
version_suffix = version.to_s.slice(/\d/)
args = [
"--build=#{arch}-apple-darwin#{osmajor}",
"--prefix=#{prefix}",
"--libdir=#{lib}/gcc/#{version_suffix}",
"--enable-languages=#{languages.join(",")}",
# Make most executables versioned to avoid conflicts.
"--program-suffix=-#{version_suffix}",
"--with-gmp=#{Formula["gmp"].opt_prefix}",
"--with-mpfr=#{Formula["mpfr"].opt_prefix}",
"--with-mpc=#{Formula["libmpc"].opt_prefix}",
"--with-isl=#{Formula["isl014"].opt_prefix}",
"--with-system-zlib",
"--enable-libstdcxx-time=yes",
"--enable-stage1-checking",
"--enable-checking=release",
"--enable-lto",
# Use 'bootstrap-debug' build configuration to force stripping of object
# files prior to comparison during bootstrap (broken by Xcode 6.3).
"--with-build-config=bootstrap-debug",
# A no-op unless --HEAD is built because in head warnings will
# raise errors. But still a good idea to include.
"--disable-werror",
"--with-pkgversion=Homebrew #{name} #{pkg_version} #{build.used_options*" "}".strip,
"--with-bugurl=https://github.com/Homebrew/homebrew-versions/issues",
]
# "Building GCC with plugin support requires a host that supports
# -fPIC, -shared, -ldl and -rdynamic."
args << "--enable-plugin" if MacOS.version > :tiger
# The pre-Mavericks toolchain requires the older DWARF-2 debugging data
# format to avoid failure during the stage 3 comparison of object files.
# See: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45248
args << "--with-dwarf2" if MacOS.version <= :mountain_lion
args << "--disable-nls" if build.without? "nls"
if build.with?("java") || build.with?("all-languages")
args << "--with-ecj-jar=#{Formula["ecj"].opt_share}/java/ecj.jar"
end
if !MacOS.prefer_64_bit? || build.without?("multilib")
args << "--disable-multilib"
else
args << "--enable-multilib"
end
args << "--enable-host-shared" if build.with?("jit") || build.with?("all-languages")
# Ensure correct install names when linking against libgcc_s;
# see discussion in https://github.com/Homebrew/homebrew/pull/34303
inreplace "libgcc/config/t-slibgcc-darwin", "@shlib_slibdir@", "#{HOMEBREW_PREFIX}/lib/gcc/#{version_suffix}"
mkdir "build" do
unless MacOS::CLT.installed?
# For Xcode-only systems, we need to tell the sysroot path.
# "native-system-headers" will be appended
args << "--with-native-system-header-dir=/usr/include"
args << "--with-sysroot=#{MacOS.sdk_path}"
end
system "../configure", *args
if build.with? "profiled-build"
# Takes longer to build, may bug out. Provided for those who want to
# optimise all the way to 11.
system "make", "profiledbootstrap"
else
system "make", "bootstrap"
end
# At this point `make check` could be invoked to run the testsuite. The
# deja-gnu and autogen formulae must be installed in order to do this.
system "make", "install"
end
# Handle conflicts between GCC formulae.
# Since GCC 4.8 libffi stuff are no longer shipped.
# Rename man7.
Dir.glob(man7/"*.7") { |file| add_suffix file, version_suffix }
# Even when suffixes are appended, the info pages conflict when
# install-info is run. fix this.
info.rmtree
# Since GCC 4.9 java properties are properly sandboxed.
end
def add_suffix(file, suffix)
dir = File.dirname(file)
ext = File.extname(file)
base = File.basename(file, ext)
File.rename file, "#{dir}/#{base}-#{suffix}#{ext}"
end
test do
(testpath/"hello-c.c").write <<-EOS.undent
#include <stdio.h>
int main()
{
puts("Hello, world!");
return 0;
}
EOS
system bin/"gcc-6", "-o", "hello-c", "hello-c.c"
assert_equal "Hello, world!\n", `./hello-c`
end
end
__END__
--- a/gcc/jit/Make-lang.in 2015-02-03 17:19:58.000000000 +0000
+++ b/gcc/jit/Make-lang.in 2015-04-08 22:08:24.000000000 +0100
@@ -85,8 +85,7 @@
$(jit_OBJS) libbackend.a libcommon-target.a libcommon.a \
$(CPPLIB) $(LIBDECNUMBER) $(LIBS) $(BACKENDLIBS) \
$(EXTRA_GCC_OBJS) \
- -Wl,--version-script=$(srcdir)/jit/libgccjit.map \
- -Wl,-soname,$(LIBGCCJIT_SONAME)
+ -Wl,-install_name,$(LIBGCCJIT_SONAME)
$(LIBGCCJIT_SONAME_SYMLINK): $(LIBGCCJIT_FILENAME)
ln -sf $(LIBGCCJIT_FILENAME) $(LIBGCCJIT_SONAME_SYMLINK)
+93
View File
@@ -0,0 +1,93 @@
class Gmp4 < Formula
desc "GNU multiple precision arithmetic library"
homepage "http://gmplib.org/"
# Track gcc infrastructure releases.
url "https://ftpmirror.gnu.org/gmp/gmp-4.3.2.tar.bz2"
mirror "https://ftp.gnu.org/gnu/gmp/gmp-4.3.2.tar.bz2"
mirror "ftp://ftp.gmplib.org/pub/gmp-4.3.2/gmp-4.3.2.tar.bz2"
mirror "ftp://gcc.gnu.org/pub/gcc/infrastructure/gmp-4.3.2.tar.bz2"
sha256 "936162c0312886c21581002b79932829aa048cfaf9937c6265aeaa14f1cd1775"
bottle do
cellar :any
revision 1
sha256 "5c5d632ea58479fba37a0844d0b9a4fd1e865e809286ada95d5484d72ab50a78" => :el_capitan
sha256 "932a2d0987dd26bbc3cb54b7d38d4cf6b0e5a4bd46fef8442b79b75f067abf6e" => :yosemite
sha256 "b7012c46ac9e5b5aa1004184e85a2e99fc047d9f92f1e8b82699ba1f1ea1f7bf" => :mavericks
end
keg_only "Conflicts with gmp in main repository."
option "with-32-bit"
option "without-check", "Do not run `make check` to verify libraries"
deprecated_option "32-bit" => "with-32-bit"
deprecated_option "skip-check" => "without-check"
fails_with :gcc_4_0 do
cause "Reports of problems using gcc 4.0 on Leopard: https://github.com/mxcl/homebrew/issues/issue/2302"
end
# Patches gmp.h to remove the __need_size_t define, which
# was preventing libc++ builds from getting the ptrdiff_t type
# Applied upstream in http://gmplib.org:8000/gmp/raw-rev/6cd3658f5621
patch :DATA
def install
args = ["--prefix=#{prefix}", "--enable-cxx"]
# Build 32-bit where appropriate, and help configure find 64-bit CPUs
if MacOS.prefer_64_bit? && !build.build_32_bit?
ENV.m64
args << "--build=x86_64-apple-darwin"
else
ENV.m32
args << "--host=none-apple-darwin"
end
system "./configure", *args
system "make"
ENV.deparallelize # Doesn't install in parallel on 8-core Mac Pro
system "make", "install"
# Different compilers and options can cause tests to fail even
# if everything compiles, so yes, we want to do this step.
system "make", "check" if build.with? "check"
end
test do
(testpath/"test.c").write <<-EOS.undent
#include <gmp.h>
int main()
{
mpz_t integ;
mpz_init (integ);
mpz_clear (integ);
return 0;
}
EOS
system ENV.cc, "test.c", "-L#{lib}", "-lgmp", "-I#{include}", "-o", "test"
system "./test"
end
end
__END__
diff --git a/gmp-h.in b/gmp-h.in
index d7fbc34..3c57c48 100644
--- a/gmp-h.in
+++ b/gmp-h.in
@@ -46,13 +46,11 @@ along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */
#ifndef __GNU_MP__
#define __GNU_MP__ 4
-#define __need_size_t /* tell gcc stddef.h we only want size_t */
#if defined (__cplusplus)
#include <cstddef> /* for size_t */
#else
#include <stddef.h> /* for size_t */
#endif
-#undef __need_size_t
/* Instantiated by configure. */
#if ! defined (__GMP_WITHIN_CONFIGURE)
+46
View File
@@ -0,0 +1,46 @@
class Isl011 < Formula
desc "Integer Set Library for the polyhedral model"
homepage "http://freecode.com/projects/isl"
# Track gcc infrastructure releases.
url "http://isl.gforge.inria.fr/isl-0.11.1.tar.bz2"
mirror "ftp://gcc.gnu.org/pub/gcc/infrastructure/isl-0.11.1.tar.bz2"
sha256 "095f4b54c88ca13a80d2b025d9c551f89ea7ba6f6201d701960bfe5c1466a98d"
bottle do
cellar :any
revision 1
sha256 "13e867965cd3a068d7261b4f07cb9835f8f3e4661f27d151318a3b04fccacbd0" => :el_capitan
sha256 "6d59cb6e7fc0aa67ff5a0734d00aaf712f424dcd6094f29b0dbbfa5d5f205a98" => :yosemite
sha256 "d747feae5b551c03d783886fd3aa58a86ce04a73753d1d8347b196f953d54ddd" => :mavericks
end
keg_only "Conflicts with isl in main repository."
depends_on "gmp4"
def install
system "./configure", "--disable-dependency-tracking",
"--disable-silent-rules",
"--prefix=#{prefix}",
"--with-gmp=system",
"--with-gmp-prefix=#{Formula["gmp4"].opt_prefix}"
system "make", "install"
(share/"gdb/auto-load").install Dir["#{lib}/*-gdb.py"]
end
test do
(testpath/"test.c").write <<-EOS.undent
#include <isl/ctx.h>
int main()
{
isl_ctx* ctx = isl_ctx_alloc();
isl_ctx_free(ctx);
return 0;
}
EOS
system ENV.cc, "test.c", "-L#{lib}", "-lisl",
"-I#{include}", "-I#{Formula["gmp4"].include}", "-o", "test"
system "./test"
end
end
+45
View File
@@ -0,0 +1,45 @@
class Isl014 < Formula
desc "Integer Set Library for the polyhedral model"
homepage "http://freecode.com/projects/isl"
# Track gcc infrastructure releases.
url "http://isl.gforge.inria.fr/isl-0.14.tar.bz2"
mirror "ftp://gcc.gnu.org/pub/gcc/infrastructure/isl-0.14.tar.bz2"
sha256 "7e3c02ff52f8540f6a85534f54158968417fd676001651c8289c705bd0228f36"
bottle do
cellar :any
sha256 "a6166d161841d901af54319a5434e955964712ae5cc19a88705d4f28669dc36b" => :yosemite
sha256 "cbcb2862709fa87913927a3ce261ac989f650a3506abde6c9eaa4da2d58b2b53" => :mavericks
sha256 "04997936c670ba1289574c526a62c69eae7e82c94c20b680df2f995df83b6d59" => :mountain_lion
end
keg_only "Conflicts with isl in main repository."
depends_on "gmp"
def install
system "./configure", "--disable-dependency-tracking",
"--disable-silent-rules",
"--prefix=#{prefix}",
"--with-gmp=system",
"--with-gmp-prefix=#{Formula["gmp"].opt_prefix}"
system "make"
system "make", "install"
(share/"gdb/auto-load").install Dir["#{lib}/*-gdb.py"]
end
test do
(testpath/"test.c").write <<-EOS.undent
#include <isl/ctx.h>
int main()
{
isl_ctx* ctx = isl_ctx_alloc();
isl_ctx_free(ctx);
return 0;
}
EOS
system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lisl", "-o", "test"
system "./test"
end
end
+57
View File
@@ -0,0 +1,57 @@
class Libmpc08 < Formula
desc "C library for high precision complex numbers"
homepage "http://multiprecision.org"
# Track gcc infrastructure releases.
url "http://multiprecision.org/mpc/download/mpc-0.8.1.tar.gz"
mirror "ftp://gcc.gnu.org/pub/gcc/infrastructure/mpc-0.8.1.tar.gz"
sha256 "e664603757251fd8a352848276497a4c79b7f8b21fd8aedd5cc0598a38fee3e4"
bottle do
cellar :any
revision 1
sha256 "e3bb3e309c6c5bd709fee9a136a642289357fcc4aa9c793df1c96785947c99d9" => :el_capitan
sha256 "79a024cd86280716cc82f35e88ae9695f0606d2b09e585d3d9a0f7fc800eec20" => :yosemite
sha256 "105469fc116eae8a19000848c91ea1bea71ad5e3f395624938030c3813eca0ed" => :mavericks
end
keg_only "Conflicts with libmpc in main repository."
depends_on "gmp4"
depends_on "mpfr2"
def install
args = [
"--prefix=#{prefix}",
"--disable-dependency-tracking",
"--with-gmp=#{Formula["gmp4"].opt_prefix}",
"--with-mpfr=#{Formula["mpfr2"].opt_prefix}",
]
system "./configure", *args
system "make"
system "make", "check"
system "make", "install"
end
test do
(testpath/"test.c").write <<-EOS.undent
#include <mpc.h>
int main()
{
mpc_t x;
mpc_init2 (x, 256);
mpc_clear (x);
return 0;
}
EOS
gmp4 = Formula["gmp4"]
mpfr2 = Formula["mpfr2"]
system ENV.cc, "test.c",
"-I#{gmp4.include}", "-L#{gmp4.lib}", "-lgmp",
"-I#{mpfr2.include}", "-L#{mpfr2.lib}", "-lmpfr",
"-I#{include}", "-L#{lib}", "-lmpc",
"-o", "test"
system "./test"
end
end
+565
View File
@@ -0,0 +1,565 @@
class LlvmAT38 < Formula
desc "Next-gen compiler infrastructure"
homepage "https://llvm.org/"
url "https://llvm.org/releases/3.8.1/llvm-3.8.1.src.tar.xz"
sha256 "6e82ce4adb54ff3afc18053d6981b6aed1406751b8742582ed50f04b5ab475f9"
resource "clang" do
url "https://llvm.org/releases/3.8.1/cfe-3.8.1.src.tar.xz"
sha256 "4cd3836dfb4b88b597e075341cae86d61c63ce3963e45c7fe6a8bf59bb382cdf"
end
resource "clang-tools-extra" do
url "https://llvm.org/releases/3.8.1/clang-tools-extra-3.8.1.src.tar.xz"
sha256 "664a5c60220de9c290bf2a5b03d902ab731a4f95fe73a00856175ead494ec396"
end
resource "compiler-rt" do
url "https://llvm.org/releases/3.8.1/compiler-rt-3.8.1.src.tar.xz"
sha256 "0df011dae14d8700499dfc961602ee0a9572fef926202ade5dcdfe7858411e5c"
end
resource "polly" do
url "https://llvm.org/releases/3.8.1/polly-3.8.1.src.tar.xz"
sha256 "453c27e1581614bb3b6351bf5a2da2939563ea9d1de99c420f85ca8d87b928a2"
end
resource "lld" do
url "https://llvm.org/releases/3.8.1/lld-3.8.1.src.tar.xz"
sha256 "2bd9be8bb18d82f7f59e31ea33b4e58387dbdef0bc11d5c9fcd5ce9a4b16dc00"
end
resource "openmp" do
url "https://llvm.org/releases/3.8.1/openmp-3.8.1.src.tar.xz"
sha256 "68fcde6ef34e0275884a2de3450a31e931caf1d6fda8606ef14f89c4123617dc"
end
resource "libcxx" do
url "https://llvm.org/releases/3.8.1/libcxx-3.8.1.src.tar.xz"
sha256 "77d7f3784c88096d785bd705fa1bab7031ce184cd91ba8a7008abf55264eeecc"
end
resource "compilerrt_cmakelists" do
url "https://trac.macports.org/raw-attachment/ticket/54242/proj-compilerrt-lib-builtins-%20alternate%20incomplete%20CMakeLists.txt"
sha256 "c227abe2ab6836ff2de733567a4590df0c87ce0bba3d4e00c43fcf79745b6793"
end
if MacOS.version <= :snow_leopard
resource "libcxxabi" do
url "https://llvm.org/releases/3.8.1/libcxxabi-3.8.1.src.tar.xz"
sha256 "e1b55f7be3fad746bdd3025f43e42d429fb6194aac5919c2be17c4a06314dae1"
end
end
bottle do
rebuild 1
sha256 "f84012d316cc335ebd93e4ac6fad1548eef54da23a8c690da5d517f1c78d72fb" => :sierra
sha256 "889759dd33dcfccb62c9ddc89541e201afbd88572d165dc0bdf5d945e681d670" => :el_capitan
sha256 "e49da061ea21b5490c916a224f4d7c5ec85e9e982bc0e377817cad3296b4e27e" => :yosemite
end
patch :DATA
# Giant batch of patches that fix builds on 10.4 and 10.5
if MacOS.version < :snow_leopard
resource "4000-patch-clang-lib-codegen-targetinfo-ppc-38.diff" do
url "https://github.com/kencu/LeopardPorts/raw/0a0fcace43631235c274410d5664c053cb462ea9/lang/llvm-3.8/files/4000-patch-clang-lib-codegen-targetinfo-ppc-38.diff"
sha256 "3ec44ba60d21611c54a49bb521a0e59ab3d77d728d806f4e5e28d3db0545e139"
end
resource "4001-patch-clang-3.8-gccabi-sema.diff" do
url "https://github.com/kencu/LeopardPorts/raw/0a0fcace43631235c274410d5664c053cb462ea9/lang/llvm-3.8/files/4001-patch-clang-3.8-gccabi-sema.diff"
sha256 "6d577bff4afce6d7978d17ae719a73717933e31da9f29a15ef4e46fd32cb630c"
end
resource "4001-patch-llvm-Only-call-setpriority-PRIO_DARWIN_THREAD-0-PRIO_DARW.diff" do
url "https://github.com/kencu/LeopardPorts/raw/0a0fcace43631235c274410d5664c053cb462ea9/lang/llvm-3.8/files/4001-patch-llvm-Only-call-setpriority-PRIO_DARWIN_THREAD-0-PRIO_DARW.diff"
sha256 "fd0ba715ed4914e88a947cff440845ee429f6486d44e1cbe485d8d1d475beda2"
end
resource "4002-patch-clang-3.8-gccabi-mangler.diff" do
url "https://github.com/kencu/LeopardPorts/raw/0a0fcace43631235c274410d5664c053cb462ea9/lang/llvm-3.8/files/4002-patch-clang-3.8-gccabi-mangler.diff"
sha256 "38dc8f2e12bd925dee2235f309068de5c60360d246071d72fbfbcb14981256f4"
end
resource "999-patch-clang-3.8-Toolchains-default-always-libcxx.diff" do
url "https://github.com/kencu/LeopardPorts/raw/0a0fcace43631235c274410d5664c053cb462ea9/lang/llvm-3.8/files/999-patch-clang-3.8-Toolchains-default-always-libcxx.diff"
sha256 "edba75fe8cd12ca80426e98bae8a140a923848fd791ef2c41173db4d1b18d25e"
end
resource "0001-Set-the-Mach-O-CPU-Subtype-to-ppc7400-when-targeting.patch" do
url "https://github.com/kencu/LeopardPorts/raw/0a0fcace43631235c274410d5664c053cb462ea9/lang/llvm-3.8/files/0001-Set-the-Mach-O-CPU-Subtype-to-ppc7400-when-targeting.patch"
sha256 "2419fa4c03d8b2b6adad520e559cf461d39c21c60b0d4ea6b7af00ff2046908b"
end
resource "0002-Define-EXC_MASK_CRASH-and-MACH_EXCEPTION_CODES-if-th.patch" do
url "https://github.com/kencu/LeopardPorts/raw/0a0fcace43631235c274410d5664c053cb462ea9/lang/llvm-3.8/files/0002-Define-EXC_MASK_CRASH-and-MACH_EXCEPTION_CODES-if-th.patch"
sha256 "45eedac790efdbbffcac270c7ab2458333937005b7b76af3d15e5277256412d2"
end
resource "0003-MacPorts-Only-Update-install-targets-for-clang-subpo.patch" do
url "https://github.com/kencu/LeopardPorts/raw/0a0fcace43631235c274410d5664c053cb462ea9/lang/llvm-3.8/files/0003-MacPorts-Only-Update-install-targets-for-clang-subpo.patch"
sha256 "74409cd8842be758d8ee6cb71a07b23a1b050c33aa715c1f2b6eacecdde9f79c"
end
resource "0004-MacPorts-Only-Use-full-path-for-the-dylib-id-instead.patch" do
url "https://github.com/kencu/LeopardPorts/raw/0a0fcace43631235c274410d5664c053cb462ea9/lang/llvm-3.8/files/0004-MacPorts-Only-Use-full-path-for-the-dylib-id-instead.patch"
sha256 "68595e9e850a55b64485f85aa758654c71024897fb4c7671b0aaf38f0fc1cd22"
end
resource "0005-MacPorts-Only-Don-t-embed-the-deployment-target-in-t.patch" do
url "https://github.com/kencu/LeopardPorts/raw/0a0fcace43631235c274410d5664c053cb462ea9/lang/llvm-3.8/files/0005-MacPorts-Only-Don-t-embed-the-deployment-target-in-t.patch"
sha256 "76cfa2fceb6a31430629f49e4c17e377970d37cc3a9fa49aba6c620bfb406276"
end
resource "0006-MacPorts-Only-Skip-checking-for-python-in-configure.patch" do
url "https://github.com/kencu/LeopardPorts/raw/0a0fcace43631235c274410d5664c053cb462ea9/lang/llvm-3.8/files/0006-MacPorts-Only-Skip-checking-for-python-in-configure.patch"
sha256 "e77899c8e30615dd0530db915eae491375008dc8ab41effabaf85a5c761537e1"
end
resource "0007-Remove-override-of-raise-abort-and-__assert_rtn.patch" do
url "https://github.com/kencu/LeopardPorts/raw/0a0fcace43631235c274410d5664c053cb462ea9/lang/llvm-3.8/files/0007-Remove-override-of-raise-abort-and-__assert_rtn.patch"
sha256 "c4798a35c187ddab3daed3316e87c63e54e02561dc33d861f55ee4fcca4e0737"
end
resource "0008-CMake-Use-CMake-s-default-RPATH-for-the-unit-tests.patch" do
url "https://github.com/kencu/LeopardPorts/raw/0a0fcace43631235c274410d5664c053cb462ea9/lang/llvm-3.8/files/0008-CMake-Use-CMake-s-default-RPATH-for-the-unit-tests.patch"
sha256 "281ac3a1413eb2f9b8a81d15750606f2fbd37175aa1b8f2fa81fe7dfcf3481b7"
end
resource "0009-CMake-Fix-rpath-construction-for-out-of-tree-builds.patch" do
url "https://github.com/kencu/LeopardPorts/raw/0a0fcace43631235c274410d5664c053cb462ea9/lang/llvm-3.8/files/0009-CMake-Fix-rpath-construction-for-out-of-tree-builds.patch"
sha256 "9b419798df9eb14956f8b11ed69cce51633c0886a4810fb43fb46e68ac89a72a"
end
resource "0010-CMake-Make-CMAKE_INSTALL_RPATH-work-again.patch" do
url "https://github.com/kencu/LeopardPorts/raw/0a0fcace43631235c274410d5664c053cb462ea9/lang/llvm-3.8/files/0010-CMake-Make-CMAKE_INSTALL_RPATH-work-again.patch"
sha256 "e3907117f8bca7c5917bd53d3c064d25d526d521afed042629cdd344d3edc811"
end
resource "0011-CMake-Fix-llvm_setup_rpath-function.patch" do
url "https://github.com/kencu/LeopardPorts/raw/0a0fcace43631235c274410d5664c053cb462ea9/lang/llvm-3.8/files/0011-CMake-Fix-llvm_setup_rpath-function.patch"
sha256 "4b5e53c07611bb3c3ad9f501d92651617006d128c554ef461dc611c0a7473f82"
end
resource "1001-MacPorts-Only-Prepare-clang-format-for-replacement-w.patch" do
url "https://github.com/kencu/LeopardPorts/raw/0a0fcace43631235c274410d5664c053cb462ea9/lang/llvm-3.8/files/1001-MacPorts-Only-Prepare-clang-format-for-replacement-w.patch"
sha256 "36ae75541f4a37bc1da59768d85f6710d5801d4d4122ede2823089435ff8678d"
end
resource "1002-MacPorts-Only-Fall-back-on-xcodebuild-sdk-when-xcrun.patch" do
url "https://github.com/kencu/LeopardPorts/raw/0a0fcace43631235c274410d5664c053cb462ea9/lang/llvm-3.8/files/1002-MacPorts-Only-Fall-back-on-xcodebuild-sdk-when-xcrun.patch"
sha256 "d6fa1f75f239ba6e290cb5eccbf1a26f403a3831d056b29c9f17b84ffca30e68"
end
resource "1003-MacPorts-Only-Fix-name-of-scan-view-executable-insid.patch" do
url "https://github.com/kencu/LeopardPorts/raw/0a0fcace43631235c274410d5664c053cb462ea9/lang/llvm-3.8/files/1003-MacPorts-Only-Fix-name-of-scan-view-executable-insid.patch"
sha256 "e5ea01023665cfdff884403d1c4fbde3219aed51fe0712c7935d1b39728f11ca"
end
resource "1004-MacPorts-Only-Relocate-clang-resources-using-llvm-ve.patch" do
url "https://github.com/kencu/LeopardPorts/raw/0a0fcace43631235c274410d5664c053cb462ea9/lang/llvm-3.8/files/1004-MacPorts-Only-Relocate-clang-resources-using-llvm-ve.patch"
sha256 "9123a490e25f1ff0ac84496180d3f287d247b9ab45dc6ce4adc92c300311eba9"
end
resource "1005-Default-to-ppc7400-for-OSX-10.5.patch" do
url "https://github.com/kencu/LeopardPorts/raw/0a0fcace43631235c274410d5664c053cb462ea9/lang/llvm-3.8/files/1005-Default-to-ppc7400-for-OSX-10.5.patch"
sha256 "b1d6bc9bed47a15d2e9aa9010a3dcdbcc55ca86e52f7fbe633259fe6773c891b"
end
resource "1006-Only-call-setpriority-PRIO_DARWIN_THREAD-0-PRIO_DARW.patch" do
url "https://github.com/kencu/LeopardPorts/raw/0a0fcace43631235c274410d5664c053cb462ea9/lang/llvm-3.8/files/1006-Only-call-setpriority-PRIO_DARWIN_THREAD-0-PRIO_DARW.patch"
sha256 "e0575b6015a56992f10ea4bf10419fc7495cb1591d7214329fdf286048ba0ca4"
end
resource "1007-Default-to-fragile-ObjC-runtime-when-targeting-darwi.patch" do
url "https://github.com/kencu/LeopardPorts/raw/0a0fcace43631235c274410d5664c053cb462ea9/lang/llvm-3.8/files/1007-Default-to-fragile-ObjC-runtime-when-targeting-darwi.patch"
sha256 "637dd035174e5ce5871f08d004efbd80a32a34dfd39d1ba9c0a2b8c2eee0957f"
end
resource "1008-Fixup-libstdc-header-search-paths-for-older-versions.patch" do
url "https://github.com/kencu/LeopardPorts/raw/0a0fcace43631235c274410d5664c053cb462ea9/lang/llvm-3.8/files/1008-Fixup-libstdc-header-search-paths-for-older-versions.patch"
sha256 "a51d4633dc88ab5adbbeb705e60f9c55dbabb3b9e26b40268aab22686fcfb70f"
end
resource "1009-Darwin-Stop-linking-libclang_rt.eprintf.a.patch" do
url "https://github.com/kencu/LeopardPorts/raw/0a0fcace43631235c274410d5664c053cb462ea9/lang/llvm-3.8/files/1009-Darwin-Stop-linking-libclang_rt.eprintf.a.patch"
sha256 "3663d5e4e16447f4438cf02dd4eba5473dd10fa93759e38ea7a7eb239b6c0882"
end
resource "2001-MacPorts-Only-Comment-out-SL-cctools-workaround.patch" do
url "https://github.com/kencu/LeopardPorts/raw/0a0fcace43631235c274410d5664c053cb462ea9/lang/llvm-3.8/files/2001-MacPorts-Only-Comment-out-SL-cctools-workaround.patch"
sha256 "09de02d6acba21e51a34f95be19ff3030bdda9e7921e884159217bc2434699df"
end
resource "2002-Update-CheckArches-to-fallback-on-Intel-ppc-if-ld-v-.patch" do
url "https://github.com/kencu/LeopardPorts/raw/0a0fcace43631235c274410d5664c053cb462ea9/lang/llvm-3.8/files/2002-Update-CheckArches-to-fallback-on-Intel-ppc-if-ld-v-.patch"
sha256 "1bdf6a86e767ab66467aac2b79c49879a5e8325eba98d26faa1803546e582a96"
end
resource "2003-Fall-back-on-xcodebuild-sdk-when-xcrun-sdk-is-not-su.patch" do
url "https://github.com/kencu/LeopardPorts/raw/0a0fcace43631235c274410d5664c053cb462ea9/lang/llvm-3.8/files/2003-Fall-back-on-xcodebuild-sdk-when-xcrun-sdk-is-not-su.patch"
sha256 "e2c98df8a0afc7710ce077094e05eb9a8c2bc04fcd1b9333eb179c73448ac98a"
end
resource "2004-On-darwin-build-ppc-slices-of-the-compiler-runtime-i.patch" do
url "https://github.com/kencu/LeopardPorts/raw/0a0fcace43631235c274410d5664c053cb462ea9/lang/llvm-3.8/files/2004-On-darwin-build-ppc-slices-of-the-compiler-runtime-i.patch"
sha256 "5ee665321f4f62bef6aa484c71f1204836b790007d0392f19d1fd95a18c0b632"
end
resource "2005-MacPorts-Only-Don-t-build-x86_64h-slice-of-compiler-.patch" do
url "https://github.com/kencu/LeopardPorts/raw/0a0fcace43631235c274410d5664c053cb462ea9/lang/llvm-3.8/files/2005-MacPorts-Only-Don-t-build-x86_64h-slice-of-compiler-.patch"
sha256 "187323919a85479fa6aaee323169456a05a9ab39e83219efa1d440481858c47c"
end
resource "2006-MacPorts-Only-Fix-regression-introduced-when-fixing-.patch" do
url "https://github.com/kencu/LeopardPorts/raw/0a0fcace43631235c274410d5664c053cb462ea9/lang/llvm-3.8/files/2006-MacPorts-Only-Fix-regression-introduced-when-fixing-.patch"
sha256 "669cf7dd9eefa8a2c00ec890f4b3be6de51f64661fbb4452f518223b42676285"
end
resource "2007-MacPorts-Only-Don-t-check-for-the-macosx.internal-SD.patch" do
url "https://github.com/kencu/LeopardPorts/raw/0a0fcace43631235c274410d5664c053cb462ea9/lang/llvm-3.8/files/2007-MacPorts-Only-Don-t-check-for-the-macosx.internal-SD.patch"
sha256 "9ea9586bc82d7ef5428c5435504f132bb009876f9accd9ba3b2065ed7862c2b7"
end
resource "2008-CMake-NFC-Move-macro-definitions-out-of-config-ix.cm.patch" do
url "https://github.com/kencu/LeopardPorts/raw/0a0fcace43631235c274410d5664c053cb462ea9/lang/llvm-3.8/files/2008-CMake-NFC-Move-macro-definitions-out-of-config-ix.cm.patch"
sha256 "9577ccce75140887e7e3f7ac203414ceb1d8bb8956e0ad88e9294b19c386cbda"
end
resource "2009-CMake-Adding-some-missing-CMake-includes.-NFC.patch" do
url "https://github.com/kencu/LeopardPorts/raw/0a0fcace43631235c274410d5664c053cb462ea9/lang/llvm-3.8/files/2009-CMake-Adding-some-missing-CMake-includes.-NFC.patch"
sha256 "f7f4b2a1654464ca52336e3852e17f0d130a7f804b08e8692c5de4fc1d4ed192"
end
resource "2010-CMake-Adding-another-missing-include.-NFC.patch" do
url "https://github.com/kencu/LeopardPorts/raw/0a0fcace43631235c274410d5664c053cb462ea9/lang/llvm-3.8/files/2010-CMake-Adding-another-missing-include.-NFC.patch"
sha256 "0cfb1d89bcd4c2a54cccf2350c34ddd5eeda1aa376b7d377187f9c2f2fb782b2"
end
resource "2011-CMake-NFC.-Add-support-for-testing-the-compiler-with.patch" do
url "https://github.com/kencu/LeopardPorts/raw/0a0fcace43631235c274410d5664c053cb462ea9/lang/llvm-3.8/files/2011-CMake-NFC.-Add-support-for-testing-the-compiler-with.patch"
sha256 "9bab589b168d1b5e428ff41f1ae2cc7d44b22c9fe25c73ad9b0b75e45055cf2b"
end
resource "2012-Add-missing-include.patch" do
url "https://github.com/kencu/LeopardPorts/raw/0a0fcace43631235c274410d5664c053cb462ea9/lang/llvm-3.8/files/2012-Add-missing-include.patch"
sha256 "792e09f615e3873854f3071d8a2deb3a9b3717664be62bcb110285cec4c66479"
end
resource "3001-buildit-build-fix-for-Leopard.patch" do
url "https://github.com/kencu/LeopardPorts/raw/0a0fcace43631235c274410d5664c053cb462ea9/lang/llvm-3.8/files/3001-buildit-build-fix-for-Leopard.patch"
sha256 "f2e8ed5a18c9995182584c2b904f92eff67efb62a88d7bc8ea31738fac6ad2d8"
end
resource "3002-buildit-Set-compatibility-version-to-RC_ProjectSourc.patch" do
url "https://github.com/kencu/LeopardPorts/raw/0a0fcace43631235c274410d5664c053cb462ea9/lang/llvm-3.8/files/3002-buildit-Set-compatibility-version-to-RC_ProjectSourc.patch"
sha256 "c7fda46fac6f164d39b5d5a364c533f890a4d3d3035585e8f44d13765609531f"
end
resource "3003-Fix-local-and-iterator-when-building-with-Lion-and-n.patch" do
url "https://github.com/kencu/LeopardPorts/raw/0a0fcace43631235c274410d5664c053cb462ea9/lang/llvm-3.8/files/3003-Fix-local-and-iterator-when-building-with-Lion-and-n.patch"
sha256 "9d2ff1cb46c504eccd6656a4495b518ea5942a254c4f2bfa8a64f0e72b8c1148"
end
resource "3004-Fix-missing-long-long-math-prototypes-when-using-the.patch" do
url "https://github.com/kencu/LeopardPorts/raw/0a0fcace43631235c274410d5664c053cb462ea9/lang/llvm-3.8/files/3004-Fix-missing-long-long-math-prototypes-when-using-the.patch"
sha256 "4e5b21353303ce3ca4ce718c68bc017e84f6c5177d732c04b95da496ca0f214d"
end
resource "3005-implement-atomic-using-mutex-lock_guard-for-64b-ops-.patch" do
url "https://github.com/kencu/LeopardPorts/raw/0a0fcace43631235c274410d5664c053cb462ea9/lang/llvm-3.8/files/3005-implement-atomic-using-mutex-lock_guard-for-64b-ops-.patch"
sha256 "136a400af5ff3d686ee95dd156c01cde7c678f04b132414c12c9d8b7adff2c39"
end
resource "compiler_rt-toolchain.patch" do
url "https://github.com/kencu/LeopardPorts/raw/0a0fcace43631235c274410d5664c053cb462ea9/lang/llvm-3.8/files/compiler_rt-toolchain.patch"
sha256 "5ddabde13f5563171eec96b530e606a4a3193a1546ae7f25aafb6998f426d92b"
end
resource "leopard-no-asan.patch" do
url "https://github.com/kencu/LeopardPorts/raw/0a0fcace43631235c274410d5664c053cb462ea9/lang/llvm-3.8/files/leopard-no-asan.patch"
sha256 "72ff067d3d30ec3f7e86221d40f2e0b39b36ed70c7815b7e1b9729b85e4dc64b"
end
resource "leopard-no-blocks.patch" do
url "https://github.com/kencu/LeopardPorts/raw/0a0fcace43631235c274410d5664c053cb462ea9/lang/llvm-3.8/files/leopard-no-blocks.patch"
sha256 "1bc301ad8180be3b5ef8fca513e6f3534112d531bb8cfd6282a583cf438afe0f"
end
resource "llvm-skip-unittests.patch" do
url "https://github.com/kencu/LeopardPorts/raw/0a0fcace43631235c274410d5664c053cb462ea9/lang/llvm-3.8/files/llvm-skip-unittests.patch"
sha256 "2ba50b6256d5630ffcb6aaf3a8611f6c77e5653a951f3e595beb3bc9d85ca5c3"
end
resource "openmp-locations.patch" do
url "https://github.com/kencu/LeopardPorts/raw/0a0fcace43631235c274410d5664c053cb462ea9/lang/llvm-3.8/files/openmp-locations.patch"
sha256 "ed079cf0a66ba6d60b96115b22b9418d1e27839c07719771b4ecd3e04979dbb3"
end
end
if MacOS.version < :snow_leopard
depends_on "cctools" => :build
depends_on "python" => :build
end
depends_on "gnu-sed" => :build
depends_on "gmp"
depends_on "libffi"
# version suffix
def ver
"3.8"
end
# LLVM installs its own standard library which confuses stdlib checking.
cxxstdlib_check :skip
# Apple's libstdc++ is too old to build LLVM
fails_with :gcc
def install
# One of llvm makefiles relies on gnu sed behavior to generate CMake modules correctly
ENV.prepend_path "PATH", "#{Formula["gnu-sed"].opt_libexec}/gnubin"
# Apple's libstdc++ is too old to build LLVM
ENV.libcxx if ENV.compiler == :clang
clang_buildpath = buildpath/"tools/clang"
compilerrt_buildpath = buildpath/"projects/compiler-rt"
libcxx_buildpath = buildpath/"projects/libcxx"
libcxxabi_buildpath = buildpath/"libcxxabi" # build failure if put in projects due to no Makefile
clang_buildpath.install resource("clang")
compilerrt_buildpath.install resource("compiler-rt")
resource("compilerrt_cmakelists").stage do
target = (compilerrt_buildpath/"lib/builtins/CMakeLists.txt")
target.unlink
mv File.basename(resource("compilerrt_cmakelists").url), target.to_s
end
libcxx_buildpath.install resource("libcxx")
(buildpath/"tools/polly").install resource("polly")
(buildpath/"tools/clang/tools/extra").install resource("clang-tools-extra")
(buildpath/"projects/openmp").install resource("openmp")
# HUGE HACK
# These patches cover several subprojects, so they can't use Homebrew's normal
# patching mechanism.
resources.select { |r| r.url.end_with?(".diff") || r.url.end_with?(".patch") }.each do |res|
buildpath.install res
filename = res.name
system "patch", "-f", "-p1", "-i", filename
rm filename
end
ENV["REQUIRES_RTTI"] = "1"
install_prefix = lib/"llvm-#{ver}"
args = %W[
--prefix=#{install_prefix}
--enable-optimized
--disable-bindings
--with-gmp=#{Formula["gmp"].opt_prefix}
--enable-shared
--enable-targets=all
--enable-libffi
]
if Hardware::CPU.type == :ppc
args << "--with-clang-default-openmp-runtime=libgomp"
end
mktemp do
system buildpath/"configure", *args
system "make", "VERBOSE=1", "install"
cd "tools/clang" do
system "make", "install"
end
end
if MacOS.version <= :snow_leopard
libcxxabi_buildpath.install resource("libcxxabi")
cd libcxxabi_buildpath/"lib" do
# Set rpath to save user from setting DYLD_LIBRARY_PATH
inreplace "buildit", "-install_name /usr/lib/libc++abi.dylib", "-install_name #{install_prefix}/usr/lib/libc++abi.dylib"
ENV["CC"] = "#{install_prefix}/bin/clang"
ENV["CXX"] = "#{install_prefix}/bin/clang++"
ENV["TRIPLE"] = "*-apple-*"
system "./buildit"
(install_prefix/"usr/lib").install "libc++abi.dylib"
cp libcxxabi_buildpath/"include/cxxabi.h", install_prefix/"lib/c++/v1"
end
# Snow Leopard make rules hardcode libc++ and libc++abi path.
# Change to Cellar path here.
inreplace "#{libcxx_buildpath}/lib/buildit" do |s|
s.gsub! "-install_name /usr/lib/libc++.1.dylib", "-install_name #{install_prefix}/usr/lib/libc++.1.dylib"
s.gsub! "-Wl,-reexport_library,/usr/lib/libc++abi.dylib", "-Wl,-reexport_library,#{install_prefix}/usr/lib/libc++abi.dylib"
end
# On Snow Leopard and older system libc++abi is not shipped but
# needed here. It is hard to tweak environment settings to change
# include path as libc++ uses a custom build script, so just
# symlink the needed header here.
ln_s libcxxabi_buildpath/"include/cxxabi.h", libcxx_buildpath/"include"
end
# Putting libcxx in projects only ensures that headers are installed.
# Manually "make install" to actually install the shared libs.
libcxx_make_args = [
# Use the built clang for building
"CC=#{install_prefix}/bin/clang",
"CXX=#{install_prefix}/bin/clang++",
# Properly set deployment target, which is needed for Snow Leopard
"MACOSX_DEPLOYMENT_TARGET=#{MacOS.version}",
# The following flags are needed so it can be installed correctly.
"DSTROOT=#{install_prefix}",
"SYMROOT=#{libcxx_buildpath}",
]
system "make", "-C", libcxx_buildpath, "install", *libcxx_make_args
(share/"clang/tools").install Dir["tools/clang/tools/scan-{build,view}"]
inreplace share/"clang/tools/scan-build/bin/scan-build", "$RealBin/bin/clang", bin/"clang-#{ver}"
bin.install_symlink share/"clang/tools/scan-build/bin/scan-build", share/"clang/tools/scan-view/bin/scan-view"
man1.install_symlink share/"clang/tools/scan-build/man/scan-build.1"
(lib/"python2.7/site-packages").install "bindings/python/llvm" => "llvm-#{ver}",
clang_buildpath/"bindings/python/clang" => "clang-#{ver}"
Dir.glob(install_prefix/"bin/*") do |exec_path|
basename = File.basename(exec_path)
bin.install_symlink exec_path => "#{basename}-#{ver}"
end
Dir.glob(install_prefix/"share/man/man1/*") do |manpage|
basename = File.basename(manpage, ".1")
man1.install_symlink manpage => "#{basename}-#{ver}.1"
end
end
def caveats; <<-EOS.undent
Extra tools are installed in #{opt_share}/clang-#{ver}
To link to libc++, something like the following is required:
CXX="clang++-#{ver} -stdlib=libc++"
CXXFLAGS="$CXXFLAGS -nostdinc++ -I#{opt_lib}/llvm-#{ver}/include/c++/v1"
LDFLAGS="$LDFLAGS -L#{opt_lib}/llvm-#{ver}/lib"
EOS
end
test do
# test for sed errors since some llvm makefiles assume that sed
# understands '\n' which is true for gnu sed and not for bsd sed.
assert_no_match /PATH\)n/, (lib/"llvm-3.8/share/llvm/cmake/LLVMConfig.cmake").read
system "#{bin}/llvm-config-#{ver}", "--version"
end
end
__END__
diff --git a/Makefile.rules b/Makefile.rules
index ebebc0a..b0bb378 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -600,7 +600,12 @@ ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW))
ifneq ($(HOST_OS),Darwin)
LD.Flags += $(RPATH) -Wl,'$$ORIGIN'
else
- LD.Flags += -Wl,-install_name -Wl,"@rpath/lib$(LIBRARYNAME)$(SHLIBEXT)"
+ LD.Flags += -Wl,-install_name
+ ifdef LOADABLE_MODULE
+ LD.Flags += -Wl,"$(PROJ_libdir)/$(LIBRARYNAME)$(SHLIBEXT)"
+ else
+ LD.Flags += -Wl,"$(PROJ_libdir)/$(SharedPrefix)$(LIBRARYNAME)$(SHLIBEXT)"
+ endif
endif
endif
endif
diff --git a/configure b/configure
index c94fb13..8d61650 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.60 for LLVM 3.8.0.
+# Generated by GNU Autoconf 2.60 for LLVM 3.8.1.
#
# Report bugs to <http://llvm.org/bugs/>.
#
@@ -561,8 +561,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='LLVM'
PACKAGE_TARNAME='llvm'
-PACKAGE_VERSION='3.8.0'
-PACKAGE_STRING='LLVM 3.8.0'
+PACKAGE_VERSION='3.8.1'
+PACKAGE_STRING='LLVM 3.8.1'
PACKAGE_BUGREPORT='http://llvm.org/bugs/'
ac_unique_file="lib/IR/Module.cpp"
@@ -1334,7 +1334,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures LLVM 3.8.0 to adapt to many kinds of systems.
+\`configure' configures LLVM 3.8.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1400,7 +1400,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of LLVM 3.8.0:";;
+ short | recursive ) echo "Configuration of LLVM 3.8.1:";;
esac
cat <<\_ACEOF
@@ -1584,7 +1584,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-LLVM configure 3.8.0
+LLVM configure 3.8.1
generated by GNU Autoconf 2.60
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1600,7 +1600,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by LLVM $as_me 3.8.0, which was
+It was created by LLVM $as_me 3.8.1, which was
generated by GNU Autoconf 2.60. Invocation command line was
$ $0 $@
@@ -1956,7 +1956,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
LLVM_VERSION_MAJOR=3
LLVM_VERSION_MINOR=8
-LLVM_VERSION_PATCH=0
+LLVM_VERSION_PATCH=1
LLVM_VERSION_SUFFIX=
@@ -18279,7 +18279,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by LLVM $as_me 3.8.0, which was
+This file was extended by LLVM $as_me 3.8.1, which was
generated by GNU Autoconf 2.60. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -18332,7 +18332,7 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-LLVM config.status 3.8.0
+LLVM config.status 3.8.1
configured by $0, generated by GNU Autoconf 2.60,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+6 -7
View File
@@ -1,17 +1,16 @@
class Miniupnpc < Formula
desc "UpnP IGD client library and daemon"
homepage "http://miniupnp.tuxfamily.org"
url "http://miniupnp.tuxfamily.org/files/download.php?file=miniupnpc-1.9.20150609.tar.gz"
sha256 "86e6ccec5b660ba6889893d1f3fca21db087c6466b1a90f495a1f87ab1cd1c36"
homepage "https://miniupnp.tuxfamily.org"
url "http://miniupnp.tuxfamily.org/files/download.php?file=miniupnpc-2.0.20170509.tar.gz"
sha256 "d3c368627f5cdfb66d3ebd64ca39ba54d6ff14a61966dbecb8dd296b7039f16a"
bottle do
cellar :any
sha256 "aecb5c84e988af64b0d3d4c3f090d033a6daaad5fe145cbec599537bcba65646" => :el_capitan
sha256 "b31e62a6331c82219bdf674c9d5b366f1288f203b947f446bbade154ab54025d" => :yosemite
sha256 "ffc0d9665983408ee86c4e5aae53c66abb22f56d700c8ceea6bd01f2a3875c75" => :mavericks
sha256 "ba1333c0e47f68fb0b11e945ada0aff81b69517aea4356f936fed0eaf357475e" => :mountain_lion
end
# /usr/bin/ld: -i argument: nstall_name must have a ':' between its symbol names
depends_on :ld64
def install
system "make", "INSTALLPREFIX=#{prefix}", "install"
end
+57
View File
@@ -0,0 +1,57 @@
class Mpfr2 < Formula
desc "Multiple-precision floating-point computations C lib"
homepage "http://www.mpfr.org/"
# Track gcc infrastructure releases.
url "http://www.mpfr.org/mpfr-2.4.2/mpfr-2.4.2.tar.bz2"
mirror "ftp://gcc.gnu.org/pub/gcc/infrastructure/mpfr-2.4.2.tar.bz2"
sha256 "c7e75a08a8d49d2082e4caee1591a05d11b9d5627514e678f02d66a124bcf2ba"
bottle do
cellar :any
revision 1
sha256 "08e5aa9a8b8631afe6478ab7973a152316237cbddcb0f76ddaebebec99ee77b0" => :el_capitan
sha256 "bb6d912bd1688077a961a91ae12a94e372e339546df84295013473bb9882def5" => :yosemite
sha256 "8745f1ca353d9bd28c07ac4c602b2836ca6d39477fa8736baba55fc46ce66d85" => :mavericks
end
option "with-32-bit"
deprecated_option "32-bit" => "with-32-bit"
depends_on "gmp4"
keg_only "Conflicts with mpfr in main repository."
fails_with :clang do
build 421
cause <<-EOS.undent
clang build 421 segfaults while building in superenv;
see https://github.com/mxcl/homebrew/issues/15061
EOS
end
def install
gmp4 = Formula["gmp4"]
args = %W[
--disable-dependency-tracking
--prefix=#{prefix}
--with-gmp=#{gmp4.opt_prefix}
]
# Build 32-bit where appropriate, and help configure find 64-bit CPUs
# Note: This logic should match what the GMP formula does.
if MacOS.prefer_64_bit? && !build.build_32_bit?
ENV.m64
args << "--build=x86_64-apple-darwin"
else
ENV.m32
args << "--build=none-apple-darwin"
end
system "./configure", *args
system "make"
system "make", "check"
system "make", "install"
end
end
+42
View File
@@ -0,0 +1,42 @@
class Ppl011 < Formula
homepage "http://bugseng.com/products/ppl/"
# Track gcc infrastructure releases.
url "http://bugseng.com/products/ppl/download/ftp/releases/0.11/ppl-0.11.tar.gz"
mirror "ftp://gcc.gnu.org/pub/gcc/infrastructure/ppl-0.11.tar.gz"
sha256 "3453064ac192e095598576c5b59ecd81a26b268c597c53df05f18921a4f21c77"
revision 1
bottle do
sha256 "be178bf8fc11a049a27b83d0b00660a3ee4426845657f3d8279b31e10730a878" => :yosemite
sha256 "f89fff76bdc39bea26763f765188523ba34eb9d07d3834c79a8d50a489a9aabc" => :mavericks
sha256 "f257cca9615ae1fb0a239c1fbf4f505dbcba139744999a9c8d7f512b5dbb7fa4" => :mountain_lion
end
depends_on "homebrew/dupes/m4" => :build if MacOS.version < :leopard
depends_on "gmp4"
conflicts_with "ppl10", :because => "They install the same binaries"
# https://www.cs.unipr.it/mantis/view.php?id=596
# https://github.com/Homebrew/homebrew/issues/27431
# Using different patch from upstream bug report to avoid autoreconf.
patch do
url "https://gist.githubusercontent.com/manphiz/9507743/raw/45081e12c2f1faf81e8536f365af05173c6dab5c/patch-ppl-flexible-array-clang_v2.patch"
sha256 "db8ced5366ec4c3efb6fd20d3b4e440de3f8b9ec1d930a33b6a23d006dc25944"
end
def install
system "./configure", "--prefix=#{prefix}",
"--disable-dependency-tracking",
"--disable-silent-rules",
"--disable-ppl_lpsol",
"--disable-ppl_lcdd",
"--disable-ppl_pips",
"--with-gmp-prefix=#{Formula["gmp4"].opt_prefix}"
system "make", "install"
end
test do
system bin/"ppl-config", "--bindir", "--libdir", "--license"
end
end
+2 -2
View File
@@ -10,8 +10,8 @@ class Qemu < Formula
# Upstream patch to "fix" pre-10.5 file handler UI... by removing the UI.
# The UI is gone on all OS X versions as of qemu 2.5.0; this patch can be removed then.
patch do
url "https://github.com/qemu/qemu/commit/365d7f3c7aacc789ead96b8eeb5ba5b0a8d93d48.patch"
sha256 "0b32b6af97d7079302ee4a76699ffe232b4121f5488079b8e757161170cea0d9"
url "https://github.com/qemu/qemu/commit/365d7f3c7aacc789ead96b8eeb5ba5b0a8d93d48.patch?full_index=1"
sha256 "4e370ff6417f80aac46c84748800353caa5ec3a59ba9cdb1587077f5a68196f8"
end
end
+1 -1
View File
@@ -92,7 +92,7 @@ module Homebrew
def make_request(path, data, auth)
headers = {
"User-Agent" => HOMEBREW_USER_AGENT,
"User-Agent" => HOMEBREW_USER_AGENT_CURL,
"Accept" => "application/vnd.github.v3+json",
"Content-Type" => "application/json"
}
+19
View File
@@ -39,4 +39,23 @@ module Homebrew
def help_s
HOMEBREW_HELP
end
def help_for_command(cmd)
cmd_path = if File.exist?(HOMEBREW_LIBRARY_PATH/"cmd/#{cmd}.sh")
HOMEBREW_LIBRARY_PATH/"cmd/#{cmd}.sh"
elsif ARGV.homebrew_developer? && File.exist?(HOMEBREW_LIBRARY_PATH/"dev-cmd/#{cmd}.sh")
HOMEBREW_LIBRARY_PATH/"dev-cmd/#{cmd}.sh"
elsif File.exist?(HOMEBREW_LIBRARY_PATH/"cmd/#{cmd}.rb")
HOMEBREW_LIBRARY_PATH/"cmd/#{cmd}.rb"
elsif ARGV.homebrew_developer? && File.exist?(HOMEBREW_LIBRARY_PATH/"dev-cmd/#{cmd}.rb")
HOMEBREW_LIBRARY_PATH/"dev-cmd/#{cmd}.rb"
end
return if cmd_path.nil?
cmd_path.read.
split("\n").
grep(/^#:/).
map { |line| line.slice(2..-1).delete("`").sub(/^ \* /, "brew ") }.
join("\n")
end
end
+28 -8
View File
@@ -25,15 +25,35 @@ module Homebrew
puts "Writing HTML fragments to #{DOC_PATH}"
puts "Writing manpages to #{TARGET_PATH}"
target_file = nil
Dir["#{SOURCE_PATH}/*.md"].each do |source_file|
target_html = DOC_PATH/"#{File.basename(source_file, ".md")}.html"
safe_system "ronn --fragment --pipe --organization='Tigerbrew' --manual='brew' #{source_file} > #{target_html}"
target_man = TARGET_PATH/File.basename(source_file, ".md")
safe_system "ronn --roff --pipe --organization='Tigerbrew' --manual='brew' #{source_file} > #{target_man}"
end
header = (SOURCE_PATH/"header.1.md").read
footer = (SOURCE_PATH/"footer.1.md").read
sub_commands = Pathname.glob("#{HOMEBREW_LIBRARY_PATH}/cmd/*.{rb,sh}").
sort_by { |source_file| source_file.basename.sub(/\.(rb|sh)$/, "") }.
map { |source_file|
source_file.read.
split("\n").
grep(/^#:/).
map { |line| line.slice(2..-1) }.
join("\n")
}.
reject { |s| s.strip.empty? }.
join("\n\n")
system "man", target_file if ARGV.flag? "--verbose"
target_md = SOURCE_PATH/"brew.1.md"
target_md.atomic_write(header + sub_commands + footer)
args = %W[
--pipe
--organization=Tigerbrew
--manual=brew
#{SOURCE_PATH}/brew.1.md
]
target_html = DOC_PATH/"brew.1.html"
target_html.atomic_write Utils.popen_read("ronn", "--fragment", *args)
target_man = TARGET_PATH/"brew.1"
target_man.atomic_write Utils.popen_read("ronn", "--roff", *args)
end
end
end
+32
View File
@@ -0,0 +1,32 @@
#: * `linkage` [`--test`] [`--reverse`] <formula>:
#: Checks the library links of an installed formula.
#:
#: Only works on installed formulae. An error is raised if it is run on
#: uninstalled formulae.
#:
#: If `--test` is passed, only display missing libraries and exit with a
#: non-zero exit code if any missing libraries were found.
#:
#: If `--reverse` is passed, print the dylib followed by the binaries
#: which link to it for each library the keg references.
require "os/mac/linkage_checker"
module Homebrew
module_function
def linkage
ARGV.kegs.each do |keg|
ohai "Checking #{keg.name} linkage" if ARGV.kegs.size > 1
result = LinkageChecker.new(keg)
if ARGV.include?("--test")
result.display_test_output
Homebrew.failed = true if result.broken_dylibs?
elsif ARGV.include?("--reverse")
result.display_reverse_output
else
result.display_normal_output
end
end
end
end
+2 -11
View File
@@ -280,17 +280,8 @@ class Pathname
end
def sha256
if MacOS.version == :tiger
sha256_vendored_sha2
else
require "digest/sha2"
incremental_hash(Digest::SHA2)
end
end
def sha256_vendored_sha2
str = Open3.popen3("#{HOMEBREW_REPOSITORY}/Library/Homebrew/vendor/sha256", "-256", self.to_s) {|_, stdout, _| stdout.read.chomp}
str.match(/= ((\d|[a-z])+)/).captures.first
require "digest/sha2"
incremental_hash(Digest::SHA256)
end
def verify_checksum(expected)
+5 -2
View File
@@ -17,7 +17,7 @@ require "extend/leopard" if RUBY_VERSION <= "1.8.6"
ARGV.extend(HomebrewArgvExtension)
HOMEBREW_VERSION = "0.9.5"
HOMEBREW_VERSION = ENV["HOMEBREW_VERSION"]
HOMEBREW_WWW = "https://github.com/mistydemeo/tigerbrew"
require "config"
@@ -43,7 +43,10 @@ else
end
HOMEBREW_GITHUB_API_TOKEN = ENV["HOMEBREW_GITHUB_API_TOKEN"]
HOMEBREW_USER_AGENT = "Tigerbrew #{HOMEBREW_VERSION} (Ruby #{RUBY_VERSION}; #{OS_VERSION})"
HOMEBREW_USER_AGENT_CURL = ENV["HOMEBREW_USER_AGENT_CURL"]
ruby_version = "#{RUBY_VERSION}#{"-p#{RUBY_PATCHLEVEL}" if defined? RUBY_PATCHLEVEL}"
HOMEBREW_USER_AGENT_RUBY = "#{ENV["HOMEBREW_USER_AGENT"]} ruby/#{ruby_version}"
HOMEBREW_CURL_ARGS = "-f#LA"
+8
View File
@@ -7,12 +7,20 @@ module OS
/linux/i === RUBY_PLATFORM
end
::OS_VERSION = ENV["HOMEBREW_OS_VERSION"]
if OS.mac?
require "os/mac"
ISSUES_URL = "https://github.com/mistydemeo/tigerbrew/wiki/troubleshooting"
PATH_OPEN = "/usr/bin/open"
# compatibility
::MACOS_FULL_VERSION = OS::Mac.full_version.to_s
::MACOS_VERSION = OS::Mac.version.to_s
elsif OS.linux?
ISSUES_URL = "https://github.com/Homebrew/linuxbrew/wiki/troubleshooting"
PATH_OPEN = "xdg-open"
# compatibility
::MACOS_FULL_VERSION = ::MACOS_VERSION = "0"
else
raise "Unknown operating system"
end
+7 -1
View File
@@ -12,7 +12,13 @@ module OS
# This can be compared to numerics, strings, or symbols
# using the standard Ruby Comparable methods.
def version
@version ||= Version.new(MACOS_VERSION)
@version ||= Version.new(full_version.to_s[/10\.\d+/])
end
# This can be compared to numerics, strings, or symbols
# using the standard Ruby Comparable methods.
def full_version
@full_version ||= Version.new(ENV["HOMEBREW_OSX_VERSION"].chomp)
end
def cat
+142
View File
@@ -0,0 +1,142 @@
require "set"
require "keg"
require "formula"
class LinkageChecker
attr_reader :keg, :formula
attr_reader :brewed_dylibs, :system_dylibs, :broken_dylibs, :variable_dylibs
attr_reader :undeclared_deps, :reverse_links
def initialize(keg, formula = nil)
@keg = keg
@formula = formula || resolve_formula(keg)
@brewed_dylibs = Hash.new { |h, k| h[k] = Set.new }
@system_dylibs = Set.new
@broken_dylibs = Set.new
@variable_dylibs = Set.new
@undeclared_deps = []
@reverse_links = Hash.new { |h, k| h[k] = Set.new }
check_dylibs
end
def check_dylibs
@keg.find do |file|
next if file.symlink? || file.directory?
next unless file.dylib? || file.mach_o_executable? || file.mach_o_bundle?
# weakly loaded dylibs may not actually exist on disk, so skip them
# when checking for broken linkage
file.dynamically_linked_libraries.each do |dylib|
@reverse_links[dylib] << file
if dylib.start_with? "@"
@variable_dylibs << dylib
else
begin
owner = Keg.for Pathname.new(dylib)
rescue NotAKegError
@system_dylibs << dylib
rescue Errno::ENOENT
@broken_dylibs << dylib
else
tap = Tab.for_keg(owner).tap
f = if tap.nil? || tap.core_tap?
owner.name
else
"#{tap}/#{owner.name}"
end
@brewed_dylibs[f] << dylib
end
end
end
end
@undeclared_deps = check_undeclared_deps if formula
end
def check_undeclared_deps
filter_out = proc do |dep|
next true if dep.build?
next false unless dep.optional? || dep.recommended?
formula.build.without?(dep)
end
declared_deps = formula.deps.reject { |dep| filter_out.call(dep) }.map(&:name)
declared_requirement_deps = formula.requirements.reject { |req| filter_out.call(req) }.map(&:default_formula).compact
declared_dep_names = (declared_deps + declared_requirement_deps).map { |dep| dep.split("/").last }
undeclared_deps = @brewed_dylibs.keys.select do |full_name|
name = full_name.split("/").last
next false if name == formula.name
!declared_dep_names.include?(name)
end
undeclared_deps.sort do |a, b|
if a.include?("/") && !b.include?("/")
1
elsif !a.include?("/") && b.include?("/")
-1
else
a <=> b
end
end
end
def display_normal_output
display_items "System libraries", @system_dylibs
display_items "Homebrew libraries", @brewed_dylibs
display_items "Variable-referenced libraries", @variable_dylibs
display_items "Missing libraries", @broken_dylibs
display_items "Possible undeclared dependencies", @undeclared_deps
end
def display_reverse_output
return if @reverse_links.empty?
sorted = @reverse_links.sort
sorted.each do |dylib, files|
puts dylib
files.each do |f|
unprefixed = f.to_s.strip_prefix "#{@keg}/"
puts " #{unprefixed}"
end
puts unless dylib == sorted.last[0]
end
end
def display_test_output
display_items "Missing libraries", @broken_dylibs
puts "No broken dylib links" if @broken_dylibs.empty?
end
def broken_dylibs?
!@broken_dylibs.empty?
end
def undeclared_deps?
!@undeclared_deps.empty?
end
private
# Display a list of things.
# Things may either be an array, or a hash of (label -> array)
def display_items(label, things)
return if things.empty?
puts "#{label}:"
if things.is_a? Hash
things.sort.each do |list_label, list|
list.sort.each do |item|
puts " #{item} (#{list_label})"
end
end
else
things.sort.each do |item|
puts " #{item}"
end
end
end
def resolve_formula(keg)
f = Formulary.from_rack(keg.rack)
f.build = Tab.for_keg(keg)
f
rescue FormulaUnavailableError
opoo "Formula unavailable: #{keg.name}"
end
end
+1 -1
View File
@@ -1,7 +1,7 @@
# match expressions when taps are given as ARGS, e.g. someuser/sometap
HOMEBREW_TAP_ARGS_REGEX = %r{^([\w-]+)/(homebrew-)?([\w-]+)$}
# match taps' formulae, e.g. someuser/sometap/someformula
HOMEBREW_TAP_FORMULA_REGEX = %r{^([\w-]+)/([\w-]+)/([\w+-.]+)$}
HOMEBREW_TAP_FORMULA_REGEX = %r{^([\w-]+)/([\w-]+)/([\w+-.@]+)$}
# match core's formulae, e.g. homebrew/homebrew/someformula
HOMEBREW_CORE_FORMULA_REGEX = %r{^homebrew/homebrew/([\w+-.]+)$}i
# match taps' directory paths, e.g. HOMEBREW_LIBRARY/Taps/someuser/sometap
+4 -11
View File
@@ -235,22 +235,15 @@ def quiet_system(cmd, *args)
end
def curl(*args)
brewed_curl = HOMEBREW_PREFIX/"opt/curl/bin/curl"
curl_certs = HOMEBREW_PREFIX/"opt/curl-ca-bundle"
use_curl = MacOS.version <= "10.6" && brewed_curl.exist? && curl_certs.exist?
curl = if use_curl
brewed_curl
else
Pathname.new "/usr/bin/curl"
end
curl = Pathname.new ENV["HOMEBREW_CURL"]
raise "#{curl} is not executable" unless curl.exist? && curl.executable?
flags = HOMEBREW_CURL_ARGS
flags = flags.delete("#") if ARGV.verbose?
args = [flags, HOMEBREW_USER_AGENT, *args]
args = [flags, HOMEBREW_USER_AGENT_CURL, *args]
# See https://github.com/Homebrew/homebrew/issues/6103
args << "--insecure" if MacOS.version < "10.6" unless use_curl
args << "--insecure" if MacOS.version < "10.6" if ENV["HOMEBREW_CURL"] == "/usr/bin/curl"
args << "--verbose" if ENV["HOMEBREW_CURL_VERBOSE"]
args << "--silent" unless $stdout.tty?
@@ -432,7 +425,7 @@ module GitHub
require "net/https"
headers = {
"User-Agent" => HOMEBREW_USER_AGENT,
"User-Agent" => HOMEBREW_USER_AGENT_RUBY,
"Accept" => "application/vnd.github.v3+json"
}
BIN
View File
Binary file not shown.
-28
View File
@@ -1,28 +0,0 @@
AUTHOR: Aaron D. Gifford - http://www.aarongifford.com/
Copyright (c) 2000-2001, Aaron D. Gifford
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTOR(S) ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTOR(S) BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
+21 -5
View File
@@ -116,11 +116,27 @@ begin
# It should never affect external commands so they can handle usage
# arguments themselves.
if empty_argv || (help_flag && (cmd.nil? || internal_cmd))
# TODO: - `brew help cmd` should display subcommand help
require "cmd/help"
puts ARGV.usage
exit ARGV.any? ? 0 : 1
if empty_argv
$stderr.puts ARGV.usage
exit 1
elsif help_flag
if cmd.nil?
puts ARGV.usage
exit 0
else
# Handle both internal ruby and shell commands
require "cmd/help"
help_text = Homebrew.help_for_command(cmd)
if help_text.nil?
# External command, let it handle help by itself
elsif help_text.empty?
puts "No help available for #{cmd}"
exit 1
else
puts help_text
exit 0
end
end
end
if internal_cmd
+223
View File
@@ -0,0 +1,223 @@
HOMEBREW_VERSION="0.9.5"
odie() {
if [[ -t 2 ]] # check whether stderr is a tty.
then
echo -ne "\033[4;31mError\033[0m: " >&2 # highlight Error with underline and red color
else
echo -n "Error: " >&2
fi
if [[ $# -eq 0 ]]
then
/bin/cat >&2
else
echo "$*" >&2
fi
exit 1
}
chdir() {
cd "$@" >/dev/null || odie "Error: failed to cd to $*!"
}
brew() {
"$HOMEBREW_BREW_FILE" "$@"
}
# Force UTF-8 to avoid encoding issues for users with broken locale settings.
if [[ "$(locale charmap 2> /dev/null)" != "UTF-8" ]]
then
export LC_ALL="en_US.UTF-8"
fi
# Where we store built products; /usr/local/Cellar if it exists,
# otherwise a Cellar relative to the Repository.
if [[ -d "$HOMEBREW_PREFIX/Cellar" ]]
then
HOMEBREW_CELLAR="$HOMEBREW_PREFIX/Cellar"
else
HOMEBREW_CELLAR="$HOMEBREW_REPOSITORY/Cellar"
fi
case "$*" in
--prefix) echo "$HOMEBREW_PREFIX"; exit 0 ;;
--cellar) echo "$HOMEBREW_CELLAR"; exit 0 ;;
--repository|--repo) echo "$HOMEBREW_REPOSITORY"; exit 0 ;;
esac
if [[ "$HOMEBREW_PREFIX" = "/" || "$HOMEBREW_PREFIX" = "/usr" ]]
then
# it may work, but I only see pain this route and don't want to support it
odie "Cowardly refusing to continue at this prefix: $HOMEBREW_PREFIX"
fi
# Users may have these set, pointing the system Ruby
# at non-system gem paths
unset GEM_HOME
unset GEM_PATH
if [[ -z "$HOMEBREW_DEVELOPER" ]]
then
unset HOMEBREW_RUBY_PATH
fi
HOMEBREW_SYSTEM="$(uname -s)"
case "$HOMEBREW_SYSTEM" in
Darwin) HOMEBREW_OSX="1";;
Linux) HOMEBREW_LINUX="1";;
esac
if [[ -z "$HOMEBREW_RUBY_PATH" ]]
then
if [[ -n "$HOMEBREW_OSX" ]]
then
HOMEBREW_RUBY_PATH="/usr/bin/ruby"
else
HOMEBREW_RUBY_PATH="$(which ruby)"
if [[ -z "$HOMEBREW_RUBY_PATH" ]]
then
odie "No Ruby found, cannot proceed."
fi
fi
fi
HOMEBREW_CURL="/usr/bin/curl"
if [[ -n "$HOMEBREW_OSX" ]]
then
HOMEBREW_PROCESSOR="$(uname -p)"
HOMEBREW_PRODUCT="Homebrew"
HOMEBREW_SYSTEM="Macintosh"
# This is i386 even on x86_64 machines
[[ "$HOMEBREW_PROCESSOR" = "i386" ]] && HOMEBREW_PROCESSOR="Intel"
HOMEBREW_OSX_VERSION="$(/usr/bin/sw_vers -productVersion)"
HOMEBREW_OS_VERSION="Mac OS X $HOMEBREW_OSX_VERSION"
HOMEBREW_OSX_VERSION_NUMERIC="$(printf "%02d%02d%02d" $(echo "${HOMEBREW_OSX_VERSION//./ }"))"
if [[ "$HOMEBREW_OSX_VERSION_NUMERIC" -lt "100900" &&
-x "$HOMEBREW_PREFIX/opt/curl/bin/curl" &&
-d "$HOMEBREW_PREFIX/opt/curl-ca-bundle" ]]
then
HOMEBREW_CURL="$HOMEBREW_PREFIX/opt/curl/bin/curl"
fi
else
HOMEBREW_PROCESSOR="$(uname -m)"
HOMEBREW_PRODUCT="${HOMEBREW_SYSTEM}brew"
[[ -n "$HOMEBREW_LINUX" ]] && HOMEBREW_OS_VERSION="$(lsb_release -sd 2>/dev/null)"
: "${HOMEBREW_OS_VERSION:=$(uname -r)}"
fi
HOMEBREW_USER_AGENT="$HOMEBREW_PRODUCT/$HOMEBREW_VERSION ($HOMEBREW_SYSTEM; $HOMEBREW_PROCESSOR $HOMEBREW_OS_VERSION)"
HOMEBREW_CURL_VERSION="$("$HOMEBREW_CURL" --version 2>/dev/null | head -n1 | /usr/bin/awk '{print $1"/"$2}')"
HOMEBREW_USER_AGENT_CURL="$HOMEBREW_USER_AGENT $HOMEBREW_CURL_VERSION"
# Declared in bin/brew
export HOMEBREW_BREW_FILE
export HOMEBREW_PREFIX
export HOMEBREW_REPOSITORY
export HOMEBREW_LIBRARY
# Declared in brew.sh
export HOMEBREW_VERSION
export HOMEBREW_CELLAR
export HOMEBREW_RUBY_PATH
export HOMEBREW_CURL
export HOMEBREW_OS_VERSION
export HOMEBREW_OSX_VERSION
export HOMEBREW_USER_AGENT
export HOMEBREW_USER_AGENT_CURL
if [[ -n "$HOMEBREW_OSX" ]]
then
if [[ -f "/usr/bin/xcode-select" ]] && [[ "$('/usr/bin/xcode-select' --print-path)" = "/" ]]
then
odie <<EOS
Your xcode-select path is currently set to '/'.
This causes the 'xcrun' tool to hang, and can render Homebrew unusable.
If you are using Xcode, you should:
sudo xcode-select -switch /Applications/Xcode.app
Otherwise, you should:
sudo rm -rf /usr/share/xcode-select
EOS
fi
XCRUN_OUTPUT="$(/usr/bin/xcrun clang 2>&1)"
XCRUN_STATUS="$?"
if [[ "$XCRUN_STATUS" -ne 0 && "$XCRUN_OUTPUT" = *license* ]]
then
odie <<EOS
You have not agreed to the Xcode license. Please resolve this by running:
sudo xcodebuild -license
EOS
fi
fi
# Many Pathname operations use getwd when they shouldn't, and then throw
# odd exceptions. Reduce our support burden by showing a user-friendly error.
if [[ ! -d "$(pwd)" ]]
then
odie "The current working directory doesn't exist, cannot proceed."
fi
if [[ "$1" = -v ]]
then
# Shift the -v to the end of the parameter list
shift
set -- "$@" -v
fi
HOMEBREW_ARG_COUNT="$#"
HOMEBREW_COMMAND="$1"
shift
case "$HOMEBREW_COMMAND" in
ls) HOMEBREW_COMMAND="list";;
homepage) HOMEBREW_COMMAND="home";;
-S) HOMEBREW_COMMAND="search";;
up) HOMEBREW_COMMAND="update";;
ln) HOMEBREW_COMMAND="link";;
instal) HOMEBREW_COMMAND="install";; # gem does the same
rm) HOMEBREW_COMMAND="uninstall";;
remove) HOMEBREW_COMMAND="uninstall";;
configure) HOMEBREW_COMMAND="diy";;
abv) HOMEBREW_COMMAND="info";;
dr) HOMEBREW_COMMAND="doctor";;
--repo) HOMEBREW_COMMAND="--repository";;
environment) HOMEBREW_COMMAND="--env";;
--config) HOMEBREW_COMMAND="config";;
esac
if [[ -f "$HOMEBREW_LIBRARY/Homebrew/cmd/$HOMEBREW_COMMAND.sh" ]]; then
HOMEBREW_BASH_COMMAND="$HOMEBREW_LIBRARY/Homebrew/cmd/$HOMEBREW_COMMAND.sh"
elif [[ -n "$HOMEBREW_DEVELOPER" && -f "$HOMEBREW_LIBRARY/Homebrew/dev-cmd/$HOMEBREW_COMMAND.sh" ]]; then
HOMEBREW_BASH_COMMAND="$HOMEBREW_LIBRARY/Homebrew/dev-cmd/$HOMEBREW_COMMAND.sh"
fi
if [[ "$(id -u)" = "0" && "$(/usr/bin/stat -f%u "$HOMEBREW_BREW_FILE")" != "0" ]]
then
case "$HOMEBREW_COMMAND" in
install|reinstall|postinstall|link|pin|update|upgrade|create|migrate|tap|tap-pin|switch)
odie <<EOS
Cowardly refusing to 'sudo brew $HOMEBREW_COMMAND'
You can use brew with sudo, but only if the brew executable is owned by root.
However, this is both not recommended and completely unsupported so do so at
your own risk.
EOS
;;
esac
fi
if [[ -n "$HOMEBREW_BASH_COMMAND" ]]
then
# source rather than executing directly to ensure the entire file is read into
# memory before it is run. This makes running a Bash script behave more like
# a Ruby script and avoids hard-to-debug issues if the Bash script is updated
# at the same time as being run.
#
# Hide shellcheck complaint:
# shellcheck source=/dev/null
source "$HOMEBREW_BASH_COMMAND"
{ "homebrew-$HOMEBREW_COMMAND" "$@"; exit $?; }
else
# Unshift command back into argument list (unless argument list was empty).
[[ "$HOMEBREW_ARG_COUNT" -gt 0 ]] && set -- "$HOMEBREW_COMMAND" "$@"
exec "$HOMEBREW_RUBY_PATH" -W0 "$HOMEBREW_LIBRARY/brew.rb" "$@"
fi
+5 -33
View File
@@ -1,15 +1,8 @@
#!/bin/sh
#!/bin/bash
chdir() {
cd "$@" >/dev/null
}
# Force UTF-8 to avoid encoding issues for users with broken locale settings.
if [ "$(locale charmap 2> /dev/null)" != "UTF-8" ]
then
export LC_ALL="en_US.UTF-8"
fi
BREW_FILE_DIRECTORY="$(chdir "${0%/*}" && pwd -P)"
HOMEBREW_BREW_FILE="$BREW_FILE_DIRECTORY/${0##*/}"
@@ -21,29 +14,8 @@ then
chdir "$BREW_SYMLINK_DIRECTORY" && pwd -P)"
fi
BREW_LIBRARY_DIRECTORY="$(chdir "$BREW_FILE_DIRECTORY"/../Library && pwd -P)"
HOMEBREW_PREFIX="$(chdir "$(dirname "$(dirname "$HOMEBREW_BREW_FILE")")" && pwd -P)"
HOMEBREW_REPOSITORY="$(chdir "$BREW_FILE_DIRECTORY"/../ && pwd -P)"
HOMEBREW_LIBRARY="$(chdir "$BREW_FILE_DIRECTORY"/../Library && pwd -P)"
# Users may have these set, pointing the system Ruby
# at non-system gem paths
unset GEM_HOME
unset GEM_PATH
if [ -z "$HOMEBREW_DEVELOPER" ]
then
unset HOMEBREW_RUBY_PATH
fi
if [ -z "$HOMEBREW_RUBY_PATH" ]
then
if [ "$(uname -s)" = "Darwin" ]
then
HOMEBREW_RUBY_PATH="/usr/bin/ruby"
else
HOMEBREW_RUBY_PATH="$(which ruby)"
fi
fi
export HOMEBREW_BREW_FILE
export HOMEBREW_RUBY_PATH
exec "$HOMEBREW_RUBY_PATH" -W0 "$BREW_LIBRARY_DIRECTORY/brew.rb" "$@"
source "$HOMEBREW_LIBRARY/brew.sh"