Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b5ed5a851e | ||
|
|
302295537d | ||
|
|
2b3f9c7b25 | ||
|
|
2fa0b4d8b0 | ||
|
|
22f34dd7db | ||
|
|
f8eb7ddd35 | ||
|
|
82e130df9f | ||
|
|
f0e8417be4 | ||
|
|
431181406f | ||
|
|
e8217afe1b | ||
|
|
63d275701b | ||
|
|
d387bb74ea | ||
|
|
ff986520d1 | ||
|
|
20f97682ac | ||
|
|
f447a8a640 | ||
|
|
37491333e6 | ||
|
|
1e620f5e7d | ||
|
|
e0daa8cb68 | ||
|
|
a2bdd1c804 | ||
|
|
b48d6bd5af | ||
|
|
36827d7637 | ||
|
|
e6522ee54e | ||
|
|
da9c583c2d | ||
|
|
d0625075ea | ||
|
|
458e371515 | ||
|
|
02c724dd21 | ||
|
|
03f7f8cbd2 | ||
|
|
975edee3a7 | ||
|
|
4b379beae2 | ||
|
|
acb6c9febe | ||
|
|
421a659181 | ||
|
|
a400253621 | ||
|
|
a11591ba69 | ||
|
|
9e81b8295b | ||
|
|
d7740e2513 | ||
|
|
e3836cad36 | ||
|
|
e1334e7b95 | ||
|
|
edf2aa9573 | ||
|
|
2ba239c9ab | ||
|
|
cff044e22e | ||
|
|
78661fd581 | ||
|
|
ba81e638f7 | ||
|
|
34de07506c | ||
|
|
fd979d03e7 | ||
|
|
629231d8d5 | ||
|
|
342c8683e4 | ||
|
|
564673f49e | ||
|
|
94c13e55ee | ||
|
|
296e4fb18b | ||
|
|
3cfb8fd22a | ||
|
|
d7324f0ff5 | ||
|
|
aca22acb83 | ||
|
|
36c2d3e611 | ||
|
|
17a9268052 | ||
|
|
58bbe40b84 | ||
|
|
6755501c79 | ||
|
|
a9d4bc393e | ||
|
|
cd25ed22b3 | ||
|
|
69df652c46 | ||
|
|
891751521b | ||
|
|
1fe7926d8b | ||
|
|
a2009ec874 | ||
|
|
d0190691a2 | ||
|
|
881e07123d | ||
|
|
9968e8d031 | ||
|
|
b058e4c268 | ||
|
|
90b3a466a9 | ||
|
|
5c9aa6afc6 | ||
|
|
b044b21851 | ||
|
|
6258a28a9c | ||
|
|
155db8df8a | ||
|
|
ff438dea59 | ||
|
|
a5f9b37c27 | ||
|
|
bdcf5daac5 | ||
|
|
9f32b5fd9b | ||
|
|
0d5cd31b45 | ||
|
|
36fbc6378a | ||
|
|
68ebfce8cf | ||
|
|
642131c25a | ||
|
|
8b0d0c9374 | ||
|
|
702ce9e879 | ||
|
|
a317f9f31c | ||
|
|
6215fe45cd | ||
|
|
f62a04151d | ||
|
|
8e4052b10c | ||
|
|
72836585fa | ||
|
|
bedd97399a | ||
|
|
9863ed82de | ||
|
|
db852cc3f4 | ||
|
|
7e7b4d68c0 | ||
|
|
31f4e224ce | ||
|
|
12fa7b4b6b | ||
|
|
b26d13a698 | ||
|
|
fd1b06d2ff | ||
|
|
e1f289149b | ||
|
|
7a80aba76d | ||
|
|
0b31135ea0 | ||
|
|
74bd32cf74 | ||
|
|
1eb6fd51a8 | ||
|
|
7c08aa6304 | ||
|
|
6f7568af59 | ||
|
|
cc8a6b9deb | ||
|
|
9893857aad | ||
|
|
bbefbf8fc4 | ||
|
|
c9039c23e0 | ||
|
|
ce12bf72fc | ||
|
|
f154230944 | ||
|
|
6d85291c79 | ||
|
|
0a26601faf | ||
|
|
9310ffb044 | ||
|
|
908c35b455 | ||
|
|
c3023f596f | ||
|
|
05cefc309e | ||
|
|
ae22afb01c | ||
|
|
2957b570c5 | ||
|
|
38e441f190 | ||
|
|
5cae01d81d | ||
|
|
7bc12c58da | ||
|
|
2ecde7fe57 | ||
|
|
54e3e4778c | ||
|
|
2c6008d531 | ||
|
|
69afc839fa | ||
|
|
ed6f8c5c12 | ||
|
|
67e64dee16 | ||
|
|
80371e4c82 | ||
|
|
27cf902d42 | ||
|
|
6a4b719574 | ||
|
|
8d1d0721cb | ||
|
|
266c314a3c | ||
|
|
61bece1f21 | ||
|
|
df762b8675 | ||
|
|
ecac1a3b48 | ||
|
|
cf5046f264 | ||
|
|
d625cc33fb | ||
|
|
40c826da08 | ||
|
|
02d0f0cd5a | ||
|
|
5b717f87a4 | ||
|
|
e599e661a8 | ||
|
|
9a9e5214d9 | ||
|
|
db1d50a8ed | ||
|
|
4051106416 | ||
|
|
4b3efa56f4 | ||
|
|
826de7f70f | ||
|
|
2042394e16 | ||
|
|
7ce57f53eb | ||
|
|
555bba6421 | ||
|
|
f69cbc2929 | ||
|
|
b53a9ce35f | ||
|
|
68bde3e786 | ||
|
|
7ce22a5fba | ||
|
|
006b1328cd | ||
|
|
72f9e297b8 | ||
|
|
36151ca31a | ||
|
|
b5c0b675a3 |
No files matched your search
+1
-1
@@ -157,7 +157,7 @@ class Cmd
|
||||
"-fuse-linker-plugin"
|
||||
# clang doesn't support these flags
|
||||
args << arg unless tool =~ /^clang/
|
||||
when "-Wno-deprecated-register"
|
||||
when "-Wno-deprecated-register", "-Wno-implicit-fallthrough"
|
||||
# older gccs don't support these flags
|
||||
args << arg unless tool =~ /^g..-4.[02]/
|
||||
when /^-W[alp],/, /^-Wno-/
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
class Alpine < Formula
|
||||
desc "News and email agent"
|
||||
homepage "http://patches.freeiz.com/alpine/"
|
||||
url "http://patches.freeiz.com/alpine/release/src/alpine-2.20.tar.xz"
|
||||
homepage "http://alpine.freeiz.com/alpine/"
|
||||
url "http://alpine.freeiz.com/alpine/release/src/alpine-2.20.tar.xz"
|
||||
sha256 "ed639b6e5bb97e6b0645c85262ca6a784316195d461ce8d8411999bf80449227"
|
||||
|
||||
bottle do
|
||||
|
||||
@@ -12,7 +12,8 @@ end
|
||||
|
||||
class AppleGcc42 < Formula
|
||||
homepage 'http://r.research.att.com/tools/'
|
||||
url 'http://r.research.att.com/gcc-42-5553-darwin8-all.tar.gz'
|
||||
url 'https://ia902307.us.archive.org/31/items/tigerbrew/gcc-42-5553-darwin8-all.tar.gz'
|
||||
mirror 'http://r.research.att.com/gcc-42-5553-darwin8-all.tar.gz'
|
||||
version '4.2.1-5553'
|
||||
sha1 '0e529a2e4723e016e3d086d6ca3215d700931503'
|
||||
|
||||
|
||||
@@ -1,23 +1,19 @@
|
||||
class Coreutils < Formula
|
||||
desc "GNU File, Shell, and Text utilities"
|
||||
homepage "https://www.gnu.org/software/coreutils"
|
||||
url "https://ftpmirror.gnu.org/coreutils/coreutils-8.25.tar.xz"
|
||||
mirror "https://ftp.gnu.org/gnu/coreutils/coreutils-8.25.tar.xz"
|
||||
sha256 "31e67c057a5b32a582f26408c789e11c2e8d676593324849dcf5779296cdce87"
|
||||
url "https://ftp.gnu.org/gnu/coreutils/coreutils-8.30.tar.xz"
|
||||
mirror "https://ftpmirror.gnu.org/coreutils/coreutils-8.30.tar.xz"
|
||||
sha256 "e831b3a86091496cdba720411f9748de81507798f6130adeaef872d206e1b057"
|
||||
|
||||
bottle do
|
||||
sha256 "1714a4893ba37f9fb1a908e5bd79e45594034daa3ff08d8273713030498d5c1b" => :sierra
|
||||
sha256 "3b278ce91252784e43d2f16fc813e72a7bd04e637627bf2916c9f847ef600d89" => :el_capitan
|
||||
sha256 "dadb2d672a6b412d03b2470459d0ccb229bf7aa1c587b04809e7f19a439a640e" => :yosemite
|
||||
sha256 "1b68974d496006908a2f538a6a7e35b3bee7eba2247afec4e1568b28d0d83c5c" => :mavericks
|
||||
sha256 "45157fb067a46c953bdfcba90de688903b7b3c8fcb39afa1e0b2fef2819eedc5" => :mojave
|
||||
sha256 "77b09dbe66f3d5098998da6babf953e01e828742b8a740a831cc3f3a1f713df7" => :high_sierra
|
||||
sha256 "94844581b7e08ae2d1dc6c77acfd6e95021283cc8b7c1228fed32a423ae826cc" => :sierra
|
||||
sha256 "a5145f88de2525d168ef998f8310d5c0abcead9efee9108fb61c30de91a4869c" => :el_capitan
|
||||
end
|
||||
|
||||
conflicts_with "ganglia", :because => "both install `gstat` binaries"
|
||||
conflicts_with "idutils", :because => "both install `gid` and `gid.1`"
|
||||
conflicts_with "aardvark_shell_utils", :because => "both install `realpath` binaries"
|
||||
|
||||
head do
|
||||
url "git://git.sv.gnu.org/coreutils"
|
||||
url "https://git.savannah.gnu.org/git/coreutils.git"
|
||||
|
||||
depends_on "autoconf" => :build
|
||||
depends_on "automake" => :build
|
||||
@@ -30,18 +26,28 @@ class Coreutils < Formula
|
||||
|
||||
depends_on "gmp" => :optional
|
||||
|
||||
conflicts_with "ganglia", :because => "both install `gstat` binaries"
|
||||
conflicts_with "gegl", :because => "both install `gcut` binaries"
|
||||
conflicts_with "idutils", :because => "both install `gid` and `gid.1`"
|
||||
conflicts_with "aardvark_shell_utils", :because => "both install `realpath` binaries"
|
||||
|
||||
def install
|
||||
# Work around unremovable, nested dirs bug that affects lots of
|
||||
# GNU projects. See:
|
||||
# https://github.com/Homebrew/homebrew/issues/45273
|
||||
# https://github.com/Homebrew/homebrew/issues/44993
|
||||
# This is thought to be an el_capitan bug:
|
||||
# https://lists.gnu.org/archive/html/bug-tar/2015-10/msg00017.html
|
||||
if MacOS.version == :el_capitan
|
||||
# Work around unremovable, nested dirs bug that affects lots of
|
||||
# GNU projects. See:
|
||||
# https://github.com/Homebrew/homebrew/issues/45273
|
||||
# https://github.com/Homebrew/homebrew/issues/44993
|
||||
# This is thought to be an el_capitan bug:
|
||||
# https://lists.gnu.org/archive/html/bug-tar/2015-10/msg00017.html
|
||||
ENV["gl_cv_func_getcwd_abort_bug"] = "no"
|
||||
|
||||
# renameatx_np and RENAME_EXCL are available at compile time from Xcode 8
|
||||
# (10.12 SDK), but the former is not available at runtime.
|
||||
inreplace "lib/renameat2.c", "defined RENAME_EXCL", "defined UNDEFINED_GIBBERISH"
|
||||
end
|
||||
|
||||
system "./bootstrap" if build.head?
|
||||
|
||||
args = %W[
|
||||
--prefix=#{prefix}
|
||||
--program-prefix=g
|
||||
@@ -64,20 +70,15 @@ class Coreutils < Formula
|
||||
man1.install_symlink "grealpath.1" => "realpath.1"
|
||||
end
|
||||
|
||||
def caveats; <<-EOS.undent
|
||||
def caveats; <<~EOS
|
||||
All commands have been installed with the prefix 'g'.
|
||||
|
||||
If you really need to use these commands with their normal names, you
|
||||
can add a "gnubin" directory to your PATH from your bashrc like:
|
||||
|
||||
PATH="#{opt_libexec}/gnubin:$PATH"
|
||||
|
||||
Additionally, you can access their man pages with normal names if you add
|
||||
the "gnuman" directory to your MANPATH from your bashrc as well:
|
||||
|
||||
MANPATH="#{opt_libexec}/gnuman:$MANPATH"
|
||||
|
||||
EOS
|
||||
EOS
|
||||
end
|
||||
|
||||
def coreutils_filenames(dir)
|
||||
@@ -92,6 +93,7 @@ class Coreutils < Formula
|
||||
test do
|
||||
(testpath/"test").write("test")
|
||||
(testpath/"test.sha1").write("a94a8fe5ccb19ba61c4c0873d391e987982fbbd3 test")
|
||||
system "#{bin}/gsha1sum", "-c", "test.sha1"
|
||||
system bin/"gsha1sum", "-c", "test.sha1"
|
||||
system bin/"gln", "-f", "test", "test.sha1"
|
||||
end
|
||||
end
|
||||
@@ -2,6 +2,7 @@ class CurlCaBundle < Formula
|
||||
homepage "http://curl.haxx.se/docs/caextract.html"
|
||||
url "https://curl.haxx.se/ca/cacert-2017-01-18.pem",
|
||||
:using => :nounzip
|
||||
mirror "https://ia902307.us.archive.org/31/items/tigerbrew/cacert-2017-01-18.pem"
|
||||
sha256 "e62a07e61e5870effa81b430e1900778943c228bd7da1259dd6a955ee2262b47"
|
||||
version "2017-01-18"
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ class Curl < Formula
|
||||
desc "Get a file from an HTTP, HTTPS or FTP server"
|
||||
homepage "https://curl.haxx.se/"
|
||||
url "https://curl.haxx.se/download/curl-7.50.3.tar.bz2"
|
||||
mirror "http://mirror.sobukus.de/files/src/curl/curl-7.50.3.tar.bz2"
|
||||
sha256 "7b7347d976661d02c84a1f4d6daf40dee377efdc45b9e2c77dedb8acf140d8ec"
|
||||
|
||||
bottle do
|
||||
|
||||
@@ -27,7 +27,16 @@ class Doxygen < Formula
|
||||
depends_on "qt" if build.with? "doxywizard"
|
||||
depends_on "llvm" => "with-clang" if build.with? "libclang"
|
||||
|
||||
# /Developer/SDKs/MacOSX10.4u.sdk/usr/include/stdarg.h:4:25: error: stdarg.h: No such file or directory
|
||||
fails_with :gcc if MacOS.version == :tiger
|
||||
|
||||
def install
|
||||
# This flag was introduced after GCC 4.2.
|
||||
# This is necessary on Tiger, since we don't have superenv yet.
|
||||
if [:gcc, :gcc_4_0].include? ENV.compiler
|
||||
inreplace "CMakeLists.txt", "-Wno-deprecated-register", ""
|
||||
end
|
||||
|
||||
args = std_cmake_args
|
||||
args << "-Dbuild_wizard=ON" if build.with? "doxywizard"
|
||||
args << "-Duse_libclang=ON -DLLVM_CONFIG=#{Formula["llvm"].opt_bin}/llvm-config" if build.with? "libclang"
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
class Dpkg < Formula
|
||||
desc "Debian package management system"
|
||||
homepage "https://wiki.debian.org/Teams/Dpkg"
|
||||
url "https://mirrors.kernel.org/debian/pool/main/d/dpkg/dpkg_1.18.2.tar.xz"
|
||||
mirror "https://mirrors.ocf.berkeley.edu/debian/pool/main/d/dpkg/dpkg_1.18.2.tar.xz"
|
||||
url "https://mirrors.kernel.org/debian/pool/main/d/dpkg/dpkg_1.18.24.tar.xz"
|
||||
mirror "https://mirrors.ocf.berkeley.edu/debian/pool/main/d/dpkg/dpkg_1.18.24.tar.xz"
|
||||
sha256 "11484f2a73d027d696e720a60380db71978bb5c06cd88fe30c291e069ac457a4"
|
||||
|
||||
bottle do
|
||||
|
||||
+29
-12
@@ -1,13 +1,13 @@
|
||||
class Fish < Formula
|
||||
desc "User-friendly command-line shell for UNIX-like operating systems"
|
||||
homepage "http://fishshell.com"
|
||||
url "http://fishshell.com/files/2.2.0/fish-2.2.0.tar.gz"
|
||||
sha256 "a76339fd14ce2ec229283c53e805faac48c3e99d9e3ede9d82c0554acfc7b77a"
|
||||
url "https://github.com/fish-shell/fish-shell/releases/download/2.7.1/fish-2.7.1.tar.gz"
|
||||
sha256 "e42bb19c7586356905a58578190be792df960fa81de35effb1ca5a5a981f0c5a"
|
||||
|
||||
bottle do
|
||||
sha256 "1a9a75647ab672132d4ea6b385a09461041f47a91a3719a82494467eaeceab97" => :tiger_altivec
|
||||
sha256 "e0ba430b35df479e52c0d33b6900cbfe55bf2779e7ab22c3e226db05e53f9410" => :leopard_g3
|
||||
sha256 "326cea656c8cadf59f2202293334c17d38dfb52ea21388f5fa2b44a6cd8cc46e" => :leopard_altivec
|
||||
sha256 "12616d6225eb804b40cdd12ecc8722252a9d28d0275af61f9afc59ef12a55f87" => :tiger_g3
|
||||
sha256 "0339873032336e84bd169f49b4a9745bcb6ee4e21cfc3cf7a99b05423405498e" => :tiger_altivec
|
||||
sha256 "6b02140be2753196951031ef7836d1297e752270c3cbda8915c6dae7dd948766" => :tiger_g5
|
||||
end
|
||||
|
||||
head do
|
||||
@@ -19,27 +19,44 @@ class Fish < Formula
|
||||
depends_on "libtool" => :build
|
||||
end
|
||||
|
||||
needs :cxx11
|
||||
depends_on "pcre2"
|
||||
|
||||
def install
|
||||
system "autoconf" if build.head?
|
||||
system "autoreconf", "--no-recursive" if build.head?
|
||||
# Necessary to get the standard signature of ttyname_r()
|
||||
ENV.append_to_cflags "-D__DARWIN_UNIX03" if MacOS.version < :leopard
|
||||
|
||||
# In Homebrew's 'superenv' sed's path will be incompatible, so
|
||||
# the correct path is passed into configure here.
|
||||
system "./configure", "--prefix=#{prefix}", "SED=/usr/bin/sed"
|
||||
args = %W[
|
||||
--prefix=#{prefix}
|
||||
--with-extra-functionsdir=#{HOMEBREW_PREFIX}/share/fish/vendor_functions.d
|
||||
--with-extra-completionsdir=#{HOMEBREW_PREFIX}/share/fish/vendor_completions.d
|
||||
--with-extra-confdir=#{HOMEBREW_PREFIX}/share/fish/vendor_conf.d
|
||||
SED=/usr/bin/sed
|
||||
]
|
||||
system "./configure", *args
|
||||
system "make", "install"
|
||||
end
|
||||
|
||||
def caveats; <<-EOS.undent
|
||||
You will need to add:
|
||||
#{HOMEBREW_PREFIX}/bin/fish
|
||||
to /etc/shells. Run:
|
||||
to /etc/shells.
|
||||
|
||||
Then run:
|
||||
chsh -s #{HOMEBREW_PREFIX}/bin/fish
|
||||
to make fish your default shell.
|
||||
|
||||
If you are upgrading from an older version of fish, you should now run:
|
||||
killall fishd
|
||||
to terminate the outdated fish daemon.
|
||||
EOS
|
||||
end
|
||||
|
||||
def post_install
|
||||
(pkgshare/"vendor_functions.d").mkpath
|
||||
(pkgshare/"vendor_completions.d").mkpath
|
||||
(pkgshare/"vendor_conf.d").mkpath
|
||||
end
|
||||
|
||||
test do
|
||||
system "#{bin}/fish", "-c", "echo"
|
||||
end
|
||||
|
||||
+45
-78
@@ -21,21 +21,17 @@ class Gcc < Formula
|
||||
|
||||
desc "GNU compiler collection"
|
||||
homepage "https://gcc.gnu.org"
|
||||
url "http://ftpmirror.gnu.org/gcc/gcc-5.2.0/gcc-5.2.0.tar.bz2"
|
||||
mirror "https://ftp.gnu.org/gnu/gcc/gcc-5.2.0/gcc-5.2.0.tar.bz2"
|
||||
sha256 "5f835b04b5f7dd4f4d2dc96190ec1621b8d89f2dc6f638f9f8bc1b1014ba8cad"
|
||||
url "https://ftp.gnu.org/gnu/gcc/gcc-7.3.0/gcc-7.3.0.tar.xz"
|
||||
mirror "https://ftpmirror.gnu.org/gcc/gcc-7.3.0/gcc-7.3.0.tar.xz"
|
||||
sha256 "832ca6ae04636adbb430e865a1451adf6979ab44ca1c8374f61fba65645ce15c"
|
||||
|
||||
bottle do
|
||||
sha256 "7786105aba6e06111cadb876900ad0f5613ad0b87e699bb81e66baa88d1279c9" => :tiger_altivec
|
||||
sha256 "aa1e0a6738594a14f270726501de6bd65628cc0f331af458c396e0728744fc1e" => :leopard_g3s
|
||||
sha256 "2e7f1d7a9600a42b88672f7719dd76257acfaa6994e11f762ccc0234c84bd905" => :leopard_altivec
|
||||
sha256 "dfe5debb5b2d22c65673a38bfc1902042d7094702f49ff3cdfa2ecb30d09308e" => :tiger_g3
|
||||
sha256 "401a75fa8baebfd62260dfa5c1b2668a4599d2543e4634d3dc7c7bb3b120e9d4" => :tiger_altivec
|
||||
end
|
||||
|
||||
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-jit", "Build the jit compiler"
|
||||
option "without-fortran", "Build without the gfortran compiler"
|
||||
option "with-jit", "Build just-in-time 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?
|
||||
|
||||
@@ -43,7 +39,6 @@ class Gcc < Formula
|
||||
depends_on "libmpc"
|
||||
depends_on "mpfr"
|
||||
depends_on "isl"
|
||||
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
|
||||
@@ -71,41 +66,43 @@ class Gcc < Formula
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64089
|
||||
patch :DATA
|
||||
|
||||
# Fix build with make 3.80
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66947
|
||||
patch do
|
||||
url "https://gist.githubusercontent.com/mistydemeo/f5508247c1171edcbddcd95671137bdb/raw/249976f5b22ace26f2373f6fad12c0a1c0e22df4/libgcc-fix-make380.patch"
|
||||
sha256 "fc5b45bb2771a6b35b0283412a50d7cb13ae982ed5607b27232a976a48078134"
|
||||
end
|
||||
|
||||
# Fix an Intel-only build failure on 10.4
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64184
|
||||
patch do
|
||||
url "https://gist.githubusercontent.com/anonymous/c0eff2ff4bfbf555505968e21311a38f/raw/39e96539676556e87c7461a382b73088c0b5ba28/-"
|
||||
sha256 "c10779e463fe3c77c574225083a9f7a12638f6b0cb278e8c3d6c40bf9d9c2762"
|
||||
url "https://gist.githubusercontent.com/mistydemeo/9c5b8dadd892ba3197a9cb431295cc83/raw/582d1ba135511272f7262f51a3f83c9099cd891d/sysdep-unix-tiger-intel.patch"
|
||||
sha256 "17afaf7daec1dd207cb8d06a7e026332637b11e83c3ad552b4cd32827f16c1d8"
|
||||
end
|
||||
|
||||
# This patch fixes the build on PPC
|
||||
# https://gcc.gnu.org/ml/gcc-testresults/2017-01/msg02971.html
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80865
|
||||
patch do
|
||||
url "https://gist.githubusercontent.com/mistydemeo/d35fcc040587cc75bd24d3464e93a45d/raw/c5fe1f0c6393526ff45803b0fc14e028149a245e/gcc_altivec.patch"
|
||||
sha256 "09a795d013ec3e96107bfb9d5c6bba821cc867b88c3bce494ae1564bfd4ababd"
|
||||
end
|
||||
|
||||
def install
|
||||
# GCC will suffer build errors if forced to use a particular linker.
|
||||
ENV.delete "LD"
|
||||
|
||||
# Otherwise libstdc++ will be incorrectly tagged with cpusubtype 10 (G4e)
|
||||
# https://github.com/mistydemeo/tigerbrew/issues/538
|
||||
if Hardware::CPU.family == :g3 || ARGV.bottle_arch == :g3
|
||||
ENV.append_to_cflags "-force_cpusubtype_ALL"
|
||||
end
|
||||
|
||||
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 adds go as a language option, but it is
|
||||
# currently only compilable on Linux.
|
||||
languages = %w[c c++ objc obj-c++ fortran java jit]
|
||||
else
|
||||
# C, C++, ObjC compilers are always built
|
||||
languages = %w[c c++ objc obj-c++]
|
||||
# We avoiding building:
|
||||
# - Ada, which requires a pre-existing GCC Ada compiler to bootstrap
|
||||
# - Go, currently not supported on macOS
|
||||
# - BRIG
|
||||
languages = %w[c c++ objc obj-c++ fortran]
|
||||
|
||||
languages << "fortran" if build.with? "fortran"
|
||||
languages << "java" if build.with? "java"
|
||||
languages << "jit" if build.with? "jit"
|
||||
end
|
||||
# JIT compiler is off by default, enabling it has performance cost
|
||||
languages << "jit" if build.with? "jit"
|
||||
|
||||
args = [
|
||||
"--build=#{arch}-apple-darwin#{osmajor}",
|
||||
@@ -119,21 +116,14 @@ class Gcc < Formula
|
||||
"--with-mpc=#{Formula["libmpc"].opt_prefix}",
|
||||
"--with-isl=#{Formula["isl"].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",
|
||||
"--disable-werror",
|
||||
"--with-pkgversion=Tigerbrew #{name} #{pkg_version} #{build.used_options*" "}".strip,
|
||||
"--with-bugurl=https://github.com/mistydemeo/tigerbrew/issues",
|
||||
]
|
||||
|
||||
# "Building GCC with plugin support requires a host that supports
|
||||
# -fPIC, -shared, -ldl and -rdynamic."
|
||||
args << "--enable-plugin" if MacOS.version > :tiger
|
||||
args << "--enable-plugin" if MacOS.version > :leopard
|
||||
|
||||
# Otherwise make fails during comparison at stage 3
|
||||
# See: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45248
|
||||
@@ -141,17 +131,13 @@ class Gcc < Formula
|
||||
|
||||
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 build.without?("multilib") || !MacOS.prefer_64_bit?
|
||||
args << "--disable-multilib"
|
||||
else
|
||||
args << "--enable-multilib"
|
||||
end
|
||||
|
||||
args << "--enable-host-shared" if build.with?("jit") || build.with?("all-languages")
|
||||
args << "--enable-host-shared" if build.with?("jit")
|
||||
|
||||
# Ensure correct install names when linking against libgcc_s;
|
||||
# see discussion in https://github.com/Homebrew/homebrew/pull/34303
|
||||
@@ -166,12 +152,10 @@ class Gcc < Formula
|
||||
end
|
||||
|
||||
system "../configure", *args
|
||||
system "make", "bootstrap"
|
||||
system "make"
|
||||
system "make", "install"
|
||||
|
||||
if build.with?("fortran") || build.with?("all-languages")
|
||||
bin.install_symlink bin/"gfortran-#{version_suffix}" => "gfortran"
|
||||
end
|
||||
bin.install_symlink bin/"gfortran-#{version_suffix}" => "gfortran"
|
||||
end
|
||||
|
||||
# Handle conflicts between GCC formulae and avoid interfering
|
||||
@@ -182,19 +166,6 @@ class Gcc < Formula
|
||||
# Even when suffixes are appended, the info pages conflict when
|
||||
# install-info is run. TODO fix this.
|
||||
info.rmtree
|
||||
|
||||
# Rename java properties
|
||||
if build.with?("java") || build.with?("all-languages")
|
||||
config_files = [
|
||||
"#{lib}/gcc/#{version_suffix}/logging.properties",
|
||||
"#{lib}/gcc/#{version_suffix}/security/classpath.security",
|
||||
"#{lib}/gcc/#{version_suffix}/i386/logging.properties",
|
||||
"#{lib}/gcc/#{version_suffix}/i386/security/classpath.security"
|
||||
]
|
||||
config_files.each do |file|
|
||||
add_suffix file, version_suffix if File.exist? file
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def add_suffix(file, suffix)
|
||||
@@ -237,23 +208,19 @@ class Gcc < Formula
|
||||
system "#{bin}/g++-#{version_suffix}", "-o", "hello-cc", "hello-cc.cc"
|
||||
assert_equal "Hello, world!\n", `./hello-cc`
|
||||
|
||||
if build.with?("fortran") || build.with?("all-languages")
|
||||
fixture = <<-EOS.undent
|
||||
integer,parameter::m=10000
|
||||
real::a(m), b(m)
|
||||
real::fact=0.5
|
||||
(testpath/"test.f90").write <<-EOS.undent
|
||||
integer,parameter::m=10000
|
||||
real::a(m), b(m)
|
||||
real::fact=0.5
|
||||
|
||||
do concurrent (i=1:m)
|
||||
a(i) = a(i) + fact*b(i)
|
||||
end do
|
||||
print *, "done"
|
||||
end
|
||||
EOS
|
||||
(testpath/"in.f90").write(fixture)
|
||||
system "#{bin}/gfortran", "-c", "in.f90"
|
||||
system "#{bin}/gfortran", "-o", "test", "in.o"
|
||||
assert_equal "done", `./test`.strip
|
||||
end
|
||||
do concurrent (i=1:m)
|
||||
a(i) = a(i) + fact*b(i)
|
||||
end do
|
||||
write(*,"(A)") "Done"
|
||||
end
|
||||
EOS
|
||||
system "#{bin}/gfortran", "-o", "test", "test.f90"
|
||||
assert_equal "Done\n", `./test`
|
||||
end
|
||||
end
|
||||
__END__
|
||||
|
||||
@@ -55,6 +55,12 @@ class Gcc44 < Formula
|
||||
sha256 "9c5f6fd30d089e97e0364af322272bb06f3d107f357d2b621503ebfbbb4a5af7"
|
||||
end
|
||||
|
||||
# Handle OS X deployment targets correctly (GCC PR target/63810 <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63810>).
|
||||
patch :p0 do
|
||||
url "https://trac.macports.org/export/129382/trunk/dports/lang/gcc44/files/macosx-version-min.patch"
|
||||
sha256 "9083143d2c60fbd89d33354710381590da770973746dd6849e18835f449510bc"
|
||||
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?
|
||||
@@ -68,6 +74,10 @@ class Gcc44 < Formula
|
||||
# GCC will suffer build errors if forced to use a particular linker.
|
||||
ENV.delete "LD"
|
||||
|
||||
# Otherwise libstdc++ will be incorrectly tagged with cpusubtype 10 (G4e)
|
||||
# https://github.com/mistydemeo/tigerbrew/issues/538
|
||||
ENV.append_to_cflags "-force_cpusubtype_ALL" if Hardware::CPU.family == :g3
|
||||
|
||||
if build.with? "all-languages"
|
||||
# Everything but Ada, which requires a pre-existing GCC Ada compiler
|
||||
# (gnat) to bootstrap.
|
||||
@@ -128,15 +138,12 @@ class Gcc44 < Formula
|
||||
|
||||
system "../configure", *args
|
||||
|
||||
# Flags for Clang compatibility
|
||||
make_flags = 'BOOT_CFLAGS="$BOOT_CFLAGS -D_FORTIFY_SOURCE=0" STAGE1_CFLAGS="$STAGE1_CFLAGS -std=gnu89 -D_FORTIFY_SOURCE=0 -fkeep-inline-functions"'
|
||||
|
||||
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", make_flags, "profiledbootstrap"
|
||||
system "make", "profiledbootstrap"
|
||||
else
|
||||
system "make", make_flags, "bootstrap"
|
||||
system "make", "bootstrap"
|
||||
end
|
||||
|
||||
# At this point `make check` could be invoked to run the testsuite. The
|
||||
|
||||
@@ -85,6 +85,10 @@ class Gcc45 < Formula
|
||||
# GCC will suffer build errors if forced to use a particular linker.
|
||||
ENV.delete "LD"
|
||||
|
||||
# Otherwise libstdc++ will be incorrectly tagged with cpusubtype 10 (G4e)
|
||||
# https://github.com/mistydemeo/tigerbrew/issues/538
|
||||
ENV.append_to_cflags "-force_cpusubtype_ALL" if Hardware::CPU.family == :g3
|
||||
|
||||
if build.with? "all-languages"
|
||||
# Everything but Ada, which requires a pre-existing GCC Ada compiler
|
||||
# (gnat) to bootstrap.
|
||||
@@ -129,7 +133,7 @@ class Gcc45 < Formula
|
||||
|
||||
# "Building GCC with plugin support requires a host that supports
|
||||
# -fPIC, -shared, -ldl and -rdynamic."
|
||||
args << "--enable-plugin" if MacOS.version > :tiger
|
||||
args << "--enable-plugin" if MacOS.version > :tiger && Hardware.cpu_type == :intel
|
||||
|
||||
# Otherwise make fails during comparison at stage 3
|
||||
# See: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45248
|
||||
@@ -170,7 +174,7 @@ class Gcc45 < Formula
|
||||
system "make", "install"
|
||||
|
||||
# `make install` neglects to transfer an essential plugin header file.
|
||||
Pathname.new(Dir[prefix.join "**", "plugin", "include", "config"].first).install "../gcc/config/darwin-sections.def" if MacOS.version > :tiger
|
||||
Pathname.new(Dir[prefix.join "**", "plugin", "include", "config"].first).install "../gcc/config/darwin-sections.def" if MacOS.version > :tiger && Hardware.cpu_type == :intel
|
||||
end
|
||||
|
||||
# Handle conflicts between GCC formulae.
|
||||
|
||||
@@ -81,6 +81,10 @@ class Gcc46 < Formula
|
||||
# GCC will suffer build errors if forced to use a particular linker.
|
||||
ENV.delete "LD"
|
||||
|
||||
# Otherwise libstdc++ will be incorrectly tagged with cpusubtype 10 (G4e)
|
||||
# https://github.com/mistydemeo/tigerbrew/issues/538
|
||||
ENV.append_to_cflags "-force_cpusubtype_ALL" if Hardware::CPU.family == :g3
|
||||
|
||||
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
|
||||
|
||||
@@ -64,6 +64,10 @@ class Gcc47 < Formula
|
||||
depends_on "cloog-ppl015"
|
||||
depends_on "ecj" if build.with?("java") || build.with?("all-languages")
|
||||
|
||||
# The as that comes with Tiger isn't capable of dealing with the
|
||||
# PPC asm that comes in libitm
|
||||
depends_on "cctools" => :build if MacOS.version < :leopard
|
||||
|
||||
# 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?
|
||||
@@ -83,6 +87,10 @@ class Gcc47 < Formula
|
||||
# GCC will suffer build errors if forced to use a particular linker.
|
||||
ENV.delete "LD"
|
||||
|
||||
# Otherwise libstdc++ will be incorrectly tagged with cpusubtype 10 (G4e)
|
||||
# https://github.com/mistydemeo/tigerbrew/issues/538
|
||||
ENV.append_to_cflags "-force_cpusubtype_ALL" if Hardware::CPU.family == :g3
|
||||
|
||||
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
|
||||
@@ -129,6 +137,10 @@ class Gcc47 < Formula
|
||||
# -fPIC, -shared, -ldl and -rdynamic."
|
||||
args << "--enable-plugin" if MacOS.version > :tiger
|
||||
|
||||
# Otherwise make fails during comparison at stage 3
|
||||
# See: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45248
|
||||
args << "--with-dwarf2" if MacOS.version < :leopard
|
||||
|
||||
args << "--disable-nls" if build.without? "nls"
|
||||
|
||||
if build.with?("java") || build.with?("all-languages")
|
||||
|
||||
@@ -89,6 +89,10 @@ class Gcc48 < Formula
|
||||
# GCC will suffer build errors if forced to use a particular linker.
|
||||
ENV.delete "LD"
|
||||
|
||||
# Otherwise libstdc++ will be incorrectly tagged with cpusubtype 10 (G4e)
|
||||
# https://github.com/mistydemeo/tigerbrew/issues/538
|
||||
ENV.append_to_cflags "-force_cpusubtype_ALL" if Hardware::CPU.family == :g3
|
||||
|
||||
if MacOS.version < :leopard
|
||||
ENV["AS"] = ENV["AS_FOR_TARGET"] = "#{Formula["cctools"].bin}/as"
|
||||
end
|
||||
|
||||
@@ -83,6 +83,10 @@ class Gcc49 < Formula
|
||||
# GCC will suffer build errors if forced to use a particular linker.
|
||||
ENV.delete "LD"
|
||||
|
||||
# Otherwise libstdc++ will be incorrectly tagged with cpusubtype 10 (G4e)
|
||||
# https://github.com/mistydemeo/tigerbrew/issues/538
|
||||
ENV.append_to_cflags "-force_cpusubtype_ALL" if Hardware::CPU.family == :g3
|
||||
|
||||
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
|
||||
|
||||
@@ -71,6 +71,10 @@ class Gcc5 < Formula
|
||||
# GCC will suffer build errors if forced to use a particular linker.
|
||||
ENV.delete "LD"
|
||||
|
||||
# Otherwise libstdc++ will be incorrectly tagged with cpusubtype 10 (G4e)
|
||||
# https://github.com/mistydemeo/tigerbrew/issues/538
|
||||
ENV.append_to_cflags "-force_cpusubtype_ALL" if Hardware::CPU.family == :g3
|
||||
|
||||
if MacOS.version < :leopard
|
||||
ENV["AS"] = ENV["AS_FOR_TARGET"] = "#{Formula["cctools"].bin}/as"
|
||||
end
|
||||
|
||||
+14
-4
@@ -21,9 +21,15 @@ class Gcc6 < Formula
|
||||
|
||||
desc "The GNU Compiler Collection"
|
||||
homepage "https://gcc.gnu.org"
|
||||
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"
|
||||
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
|
||||
|
||||
# GCC's Go compiler is not currently supported on Mac OS X.
|
||||
# See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46986
|
||||
@@ -65,6 +71,10 @@ class Gcc6 < Formula
|
||||
# GCC will suffer build errors if forced to use a particular linker.
|
||||
ENV.delete "LD"
|
||||
|
||||
# Otherwise libstdc++ will be incorrectly tagged with cpusubtype 10 (G4e)
|
||||
# https://github.com/mistydemeo/tigerbrew/issues/538
|
||||
ENV.append_to_cflags "-force_cpusubtype_ALL" if Hardware::CPU.family == :g3
|
||||
|
||||
if MacOS.version < :leopard
|
||||
ENV["AS"] = ENV["AS_FOR_TARGET"] = "#{Formula["cctools"].bin}/as"
|
||||
end
|
||||
@@ -113,7 +123,7 @@ class Gcc6 < Formula
|
||||
|
||||
# "Building GCC with plugin support requires a host that supports
|
||||
# -fPIC, -shared, -ldl and -rdynamic."
|
||||
args << "--enable-plugin" if MacOS.version > :tiger
|
||||
args << "--enable-plugin" if MacOS.version > :leopard
|
||||
|
||||
# The pre-Mavericks toolchain requires the older DWARF-2 debugging data
|
||||
# format to avoid failure during the stage 3 comparison of object files.
|
||||
|
||||
@@ -1,213 +0,0 @@
|
||||
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)
|
||||
+30
-14
@@ -1,27 +1,37 @@
|
||||
class Gmp < Formula
|
||||
desc "GNU multiple precision arithmetic library"
|
||||
homepage "https://gmplib.org/"
|
||||
url "http://ftpmirror.gnu.org/gmp/gmp-6.0.0a.tar.bz2"
|
||||
mirror "https://gmplib.org/download/gmp/gmp-6.0.0a.tar.bz2"
|
||||
mirror "https://ftp.gnu.org/gnu/gmp/gmp-6.0.0a.tar.bz2"
|
||||
sha256 "7f8e9a804b9c6d07164cf754207be838ece1219425d64e28cfa3e70d5c759aaf"
|
||||
url "https://gmplib.org/download/gmp/gmp-6.1.2.tar.xz"
|
||||
mirror "https://ftp.gnu.org/gnu/gmp/gmp-6.1.2.tar.xz"
|
||||
sha256 "87b565e89a9a684fe4ebeeddb8399dce2599f9c9049854ca8c0dfbdea0e21912"
|
||||
|
||||
bottle do
|
||||
cellar :any
|
||||
sha1 "954d513d362b0bda155bd8bf0347a49a93e3f885" => :tiger_altivec
|
||||
sha1 "ef404f79249e760443a037cc5f9374df4074f8fc" => :leopard_g3
|
||||
sha1 "f6b2011e9b1a6e22ccbb30f6ed94d338063feb30" => :leopard_altivec
|
||||
end
|
||||
|
||||
option "32-bit"
|
||||
option :cxx11
|
||||
|
||||
def arch_to_string_map
|
||||
@arch_map ||= {
|
||||
:g3 => "powerpc750",
|
||||
:g4 => "powerpc7400",
|
||||
:g4e => "powerpc7450",
|
||||
:g5 => "powerpc970"
|
||||
}
|
||||
end
|
||||
|
||||
# https://github.com/mistydemeo/tigerbrew/issues/212
|
||||
env :std
|
||||
|
||||
def install
|
||||
ENV.cxx11 if build.cxx11?
|
||||
args = ["--prefix=#{prefix}", "--enable-cxx"]
|
||||
if build.bottle?
|
||||
bottle_sym = ARGV.bottle_arch || Hardware.oldest_cpu
|
||||
arch = arch_to_string_map.fetch(bottle_sym, "core2")
|
||||
args << "--build=#{arch}-apple-darwin#{`uname -r`.to_i}"
|
||||
end
|
||||
|
||||
if build.build_32_bit? || !MacOS.prefer_64_bit?
|
||||
ENV.m32
|
||||
@@ -32,22 +42,28 @@ class Gmp < Formula
|
||||
# https://github.com/Homebrew/homebrew/issues/20693
|
||||
args << "--disable-assembly" if build.build_32_bit? || build.bottle?
|
||||
|
||||
system "./configure", *args
|
||||
system "./configure", "--disable-static", *args
|
||||
system "make"
|
||||
system "make", "check"
|
||||
ENV.deparallelize
|
||||
system "make", "install"
|
||||
system "make", "clean"
|
||||
system "./configure", "--disable-shared", "--disable-assembly", *args
|
||||
system "make"
|
||||
lib.install Dir[".libs/*.a"]
|
||||
end
|
||||
|
||||
test do
|
||||
(testpath/"test.c").write <<-EOS.undent
|
||||
#include <gmp.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
mpz_t integ;
|
||||
mpz_init (integ);
|
||||
mpz_clear (integ);
|
||||
int main() {
|
||||
mpz_t i, j, k;
|
||||
mpz_init_set_str (i, "1a", 16);
|
||||
mpz_init (j);
|
||||
mpz_init (k);
|
||||
mpz_sqrtrem (j, k, i);
|
||||
if (mpz_get_si (j) != 5 || mpz_get_si (k) != 1) abort();
|
||||
return 0;
|
||||
}
|
||||
EOS
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
class Grip < Formula
|
||||
desc "GitHub Markdown previewer"
|
||||
homepage "https://github.com/joeyespo/grip"
|
||||
url "https://files.pythonhosted.org/packages/3c/ea/2a475ed37e1b6476182e71223c98667f51704bdbc919608372b203c7ea04/grip-4.5.2.tar.gz"
|
||||
sha256 "048b7e5c738ed80bee345bd10840f27eb31687eb67132b40f2473dc1cf67aa0f"
|
||||
|
||||
bottle do
|
||||
cellar :any_skip_relocation
|
||||
sha256 "1d4b1cbd24fd7e087f13f947510fbf886bb1eccbd0bc7c45f23c4a5eebec678e" => :tiger_g3
|
||||
sha256 "cd904541d7370920a24f07abe782cc68f947dc26e820eb7000f9c0edceb9e8e2" => :tiger_g4
|
||||
sha256 "69934d0ea8e23b288a28e5dbbe429415d0b0e9df7d3bdb3c338b3bf0acd12121" => :tiger_g4e
|
||||
sha256 "0fabed73fb8cb3072f4b849e47ca2ebab0d6c8300652755866a354e49d146024" => :tiger_g5
|
||||
end
|
||||
|
||||
depends_on "python"
|
||||
|
||||
resource "certifi" do
|
||||
url "https://files.pythonhosted.org/packages/15/d4/2f888fc463d516ff7bf2379a4e9a552fef7f22a94147655d9b1097108248/certifi-2018.1.18.tar.gz"
|
||||
sha256 "edbc3f203427eef571f79a7692bb160a2b0f7ccaa31953e99bd17e307cf63f7d"
|
||||
end
|
||||
|
||||
resource "chardet" do
|
||||
url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz"
|
||||
sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae"
|
||||
end
|
||||
|
||||
resource "click" do
|
||||
url "https://files.pythonhosted.org/packages/95/d9/c3336b6b5711c3ab9d1d3a80f1a3e2afeb9d8c02a7166462f6cc96570897/click-6.7.tar.gz"
|
||||
sha256 "f15516df478d5a56180fbf80e68f206010e6d160fc39fa508b65e035fd75130b"
|
||||
end
|
||||
|
||||
resource "docopt" do
|
||||
url "https://files.pythonhosted.org/packages/a2/55/8f8cab2afd404cf578136ef2cc5dfb50baa1761b68c9da1fb1e4eed343c9/docopt-0.6.2.tar.gz"
|
||||
sha256 "49b3a825280bd66b3aa83585ef59c4a8c82f2c8a522dbe754a8bc8d08c85c491"
|
||||
end
|
||||
|
||||
resource "Flask" do
|
||||
url "https://files.pythonhosted.org/packages/eb/12/1c7bd06fcbd08ba544f25bf2c6612e305a70ea51ca0eda8007344ec3f123/Flask-0.12.2.tar.gz"
|
||||
sha256 "49f44461237b69ecd901cc7ce66feea0319b9158743dd27a2899962ab214dac1"
|
||||
end
|
||||
|
||||
resource "idna" do
|
||||
url "https://files.pythonhosted.org/packages/f4/bd/0467d62790828c23c47fc1dfa1b1f052b24efdf5290f071c7a91d0d82fd3/idna-2.6.tar.gz"
|
||||
sha256 "2c6a5de3089009e3da7c5dde64a141dbc8551d5b7f6cf4ed7c2568d0cc520a8f"
|
||||
end
|
||||
|
||||
resource "itsdangerous" do
|
||||
url "https://files.pythonhosted.org/packages/dc/b4/a60bcdba945c00f6d608d8975131ab3f25b22f2bcfe1dab221165194b2d4/itsdangerous-0.24.tar.gz"
|
||||
sha256 "cbb3fcf8d3e33df861709ecaf89d9e6629cff0a217bc2848f1b41cd30d360519"
|
||||
end
|
||||
|
||||
resource "Jinja2" do
|
||||
url "https://files.pythonhosted.org/packages/56/e6/332789f295cf22308386cf5bbd1f4e00ed11484299c5d7383378cf48ba47/Jinja2-2.10.tar.gz"
|
||||
sha256 "f84be1bb0040caca4cea721fcbbbbd61f9be9464ca236387158b0feea01914a4"
|
||||
end
|
||||
|
||||
resource "Markdown" do
|
||||
url "https://files.pythonhosted.org/packages/b3/73/fc5c850f44af5889192dff783b7b0d8f3fe8d30b65c8e3f78f8f0265fecf/Markdown-2.6.11.tar.gz"
|
||||
sha256 "a856869c7ff079ad84a3e19cd87a64998350c2b94e9e08e44270faef33400f81"
|
||||
end
|
||||
|
||||
resource "MarkupSafe" do
|
||||
url "https://files.pythonhosted.org/packages/4d/de/32d741db316d8fdb7680822dd37001ef7a448255de9699ab4bfcbdf4172b/MarkupSafe-1.0.tar.gz"
|
||||
sha256 "a6be69091dac236ea9c6bc7d012beab42010fa914c459791d627dad4910eb665"
|
||||
end
|
||||
|
||||
resource "path-and-address" do
|
||||
url "https://files.pythonhosted.org/packages/2b/b5/749fab14d9e84257f3b0583eedb54e013422b6c240491a4ae48d9ea5e44f/path-and-address-2.0.1.zip"
|
||||
sha256 "e96363d982b3a2de8531f4cd5f086b51d0248b58527227d43cf5014d045371b7"
|
||||
end
|
||||
|
||||
resource "Pygments" do
|
||||
url "https://files.pythonhosted.org/packages/71/2a/2e4e77803a8bd6408a2903340ac498cb0a2181811af7c9ec92cb70b0308a/Pygments-2.2.0.tar.gz"
|
||||
sha256 "dbae1046def0efb574852fab9e90209b23f556367b5a320c0bcb871c77c3e8cc"
|
||||
end
|
||||
|
||||
resource "requests" do
|
||||
url "https://files.pythonhosted.org/packages/b0/e1/eab4fc3752e3d240468a8c0b284607899d2fbfb236a56b7377a329aa8d09/requests-2.18.4.tar.gz"
|
||||
sha256 "9c443e7324ba5b85070c4a818ade28bfabedf16ea10206da1132edaa6dda237e"
|
||||
end
|
||||
|
||||
resource "urllib3" do
|
||||
url "https://files.pythonhosted.org/packages/ee/11/7c59620aceedcc1ef65e156cc5ce5a24ef87be4107c2b74458464e437a5d/urllib3-1.22.tar.gz"
|
||||
sha256 "cc44da8e1145637334317feebd728bd869a35285b93cbb4cca2577da7e62db4f"
|
||||
end
|
||||
|
||||
resource "Werkzeug" do
|
||||
url "https://files.pythonhosted.org/packages/9f/08/a3bb1c045ec602dc680906fc0261c267bed6b3bb4609430aff92c3888ec8/Werkzeug-0.14.1.tar.gz"
|
||||
sha256 "c3fd7a7d41976d9f44db327260e263132466836cef6f91512889ed60ad26557c"
|
||||
end
|
||||
|
||||
def install
|
||||
ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python2.7/site-packages"
|
||||
resources.each do |r|
|
||||
r.stage do
|
||||
system "python", *Language::Python.setup_install_args(libexec/"vendor")
|
||||
end
|
||||
end
|
||||
|
||||
ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python2.7/site-packages"
|
||||
system "python", *Language::Python.setup_install_args(libexec)
|
||||
|
||||
bin.install Dir[libexec/"bin/*"]
|
||||
bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"])
|
||||
end
|
||||
|
||||
test do
|
||||
assert_match "<strong>Homebrew</strong> is awesome",
|
||||
pipe_output("#{bin}/grip - --export -", "**Homebrew** is awesome.")
|
||||
end
|
||||
end
|
||||
@@ -7,14 +7,12 @@ class Isl < Formula
|
||||
# and update isl_version() function accordingly. All other names will
|
||||
# result in isl_version() function returning "UNKNOWN" and hence break
|
||||
# package detection.
|
||||
url "http://isl.gforge.inria.fr/isl-0.14.1.tar.xz"
|
||||
sha256 "8882c9e36549fc757efa267706a9af733bb8d7fe3905cbfde43e17a89eea4675"
|
||||
url "http://isl.gforge.inria.fr/isl-0.18.tar.xz"
|
||||
mirror "https://mirrors.ocf.berkeley.edu/debian/pool/main/i/isl/isl_0.18.orig.tar.xz"
|
||||
sha256 "0f35051cc030b87c673ac1f187de40e386a1482a0cfdf2c552dd6031b307ddc4"
|
||||
|
||||
bottle do
|
||||
cellar :any
|
||||
sha256 "5eaa78e68bc8d075525deb825a6eb06c2fb50a17b7dd4396ad0ac55de8aa3756" => :tiger_altivec
|
||||
sha256 "9b9a2b0962c3ebfcabe04a59ea55b4ca27c78399f8da2b13b9e87d5b6af204c3" => :leopard_g3
|
||||
sha256 "2aec4bfbb99d9d8f8946f38ba7a047a51ad6cae6332699305dca79f702ca322a" => :leopard_altivec
|
||||
end
|
||||
|
||||
head do
|
||||
@@ -34,7 +32,7 @@ class Isl < Formula
|
||||
"--prefix=#{prefix}",
|
||||
"--with-gmp=system",
|
||||
"--with-gmp-prefix=#{Formula["gmp"].opt_prefix}"
|
||||
system "make"
|
||||
system "make", "check"
|
||||
system "make", "install"
|
||||
(share/"gdb/auto-load").install Dir["#{lib}/*-gdb.py"]
|
||||
end
|
||||
@@ -50,7 +48,7 @@ class Isl < Formula
|
||||
return 0;
|
||||
}
|
||||
EOS
|
||||
system ENV.cc, "test.c", "-lisl", "-o", "test"
|
||||
system ENV.cc, "test.c", "-L#{lib}", "-lisl", "-o", "test"
|
||||
system "./test"
|
||||
end
|
||||
end
|
||||
@@ -1,6 +1,6 @@
|
||||
class Libid3tag < Formula
|
||||
desc "ID3 tag manipulation library"
|
||||
homepage "http://www.underbit.com/products/mad/"
|
||||
homepage "https://www.underbit.com/products/mad/"
|
||||
url "https://downloads.sourceforge.net/project/mad/libid3tag/0.15.1b/libid3tag-0.15.1b.tar.gz"
|
||||
sha256 "63da4f6e7997278f8a3fef4c6a372d342f705051d1eeb6a46a86b03610e26151"
|
||||
|
||||
@@ -15,32 +15,32 @@ class Libid3tag < Formula
|
||||
|
||||
# patch for utf-16 (memory leaks), see https://bugs.launchpad.net/mixxx/+bug/403586
|
||||
{
|
||||
"utf16.patchlibid3tag-0.15.1b-utf16" => "daf621e8123530fdab5193099031074666fc7330",
|
||||
"unknown-encoding" => "093def535edb3d2f5be6b173eedf0f93a1c0314c",
|
||||
"compat" => "8c179b10bf49385e4334aab141e4cf270cb02182",
|
||||
"file-write" => "b7baae1c87f90aac64a4d17725b2eaad521e42af"
|
||||
"utf16.patchlibid3tag-0.15.1b-utf16" => "487d0c531f3653f8e754d720729cf1cec1bce6e897b845fa61adaaf2668d1568",
|
||||
"unknown-encoding" => "8b695c9c05e3885655b2e798326b804011615bc6c831cd55cdbacc456a6b9494",
|
||||
"compat" => "88f486c3d263a4dd5bb556232dcfe2fba175b5124bcdd72aa6c30f562fc87d53",
|
||||
"file-write" => "eff855cabd8a51866a29246a1b257da64f46aab72d4b8e163e2a4c0d15165bf1",
|
||||
}.each do |name, sha|
|
||||
patch do
|
||||
url "http://mirror.ovh.net/gentoo-portage/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-#{name}.patch"
|
||||
sha1 sha
|
||||
url "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-#{name}.patch?id=56bd759df1d0"
|
||||
sha256 sha
|
||||
end
|
||||
end
|
||||
|
||||
# typedef for 64-bit long + buffer overflow
|
||||
{
|
||||
"64bit-long" => "f9778590811a050384b9bf8827345b61999f0da3",
|
||||
"fix_overflow" => "ed80bc74bd81caa225952f72a1a28d54300e43e3",
|
||||
"tag" => "b7ef9a41a31a37b8bb6d8e064b0c0ba618d3fa03"
|
||||
"64bit-long" => "5f8b3d3419addf90977832b0a6e563acc2c8e243bb826ebb6d0ec573ec122e1b",
|
||||
"fix_overflow" => "43ea3e0b324fb25802dae6410564c947ce1982243c781ef54b023f060c3b0ac4",
|
||||
"tag" => "ca7262ddad158ab0be804429d705f8c6a1bb120371dec593323fa4876c1b277f",
|
||||
}.each do |name, sha|
|
||||
patch :p0 do
|
||||
url "http://mirror.ovh.net/gentoo-portage/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-#{name}.patch"
|
||||
sha1 sha
|
||||
url "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-#{name}.patch?id=56bd759df1d0"
|
||||
sha256 sha
|
||||
end
|
||||
end
|
||||
|
||||
# corrects "a cappella" typo
|
||||
patch :p2 do
|
||||
url "http://mirror.ovh.net/gentoo-portage/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-a_capella.patch"
|
||||
url "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-a_capella.patch?id=56bd759df1d0"
|
||||
sha256 "5e86270ebb179d82acee686700d203e90f42e82beeed455b0163d8611657d395"
|
||||
end
|
||||
|
||||
|
||||
@@ -14,10 +14,10 @@ class Libpcap < Formula
|
||||
|
||||
keg_only :provided_by_osx
|
||||
|
||||
unless OS.mac?
|
||||
depends_on "bison" => :build
|
||||
depends_on "flex" => :build
|
||||
end
|
||||
# System versions are too old on older OS Xs
|
||||
# https://github.com/mistydemeo/tigerbrew/issues/574
|
||||
depends_on "bison" => :build
|
||||
depends_on "flex" => :build
|
||||
|
||||
def install
|
||||
system "./configure", "--prefix=#{prefix}",
|
||||
|
||||
@@ -1,565 +0,0 @@
|
||||
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'`\\"
|
||||
@@ -0,0 +1,41 @@
|
||||
class Mgba < Formula
|
||||
desc "Game Boy Advance emulator"
|
||||
homepage "https://mgba.io/"
|
||||
url "https://github.com/mgba-emu/mgba/archive/0.6.3.tar.gz"
|
||||
sha256 "35c8906c01206adae714fee9c2bc39698c514a4adb32c9c4a5a3fa58b2d10f9a"
|
||||
head "https://github.com/mgba-emu/mgba.git"
|
||||
|
||||
depends_on :ld64 # fixes a linktime error on Tiger
|
||||
depends_on "cmake" => :build
|
||||
depends_on "pkg-config" => :build
|
||||
depends_on "libepoxy"
|
||||
depends_on "libpng"
|
||||
depends_on "libzip"
|
||||
depends_on "sdl2"
|
||||
|
||||
# error: stdarg.h: No such file or directory
|
||||
fails_with :gcc if MacOS.version == :tiger
|
||||
|
||||
def install
|
||||
# Qt is still broken on 10.4, so build with it off by default.
|
||||
# FFmpeg introduces a VideoDecodeAcceleration framework requirement,
|
||||
# which isn't available on older OS Xs.
|
||||
# Imagemagick fails to link due to some strange path lookup issues.
|
||||
# The Sqlite feature isn't exposed in the SDL build, so no reason to enable it.
|
||||
args = ["-DBUILD_QT=OFF", "-DUSE_FFMPEG=OFF", "-DUSE_MAGICK=OFF", "-DUSE_SQLITE3=OFF"]
|
||||
|
||||
# GCC 4.0 and 4.2 don't support -flto
|
||||
# The buildsystem will detect this in the next stable release.
|
||||
# GCC also doesn't enable LTO on Tiger.
|
||||
if MacOS.version < :leopard || [:gcc, :gcc_4_0].include?(ENV.compiler)
|
||||
args << "-DBUILD_LTO=OFF"
|
||||
end
|
||||
|
||||
system "cmake", ".", *(std_cmake_args + args)
|
||||
system "make", "install"
|
||||
end
|
||||
|
||||
test do
|
||||
assert_match version.to_s, shell_output("#{bin}/mGBA --version")
|
||||
end
|
||||
end
|
||||
+5
-14
@@ -1,22 +1,12 @@
|
||||
class Mpfr < Formula
|
||||
desc "C library for multiple-precision floating-point computations"
|
||||
homepage "http://www.mpfr.org/"
|
||||
# Upstream is down a lot, so use mirrors
|
||||
url "https://mirrors.kernel.org/debian/pool/main/m/mpfr4/mpfr4_3.1.3.orig.tar.xz"
|
||||
mirror "https://ftp.gnu.org/gnu/mpfr/mpfr-3.1.3.tar.xz"
|
||||
sha256 "6835a08bd992c8257641791e9a6a2b35b02336c8de26d0a8577953747e514a16"
|
||||
url "https://ftp.gnu.org/gnu/mpfr/mpfr-3.1.6.tar.xz"
|
||||
mirror "https://ftpmirror.gnu.org/mpfr/mpfr-3.1.6.tar.xz"
|
||||
sha256 "7a62ac1a04408614fccdc506e4844b10cf0ad2c2b1677097f8f35d3a1344a950"
|
||||
|
||||
bottle do
|
||||
cellar :any
|
||||
sha256 "04e066ed7657626ae08398f894d58b23e0614af343f8a1d6fe4a892f3f943e17" => :tiger_altivec
|
||||
sha256 "9422c33c89b7782aa0b777e7bbbecf8539681b76dc32d6ae6faaf498eb471d0b" => :leopard_g3
|
||||
sha256 "cfbbd0bb406a79a5bdeddc16a5f01a61597aeb19a03e4be76c8ab3cf4fccbaef" => :leopard_altivec
|
||||
end
|
||||
|
||||
# http://www.mpfr.org/mpfr-current/allpatches
|
||||
patch do
|
||||
url "https://gist.github.com/anonymous/3a7d24cf2c68f21eb940/raw/471e928fcdbfb5c2fa7428cfb496496e6ee469aa/mpfr-3.1.3.diff"
|
||||
sha256 "1ca002acc121413b9ce39e9f12bb6efe4bed4ec45cf3f3ffcff122b94f6694de"
|
||||
end
|
||||
|
||||
option "32-bit"
|
||||
@@ -33,7 +23,8 @@ class Mpfr < Formula
|
||||
|
||||
def install
|
||||
ENV.m32 if build.build_32_bit?
|
||||
system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}"
|
||||
system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}",
|
||||
"--disable-silent-rules"
|
||||
system "make"
|
||||
system "make", "check"
|
||||
system "make", "install"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
class Mysql < Formula
|
||||
desc "Open source relational database management system"
|
||||
homepage "https://dev.mysql.com/doc/refman/5.6/en/"
|
||||
url "https://cdn.mysql.com/Downloads/MySQL-5.6/mysql-5.6.35.tar.gz"
|
||||
url "https://cdn.mysql.com/archives/mysql-5.6/mysql-5.6.35.tar.gz"
|
||||
sha256 "dddcba169b98844d7c65346cbd791c853edf942d78440381685087b84aa35020"
|
||||
|
||||
bottle do
|
||||
|
||||
@@ -1,18 +1,16 @@
|
||||
class Pcre2 < Formula
|
||||
desc "Perl compatible regular expressions library with a new API"
|
||||
homepage "http://www.pcre.org/"
|
||||
url "https://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre2-10.20.tar.bz2"
|
||||
mirror "https://www.mirrorservice.org/sites/downloads.sourceforge.net/p/pc/pcre/pcre2/10.20/pcre2-10.20.tar.bz2"
|
||||
sha256 "332e287101c9e9567d1ed55391b338b32f1f72c5b5ee7cc81ef2274a53ad487a"
|
||||
homepage "https://www.pcre.org/"
|
||||
url "https://ftp.pcre.org/pub/pcre/pcre2-10.30.tar.bz2"
|
||||
sha256 "90bd41c605d30e3745771eb81928d779f158081a51b2f314bbcc1f73de5773db"
|
||||
|
||||
head "svn://vcs.exim.org/pcre2/code/trunk"
|
||||
|
||||
bottle do
|
||||
cellar :any
|
||||
sha256 "df6f0855251cd664b41896e72262d28ed73b82b585b09d5df1a8d54783c8583c" => :el_capitan
|
||||
sha256 "acd343182f0033d61a8b9266909a1c3a609d9a450d1cf28fe30fefa9c54c36e3" => :yosemite
|
||||
sha256 "febc1cf22e5da7f4f873dadda0d88a158602d99b49d61ed51441d82083a9b924" => :mavericks
|
||||
sha256 "5258f37a0149806a78d777c6c311ff9c53eff4d4ae3d14c47825f4c279eed298" => :mountain_lion
|
||||
sha256 "bd0d09c9849ec4ce62bff6bf422cf8c42dfa7d39e684c0d7e7d3d176a749ab76" => :tiger_g3
|
||||
sha256 "032c6cc3f59a97be735e385714da097201d03afb5ecc1ee943d0f5ebf8f06d52" => :tiger_altivec
|
||||
sha256 "23e8ed207c87f4a77e01b49d1972de94795e398ab00e4fe1d2260f1c905306f7" => :tiger_g5
|
||||
end
|
||||
|
||||
option :universal
|
||||
@@ -28,11 +26,10 @@ class Pcre2 < Formula
|
||||
"--enable-pcre2grep-libbz2",
|
||||
"--enable-jit"
|
||||
system "make"
|
||||
system "make", "check"
|
||||
system "make", "install"
|
||||
end
|
||||
|
||||
test do
|
||||
system "#{bin}/pcre2grep", "regular expression", "#{prefix}/README"
|
||||
system "#{bin}/pcre2grep", "regular expression", prefix/"README"
|
||||
end
|
||||
end
|
||||
@@ -12,10 +12,10 @@ class Ppl011 < Formula
|
||||
sha256 "f257cca9615ae1fb0a239c1fbf4f505dbcba139744999a9c8d7f512b5dbb7fa4" => :mountain_lion
|
||||
end
|
||||
|
||||
depends_on "homebrew/dupes/m4" => :build if MacOS.version < :leopard
|
||||
depends_on "m4" => :build if MacOS.version < :leopard
|
||||
depends_on "gmp4"
|
||||
|
||||
conflicts_with "ppl10", :because => "They install the same binaries"
|
||||
conflicts_with "ppl", :because => "They install the same binaries"
|
||||
|
||||
# https://www.cs.unipr.it/mantis/view.php?id=596
|
||||
# https://github.com/Homebrew/homebrew/issues/27431
|
||||
|
||||
+40
-101
@@ -1,24 +1,19 @@
|
||||
class Python < Formula
|
||||
desc "Interpreted, interactive, object-oriented programming language"
|
||||
homepage "https://www.python.org"
|
||||
url "https://www.python.org/ftp/python/2.7.12/Python-2.7.12.tar.xz"
|
||||
sha256 "d7837121dd5652a05fef807c361909d255d173280c4e1a4ded94d73d80a1f978"
|
||||
revision 3
|
||||
|
||||
head "https://hg.python.org/cpython", :using => :hg, :branch => "2.7"
|
||||
url "https://www.python.org/ftp/python/2.7.15/Python-2.7.15.tar.xz"
|
||||
sha256 "22d9b1ac5b26135ad2b8c2901a9413537e08749a753356ee913c84dbd2df5574"
|
||||
head "https://github.com/python/cpython.git", :branch => "2.7"
|
||||
|
||||
bottle do
|
||||
sha256 "2ac20b04ff599f02e950431622943f2c92e70e85c097f645265adaf4dd8c6a31" => :sierra
|
||||
sha256 "ed692ad5e13437a751dce19865989ce7e3344402aa38496db3e78ab179121197" => :el_capitan
|
||||
sha256 "834c7ac3ce19df12cb4fb9cbb1cae0c7fbdcaf33a9141dc1c3791ab801df27f0" => :yosemite
|
||||
sha256 "8dc69c4e1f6f1ebaa59033ea30bf96f924d496ba0d0a7d698e5b9ed20369a657" => :tiger_g3
|
||||
sha256 "5aa18fb91dc3b1b3bc810171b78b0a30b68de878457666addd9c08bd2873692d" => :tiger_altivec
|
||||
end
|
||||
|
||||
# Please don't add a wide/ucs4 option as it won't be accepted.
|
||||
# More details in: https://github.com/Homebrew/homebrew/pull/32368
|
||||
option :universal
|
||||
option "with-quicktest", "Run `make quicktest` after the build (for devs; may fail)"
|
||||
option "with-tcl-tk", "Use Tigerbrew's Tk instead of OS X Tk (has optional Cocoa and threads support)"
|
||||
option "with-poll", "Enable select.poll, which is not fully implemented on OS X (https://bugs.python.org/issue5154)"
|
||||
|
||||
# sphinx-doc depends on python, but on 10.6 or earlier python is fulfilled by
|
||||
# brew, which would lead to circular dependency.
|
||||
@@ -43,30 +38,27 @@ class Python < Formula
|
||||
skip_clean "bin/easy_install", "bin/easy_install-2.7"
|
||||
|
||||
resource "setuptools" do
|
||||
url "https://files.pythonhosted.org/packages/9f/7c/0a33c528164f1b7ff8cf0684cf88c2e733c8ae0119ceca4a3955c7fc059d/setuptools-23.1.0.tar.gz"
|
||||
sha256 "4e269d36ba2313e6236f384b36eb97b3433cf99a16b94c74cca7eee2b311f2be"
|
||||
url "https://files.pythonhosted.org/packages/1a/04/d6f1159feaccdfc508517dba1929eb93a2854de729fa68da9d5c6b48fa00/setuptools-39.2.0.zip"
|
||||
sha256 "f7cddbb5f5c640311eb00eab6e849f7701fa70bf6a183fc8a2c33dd1d1672fb2"
|
||||
end
|
||||
|
||||
resource "pip" do
|
||||
url "https://files.pythonhosted.org/packages/e7/a8/7556133689add8d1a54c0b14aeff0acb03c64707ce100ecd53934da1aa13/pip-8.1.2.tar.gz"
|
||||
sha256 "4d24b03ffa67638a3fa931c09fd9e0273ffa904e95ebebe7d4b1a54c93d7b732"
|
||||
url "https://files.pythonhosted.org/packages/ae/e8/2340d46ecadb1692a1e455f13f75e596d4eab3d11a57446f08259dee8f02/pip-10.0.1.tar.gz"
|
||||
sha256 "f2bd08e0cd1b06e10218feaf6fef299f473ba706582eb3bd9d52203fdbd7ee68"
|
||||
end
|
||||
|
||||
resource "wheel" do
|
||||
url "https://files.pythonhosted.org/packages/c9/1d/bd19e691fd4cfe908c76c429fe6e4436c9e83583c4414b54f6c85471954a/wheel-0.29.0.tar.gz"
|
||||
sha256 "1ebb8ad7e26b448e9caa4773d2357849bf80ff9e313964bcaf79cbf0201a1648"
|
||||
url "https://files.pythonhosted.org/packages/2a/fb/aefe5d5dbc3f4fe1e815bcdb05cbaab19744d201bbc9b59cfa06ec7fc789/wheel-0.31.1.tar.gz"
|
||||
sha256 "0a2e54558a0628f2145d2fc822137e322412115173e8a2ddbe1c9024338ae83c"
|
||||
end
|
||||
|
||||
# Patch to disable the search for Tk.framework, since Homebrew's Tk is
|
||||
# a plain unix build. Remove `-lX11`, too because our Tk is "AquaTk".
|
||||
patch :DATA if build.with? "tcl-tk"
|
||||
|
||||
# Patch for pyport.h macro issue
|
||||
# https://bugs.python.org/issue10910
|
||||
# https://trac.macports.org/ticket/44288
|
||||
patch do
|
||||
url "https://bugs.python.org/file30805/issue10910-workaround.txt"
|
||||
sha256 "c075353337f9ff3ccf8091693d278782fcdff62c113245d8de43c5c7acc57daf"
|
||||
if build.with? "tcl-tk"
|
||||
patch do
|
||||
url "https://raw.githubusercontent.com/Homebrew/patches/42fcf22/python/brewed-tk-patch.diff"
|
||||
sha256 "15c153bdfe51a98efe48f8e8379f5d9b5c6c4015e53d3f9364d23c8689857f09"
|
||||
end
|
||||
end
|
||||
|
||||
def lib_cellar
|
||||
@@ -85,19 +77,15 @@ class Python < Formula
|
||||
# setuptools remembers the build flags python is built with and uses them to
|
||||
# build packages later. Xcode-only systems need different flags.
|
||||
def pour_bottle
|
||||
reason <<-EOS.undent
|
||||
The bottle needs the Apple Command Line Tools to be installed.
|
||||
You can install them, if desired, with:
|
||||
xcode-select --install
|
||||
reason <<~EOS
|
||||
The bottle needs the Apple Command Line Tools to be installed.
|
||||
You can install them, if desired, with:
|
||||
xcode-select --install
|
||||
EOS
|
||||
satisfy { MacOS::CLT.installed? }
|
||||
end
|
||||
|
||||
def install
|
||||
if build.with? "poll"
|
||||
opoo "The given option --with-poll enables a somewhat broken poll() on OS X (https://bugs.python.org/issue5154)."
|
||||
end
|
||||
|
||||
# Unset these so that installing pip and setuptools puts them where we want
|
||||
# and not into some other Python the user has installed.
|
||||
ENV["PYTHONHOME"] = nil
|
||||
@@ -178,18 +166,7 @@ class Python < Formula
|
||||
args << "CPPFLAGS=#{cppflags.join(" ")}" unless cppflags.empty?
|
||||
|
||||
system "./configure", *args
|
||||
|
||||
# HAVE_POLL is "broken" on OS X. See:
|
||||
# https://trac.macports.org/ticket/18376
|
||||
# https://bugs.python.org/issue5154
|
||||
if build.without? "poll"
|
||||
inreplace "pyconfig.h", /.*?(HAVE_POLL[_A-Z]*).*/, '#undef \1'
|
||||
end
|
||||
|
||||
system "make"
|
||||
if build.with?("quicktest") || build.bottle?
|
||||
system "make", "quicktest", "TESTPYTHONOPTS=-s", "TESTOPTS=-j#{ENV.make_jobs} -w"
|
||||
end
|
||||
|
||||
ENV.deparallelize do
|
||||
# Tell Python not to install into /Applications
|
||||
@@ -214,6 +191,9 @@ class Python < Formula
|
||||
# Symlink the pkgconfig files into HOMEBREW_PREFIX so they're accessible.
|
||||
(lib/"pkgconfig").install_symlink Dir["#{frameworks}/Python.framework/Versions/Current/lib/pkgconfig/*"]
|
||||
|
||||
# Remove 2to3 because Python 3 also installs it
|
||||
rm bin/"2to3"
|
||||
|
||||
# Remove the site-packages that Python created in its Cellar.
|
||||
site_packages_cellar.rmtree
|
||||
|
||||
@@ -230,6 +210,13 @@ class Python < Formula
|
||||
end
|
||||
|
||||
def post_install
|
||||
# Avoid conflicts with lingering unversioned files from Python 3
|
||||
rm_f %W[
|
||||
#{HOMEBREW_PREFIX}/bin/easy_install
|
||||
#{HOMEBREW_PREFIX}/bin/pip
|
||||
#{HOMEBREW_PREFIX}/bin/wheel
|
||||
]
|
||||
|
||||
# Fix up the site-packages so that user-installed Python software survives
|
||||
# minor updates, such as going from 2.7.0 to 2.7.1:
|
||||
|
||||
@@ -250,7 +237,7 @@ class Python < Formula
|
||||
# setuptools-0.9.5-py3.3.egg
|
||||
rm_rf Dir["#{site_packages}/setuptools*"]
|
||||
rm_rf Dir["#{site_packages}/distribute*"]
|
||||
rm_rf (Dir["#{site_packages}/pip[-_.][0-9]*"] + Dir["#{site_packages}/pip"])
|
||||
rm_rf Dir["#{site_packages}/pip[-_.][0-9]*", "#{site_packages}/pip"]
|
||||
|
||||
setup_args = ["-s", "setup.py", "--no-user-cfg", "install", "--force",
|
||||
"--verbose",
|
||||
@@ -284,21 +271,21 @@ class Python < Formula
|
||||
end
|
||||
|
||||
cfg = lib_cellar/"distutils/distutils.cfg"
|
||||
cfg.atomic_write <<-EOF.undent
|
||||
cfg.atomic_write <<~EOS
|
||||
[install]
|
||||
prefix=#{HOMEBREW_PREFIX}
|
||||
|
||||
[build_ext]
|
||||
include_dirs=#{include_dirs.join ":"}
|
||||
library_dirs=#{library_dirs.join ":"}
|
||||
EOF
|
||||
EOS
|
||||
end
|
||||
|
||||
def sitecustomize
|
||||
<<-EOF.undent
|
||||
<<~EOS
|
||||
# This file is created by Homebrew and is executed on each python startup.
|
||||
# Don't print from here, or else python command line scripts may fail!
|
||||
# <https://github.com/Homebrew/brew/blob/master/share/doc/homebrew/Homebrew-and-Python.md>
|
||||
# <https://docs.brew.sh/Homebrew-and-Python>
|
||||
import re
|
||||
import os
|
||||
import sys
|
||||
@@ -341,10 +328,10 @@ class Python < Formula
|
||||
|
||||
# Set the sys.executable to use the opt_prefix
|
||||
sys.executable = '#{opt_bin}/python2.7'
|
||||
EOF
|
||||
EOS
|
||||
end
|
||||
|
||||
def caveats; <<-EOS.undent
|
||||
def caveats; <<~EOS
|
||||
Pip and setuptools have been installed. To update them
|
||||
pip install --upgrade pip setuptools
|
||||
|
||||
@@ -354,8 +341,8 @@ class Python < Formula
|
||||
They will install into the site-package directory
|
||||
#{site_packages}
|
||||
|
||||
See: https://github.com/Homebrew/brew/blob/master/share/doc/homebrew/Homebrew-and-Python.md
|
||||
EOS
|
||||
See: https://docs.brew.sh/Homebrew-and-Python
|
||||
EOS
|
||||
end
|
||||
|
||||
test do
|
||||
@@ -364,54 +351,6 @@ class Python < Formula
|
||||
system "#{bin}/python", "-c", "import sqlite3"
|
||||
# Check if some other modules import. Then the linked libs are working.
|
||||
system "#{bin}/python", "-c", "import Tkinter; root = Tkinter.Tk()"
|
||||
system bin/"pip", "list"
|
||||
system bin/"pip", "list", "--format=columns"
|
||||
end
|
||||
end
|
||||
|
||||
__END__
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 716f08e..66114ef 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -1810,9 +1810,6 @@ class PyBuildExt(build_ext):
|
||||
# Rather than complicate the code below, detecting and building
|
||||
# AquaTk is a separate method. Only one Tkinter will be built on
|
||||
# Darwin - either AquaTk, if it is found, or X11 based Tk.
|
||||
- if (host_platform == 'darwin' and
|
||||
- self.detect_tkinter_darwin(inc_dirs, lib_dirs)):
|
||||
- return
|
||||
|
||||
# Assume we haven't found any of the libraries or include files
|
||||
# The versions with dots are used on Unix, and the versions without
|
||||
@@ -1858,21 +1855,6 @@ class PyBuildExt(build_ext):
|
||||
if dir not in include_dirs:
|
||||
include_dirs.append(dir)
|
||||
|
||||
- # Check for various platform-specific directories
|
||||
- if host_platform == 'sunos5':
|
||||
- include_dirs.append('/usr/openwin/include')
|
||||
- added_lib_dirs.append('/usr/openwin/lib')
|
||||
- elif os.path.exists('/usr/X11R6/include'):
|
||||
- include_dirs.append('/usr/X11R6/include')
|
||||
- added_lib_dirs.append('/usr/X11R6/lib64')
|
||||
- added_lib_dirs.append('/usr/X11R6/lib')
|
||||
- elif os.path.exists('/usr/X11R5/include'):
|
||||
- include_dirs.append('/usr/X11R5/include')
|
||||
- added_lib_dirs.append('/usr/X11R5/lib')
|
||||
- else:
|
||||
- # Assume default location for X11
|
||||
- include_dirs.append('/usr/X11/include')
|
||||
- added_lib_dirs.append('/usr/X11/lib')
|
||||
|
||||
# If Cygwin, then verify that X is installed before proceeding
|
||||
if host_platform == 'cygwin':
|
||||
@@ -1897,9 +1879,6 @@ class PyBuildExt(build_ext):
|
||||
if host_platform in ['aix3', 'aix4']:
|
||||
libs.append('ld')
|
||||
|
||||
- # Finally, link with the X11 libraries (not appropriate on cygwin)
|
||||
- if host_platform != "cygwin":
|
||||
- libs.append('X11')
|
||||
|
||||
ext = Extension('_tkinter', ['_tkinter.c', 'tkappinit.c'],
|
||||
define_macros=[('WITH_APPINIT', 1)] + defs,
|
||||
+126
-89
@@ -1,51 +1,54 @@
|
||||
class Python3 < Formula
|
||||
desc "Interpreted, interactive, object-oriented programming language"
|
||||
homepage "https://www.python.org/"
|
||||
url "https://www.python.org/ftp/python/3.5.0/Python-3.5.0.tar.xz"
|
||||
sha256 "d6d7aa1634a5eeeca6ed4fca266982a04f84bd8f3945a9179e20b24ad2e2be91"
|
||||
revision 1
|
||||
url "https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tar.xz"
|
||||
sha256 "0382996d1ee6aafe59763426cf0139ffebe36984474d0ec4126dd1c40a8b3549"
|
||||
|
||||
bottle do
|
||||
revision 3
|
||||
sha256 "5a955a6800431f4b38f7dcc4910deaf3c9e3a47f68b5a4b2117527c57290c4dd" => :el_capitan
|
||||
sha256 "956b2bfe8289da7584089768e6143f852b9586ffd552d9b1e4c5e116f7c52587" => :yosemite
|
||||
sha256 "98e2f771b7bc6e33f5eae068788b9197619eb037f043a292790482aa82577528" => :mavericks
|
||||
sha256 "2caf6b1d5c9166e4135392905adbb342d9abff35377762fc101278ba367089a3" => :tiger_g3
|
||||
sha256 "b5bbf6517590aae2a173d4dc2b586525b110d5188a4b5b2f465e41bfcf73f495" => :tiger_altivec
|
||||
end
|
||||
|
||||
head "https://hg.python.org/cpython", :using => :hg
|
||||
head do
|
||||
url "https://github.com/python/cpython.git"
|
||||
|
||||
resource "blurb" do
|
||||
url "https://files.pythonhosted.org/packages/f2/2d/541cf1d8054dbb320aca5e9dcce5d66efb227be9adb75d2697ee45d1f742/blurb-1.0.6.tar.gz"
|
||||
sha256 "90c7d2e5d141d7d1fc6ca0fe660025317ac81ca078e6045c46b1bc5a675ce5d1"
|
||||
end
|
||||
end
|
||||
|
||||
option :universal
|
||||
option "with-tcl-tk", "Use Tigerbrew's Tk instead of OS X Tk (has optional Cocoa and threads support)"
|
||||
option "with-quicktest", "Run `make quicktest` after the build"
|
||||
|
||||
deprecated_option "quicktest" => "with-quicktest"
|
||||
deprecated_option "with-brewed-tk" => "with-tcl-tk"
|
||||
|
||||
depends_on "pkg-config" => :build
|
||||
depends_on "sphinx-doc" => :build if MacOS.version > :snow_leopard
|
||||
depends_on "readline" => :recommended
|
||||
depends_on "sqlite" => :recommended
|
||||
depends_on "sqlite"
|
||||
depends_on "gdbm" => :recommended
|
||||
depends_on "openssl"
|
||||
depends_on "xz" => :recommended # for the lzma module added in 3.3
|
||||
depends_on "tcl-tk" => :optional
|
||||
depends_on :x11 if build.with?("tcl-tk") && Tab.for_name("tcl-tk").with?("x11")
|
||||
|
||||
skip_clean "bin/pip3", "bin/pip-3.4", "bin/pip-3.5"
|
||||
skip_clean "bin/easy_install3", "bin/easy_install-3.4", "bin/easy_install-3.5"
|
||||
skip_clean "bin/pip3", "bin/pip-3.4", "bin/pip-3.5", "bin/pip-3.6", "bin/pip-3.7"
|
||||
skip_clean "bin/easy_install3", "bin/easy_install-3.4", "bin/easy_install-3.5", "bin/easy_install-3.6", "bin/easy_install-3.7"
|
||||
|
||||
resource "setuptools" do
|
||||
url "https://pypi.python.org/packages/source/s/setuptools/setuptools-18.3.1.tar.gz"
|
||||
sha256 "2fa230727104b07e522deec17929e84e041c9047e392c055347a02b0d5ca874d"
|
||||
url "https://files.pythonhosted.org/packages/1a/04/d6f1159feaccdfc508517dba1929eb93a2854de729fa68da9d5c6b48fa00/setuptools-39.2.0.zip"
|
||||
sha256 "f7cddbb5f5c640311eb00eab6e849f7701fa70bf6a183fc8a2c33dd1d1672fb2"
|
||||
end
|
||||
|
||||
resource "pip" do
|
||||
url "https://pypi.python.org/packages/source/p/pip/pip-7.1.2.tar.gz"
|
||||
sha256 "ca047986f0528cfa975a14fb9f7f106271d4e0c3fe1ddced6c1db2e7ae57a477"
|
||||
url "https://files.pythonhosted.org/packages/ae/e8/2340d46ecadb1692a1e455f13f75e596d4eab3d11a57446f08259dee8f02/pip-10.0.1.tar.gz"
|
||||
sha256 "f2bd08e0cd1b06e10218feaf6fef299f473ba706582eb3bd9d52203fdbd7ee68"
|
||||
end
|
||||
|
||||
resource "wheel" do
|
||||
url "https://pypi.python.org/packages/source/w/wheel/wheel-0.26.0.tar.gz"
|
||||
sha256 "eaad353805c180a47545a256e6508835b65a8e830ba1093ed8162f19a50a530c"
|
||||
url "https://files.pythonhosted.org/packages/2a/fb/aefe5d5dbc3f4fe1e815bcdb05cbaab19744d201bbc9b59cfa06ec7fc789/wheel-0.31.1.tar.gz"
|
||||
sha256 "0a2e54558a0628f2145d2fc822137e322412115173e8a2ddbe1c9024338ae83c"
|
||||
end
|
||||
|
||||
# Homebrew's tcl-tk is built in a standard unix fashion (due to link errors)
|
||||
@@ -53,27 +56,6 @@ class Python3 < Formula
|
||||
# X11.
|
||||
patch :DATA if build.with? "tcl-tk"
|
||||
|
||||
# Fix extension module builds against Xcode 7 SDKs
|
||||
# https://github.com/Homebrew/homebrew/issues/41085
|
||||
# https://bugs.python.org/issue25136
|
||||
patch do
|
||||
url "https://bugs.python.org/file40478/xcode-stubs.diff"
|
||||
sha256 "029cc0dc72b1bcf4ddc5f913cc4a3fd970378073c6355921891f041aca2f8b12"
|
||||
end
|
||||
|
||||
def lib_cellar
|
||||
prefix/"Frameworks/Python.framework/Versions/#{xy}/lib/python#{xy}"
|
||||
end
|
||||
|
||||
def site_packages_cellar
|
||||
lib_cellar/"site-packages"
|
||||
end
|
||||
|
||||
# The HOMEBREW_PREFIX location of site-packages.
|
||||
def site_packages
|
||||
HOMEBREW_PREFIX/"lib/python#{xy}/site-packages"
|
||||
end
|
||||
|
||||
fails_with :llvm do
|
||||
build 2336
|
||||
cause <<-EOS.undent
|
||||
@@ -99,38 +81,50 @@ class Python3 < Formula
|
||||
ENV["PYTHONHOME"] = nil
|
||||
ENV["PYTHONPATH"] = nil
|
||||
|
||||
xy = (buildpath/"configure.ac").read.slice(/PYTHON_VERSION, (3\.\d)/, 1)
|
||||
lib_cellar = prefix/"Frameworks/Python.framework/Versions/#{xy}/lib/python#{xy}"
|
||||
|
||||
args = %W[
|
||||
--prefix=#{prefix}
|
||||
--enable-ipv6
|
||||
--datarootdir=#{share}
|
||||
--datadir=#{share}
|
||||
--enable-framework=#{frameworks}
|
||||
--enable-loadable-sqlite-extensions
|
||||
--without-ensurepip
|
||||
--with-openssl=#{Formula["openssl"].opt_prefix}
|
||||
]
|
||||
|
||||
args << "--without-gcc" if ENV.compiler == :clang
|
||||
|
||||
cflags = []
|
||||
ldflags = []
|
||||
cppflags = []
|
||||
|
||||
unless MacOS::CLT.installed?
|
||||
# Help Python's build system (setuptools/pip) to build things on Xcode-only systems
|
||||
# The setup.py looks at "-isysroot" to get the sysroot (and not at --sysroot)
|
||||
cflags = "CFLAGS=-isysroot #{MacOS.sdk_path}"
|
||||
ldflags = "LDFLAGS=-isysroot #{MacOS.sdk_path}"
|
||||
args << "CPPFLAGS=-I#{MacOS.sdk_path}/usr/include" # find zlib
|
||||
cflags << "-isysroot #{MacOS.sdk_path}"
|
||||
ldflags << "-isysroot #{MacOS.sdk_path}"
|
||||
cppflags << "-I#{MacOS.sdk_path}/usr/include" # find zlib
|
||||
# For the Xlib.h, Python needs this header dir with the system Tk
|
||||
if build.without? "tcl-tk"
|
||||
cflags += " -I#{MacOS.sdk_path}/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers"
|
||||
cflags << "-I#{MacOS.sdk_path}/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers"
|
||||
end
|
||||
args << cflags
|
||||
args << ldflags
|
||||
end
|
||||
# Avoid linking to libgcc http://code.activestate.com/lists/python-dev/112195/
|
||||
args << "MACOSX_DEPLOYMENT_TARGET=#{MacOS.version}"
|
||||
|
||||
# We want our readline and openssl! This is just to outsmart the detection code,
|
||||
# We want our readline! This is just to outsmart the detection code,
|
||||
# superenv makes cc always find includes/libs!
|
||||
inreplace "setup.py",
|
||||
"do_readline = self.compiler.find_library_file(lib_dirs, 'readline')",
|
||||
"do_readline = '#{Formula["readline"].opt_lib}/libhistory.dylib'"
|
||||
|
||||
inreplace "setup.py" do |s|
|
||||
s.gsub! "do_readline = self.compiler.find_library_file(lib_dirs, 'readline')",
|
||||
"do_readline = '#{Formula["readline"].opt_lib}/libhistory.dylib'"
|
||||
s.gsub! "/usr/local/ssl", Formula["openssl"].opt_prefix
|
||||
s.gsub! "sqlite_setup_debug = False", "sqlite_setup_debug = True"
|
||||
s.gsub! "for d_ in inc_dirs + sqlite_inc_paths:",
|
||||
"for d_ in ['#{Formula["sqlite"].opt_include}']:"
|
||||
end
|
||||
|
||||
if build.universal?
|
||||
@@ -138,9 +132,6 @@ class Python3 < Formula
|
||||
args << "--enable-universalsdk" << "--with-universal-archs=intel"
|
||||
end
|
||||
|
||||
# Allow sqlite3 module to load extensions: http://docs.python.org/library/sqlite3.html#f1
|
||||
inreplace("setup.py", 'sqlite_defines.append(("SQLITE_OMIT_LOAD_EXTENSION", "1"))', "pass") if build.with? "sqlite"
|
||||
|
||||
# Allow python modules to use ctypes.find_library to find homebrew's stuff
|
||||
# even if homebrew is not a /usr/local/lib. Try this with:
|
||||
# `brew install enchant && pip install pyenchant`
|
||||
@@ -155,8 +146,11 @@ class Python3 < Formula
|
||||
ENV.append "LDFLAGS", "-L#{tcl_tk}/lib"
|
||||
end
|
||||
|
||||
system "./configure", *args
|
||||
args << "CFLAGS=#{cflags.join(" ")}" unless cflags.empty?
|
||||
args << "LDFLAGS=#{ldflags.join(" ")}" unless ldflags.empty?
|
||||
args << "CPPFLAGS=#{cppflags.join(" ")}" unless cppflags.empty?
|
||||
|
||||
system "./configure", *args
|
||||
system "make"
|
||||
|
||||
ENV.deparallelize # Installs must be serialized
|
||||
@@ -164,7 +158,6 @@ class Python3 < Formula
|
||||
system "make", "install", "PYTHONAPPSDIR=#{prefix}"
|
||||
# Demos and Tools
|
||||
system "make", "frameworkinstallextras", "PYTHONAPPSDIR=#{share}/python3"
|
||||
system "make", "quicktest" if build.include? "quicktest"
|
||||
|
||||
# Any .app get a " 3" attached, so it does not conflict with python 2.x.
|
||||
Dir.glob("#{prefix}/*.app") { |app| mv app, app.sub(".app", " 3.app") }
|
||||
@@ -182,21 +175,45 @@ class Python3 < Formula
|
||||
rm bin/"2to3"
|
||||
|
||||
# Remove the site-packages that Python created in its Cellar.
|
||||
site_packages_cellar.rmtree
|
||||
|
||||
# These makevars are available through distutils.sysconfig at runtime and
|
||||
# some third-party software packages depend on them
|
||||
inreplace frameworks/"Python.framework/Versions/#{xy}/lib/python#{xy}/config-#{xy}m/Makefile" do |s|
|
||||
s.change_make_var! "LINKFORSHARED",
|
||||
"-u _PyMac_Error #{opt_prefix}/Frameworks/Python.framework/Versions/#{xy}/Python"
|
||||
end
|
||||
(prefix/"Frameworks/Python.framework/Versions/#{xy}/lib/python#{xy}/site-packages").rmtree
|
||||
|
||||
%w[setuptools pip wheel].each do |r|
|
||||
(libexec/r).install resource(r)
|
||||
end
|
||||
|
||||
if MacOS.version > :snow_leopard
|
||||
cd "Doc" do
|
||||
if build.head?
|
||||
system bin/"python3", "-m", "venv", "./venv"
|
||||
resource("blurb").stage do
|
||||
system buildpath/"Doc/venv/bin/python3", "-m", "pip", "install", "-v",
|
||||
"--no-deps", "--no-binary", ":all", "--ignore-installed", "."
|
||||
end
|
||||
end
|
||||
|
||||
system "make", "html"
|
||||
doc.install Dir["build/html/*"]
|
||||
end
|
||||
end
|
||||
|
||||
# Install unversioned symlinks in libexec/bin.
|
||||
{
|
||||
"idle" => "idle3",
|
||||
"pydoc" => "pydoc3",
|
||||
"python" => "python3",
|
||||
"python-config" => "python3-config",
|
||||
}.each do |unversioned_name, versioned_name|
|
||||
(libexec/"bin").install_symlink (bin/versioned_name).realpath => unversioned_name
|
||||
end
|
||||
end
|
||||
|
||||
def post_install
|
||||
ENV.delete "PYTHONPATH"
|
||||
|
||||
xy = (prefix/"Frameworks/Python.framework/Versions").children.min.basename.to_s
|
||||
site_packages = HOMEBREW_PREFIX/"lib/python#{xy}/site-packages"
|
||||
site_packages_cellar = prefix/"Frameworks/Python.framework/Versions/#{xy}/lib/python#{xy}/site-packages"
|
||||
|
||||
# Fix up the site-packages so that user-installed Python software survives
|
||||
# minor updates, such as going from 3.3.2 to 3.3.3:
|
||||
|
||||
@@ -232,45 +249,50 @@ class Python3 < Formula
|
||||
rm_rf [bin/"pip", bin/"easy_install"]
|
||||
mv bin/"wheel", bin/"wheel3"
|
||||
|
||||
# Install unversioned symlinks in libexec/bin.
|
||||
{
|
||||
"easy_install" => "easy_install-#{xy}",
|
||||
"pip" => "pip3",
|
||||
"wheel" => "wheel3",
|
||||
}.each do |unversioned_name, versioned_name|
|
||||
(libexec/"bin").install_symlink (bin/versioned_name).realpath => unversioned_name
|
||||
end
|
||||
|
||||
# post_install happens after link
|
||||
%W[pip3 pip#{xy} easy_install-#{xy} wheel3].each do |e|
|
||||
(HOMEBREW_PREFIX/"bin").install_symlink bin/e
|
||||
end
|
||||
|
||||
# Help distutils find brewed stuff when building extensions
|
||||
include_dirs = [HOMEBREW_PREFIX/"include", Formula["openssl"].opt_include]
|
||||
library_dirs = [HOMEBREW_PREFIX/"lib", Formula["openssl"].opt_lib]
|
||||
|
||||
if build.with? "sqlite"
|
||||
include_dirs << Formula["sqlite"].opt_include
|
||||
library_dirs << Formula["sqlite"].opt_lib
|
||||
end
|
||||
include_dirs = [HOMEBREW_PREFIX/"include", Formula["openssl"].opt_include,
|
||||
Formula["sqlite"].opt_include]
|
||||
library_dirs = [HOMEBREW_PREFIX/"lib", Formula["openssl"].opt_lib,
|
||||
Formula["sqlite"].opt_lib]
|
||||
|
||||
if build.with? "tcl-tk"
|
||||
include_dirs << Formula["tcl-tk"].opt_include
|
||||
library_dirs << Formula["tcl-tk"].opt_lib
|
||||
end
|
||||
|
||||
cfg = lib_cellar/"distutils/distutils.cfg"
|
||||
cfg.atomic_write <<-EOF.undent
|
||||
cfg = prefix/"Frameworks/Python.framework/Versions/#{xy}/lib/python#{xy}/distutils/distutils.cfg"
|
||||
|
||||
cfg.atomic_write <<~EOS
|
||||
[install]
|
||||
prefix=#{HOMEBREW_PREFIX}
|
||||
|
||||
[build_ext]
|
||||
include_dirs=#{include_dirs.join ":"}
|
||||
library_dirs=#{library_dirs.join ":"}
|
||||
EOF
|
||||
end
|
||||
|
||||
def xy
|
||||
version.to_s.slice(/(3.\d)/) || "3.6"
|
||||
EOS
|
||||
end
|
||||
|
||||
def sitecustomize
|
||||
<<-EOF.undent
|
||||
xy = (prefix/"Frameworks/Python.framework/Versions").children.min.basename.to_s
|
||||
|
||||
<<~EOS
|
||||
# This file is created by Homebrew and is executed on each python startup.
|
||||
# Don't print from here, or else python command line scripts may fail!
|
||||
# <https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Homebrew-and-Python.md>
|
||||
# <https://docs.brew.sh/Homebrew-and-Python>
|
||||
import re
|
||||
import os
|
||||
import sys
|
||||
@@ -297,32 +319,46 @@ class Python3 < Formula
|
||||
# the Cellar site-packages is a symlink to the HOMEBREW_PREFIX
|
||||
# site_packages; prefer the shorter paths
|
||||
long_prefix = re.compile(r'#{rack}/[0-9\._abrc]+/Frameworks/Python\.framework/Versions/#{xy}/lib/python#{xy}/site-packages')
|
||||
sys.path = [long_prefix.sub('#{site_packages}', p) for p in sys.path]
|
||||
sys.path = [long_prefix.sub('#{HOMEBREW_PREFIX/"lib/python#{xy}/site-packages"}', p) for p in sys.path]
|
||||
|
||||
# Set the sys.executable to use the opt_prefix
|
||||
sys.executable = '#{opt_bin}/python#{xy}'
|
||||
EOF
|
||||
EOS
|
||||
end
|
||||
|
||||
def caveats
|
||||
text = <<-EOS.undent
|
||||
Pip and setuptools have been installed. To update them
|
||||
pip3 install --upgrade pip setuptools
|
||||
if prefix.exist?
|
||||
xy = (prefix/"Frameworks/Python.framework/Versions").children.min.basename.to_s
|
||||
else
|
||||
xy = version.to_s.slice(/(3\.\d)/) || "3.7"
|
||||
end
|
||||
text = <<~EOS
|
||||
Python has been installed as
|
||||
#{HOMEBREW_PREFIX}/bin/python3
|
||||
|
||||
Unversioned symlinks `python`, `python-config`, `pip` etc. pointing to
|
||||
`python3`, `python3-config`, `pip3` etc., respectively, have been installed into
|
||||
#{opt_libexec}/bin
|
||||
|
||||
If you need Homebrew's Python 2.7 run
|
||||
brew install python
|
||||
|
||||
Pip, setuptools, and wheel have been installed. To update them run
|
||||
pip3 install --upgrade pip setuptools wheel
|
||||
|
||||
You can install Python packages with
|
||||
pip3 install <package>
|
||||
|
||||
They will install into the site-package directory
|
||||
#{site_packages}
|
||||
#{HOMEBREW_PREFIX/"lib/python#{xy}/site-packages"}
|
||||
|
||||
See: https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Homebrew-and-Python.md
|
||||
See: https://docs.brew.sh/Homebrew-and-Python
|
||||
EOS
|
||||
|
||||
# Tk warning only for 10.6
|
||||
tk_caveats = <<-EOS.undent
|
||||
tk_caveats = <<~EOS
|
||||
|
||||
Apple's Tcl/Tk is not recommended for use with Python on Mac OS X 10.6.
|
||||
For more information see: http://www.python.org/download/mac/tcltk/
|
||||
For more information see: https://www.python.org/download/mac/tcltk/
|
||||
EOS
|
||||
|
||||
text += tk_caveats unless MacOS.version >= :lion
|
||||
@@ -330,6 +366,7 @@ class Python3 < Formula
|
||||
end
|
||||
|
||||
test do
|
||||
xy = (prefix/"Frameworks/Python.framework/Versions").children.min.basename.to_s
|
||||
# Check if sqlite is ok, because we build with --enable-loadable-sqlite-extensions
|
||||
# and it can occur that building sqlite silently fails if OSX's sqlite is used.
|
||||
system "#{bin}/python#{xy}", "-c", "import sqlite3"
|
||||
|
||||
+4
-25
@@ -1,42 +1,24 @@
|
||||
class Qemu < Formula
|
||||
desc "x86 and PowerPC Emulator"
|
||||
homepage "http://wiki.qemu.org"
|
||||
# 2.2.1 is the last version to work pre-10.6
|
||||
# See: https://github.com/mistydemeo/tigerbrew/issues/523
|
||||
url "http://wiki.qemu-project.org/download/qemu-2.2.1.tar.bz2"
|
||||
sha256 "4617154c6ef744b83e10b744e392ad111dd351d435d6563ce24d8da75b1335a0"
|
||||
head "git://git.qemu-project.org/qemu.git"
|
||||
|
||||
stable do
|
||||
url "http://wiki.qemu-project.org/download/qemu-2.4.0.1.tar.bz2"
|
||||
sha256 "ecfe8b88037e41e817d72c460c56c6a0b573d540d6ba38b162d0de4fd22d1bdb"
|
||||
|
||||
# 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?full_index=1"
|
||||
sha256 "4e370ff6417f80aac46c84748800353caa5ec3a59ba9cdb1587077f5a68196f8"
|
||||
end
|
||||
end
|
||||
|
||||
bottle do
|
||||
sha256 "c6bf8ef38e8af71b00a906a4578bd180d91dce2f3c2f092818690b52bfaac895" => :el_capitan
|
||||
sha256 "36e3cee1a950d0877d6120b4e7603ddd96e506af54e72337276e5d931e8c40dc" => :yosemite
|
||||
sha256 "043f1c5b577fdfbaac516bc1ca909dee089cd591fd018b68c1298ab859170ef9" => :mavericks
|
||||
end
|
||||
|
||||
depends_on "make" => :build if MacOS.version < :leopard
|
||||
depends_on "pkg-config" => :build
|
||||
depends_on "libtool" => :build
|
||||
depends_on "jpeg"
|
||||
depends_on "gnutls"
|
||||
depends_on "glib"
|
||||
depends_on "libutil" if MacOS.version < :leopard
|
||||
depends_on "pixman"
|
||||
depends_on "vde" => :optional
|
||||
depends_on "sdl" => :optional
|
||||
depends_on "gtk+" => :optional
|
||||
depends_on "libssh2" => :optional
|
||||
|
||||
fails_with :gcc_4_0
|
||||
fails_with :gcc
|
||||
|
||||
# 3.2MB working disc-image file hosted on upstream's servers for people to use to test qemu functionality.
|
||||
resource "armtest" do
|
||||
url "http://wiki.qemu.org/download/arm-test-0.2.tar.gz"
|
||||
@@ -50,9 +32,6 @@ class Qemu < Formula
|
||||
# Needed for certain stdint macros on 10.4
|
||||
ENV.append_to_cflags "-D__STDC_CONSTANT_MACROS"
|
||||
|
||||
# Rez is provided in a normal path in later Xcodes
|
||||
ENV.prepend_path "PATH", "/Developer/Tools"
|
||||
|
||||
# Make 3.80 does not support the `or` operator and has trouble evaluating `unnest-vars`
|
||||
# See https://github.com/mistydemeo/tigerbrew/pull/496
|
||||
ENV["MAKE"] = make_path
|
||||
|
||||
@@ -3,8 +3,7 @@ class Qt < Formula
|
||||
homepage "https://www.qt.io/"
|
||||
|
||||
stable do
|
||||
url "https://download.qt.io/official_releases/qt/4.8/4.8.7/qt-everywhere-opensource-src-4.8.7.tar.gz"
|
||||
mirror "https://www.mirrorservice.org/sites/download.qt-project.org/official_releases/qt/4.8/4.8.7/qt-everywhere-opensource-src-4.8.7.tar.gz"
|
||||
url "https://download.qt.io/archive/qt/4.8/4.8.7/qt-everywhere-opensource-src-4.8.7.tar.gz"
|
||||
sha256 "e2882295097e47fe089f8ac741a95fef47e0a73a3f3cdf21b56990638f626ea0"
|
||||
end
|
||||
|
||||
|
||||
@@ -7,7 +7,8 @@ class Readline < Formula
|
||||
|
||||
bottle do
|
||||
cellar :any
|
||||
sha256 "f36867f7a2762620894058678f400aa945c9a6930a7a33f7e74d02e12639bbb4" => :tiger_altivec
|
||||
sha256 "5ec9e06a248e6d50c9dfa10ab3a862597fbbb66e79039c2848a6da4995b16af4" => :tiger_g3
|
||||
sha256 "42447f1f1ed5a90e778c74131bb24431438864dccd8fdf1d9f120ee62550da67" => :tiger_altivec
|
||||
sha256 "87370403df816b715cb920cce228a31240e7d6eab976bf32b92e2f77050dac06" => :leopard_g3
|
||||
sha256 "3d347f4be190c3881c6240f3037e4e5b474b47c36740cf21595ba4122e280205" => :leopard_altivec
|
||||
end
|
||||
|
||||
@@ -27,17 +27,17 @@ class Ruby < Formula
|
||||
depends_on "openssl"
|
||||
depends_on :x11 if build.with? "tcltk"
|
||||
|
||||
if MacOS.version <= :leopard
|
||||
if true# MacOS.version <= :leopard
|
||||
# fix for https://bugs.ruby-lang.org/issues/11054
|
||||
patch do
|
||||
url "https://github.com/ruby/ruby/commit/1c80c388d5bd48018c419a2ea3ed9f7b7514dfa3.patch"
|
||||
sha256 "b53661f3077f10af2446f6faf5870d476471290859b7058cd2661e6e6ca24e8e"
|
||||
url "https://github.com/ruby/ruby/commit/1c80c388d5bd48018c419a2ea3ed9f7b7514dfa3.patch?full_index=1"
|
||||
sha256 "8ba0a24a36702d2cbc94aa73cb6f0b11793348b0158c11c8608e073c71601bb5"
|
||||
end
|
||||
|
||||
# fix for https://bugs.ruby-lang.org/issues/13247
|
||||
patch do
|
||||
url "https://github.com/ruby/ruby/commit/9e1a9858c84142e32b1bc51b23fa06a025f98b46.patch"
|
||||
sha256 "6bae61c482b59771613c281def4826cd32fa5d9fbe8d0f4935b50896b65fe5fe"
|
||||
url "https://github.com/ruby/ruby/commit/9e1a9858c84142e32b1bc51b23fa06a025f98b46.patch?full_index=1"
|
||||
sha256 "300f13461385804ddfb314d9b0880bb47ad4f53f48209681d193a800418c31e6"
|
||||
end
|
||||
|
||||
# fix for ext/fiddle/libffi-3.2.1/src/x86/win32.S
|
||||
@@ -45,9 +45,9 @@ class Ruby < Formula
|
||||
patch :DATA
|
||||
end
|
||||
|
||||
fails_with :llvm do
|
||||
build 2326
|
||||
end
|
||||
# fails_with :llvm do
|
||||
# build 2326
|
||||
# end
|
||||
|
||||
def install
|
||||
# mcontext types had a member named `ss` instead of `__ss`
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
class Tcsh < Formula
|
||||
desc "Enhanced, fully compatible version of the Berkeley C shell"
|
||||
homepage "http://www.tcsh.org/"
|
||||
url "ftp://ftp.astron.com/pub/tcsh/tcsh-6.19.00.tar.gz"
|
||||
mirror "http://ftp.funet.fi/pub/mirrors/ftp.astron.com/pub/tcsh/tcsh-6.19.00.tar.gz"
|
||||
sha256 "12e271e0b89e4259d9d6e8d525322e77340e7244cfbd199a591e5f8146285c49"
|
||||
url "ftp://ftp.astron.com/pub/tcsh/tcsh-6.20.00.tar.gz"
|
||||
mirror "https://ftp.osuosl.org/pub/blfs/conglomeration/tcsh/tcsh-6.20.00.tar.gz"
|
||||
sha256 "b89de7064ab54dac454a266cfe5d8bf66940cb5ed048d0c30674ea62e7ecef9d"
|
||||
|
||||
bottle do
|
||||
sha256 "2d3fed239e9d5ac71b47c3e5bf96b93c1e9ba77c3799ca482a5b6809621d5f1e" => :yosemite
|
||||
sha256 "ff5b980d71cb0f151264f0a7f6c6b34120e2420aac284ecfe8fcf908f4e90c07" => :mavericks
|
||||
sha256 "beab7a774551d3b446526359c31900fbbc7300403b545395c1949ba302a65e24" => :mountain_lion
|
||||
sha256 "9ea07dfb5815b5cfda4c022870a31fce1e1e66109d6afd21d45870b6566eef50" => :tiger_g3
|
||||
sha256 "e574d87dd70e6604f675033fcea4bd3f7529242dd868d705a8bae694f87f7a03" => :tiger_altivec
|
||||
sha256 "2ff1a8f5dbd9a71f555009b7ee509dc033953d4558a3fed85f74781a12942c5a" => :tiger_g5
|
||||
end
|
||||
|
||||
def install
|
||||
@@ -17,10 +17,10 @@ class Tcsh < Formula
|
||||
end
|
||||
|
||||
test do
|
||||
(testpath/"test.csh").write <<-EOS.undent
|
||||
#!#{bin}/tcsh
|
||||
(testpath/"test.csh").write <<~EOS
|
||||
#!#{bin}/tcsh -f
|
||||
set ARRAY=( "t" "e" "s" "t" )
|
||||
foreach i ( `seq $#ARRAY` )
|
||||
foreach i ( 1 2 3 4 )
|
||||
echo -n $ARRAY[$i]
|
||||
end
|
||||
EOS
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
class Timedog < Formula
|
||||
desc "Lists files that were saved by a backup of the OS X Time Machine"
|
||||
homepage "http://timedog.googlecode.com/"
|
||||
url "https://timedog.googlecode.com/files/timedog-1.3.zip"
|
||||
sha256 "4683f37a28407dabc5c56dc45e6480dd2db460289321edce8980a236cc2787ec"
|
||||
homepage "https://github.com/nlfiedler/timedog"
|
||||
url "https://github.com/nlfiedler/timedog/archive/v1.4.tar.gz"
|
||||
sha256 "169ab408fe5c6b292a7d4adf0845c42160108fd43d6a392b95210204de49cb52"
|
||||
head "https://github.com/nlfiedler/timedog.git"
|
||||
|
||||
def install
|
||||
bin.install "timedog"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
class Unar < Formula
|
||||
desc "RAR archive command-line tools"
|
||||
homepage "http://unarchiver.c3.cx/commandline"
|
||||
url "https://theunarchiver.googlecode.com/files/unar1.8.1_src.zip"
|
||||
url "https://wakaba.c3.cx/releases/TheUnarchiver/unar1.8.1_src.zip"
|
||||
version "1.8.1"
|
||||
sha256 "67ccb1c780150840f38de63b8e7047717ef4c71b7574d9ef57bd9d9c93255709"
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
class Xz < Formula
|
||||
desc "General-purpose data compression with high compression ratio"
|
||||
homepage "http://tukaani.org/xz/"
|
||||
url "https://fossies.org/linux/misc/xz-5.2.1.tar.gz"
|
||||
url "http://download.openpkg.org/components/cache/xz/xz-5.2.1.tar.gz"
|
||||
mirror "http://tukaani.org/xz/xz-5.2.1.tar.gz"
|
||||
sha256 "b918b6648076e74f8d7ae19db5ee663df800049e187259faf5eb997a7b974681"
|
||||
|
||||
|
||||
@@ -149,6 +149,7 @@ module Homebrew
|
||||
f.puts "HOMEBREW_BOTTLE_DOMAIN: #{BottleSpecification::DEFAULT_DOMAIN}"
|
||||
f.puts hardware
|
||||
f.puts "OS X: #{MACOS_FULL_VERSION}-#{kernel}"
|
||||
f.puts "Curl: #{ENV["HOMEBREW_CURL"]}"
|
||||
f.puts "Xcode: #{xcode ? xcode : "N/A"}"
|
||||
f.puts "CLT: #{clt ? clt : "N/A"}"
|
||||
f.puts "GCC-4.0: build #{gcc_40}" if gcc_40
|
||||
|
||||
@@ -528,17 +528,6 @@ class Checks
|
||||
end
|
||||
end
|
||||
|
||||
def check_ruby_version
|
||||
ruby_version = MacOS.version >= "10.9" ? "2.0" : "1.8"
|
||||
if RUBY_VERSION[/\d\.\d/] != ruby_version then <<-EOS.undent
|
||||
Ruby version #{RUBY_VERSION} is unsupported on #{MacOS.version}. Tigerbrew
|
||||
is developed and tested on Ruby #{ruby_version}, and may not work correctly
|
||||
on other Rubies. Patches are accepted as long as they don't cause breakage
|
||||
on supported Rubies.
|
||||
EOS
|
||||
end
|
||||
end
|
||||
|
||||
def check_homebrew_prefix
|
||||
unless HOMEBREW_PREFIX.to_s == "/usr/local"
|
||||
<<-EOS.undent
|
||||
|
||||
Executable
+44
@@ -0,0 +1,44 @@
|
||||
setup-curl-path() {
|
||||
local vendor_dir
|
||||
local vendor_curl_current_version
|
||||
local vendor_curl_path
|
||||
|
||||
vendor_dir="$HOMEBREW_LIBRARY/Homebrew/vendor"
|
||||
vendor_curl_current_version="$vendor_dir/portable-curl/current"
|
||||
vendor_curl_path="$vendor_curl_current_version/bin/curl"
|
||||
|
||||
if [[ "$HOMEBREW_COMMAND" != "vendor-install" ]]
|
||||
then
|
||||
if [[ -x "$vendor_curl_path" ]]
|
||||
then
|
||||
HOMEBREW_CURL="$vendor_curl_path"
|
||||
|
||||
if [[ $(readlink "$vendor_curl_current_version") != "$(<"$vendor_dir/portable-curl-version")" ]]
|
||||
then
|
||||
if ! brew vendor-install curl --quiet
|
||||
then
|
||||
onoe "Failed to upgrade vendor Curl."
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if [[ -n "$HOMEBREW_OSX" ]]
|
||||
then
|
||||
HOMEBREW_CURL="/usr/bin/curl"
|
||||
else
|
||||
HOMEBREW_CURL="$(which curl)"
|
||||
fi
|
||||
|
||||
if [[ "$HOMEBREW_OSX_VERSION_NUMERIC" -lt "100900" || ! -x "$HOMEBREW_CURL" ]]
|
||||
then
|
||||
brew vendor-install curl --quiet
|
||||
if [[ ! -x "$vendor_curl_path" ]]
|
||||
then
|
||||
odie "Failed to install vendor Curl."
|
||||
fi
|
||||
HOMEBREW_CURL="$vendor_curl_path"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
export HOMEBREW_CURL
|
||||
}
|
||||
@@ -0,0 +1,233 @@
|
||||
#: @hide_from_man_page
|
||||
#: * `vendor-install` [<target>]:
|
||||
#: Install vendor version of Homebrew dependencies.
|
||||
|
||||
# Hide shellcheck complaint:
|
||||
# shellcheck source=/dev/null
|
||||
source "$HOMEBREW_LIBRARY/Homebrew/utils/lock.sh"
|
||||
|
||||
VENDOR_DIR="$HOMEBREW_LIBRARY/Homebrew/vendor"
|
||||
|
||||
# Built from https://github.com/Homebrew/homebrew-portable.
|
||||
if [[ -n "$HOMEBREW_OSX" ]]
|
||||
then
|
||||
# PPC-only 10.4 build
|
||||
if [[ "$HOMEBREW_PROCESSOR" != "Intel" ]]
|
||||
then
|
||||
ruby_URL="https://archive.org/download/tigerbrew/portable-ruby-2.3.3.tiger_g3.bottle.tar.gz"
|
||||
ruby_SHA="162bed8c95fb30d4580ebc7dfadbb9d699171edbd7b60d8259de7f4cfc55cc32"
|
||||
# Intel-only 10.4 build
|
||||
else
|
||||
ruby_URL="https://archive.org/download/tigerbrew/portable-ruby-2.3.3.tiger_i386.bottle.tar.gz"
|
||||
ruby_SHA="7f4f13348d583bc9e8594d2b094c6b0140ce0a32a226a145b8b7f9993fca8c28"
|
||||
fi
|
||||
|
||||
# Curl used on older OS Xs to download software
|
||||
# PPC-only 10.4 build
|
||||
if [[ "$HOMEBREW_PROCESSOR" != "Intel" ]]
|
||||
then
|
||||
curl_URL="https://archive.org/download/tigerbrew/portable-curl-7.58.0.tiger_g3.bottle.tar.gz"
|
||||
curl_SHA="b3c29e64b62c281e6820460c823d6f7d983e7234fd398ffd13d49c6a011c6bda"
|
||||
# Intel-only 10.4 build
|
||||
else
|
||||
curl_URL="https://archive.org/download/tigerbrew/portable-curl-7.58.0.tiger_i386.bottle.tar.gz"
|
||||
curl_SHA="552eff67a04f23ee3e041e51387fbebc8b950c265a1b92bed2fdd69ea71496a8"
|
||||
fi
|
||||
elif [[ -n "$HOMEBREW_LINUX" ]]
|
||||
then
|
||||
ruby_URL="https://homebrew.bintray.com/bottles-portable/portable-ruby-2.0.0-p648.x86_64_linux.bottle.tar.gz"
|
||||
ruby_SHA="dbb5118a22a6a75cc77e62544a3d8786d383fab1bdaf8c154951268807357bf0"
|
||||
fi
|
||||
|
||||
fetch() {
|
||||
local -a curl_args
|
||||
local sha
|
||||
local temporary_path
|
||||
|
||||
curl_args=(
|
||||
--fail \
|
||||
--remote-time \
|
||||
--location \
|
||||
--user-agent "$HOMEBREW_USER_AGENT_CURL" \
|
||||
)
|
||||
|
||||
if [[ -n "$HOMEBREW_QUIET" ]]
|
||||
then
|
||||
curl_args[${#curl_args[*]}]="--silent"
|
||||
elif [[ -z "$HOMEBREW_VERBOSE" ]]
|
||||
then
|
||||
curl_args[${#curl_args[*]}]="--progress-bar"
|
||||
fi
|
||||
|
||||
# Certs are too old to recognize most modern websites; count on the
|
||||
# sha256 hashes to ensure we're fetching the right thing.
|
||||
if [[ "$HOMEBREW_CURL" = "/usr/bin/curl" && "$HOMEBREW_OSX_VERSION_NUMERIC" -lt "100900" ]]
|
||||
then
|
||||
curl_args[${#curl_args[*]}]="--insecure"
|
||||
fi
|
||||
|
||||
temporary_path="${CACHED_LOCATION}.incomplete"
|
||||
|
||||
mkdir -p "$HOMEBREW_CACHE"
|
||||
[[ -n "$HOMEBREW_QUIET" ]] || echo "==> Downloading $VENDOR_URL"
|
||||
if [[ -f "$CACHED_LOCATION" ]]
|
||||
then
|
||||
[[ -n "$HOMEBREW_QUIET" ]] || echo "Already downloaded: $CACHED_LOCATION"
|
||||
else
|
||||
if [[ -f "$temporary_path" ]]
|
||||
then
|
||||
"$HOMEBREW_CURL" "${curl_args[@]}" -C - "$VENDOR_URL" -o "$temporary_path"
|
||||
if [[ $? -eq 33 ]]
|
||||
then
|
||||
[[ -n "$HOMEBREW_QUIET" ]] || echo "Trying a full download"
|
||||
rm -f "$temporary_path"
|
||||
"$HOMEBREW_CURL" "${curl_args[@]}" "$VENDOR_URL" -o "$temporary_path"
|
||||
fi
|
||||
else
|
||||
"$HOMEBREW_CURL" "${curl_args[@]}" "$VENDOR_URL" -o "$temporary_path"
|
||||
fi
|
||||
|
||||
if [[ ! -f "$temporary_path" ]]
|
||||
then
|
||||
odie "Download failed: ${VENDOR_URL}"
|
||||
fi
|
||||
|
||||
trap '' SIGINT
|
||||
mv "$temporary_path" "$CACHED_LOCATION"
|
||||
trap - SIGINT
|
||||
fi
|
||||
|
||||
if [[ "$(sysctl -n hw.cputype)" = "18" ]]; then
|
||||
cpu_family="$(sysctl -n hw.cpusubtype)"
|
||||
else
|
||||
cpu_family="$(sysctl -n hw.cpufamily)"
|
||||
fi
|
||||
|
||||
if [[ -x "$(which shasum)" ]]
|
||||
then
|
||||
sha="$(shasum -a 256 "$CACHED_LOCATION" | cut -d' ' -f1)"
|
||||
elif [[ -x "$(which sha256sum)" ]]
|
||||
then
|
||||
sha="$(sha256sum "$CACHED_LOCATION" | cut -d' ' -f1)"
|
||||
# Ruby 1.8.2's vendored Ruby has broken SHA256 calculation pre-G4e
|
||||
elif [[ -x "$(which ruby)" && "$cpu_family" != 9 && "$cpu_family" != 10 ]]
|
||||
then
|
||||
sha="$(ruby -e "require 'digest/sha2'; digest = Digest::SHA256.new; File.open('$CACHED_LOCATION', 'rb') { |f| digest.update(f.read) }; puts digest.hexdigest")"
|
||||
# Pure Perl SHA256 implementation
|
||||
else
|
||||
sha="$($VENDOR_DIR/sha256 "$CACHED_LOCATION")"
|
||||
fi
|
||||
|
||||
if [[ "$sha" != "$VENDOR_SHA" ]]
|
||||
then
|
||||
odie <<EOS
|
||||
Checksum mismatch.
|
||||
Expected: $VENDOR_SHA
|
||||
Actual: $sha
|
||||
Archive: $CACHED_LOCATION
|
||||
To retry an incomplete download, remove the file above.
|
||||
EOS
|
||||
fi
|
||||
}
|
||||
|
||||
install() {
|
||||
local tar_args
|
||||
local verb
|
||||
|
||||
if [[ -n "$HOMEBREW_VERBOSE" ]]
|
||||
then
|
||||
tar_args="xvzf"
|
||||
else
|
||||
tar_args="xzf"
|
||||
fi
|
||||
|
||||
mkdir -p "$VENDOR_DIR/portable-$VENDOR_NAME"
|
||||
safe_cd "$VENDOR_DIR/portable-$VENDOR_NAME"
|
||||
|
||||
trap '' SIGINT
|
||||
|
||||
if [[ -d "$VENDOR_VERSION" ]]
|
||||
then
|
||||
verb="reinstall"
|
||||
mv "$VENDOR_VERSION" "$VENDOR_VERSION.reinstall"
|
||||
elif [[ -n "$(ls -A .)" ]]
|
||||
then
|
||||
verb="upgrade"
|
||||
else
|
||||
verb="install"
|
||||
fi
|
||||
|
||||
safe_cd "$VENDOR_DIR"
|
||||
[[ -n "$HOMEBREW_QUIET" ]] || echo "==> Unpacking $(basename "$VENDOR_URL")"
|
||||
tar "$tar_args" "$CACHED_LOCATION"
|
||||
safe_cd "$VENDOR_DIR/portable-$VENDOR_NAME"
|
||||
|
||||
if "./$VENDOR_VERSION/bin/$VENDOR_NAME" --version >/dev/null 2>&1
|
||||
then
|
||||
ln -sfn "$VENDOR_VERSION" current
|
||||
# remove old vendor installations by sorting files with modified time.
|
||||
ls -t | grep -Ev "^(current|$VENDOR_VERSION)" | tail -n +4 | xargs rm -rf
|
||||
if [[ -d "$VENDOR_VERSION.reinstall" ]]
|
||||
then
|
||||
rm -rf "$VENDOR_VERSION.reinstall"
|
||||
fi
|
||||
else
|
||||
rm -rf "$VENDOR_VERSION"
|
||||
if [[ -d "$VENDOR_VERSION.reinstall" ]]
|
||||
then
|
||||
mv "$VENDOR_VERSION.reinstall" "$VENDOR_VERSION"
|
||||
fi
|
||||
odie "Failed to $verb vendor $VENDOR_NAME."
|
||||
fi
|
||||
|
||||
trap - SIGINT
|
||||
}
|
||||
|
||||
homebrew-vendor-install() {
|
||||
local option
|
||||
local url_var
|
||||
local sha_var
|
||||
|
||||
for option in "$@"
|
||||
do
|
||||
case "$option" in
|
||||
-\?|-h|--help|--usage) brew help vendor-install; exit $? ;;
|
||||
--verbose) HOMEBREW_VERBOSE=1 ;;
|
||||
--quiet) HOMEBREW_QUIET=1 ;;
|
||||
--debug) HOMEBREW_DEBUG=1 ;;
|
||||
--*) ;;
|
||||
-*)
|
||||
[[ "$option" = *v* ]] && HOMEBREW_VERBOSE=1
|
||||
[[ "$option" = *q* ]] && HOMEBREW_QUIET=1
|
||||
[[ "$option" = *d* ]] && HOMEBREW_DEBUG=1
|
||||
;;
|
||||
*)
|
||||
[[ -n "$VENDOR_NAME" ]] && odie "This command does not take multiple vendor targets"
|
||||
VENDOR_NAME="$option"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
[[ -z "$VENDOR_NAME" ]] && odie "This command requires one vendor target."
|
||||
[[ -n "$HOMEBREW_DEBUG" ]] && set -x
|
||||
|
||||
url_var="${VENDOR_NAME}_URL"
|
||||
sha_var="${VENDOR_NAME}_SHA"
|
||||
VENDOR_URL="${!url_var}"
|
||||
VENDOR_SHA="${!sha_var}"
|
||||
|
||||
if [[ -z "$VENDOR_URL" || -z "$VENDOR_SHA" ]]
|
||||
then
|
||||
odie <<-EOS
|
||||
Cannot find a vendored version of $VENDOR_NAME for your $HOMEBREW_PROCESSOR
|
||||
processor on $HOMEBREW_PRODUCT!
|
||||
EOS
|
||||
fi
|
||||
|
||||
VENDOR_VERSION="$(<"$VENDOR_DIR/portable-${VENDOR_NAME}-version")"
|
||||
CACHED_LOCATION="$HOMEBREW_CACHE/$(basename "$VENDOR_URL")"
|
||||
|
||||
lock "vendor-install-$VENDOR_NAME"
|
||||
fetch
|
||||
install
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
# @private
|
||||
module CompilerConstants
|
||||
GNU_GCC_VERSIONS = %w[4.3 4.4 4.5 4.6 4.7 4.8 4.9 5 6]
|
||||
GNU_GCC_REGEXP = /^gcc-(4\.[3-9]|[5-6])$/
|
||||
GNU_GCC_VERSIONS = %w[4.3 4.4 4.5 4.6 4.7 4.8 4.9 5 6 7]
|
||||
GNU_GCC_REGEXP = /^gcc-(4\.[3-9]|[5-7])$/
|
||||
COMPILER_SYMBOL_MAP = {
|
||||
"gcc-4.0" => :gcc_4_0,
|
||||
"gcc-4.2" => :gcc,
|
||||
|
||||
+12
-30
@@ -1,33 +1,8 @@
|
||||
def cache
|
||||
if ENV["HOMEBREW_CACHE"]
|
||||
Pathname.new(ENV["HOMEBREW_CACHE"]).expand_path
|
||||
else
|
||||
# we do this for historic reasons, however the cache *should* be the same
|
||||
# directory whichever user is used and whatever instance of brew is executed
|
||||
home_cache = Pathname.new("~/Library/Caches/Homebrew").expand_path
|
||||
if home_cache.directory? && home_cache.writable_real?
|
||||
home_cache
|
||||
else
|
||||
Pathname.new("/Library/Caches/Homebrew").extend Module.new {
|
||||
def mkpath
|
||||
unless exist?
|
||||
super
|
||||
chmod 0775
|
||||
end
|
||||
end
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
HOMEBREW_CACHE = cache
|
||||
undef cache
|
||||
|
||||
# Where brews installed via URL are cached
|
||||
HOMEBREW_CACHE_FORMULA = HOMEBREW_CACHE+"Formula"
|
||||
|
||||
unless defined? HOMEBREW_BREW_FILE
|
||||
HOMEBREW_BREW_FILE = ENV["HOMEBREW_BREW_FILE"] || which("brew").to_s
|
||||
if ENV["HOMEBREW_BREW_FILE"]
|
||||
# Path to `bin/brew` main executable in {HOMEBREW_PREFIX}
|
||||
HOMEBREW_BREW_FILE = Pathname.new(ENV["HOMEBREW_BREW_FILE"])
|
||||
else
|
||||
odie "HOMEBREW_BREW_FILE was not exported! Please call bin/brew directly!"
|
||||
end
|
||||
|
||||
# Where we link under
|
||||
@@ -47,6 +22,13 @@ else
|
||||
HOMEBREW_REPOSITORY+"Cellar"
|
||||
end
|
||||
|
||||
# Where downloads (bottles, source tarballs, etc.) are cached
|
||||
HOMEBREW_CACHE = Pathname.new(ENV["HOMEBREW_CACHE"])
|
||||
|
||||
# Where brews installed via URL are cached
|
||||
HOMEBREW_CACHE_FORMULA = HOMEBREW_CACHE/"Formula"
|
||||
|
||||
# Where build, postinstall, and test logs of formulae are written to
|
||||
HOMEBREW_LOGS = Pathname.new(ENV["HOMEBREW_LOGS"] || "~/Library/Logs/Homebrew/").expand_path
|
||||
|
||||
HOMEBREW_TEMP = Pathname.new(ENV.fetch("HOMEBREW_TEMP", "/tmp"))
|
||||
|
||||
@@ -243,7 +243,7 @@ def curl(*args)
|
||||
|
||||
args = [flags, HOMEBREW_USER_AGENT_CURL, *args]
|
||||
# See https://github.com/Homebrew/homebrew/issues/6103
|
||||
args << "--insecure" if MacOS.version < "10.6" if ENV["HOMEBREW_CURL"] == "/usr/bin/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?
|
||||
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
# create a lock using `flock(2)`. A name is required as first argument.
|
||||
# the lock will be automatically unlocked when the shell process quits.
|
||||
# Noted due to the fixed FD, a shell process can only create one lock.
|
||||
lock() {
|
||||
local name="$1"
|
||||
local lock_dir="$HOMEBREW_PREFIX/var/homebrew/locks"
|
||||
local lock_file="$lock_dir/$name"
|
||||
[[ -d "$lock_dir" ]] || mkdir -p "$lock_dir"
|
||||
if ! [[ -w "$lock_dir" ]]
|
||||
then
|
||||
odie <<EOS
|
||||
Can't create $name lock in $lock_dir!
|
||||
Fix permissions by running:
|
||||
sudo chown -R \$(whoami) $HOMEBREW_PREFIX/var/homebrew
|
||||
EOS
|
||||
fi
|
||||
# 200 is the file descriptor used in the lock.
|
||||
# This FD should be used exclusively for lock purpose.
|
||||
# Any value except 0(stdin), 1(stdout) and 2(stderr) can do the job.
|
||||
# Noted, FD is unique per process but it will be shared to subprocess.
|
||||
# It is recommended to choose a large number to avoid conflicting with
|
||||
# other FD opened by the script.
|
||||
#
|
||||
# close FD first, this is required if parent process holds a different lock.
|
||||
exec 200>&-
|
||||
# open the lock file to FD, so the shell process can hold the lock.
|
||||
exec 200>"$lock_file"
|
||||
if ! _create_lock 200 "$name"
|
||||
then
|
||||
odie <<EOS
|
||||
Another active Homebrew $name process is already in progress.
|
||||
Please wait for it to finish or terminate it to continue.
|
||||
EOS
|
||||
fi
|
||||
}
|
||||
|
||||
_create_lock() {
|
||||
local lock_fd="$1"
|
||||
local name="$2"
|
||||
local ruby="/usr/bin/ruby"
|
||||
local python="/usr/bin/python"
|
||||
[[ -x "$ruby" ]] || ruby="$(which ruby 2>/dev/null)"
|
||||
[[ -x "$python" ]] || python="$(which python 2>/dev/null)"
|
||||
|
||||
if [[ -x "$ruby" ]] && "$ruby" -e "exit(RUBY_VERSION >= '1.8.7')"
|
||||
then
|
||||
"$ruby" -e "File.new($lock_fd).flock(File::LOCK_EX | File::LOCK_NB) || exit(1)"
|
||||
elif [[ -x "$(which flock)" ]]
|
||||
then
|
||||
flock -n "$lock_fd"
|
||||
elif [[ -x "$python" ]]
|
||||
then
|
||||
"$python" -c "import fcntl; fcntl.flock($lock_fd, fcntl.LOCK_EX | fcntl.LOCK_NB)"
|
||||
else
|
||||
onoe "Cannot create $name lock, please avoid running Homebrew in parallel."
|
||||
fi
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
setup-ruby-path() {
|
||||
local vendor_dir
|
||||
local vendor_ruby_current_version
|
||||
local vendor_ruby_path
|
||||
local ruby_version_major
|
||||
|
||||
vendor_dir="$HOMEBREW_LIBRARY/Homebrew/vendor"
|
||||
vendor_ruby_current_version="$vendor_dir/portable-ruby/current"
|
||||
vendor_ruby_path="$vendor_ruby_current_version/bin/ruby"
|
||||
|
||||
if [[ -z "$HOMEBREW_DEVELOPER" ]]
|
||||
then
|
||||
unset HOMEBREW_RUBY_PATH
|
||||
fi
|
||||
|
||||
if [[ -z "$HOMEBREW_RUBY_PATH" && "$HOMEBREW_COMMAND" != "vendor-install" ]]
|
||||
then
|
||||
if [[ -x "$vendor_ruby_path" ]]
|
||||
then
|
||||
HOMEBREW_RUBY_PATH="$vendor_ruby_path"
|
||||
|
||||
if [[ $(readlink "$vendor_ruby_current_version") != "$(<"$vendor_dir/portable-ruby-version")" ]]
|
||||
then
|
||||
if ! brew vendor-install ruby --quiet
|
||||
then
|
||||
onoe "Failed to upgrade vendor Ruby."
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if [[ -n "$HOMEBREW_OSX" ]]
|
||||
then
|
||||
HOMEBREW_RUBY_PATH="/usr/bin/ruby"
|
||||
else
|
||||
HOMEBREW_RUBY_PATH="$(which ruby)"
|
||||
fi
|
||||
|
||||
if [[ -n "$HOMEBREW_RUBY_PATH" ]]
|
||||
then
|
||||
ruby_version_major="$("$HOMEBREW_RUBY_PATH" --version)"
|
||||
ruby_version_major="${ruby_version_major#ruby }"
|
||||
ruby_version_major="${ruby_version_major%%.*}"
|
||||
fi
|
||||
|
||||
if [[ "$ruby_version_major" != "2" || -n "$HOMEBREW_FORCE_VENDOR_RUBY" ]]
|
||||
then
|
||||
brew vendor-install ruby --quiet
|
||||
if [[ ! -x "$vendor_ruby_path" ]]
|
||||
then
|
||||
odie "Failed to install vendor Ruby."
|
||||
fi
|
||||
HOMEBREW_RUBY_PATH="$vendor_ruby_path"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
export HOMEBREW_RUBY_PATH
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
Digest::SHA::PurePerl version 5.95
|
||||
==================================
|
||||
|
||||
Digest::SHA::PurePerl is a complete implementation of the NIST
|
||||
Secure Hash Standard. It gives Perl programmers a convenient way
|
||||
to calculate SHA-1, SHA-224, SHA-256, SHA-384, SHA-512, SHA-512/224,
|
||||
and SHA-512/256 message digests. The module can handle all types of
|
||||
input, including partial-byte data.
|
||||
|
||||
DEPENDENCIES
|
||||
|
||||
None
|
||||
|
||||
COPYRIGHT AND LICENSE
|
||||
|
||||
Copyright (C) 2003-2014 Mark Shelor
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself.
|
||||
|
||||
Please refer to the Perl Artistic License for details:
|
||||
|
||||
http://search.cpan.org/perldoc?perlartistic
|
||||
+1594
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1 @@
|
||||
7.58.0
|
||||
@@ -0,0 +1 @@
|
||||
2.3.3
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
#!/bin/sh # Graceful sha256 for tigerbrew with fallbacks. Public domain.
|
||||
|
||||
# Cycle through utilities we may likely have that can compute a sha256.
|
||||
# We make sure it works correctly by grepping a few digits of /dev/null.
|
||||
# If we don't have a utility (or utility doesn't have the algorithm),
|
||||
# fail silently and move on.
|
||||
|
||||
# These two variables should be defined if this was called through brew;
|
||||
# otherwise, define them by shelling out in case this was called manually.
|
||||
homebrew_prefix=${HOMEBREW_PREFIX:-$(brew --repository)}
|
||||
homebrew_repository=${HOMEBREW_REPOSITORY:-$(brew --repository)}
|
||||
|
||||
homebrew_openssl="$homebrew_prefix/opt/openssl/bin/openssl"
|
||||
vendor_openssl="$homebrew_repository/Library/Homebrew/vendor/portable-openssl/current/bin/openssl"
|
||||
|
||||
for util in "sha2 -q -256" "openssl dgst -sha256" "$vendor_openssl" "$homebrew_openssl dgst -sha256" "shasum -a 256" "gsha256sum"
|
||||
do
|
||||
$util </dev/null 2>/dev/null | grep e3b0c >/dev/null 2>&1 &&
|
||||
exec $util "$@" | sed -e's|.*= ||' -e's| .*||' && exit 0
|
||||
done
|
||||
|
||||
# If we don't have a faster utility installed, then fall back to this
|
||||
# stand-alone version of Digest::SHA::PurePerl. I've changed the default
|
||||
# algorithm to sha256 instead of sha1, but otherwise its still functionally
|
||||
# equivalent to 'shasum'. The script will use Digest::SHA (the binary
|
||||
# version) if our perl happens to have it (although the perl 5.8 that ships
|
||||
# with 10.4 indeed does not), falling back to the pure perl module only
|
||||
# as a last resort. Digest::SHA::PurePerl is Artistic license.
|
||||
|
||||
exec perl -I"$(dirname "$0")" "$(dirname "$0")/shasum" "$@" | sed 's| .*||'
|
||||
+329
@@ -0,0 +1,329 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
## shasum: filter for computing SHA digests (ref. sha1sum/md5sum)
|
||||
##
|
||||
## Copyright (C) 2003-2015 Mark Shelor, All Rights Reserved
|
||||
##
|
||||
## Version: 5.95
|
||||
## Sat Jan 10 12:15:36 MST 2015
|
||||
|
||||
## shasum SYNOPSIS adapted from GNU Coreutils sha1sum. Add
|
||||
## "-a" option for algorithm selection,
|
||||
## "-U" option for Universal Newlines support,
|
||||
## "-0" option for reading bit strings, and
|
||||
## "-p" option for portable digests (to be deprecated).
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Fcntl;
|
||||
use Getopt::Long;
|
||||
|
||||
my $POD = <<'END_OF_POD';
|
||||
|
||||
=head1 NAME
|
||||
|
||||
shasum - Print or Check SHA Checksums
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
Usage: shasum [OPTION]... [FILE]...
|
||||
Print or check SHA checksums.
|
||||
With no FILE, or when FILE is -, read standard input.
|
||||
|
||||
-a, --algorithm 1, 224, 256, 384, 512, 512224, 512256
|
||||
-b, --binary read in binary mode
|
||||
-c, --check read SHA sums from the FILEs and check them
|
||||
-t, --text read in text mode (default)
|
||||
-U, --UNIVERSAL read in Universal Newlines mode
|
||||
produces same digest on Windows/Unix/Mac
|
||||
-0, --01 read in BITS mode
|
||||
ASCII '0' interpreted as 0-bit,
|
||||
ASCII '1' interpreted as 1-bit,
|
||||
all other characters ignored
|
||||
-p, --portable read in portable mode (to be deprecated)
|
||||
|
||||
The following two options are useful only when verifying checksums:
|
||||
-s, --status don't output anything, status code shows success
|
||||
-w, --warn warn about improperly formatted checksum lines
|
||||
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit
|
||||
|
||||
When verifying SHA-512/224 or SHA-512/256 checksums, indicate the
|
||||
algorithm explicitly using the -a option, e.g.
|
||||
|
||||
shasum -a 512224 -c checksumfile
|
||||
|
||||
The sums are computed as described in FIPS PUB 180-4. When checking,
|
||||
the input should be a former output of this program. The default
|
||||
mode is to print a line with checksum, a character indicating type
|
||||
(`*' for binary, ` ' for text, `U' for UNIVERSAL, `^' for BITS, `?'
|
||||
for portable), and name for each FILE.
|
||||
|
||||
Report shasum bugs to mshelor@cpan.org
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Running I<shasum> is often the quickest way to compute SHA message
|
||||
digests. The user simply feeds data to the script through files or
|
||||
standard input, and then collects the results from standard output.
|
||||
|
||||
The following command shows how to compute digests for typical inputs
|
||||
such as the NIST test vector "abc":
|
||||
|
||||
perl -e "print qq(abc)" | shasum
|
||||
|
||||
Or, if you want to use SHA-256 instead of the default SHA-1, simply say:
|
||||
|
||||
perl -e "print qq(abc)" | shasum -a 256
|
||||
|
||||
Since I<shasum> mimics the behavior of the combined GNU I<sha1sum>,
|
||||
I<sha224sum>, I<sha256sum>, I<sha384sum>, and I<sha512sum> programs,
|
||||
you can install this script as a convenient drop-in replacement.
|
||||
|
||||
Unlike the GNU programs, I<shasum> encompasses the full SHA standard by
|
||||
allowing partial-byte inputs. This is accomplished through the BITS
|
||||
option (I<-0>). The following example computes the SHA-224 digest of
|
||||
the 7-bit message I<0001100>:
|
||||
|
||||
perl -e "print qq(0001100)" | shasum -0 -a 224
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Copyright (c) 2003-2015 Mark Shelor <mshelor@cpan.org>.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
I<shasum> is implemented using the Perl module L<Digest::SHA> or
|
||||
L<Digest::SHA::PurePerl>.
|
||||
|
||||
=cut
|
||||
|
||||
END_OF_POD
|
||||
|
||||
my $VERSION = "5.95";
|
||||
|
||||
sub usage {
|
||||
my($err, $msg) = @_;
|
||||
|
||||
$msg = "" unless defined $msg;
|
||||
if ($err) {
|
||||
warn($msg . "Type shasum -h for help\n");
|
||||
exit($err);
|
||||
}
|
||||
my($USAGE) = $POD =~ /SYNOPSIS(.+?)^=/sm;
|
||||
$USAGE =~ s/^\s*//;
|
||||
$USAGE =~ s/\s*$//;
|
||||
$USAGE =~ s/^ //gm;
|
||||
print $USAGE, "\n";
|
||||
exit($err);
|
||||
}
|
||||
|
||||
|
||||
## Sync stdout and stderr by forcing a flush after every write
|
||||
|
||||
select((select(STDOUT), $| = 1)[0]);
|
||||
select((select(STDERR), $| = 1)[0]);
|
||||
|
||||
|
||||
## Collect options from command line
|
||||
|
||||
my ($alg, $binary, $check, $text, $status, $warn, $help, $version);
|
||||
my ($portable, $BITS, $reverse, $UNIVERSAL, $versions);
|
||||
|
||||
eval { Getopt::Long::Configure ("bundling") };
|
||||
GetOptions(
|
||||
'b|binary' => \$binary, 'c|check' => \$check,
|
||||
't|text' => \$text, 'a|algorithm=i' => \$alg,
|
||||
's|status' => \$status, 'w|warn' => \$warn,
|
||||
'h|help' => \$help, 'v|version' => \$version,
|
||||
'p|portable' => \$portable,
|
||||
'0|01' => \$BITS,
|
||||
'R|REVERSE' => \$reverse,
|
||||
'U|UNIVERSAL' => \$UNIVERSAL,
|
||||
'V|VERSIONS' => \$versions,
|
||||
) or usage(1, "");
|
||||
|
||||
|
||||
## Deal with help requests and incorrect uses
|
||||
|
||||
usage(0)
|
||||
if $help;
|
||||
usage(1, "shasum: Ambiguous file mode\n")
|
||||
if scalar(grep {defined $_}
|
||||
($binary, $portable, $text, $BITS, $UNIVERSAL)) > 1;
|
||||
usage(1, "shasum: --warn option used only when verifying checksums\n")
|
||||
if $warn && !$check;
|
||||
usage(1, "shasum: --status option used only when verifying checksums\n")
|
||||
if $status && !$check;
|
||||
|
||||
|
||||
## Try to use Digest::SHA. If not installed, use the slower
|
||||
## but functionally equivalent Digest::SHA::PurePerl instead.
|
||||
|
||||
## If option -R is invoked, reverse the module preference,
|
||||
## i.e. try Digest::SHA::PurePerl first, then Digest::SHA.
|
||||
|
||||
my @MODS = qw(Digest::SHA Digest::SHA::PurePerl);
|
||||
@MODS[0, 1] = @MODS[1, 0] if $reverse;
|
||||
|
||||
my $module;
|
||||
for (@MODS) {
|
||||
my $mod = $_;
|
||||
if (eval "require $mod") {
|
||||
$module = $mod;
|
||||
last;
|
||||
}
|
||||
}
|
||||
die "shasum: Unable to find " . join(" or ", @MODS) . "\n"
|
||||
unless defined $module;
|
||||
|
||||
|
||||
## Default to SHA-256 unless overridden by command line option
|
||||
|
||||
$alg = 256 unless defined $alg;
|
||||
grep { $_ == $alg } (1, 224, 256, 384, 512, 512224, 512256)
|
||||
or usage(1, "shasum: Unrecognized algorithm\n");
|
||||
|
||||
|
||||
## Display version information if requested
|
||||
|
||||
if ($version) {
|
||||
print "$VERSION\n";
|
||||
exit(0);
|
||||
}
|
||||
|
||||
if ($versions) {
|
||||
print "shasum $VERSION\n";
|
||||
print "$module ", eval "\$${module}::VERSION", "\n";
|
||||
print "perl ", defined $^V ? sprintf("%vd", $^V) : $], "\n";
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
## Try to figure out if the OS is DOS-like. If it is,
|
||||
## default to binary mode when reading files, unless
|
||||
## explicitly overridden by command line "--text" or
|
||||
## "--UNIVERSAL" or "--portable" options.
|
||||
|
||||
my $isDOSish = ($^O =~ /^(MSWin\d\d|os2|dos|mint|cygwin)$/);
|
||||
if ($isDOSish) { $binary = 1 unless $text || $UNIVERSAL || $portable }
|
||||
|
||||
my $modesym = $binary ? '*' : ($UNIVERSAL ? 'U' :
|
||||
($BITS ? '^' : ($portable ? '?' : ' ')));
|
||||
|
||||
|
||||
## Read from STDIN (-) if no files listed on command line
|
||||
|
||||
@ARGV = ("-") unless @ARGV;
|
||||
|
||||
|
||||
## sumfile($file): computes SHA digest of $file
|
||||
|
||||
sub sumfile {
|
||||
my $file = shift;
|
||||
|
||||
my $mode = $binary ? 'b' : ($UNIVERSAL ? 'U' :
|
||||
($BITS ? '0' : ($portable ? 'p' : '')));
|
||||
my $digest = eval { $module->new($alg)->addfile($file, $mode) };
|
||||
if ($@) { warn "shasum: $file: $!\n"; return }
|
||||
$digest->hexdigest;
|
||||
}
|
||||
|
||||
|
||||
## %len2alg: maps hex digest length to SHA algorithm
|
||||
|
||||
my %len2alg = (40 => 1, 56 => 224, 64 => 256, 96 => 384, 128 => 512);
|
||||
$len2alg{56} = 512224 if $alg == 512224;
|
||||
$len2alg{64} = 512256 if $alg == 512256;
|
||||
|
||||
|
||||
## unescape: convert backslashed filename to plain filename
|
||||
|
||||
sub unescape {
|
||||
$_ = shift;
|
||||
s/\\\\/\0/g;
|
||||
s/\\n/\n/g;
|
||||
return if /\\/;
|
||||
s/\0/\\/g;
|
||||
return $_;
|
||||
}
|
||||
|
||||
|
||||
## verify: confirm the digest values in a checksum file
|
||||
|
||||
sub verify {
|
||||
my $checkfile = shift;
|
||||
my ($err, $fmt_errs, $read_errs, $match_errs) = (0, 0, 0, 0);
|
||||
my ($num_lines, $num_files) = (0, 0);
|
||||
my ($bslash, $sum, $fname, $rsp, $digest);
|
||||
|
||||
local *FH;
|
||||
$checkfile eq '-' and open(FH, '< -')
|
||||
and $checkfile = 'standard input'
|
||||
or sysopen(FH, $checkfile, O_RDONLY)
|
||||
or die "shasum: $checkfile: $!\n";
|
||||
while (<FH>) {
|
||||
next if /^#/; s/\n$//; s/^[ \t]+//; $num_lines++;
|
||||
$bslash = s/^\\//;
|
||||
($sum, $modesym, $fname) =
|
||||
/^([\da-fA-F]+)[ \t]([ *?^U])([^\0]*)/;
|
||||
$alg = defined $sum ? $len2alg{length($sum)} : undef;
|
||||
$fname = unescape($fname) if defined $fname && $bslash;
|
||||
if (grep { ! defined $_ } ($alg, $sum, $modesym, $fname)) {
|
||||
$alg = 1 unless defined $alg;
|
||||
warn("shasum: $checkfile: $.: improperly " .
|
||||
"formatted SHA$alg checksum line\n") if $warn;
|
||||
$fmt_errs++;
|
||||
next;
|
||||
}
|
||||
$fname =~ s/\r$// unless -e $fname;
|
||||
$rsp = "$fname: "; $num_files++;
|
||||
($binary, $text, $UNIVERSAL, $BITS, $portable) =
|
||||
map { $_ eq $modesym } ('*', ' ', 'U', '^', 'p');
|
||||
unless ($digest = sumfile($fname)) {
|
||||
$rsp .= "FAILED open or read\n";
|
||||
$err = 1; $read_errs++;
|
||||
}
|
||||
else {
|
||||
if (lc($sum) eq $digest) { $rsp .= "OK\n" }
|
||||
else { $rsp .= "FAILED\n"; $err = 1; $match_errs++ }
|
||||
}
|
||||
print $rsp unless $status;
|
||||
}
|
||||
close(FH);
|
||||
unless ($num_files) {
|
||||
$alg = 1 unless defined $alg;
|
||||
warn("shasum: $checkfile: no properly formatted " .
|
||||
"SHA$alg checksum lines found\n");
|
||||
$err = 1;
|
||||
}
|
||||
elsif (! $status) {
|
||||
warn("shasum: WARNING: $fmt_errs line" . ($fmt_errs>1?
|
||||
's are':' is') . " improperly formatted\n") if $fmt_errs;
|
||||
warn("shasum: WARNING: $read_errs listed file" .
|
||||
($read_errs>1?'s':'') . " could not be read\n") if $read_errs;
|
||||
warn("shasum: WARNING: $match_errs computed checksum" .
|
||||
($match_errs>1?'s':'') . " did NOT match\n") if $match_errs;
|
||||
}
|
||||
return($err == 0);
|
||||
}
|
||||
|
||||
|
||||
## Verify or compute SHA checksums of requested files
|
||||
|
||||
my($file, $digest);
|
||||
|
||||
my $STATUS = 0;
|
||||
for $file (@ARGV) {
|
||||
if ($check) { $STATUS = 1 unless verify($file) }
|
||||
elsif ($digest = sumfile($file)) {
|
||||
if ($file =~ /[\n\\]/) {
|
||||
$file =~ s/\\/\\\\/g; $file =~ s/\n/\\n/g;
|
||||
$digest = "\\$digest";
|
||||
}
|
||||
print "$digest $modesym", "$file\n";
|
||||
}
|
||||
else { $STATUS = 1 }
|
||||
}
|
||||
exit($STATUS)
|
||||
+24
-28
@@ -16,7 +16,7 @@ odie() {
|
||||
exit 1
|
||||
}
|
||||
|
||||
chdir() {
|
||||
safe_cd() {
|
||||
cd "$@" >/dev/null || odie "Error: failed to cd to $*!"
|
||||
}
|
||||
|
||||
@@ -56,31 +56,12 @@ fi
|
||||
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
|
||||
@@ -93,12 +74,6 @@ then
|
||||
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"
|
||||
@@ -109,6 +84,11 @@ HOMEBREW_USER_AGENT="$HOMEBREW_PRODUCT/$HOMEBREW_VERSION ($HOMEBREW_SYSTEM; $HOM
|
||||
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"
|
||||
|
||||
if [[ -z "$HOMEBREW_CACHE" ]]
|
||||
then
|
||||
HOMEBREW_CACHE="$HOME/Library/Caches/Homebrew"
|
||||
fi
|
||||
|
||||
# Declared in bin/brew
|
||||
export HOMEBREW_BREW_FILE
|
||||
export HOMEBREW_PREFIX
|
||||
@@ -117,8 +97,9 @@ export HOMEBREW_LIBRARY
|
||||
|
||||
# Declared in brew.sh
|
||||
export HOMEBREW_VERSION
|
||||
export HOMEBREW_CACHE
|
||||
export HOMEBREW_CELLAR
|
||||
export HOMEBREW_RUBY_PATH
|
||||
export HOMEBREW_SYSTEM
|
||||
export HOMEBREW_CURL
|
||||
export HOMEBREW_OS_VERSION
|
||||
export HOMEBREW_OSX_VERSION
|
||||
@@ -194,7 +175,7 @@ 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)
|
||||
install|reinstall|postinstall|link|pin|update|upgrade|vendor-install|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.
|
||||
@@ -205,6 +186,21 @@ EOS
|
||||
esac
|
||||
fi
|
||||
|
||||
# Hide shellcheck complaint:
|
||||
# shellcheck source=/dev/null
|
||||
source "$HOMEBREW_LIBRARY/Homebrew/utils/ruby.sh"
|
||||
setup-ruby-path
|
||||
if [[ -x "$HOMEBREW_LIBRARY/Homebrew/cmd/vendor-curl.sh" ]]
|
||||
then
|
||||
source "$HOMEBREW_LIBRARY/Homebrew/cmd/vendor-curl.sh"
|
||||
setup-curl-path
|
||||
fi
|
||||
|
||||
# This may have changed after we vendored curl; regenerate it
|
||||
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"
|
||||
export HOMEBREW_USER_AGENT_CURL
|
||||
|
||||
if [[ -n "$HOMEBREW_BASH_COMMAND" ]]
|
||||
then
|
||||
# source rather than executing directly to ensure the entire file is read into
|
||||
|
||||
@@ -22,7 +22,7 @@ What Packages Are Available?
|
||||
----------------------------
|
||||
1. You can [browse the Formula directory on GitHub][formula].
|
||||
2. Or type `brew search` for a list.
|
||||
3. Or use [`brew desc`][brew-desc] to browse packages from the command line.
|
||||
3. Or use `brew desc` to browse packages from the command line.
|
||||
|
||||
More Documentation
|
||||
------------------
|
||||
@@ -49,7 +49,7 @@ Many of the formulae in the repository have been tested, but there are still man
|
||||
Credits
|
||||
-------
|
||||
|
||||
Homebrew is originally by [mxcl][mxcl], a splendid chap. This fork is by @mistydemeo, incorporating some code originally written by @sceaga.
|
||||
Homebrew is originally by [mxcl][mxcl], a splendid chap. This fork is by [mistydemeo](https://github.com/mistydemeo), incorporating some code originally written by @sceaga.
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
Reference in new issue
Block a user