190 Commits
Author SHA1 Message Date
NotAlexNoyle b5ed5a851e Fix dpkg links 2018-10-08 20:16:49 -04:00
Misty De Meo 302295537d Merge pull request #613 from mistydemeo/libid3tag_fix_patches
libid3tag: fix patches
2018-10-06 09:32:17 -07:00
Misty De Meo 2b3f9c7b25 libid3tag: fix patches
Fixes #612.
2018-10-06 09:31:28 -07:00
Misty De Meo 2fa0b4d8b0 Merge pull request #610 from dcwar/master
Coreutils 8.30
2018-09-07 10:32:40 -07:00
dcwar 22f34dd7db Merge pull request from dcwar/dcwar-patch-2
Update coreutils.rb
2018-09-06 23:17:22 -04:00
dcwar f8eb7ddd35 Update coreutils.rb 2018-09-06 23:15:33 -04:00
Misty De Meo 82e130df9f Merge pull request #604 from mistydemeo/fix_python_superenv
superenv: filter out -Wno-implicit-fallthrough
2018-07-20 19:53:28 -07:00
Misty De Meo f0e8417be4 superenv: filter out -Wno-implicit-fallthrough
Fixes #599.
2018-07-20 19:52:32 -07:00
Misty De Meo 431181406f Merge pull request #603 from mistydemeo/qt_fix_url
qt: fix download URL
2018-07-20 19:50:44 -07:00
Misty De Meo e8217afe1b qt: fix download URL
Fixes #601.
2018-07-20 19:47:34 -07:00
Misty De Meo 63d275701b Merge pull request #598 from mistydemeo/update_python
Update Python and Python 3 formulae
2018-07-06 23:41:21 -07:00
Misty De Meo d387bb74ea python3: add Tiger bottles 2018-07-06 23:33:48 -07:00
Misty De Meo ff986520d1 python: add Tiger bottles 2018-07-06 23:33:39 -07:00
Misty De Meo 20f97682ac python3: remove quicktest 2018-07-06 23:21:11 -07:00
Misty De Meo f447a8a640 python3 3.7.0 2018-07-06 23:21:11 -07:00
Misty De Meo 37491333e6 python: sync Homebrew changes 2018-07-06 22:36:48 -07:00
Misty De Meo 1e620f5e7d python 2.7.15 2018-07-06 22:36:48 -07:00
Misty De Meo e0daa8cb68 grip: add Tiger bottles 2018-07-06 21:29:14 -07:00
Daniel Toman a2bdd1c804 grip 4.5.2
Closes #596.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2018-07-06 21:29:07 -07:00
Misty De Meo b48d6bd5af Merge pull request #597 from mistydemeo/fix_g3_vendor_ruby
Fix vendored Ruby script on G3 (again)
2018-07-06 20:11:30 -07:00
Misty De Meo 36827d7637 vendor-install: remember VENDOR_DIR is a variable 2018-07-06 19:42:02 -07:00
Misty De Meo e6522ee54e vendor-install: fix checking processor on PPC
I always forget that "cpufamily" is only defined on Intel, while
"cpusubtype" is only defined on PowerPC. This adds a check for the
CPU type first to avoid using the wrong value on the wrong CPU.
2018-07-06 19:08:57 -07:00
Misty De Meo da9c583c2d Merge pull request #590 from mistydemeo/update_tcsh
tcsh 6.20.00
2018-05-13 10:22:13 -07:00
Misty De Meo d0625075ea tcsh: add Tiger bottles 2018-05-13 10:21:42 -07:00
Misty De Meo 458e371515 tcsh: Tiger doesn't have /usr/bin/seq 2018-05-13 10:14:31 -07:00
Misty De Meo 02c724dd21 tcsh 6.20.00 2018-05-13 10:08:59 -07:00
Misty De Meo 03f7f8cbd2 vendor-install: remove stray else statement
Fixes #588.
2018-05-12 09:18:00 -07:00
Misty De Meo 975edee3a7 Merge pull request #587 from mistydemeo/add_back_perl_sha256
vendor-install: use pure Perl to avoid broken sha2
2018-05-11 16:00:46 -07:00
Misty De Meo 4b379beae2 vendor-install: use pure Perl to avoid broken sha2 2018-05-10 23:12:44 -07:00
Misty De Meo acb6c9febe Merge pull request #580 from mistydemeo/add_mgba
mgba 0.6.3
2018-05-07 17:58:07 -07:00
Misty De Meo 421a659181 Merge pull request #586 from mistydemeo/readline_bottles
readline: add Tiger bottles
2018-05-07 17:57:12 -07:00
a400253621 mgba 0.6.3
Co-authored-by: Kyungdahm Yun <tomyun@gmail.com>
Co-authored-by: equal-l2 <equal-l2@users.noreply.github.com>
Co-authored-by: JCount <JCount42@gmail.com>
Co-authored-by: Zhiming Wang <zmwangx@gmail.com>
Co-authored-by: FX Coudert <fxcoudert@gmail.com>
Co-authored-by: ilovezfs <ilovezfs@icloud.com>
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2018-05-07 17:23:44 -07:00
Misty De Meo a11591ba69 readline: add Tiger bottles 2018-05-07 17:03:57 -07:00
Misty De Meo 9e81b8295b Merge pull request #581 from mistydemeo/gcc_fix_g5
GCC 7.3.0
2018-04-29 20:11:35 -07:00
Misty De Meo d7740e2513 gcc: add Tiger Altivec bottle 2018-04-29 20:08:41 -07:00
Misty De Meo e3836cad36 gcc: add Tiger G3 bottle 2018-04-28 20:03:15 -07:00
Misty De Meo e1334e7b95 Merge pull request #583 from mistydemeo/pcre2_bottles
pcre2: add bottles
2018-04-28 19:56:42 -07:00
Misty De Meo edf2aa9573 pcre2: add bottles 2018-04-28 19:55:29 -07:00
Misty De Meo 2ba239c9ab Merge pull request #582 from mistydemeo/fish_fix_tiger
fish: fix Tiger build
2018-04-28 19:54:41 -07:00
Misty De Meo cff044e22e fish: add bottles 2018-04-28 19:54:10 -07:00
Misty De Meo 78661fd581 fish: fix incompatible ttyname_r on 10.4 2018-04-28 19:54:10 -07:00
Misty De Meo ba81e638f7 gcc: use upstream patch 2018-04-27 21:55:32 -07:00
Misty De Meo 34de07506c gcc: pass -force_cpusubtype_ALL for G3 bottle builds, too 2018-04-27 21:55:32 -07:00
Misty De Meo fd979d03e7 gcc 7.3.0 2018-04-27 21:31:46 -07:00
Misty De Meo 629231d8d5 Merge pull request #576 from mistydemeo/libpcap_flex_bison
libpcap: needs newer bison/flex
2018-04-10 20:48:00 -07:00
Misty De Meo 342c8683e4 libpcap: needs newer bison/flex
Fixes #574.
2018-04-10 20:38:51 -07:00
Misty De Meo 564673f49e Merge pull request #570 from EricFromCanada/gcc44-update
gcc44: fix build for all
2018-03-11 23:46:44 -07:00
EricFromCanada 94c13e55ee gcc44: fix build for all 2018-03-07 15:57:56 -05:00
Misty De Meo 296e4fb18b Merge pull request #525 from mistydemeo/revert_to_qemu_221
Revert to QEMU 2.2.1
2018-03-05 20:41:11 -08:00
Misty De Meo 3cfb8fd22a Merge branch 'vendor_ruby' 2018-03-05 20:31:45 -08:00
Misty De Meo d7324f0ff5 brew.sh: Update curl version variable, too 2018-03-03 16:33:54 -08:00
Misty De Meo aca22acb83 doctor: kill Ruby version test 2018-02-28 17:29:41 -08:00
Misty De Meo 36c2d3e611 brew.sh: redeclare HOMEBREW_USER_AGENT_CURL after vendoring curl 2018-02-28 17:25:49 -08:00
EricFromCanada 17a9268052 gcc47: fix build on 10.4 2018-02-25 16:50:05 -08:00
Misty De Meo 58bbe40b84 Fix vendor curl comments 2018-02-25 14:47:58 -08:00
Misty De Meo 6755501c79 Simplify vendor conditional 2018-02-25 14:47:24 -08:00
Misty De Meo a9d4bc393e Fix version number for PPC curl 2018-02-25 12:26:36 -08:00
Misty De Meo cd25ed22b3 Add Tiger Intel Ruby/Curl packages 2018-02-25 12:26:11 -08:00
Misty De Meo 69df652c46 Config: print curl to use 2018-02-25 11:34:24 -08:00
Misty De Meo 891751521b Fix path to curl script 2018-02-25 11:31:40 -08:00
Misty De Meo 1fe7926d8b +x vendor-curl.sh 2018-02-25 11:31:04 -08:00
Misty De Meo a2009ec874 Fix copypaste error 2018-02-25 11:26:39 -08:00
Misty De Meo d0190691a2 Bump portable-curl version 2018-02-25 11:23:05 -08:00
Misty De Meo 881e07123d Add PPC Ruby 2.3.3 binary 2018-02-25 11:21:15 -08:00
Misty De Meo 9968e8d031 Don't use PPC curl on Intel 2018-02-25 11:17:58 -08:00
Misty De Meo b058e4c268 Promote OS X version to use the Tiger install on 2018-02-25 11:17:34 -08:00
Misty De Meo 90b3a466a9 vendor-install: bump Intel Ruby version 2018-02-25 11:16:42 -08:00
Misty De Meo 5c9aa6afc6 Move vendor-curl path to a Homebrewish location 2018-02-25 11:15:11 -08:00
Misty De Meo b044b21851 vendor-install: update shasum/sha256sum calls 2018-02-25 11:15:11 -08:00
Misty De Meo 6258a28a9c vendor-install: use Ruby as a sha256 fallback where appropriate 2018-02-25 11:15:11 -08:00
Misty De Meo 155db8df8a Remove vendored openssl
This isn't actually necessary!
2018-02-25 11:15:11 -08:00
Misty De Meo ff438dea59 brew.sh: stop using non-vendor curl 2018-02-25 11:15:11 -08:00
Misty De Meo a5f9b37c27 vendor-install: pass --insecure to curl when certs are too old 2018-02-25 11:15:11 -08:00
Misty De Meo bdcf5daac5 vendor-install: restructure URLs
This fixes an issue where Intel 10.4 Macs would try to
download an incompatible Ruby.
2018-02-25 11:15:11 -08:00
Misty De Meo 9f32b5fd9b vendor-install: add Intel curl/openssl URLs 2018-02-25 11:15:11 -08:00
Misty De Meo 0d5cd31b45 vendor-install: update sha256 incantation 2018-02-25 11:15:11 -08:00
Misty De Meo 36fbc6378a Restore lock support 2018-02-25 11:15:11 -08:00
Misty De Meo 68ebfce8cf vendor-install: use non-@2.2 Ruby URLs 2018-02-25 11:15:11 -08:00
Misty De Meo 642131c25a brew.sh: set up openssl and curl 2018-02-25 11:15:11 -08:00
Misty De Meo 8b0d0c9374 Add portable-curl script 2018-02-25 11:15:10 -08:00
Misty De Meo 702ce9e879 Add portable-openssl script 2018-02-25 11:15:10 -08:00
Misty De Meo a317f9f31c vendor-install: add curl and openssl URLs 2018-02-25 11:15:10 -08:00
Martin Afanasjew 6215fe45cd brew.sh: rename 'chdir' to 'safe_cd'
This is inspired by `safe_system` with basically the same implication
(fail on error), making the name a lot less confusing and avoiding a
clash with the `chdir` function previously defined in `bin/brew`.

Closes #414.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2018-02-25 11:15:10 -08:00
Misty De Meo f62a04151d vendor-install: fix another typo 2018-02-25 11:15:10 -08:00
Misty De Meo 8e4052b10c vendor-install: fix typo 2018-02-25 11:15:10 -08:00
Misty De Meo 72836585fa vendor-install: don't depend on newer behaviour of which 2018-02-25 11:15:10 -08:00
Misty De Meo bedd97399a Add portable-ruby-version 2018-02-25 11:15:10 -08:00
Misty De Meo 9863ed82de vendor-install: temporarily disable locking 2018-02-25 11:15:10 -08:00
Misty De Meo db852cc3f4 vendor-install: fix array syntax for old bash 2018-02-25 11:15:10 -08:00
Misty De Meo 7e7b4d68c0 vendor-install: support Tigerbrew's vendored sha2 2018-02-25 11:15:10 -08:00
Misty De Meo 31f4e224ce vendor-install: add ppc/i386 binaries 2018-02-25 11:15:10 -08:00
Mike McQuaid 12fa7b4b6b Enable vendored Ruby 2.0. 2018-02-25 11:15:09 -08:00
Mike McQuaid b26d13a698 ruby.sh: allow forcing the usage of the vendored Ruby. 2018-02-25 11:15:09 -08:00
Mike McQuaid fd1b06d2ff ruby.sh: fix original setup ruby path name. 2018-02-25 11:15:09 -08:00
Xu Cheng e1f289149b ruby.sh: add test flag 2018-02-25 11:15:09 -08:00
Xu Cheng 7a80aba76d brew.sh: new HOMEBREW_RUBY_PATH resolution logic
* Use vendor Ruby if it's present
* Install vendor Ruby for system without Ruby 2.x
2018-02-25 11:15:09 -08:00
Xu Cheng 0b31135ea0 various: don't assume non-OS X == Linux. 2018-02-25 11:15:09 -08:00
Xu Cheng 74bd32cf74 add vendor-install command 2018-02-25 11:15:09 -08:00
EricFromCanada 1eb6fd51a8 gcc45: fix build on 10.5 PPC by disabling plugins 2018-02-19 22:59:27 -08:00
EricFromCanada 7c08aa6304 ppl011: fix dependent & conflicting formulae 2018-02-12 09:42:42 -08:00
EricFromCanada 6f7568af59 xz: fix 410 on primary mirror 2018-02-12 09:42:04 -08:00
EricFromCanada cc8a6b9deb gmp: fix bottling on Intel 2018-02-08 09:50:47 -08:00
EricFromCanada 9893857aad curl: change HTTP mirror 2018-02-08 09:23:39 -08:00
Misty De Meo bbefbf8fc4 Merge pull request #558 from vivlim/python3-postinstall
Fix python3 postinstall
2018-02-06 22:57:58 -08:00
Vivian Lim c9039c23e0 Fix python3 postinstall
Postinstall was failing with these errors, which caused (perhaps among other problems?) easy_install and pip3 to not be linked & added to PATH properly.

`vivtop-g4:~/Desktop vivlim$ brew postinstall python3
Error: wrong number of arguments (2 for 1)
Please report this bug:
    https://github.com/mistydemeo/tigerbrew/wiki/troubleshooting
/usr/local/Library/Formula/python3.rb:220:in '[]'
/usr/local/Library/Formula/python3.rb:220:in 'post_install'
/usr/local/Library/Homebrew/formula.rb:765:in 'run_post_install'
/usr/local/Library/Homebrew/cmd/postinstall.rb:3:in 'postinstall'
/usr/local/Library/Homebrew/cmd/postinstall.rb:3:in 'each'
/usr/local/Library/Homebrew/cmd/postinstall.rb:3:in 'postinstall'
/usr/local/Library/brew.rb:143:in 'send'
/usr/local/Library/brew.rb:143
vivtop-g4:~/Desktop vivlim$`
2018-02-06 21:46:46 -08:00
Misty De Meo ce12bf72fc Merge pull request #555 from mistydemeo/curl_ca_bundle_mirror
curl-ca-bundle: add archive.org mirror
2018-01-25 10:34:50 -08:00
Misty De Meo f154230944 curl-ca-bundle: add archive.org mirror 2018-01-25 10:32:45 -08:00
Misty De Meo 6d85291c79 Merge pull request #553 from mistydemeo/update_fish
Update Fish, pcre2
2018-01-25 07:37:26 +11:00
Misty De Meo 0a26601faf fish: needs C++11 2018-01-23 17:17:38 -08:00
Misty De Meo 9310ffb044 pcre2 10.30 2018-01-23 17:13:27 -08:00
Misty De Meo 908c35b455 fish 2.7.1 2018-01-23 17:12:13 -08:00
Misty De Meo c3023f596f fish: correct tarball path 2018-01-23 17:09:42 -08:00
Misty De Meo 05cefc309e Merge pull request #552 from mistydemeo/gcc_build_without_plugin
gcc{6,7}: build without plugins on Leopard, too
2018-01-21 20:51:51 +11:00
Misty De Meo ae22afb01c gcc{6,7}: build without plugins on Leopard, too
Fixes #518.
Fixes #551.
2018-01-21 20:50:25 +11:00
Misty De Meo 2957b570c5 Merge pull request #550 from mistydemeo/backport_g3_gcc_fix
Backport G3 GCC fix to older GCCs
2018-01-12 22:20:14 +11:00
Misty De Meo 38e441f190 gcc6: apply G3 fix 2018-01-12 22:16:40 +11:00
Misty De Meo 5cae01d81d gcc5: apply G3 fix 2018-01-12 22:16:36 +11:00
Misty De Meo 7bc12c58da gcc49: apply G3 fix 2018-01-12 22:16:32 +11:00
Misty De Meo 2ecde7fe57 gcc48: apply G3 fix 2018-01-12 22:16:26 +11:00
Misty De Meo 54e3e4778c gcc47: apply G3 fix 2018-01-12 22:16:21 +11:00
Misty De Meo 2c6008d531 gcc46: apply G3 fix 2018-01-12 22:16:14 +11:00
Misty De Meo 69afc839fa gcc45: apply G3 fix 2018-01-12 22:15:58 +11:00
Misty De Meo ed6f8c5c12 gcc44: apply G3 fix 2018-01-12 22:15:49 +11:00
Misty De Meo 67e64dee16 Merge pull request #549 from mistydemeo/gcc_7
Upgrade GCC to 7.2.0
2018-01-12 22:11:22 +11:00
Misty De Meo 80371e4c82 compilers: add support for gcc-7 2018-01-12 22:08:12 +11:00
Misty De Meo 27cf902d42 gcc: force CPU subtype on G3 2018-01-12 22:04:59 +11:00
Misty De Meo 6a4b719574 gcc: sync options with Homebrew
See: https://github.com/Homebrew/homebrew-core/pull/13011
2018-01-12 22:04:59 +11:00
Misty De Meo 8d1d0721cb gcc: add patches for 7.2.0 2018-01-12 21:59:30 +11:00
Misty De Meo 266c314a3c gcc: update sysdep patch for 7.2.0 2018-01-12 21:59:30 +11:00
Misty De Meo 61bece1f21 gcc: remove upstreamed patch 2018-01-12 21:59:29 +11:00
Misty De Meo df762b8675 gcc 7.2.0 2018-01-12 21:59:29 +11:00
Misty De Meo ecac1a3b48 isl 0.18 2018-01-12 21:59:29 +11:00
Misty De Meo cf5046f264 gmp 6.1.2 2018-01-12 21:59:29 +11:00
Misty De Meo d625cc33fb mpfr 3.1.6 2018-01-12 21:56:53 +11:00
Misty De Meo 40c826da08 curl: pass --insecure on 10.6 2018-01-02 10:12:48 +08:00
Misty De Meo 02d0f0cd5a doxygen: can't build under gcc-4.2 in stdenv on Tiger 2018-01-02 09:58:35 +08:00
Misty De Meo 5b717f87a4 doxygen: strip incompatible flag on Tiger
Fixes #371.
2018-01-02 09:58:35 +08:00
Misty De Meo e599e661a8 mysql: fix download URL
Fixes #546.
2018-01-01 22:24:22 +11:00
Misty De Meo 9a9e5214d9 unar: update tarball url 2017-12-14 10:52:36 +11:00
Misty De Meo db1d50a8ed timedog 1.4
Fixes #540.
2017-11-27 23:20:18 +11:00
Misty De Meo 4051106416 ruby: fix patch URL/SHAs 2017-11-13 17:14:42 +11:00
Misty De Meo 4b3efa56f4 apple-gcc42: mirror on archive.org
This is a bit too important to let it go missing.
Relying on AT&T to host it forever feels dangerous.
2017-11-13 16:23:14 +11:00
Misty De Meo 826de7f70f Merge pull request #533 from 128keaton/patch-1
Update README.md
2017-11-03 11:53:20 +13:00
Keaton Burleson 2042394e16 Update README.md
Not sure why the brackets were there for brew-desc. Also--I linked the creator in the Credits.
2017-11-02 17:46:53 -05:00
tcj 7ce57f53eb Update URL to Alpine information and source code
Update URL to Alpine information and source code
2017-09-30 10:29:11 -07:00
Misty De Meo 555bba6421 Merge pull request #531 from mistydemeo/http_curl_mirror
curl: add HTTP mirror.
2017-09-15 16:40:02 -07:00
Mike McQuaid f69cbc2929 curl: add HTTP mirror.
This allows a curl that cannot handle modern SSL certificates to install a newer version.

Fixes #506

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2017-09-15 16:35:35 -07:00
Misty De Meo b53a9ce35f qemu: restore desc 2017-07-13 16:20:58 -07:00
Misty De Meo 68bde3e786 qemu: remove bottle block 2017-07-13 16:20:31 -07:00
Misty De Meo 7ce22a5fba qemu: use a newer make on 10.4 2017-07-13 16:09:12 -07:00
Misty De Meo 006b1328cd qemu: disable cocoa on 10.4 2017-07-13 15:48:45 -07:00
Misty De Meo 72f9e297b8 qemu: fix stdint on 10.4 2017-07-13 15:41:46 -07:00
Misty De Meo 36151ca31a qemu: fix 32-bit build on 64-bit CPU 2017-07-13 15:33:25 -07:00
Misty De Meo b5c0b675a3 qemu: revert to 2.2.1 2017-07-13 15:25:11 -07:00
Misty De Meo 1236c7435f qemu: fix patch sha256
Fixes #521.
2017-07-03 10:23:28 -07:00
Misty De Meo 24972db79f gist-logs: fix user agent
Refs #518.
2017-06-17 22:18:25 -07:00
Misty De Meo 1975f0f33a Merge pull request #515 from mistydemeo/use_internal_sha256
Use internal Ruby 1.8.2 sha256
2017-05-30 09:11:29 -07:00
Misty De Meo 1964065a71 Use internal Ruby 1.8.2 sha256
Turns out this was here all along! Just with a slightly different
API from modern versions of Ruby.
2017-05-30 09:06:08 -07:00
Misty De Meo bddb767290 Only include RUBY_PATCHLEVEL if defined
Hotfix for #514.
2017-05-26 17:13:00 -07:00
Misty De Meo a460f2d1b5 Merge pull request #513 from mistydemeo/perl-fallbacks-sha256
Make sha256 resilient with platform-independent fallback.
2017-05-25 18:06:43 -07:00
Misty De Meo c307a32fb2 sha256: add homebrew/vendor openssl to the rotation 2017-05-25 18:03:48 -07:00
Geoff Nixon 9774dff598 Make sha256 resilient with platform-independent fallback. 2017-05-25 18:03:45 -07:00
Misty De Meo 3bd76c45ca Merge pull request #509 from mistydemeo/introduce_brew_sh
Introduce brew.sh
2017-05-25 18:03:19 -07:00
Misty De Meo 47b7bb4226 miniupnpc: needs ld64 on Tiger 2017-05-22 23:39:49 -07:00
Thomas Bernard 1fed6abaa3 miniupnpc: bump to version 2.0.20170509. Fixes CVE-2017-8798
also update homepage for https

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

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

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

Closes #35.

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

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

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

Closes Homebrew/homebrew#49961.

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

Closes Homebrew/homebrew#49538.

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

Closes Homebrew/homebrew#49327.

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

Closes Homebrew/homebrew#49185.

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

Allows pulling https://github.com/Homebrew/homebrew-core/pull/971.
2017-05-09 21:34:12 -07:00
Misty De Meo 3304b115ae Import linkage checker 2017-05-09 21:14:15 -07:00
Misty De Meo 15aeaae83d Import GCC formulae dependencies
These were missed in the last PR.
2017-05-08 22:53:13 -07:00
Misty De Meo 2c22b28cb4 Import gcc formulae from homebrew/versions
Eventually these will be replaced with versions using Homebrew's new
naming format, but these will allow users who already had them to use
them.

Fixes #499.
2017-04-29 22:30:01 -07:00
77 changed files with 5559 additions and 581 deletions

No files matched your search

+1 -1
View File
@@ -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-/
+2 -2
View File
@@ -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
+2 -1
View File
@@ -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'
+30
View File
@@ -0,0 +1,30 @@
class CloogPpl015 < Formula
homepage "http://repo.or.cz/w/cloog-ppl.git"
url "ftp://gcc.gnu.org/pub/gcc/infrastructure/cloog-ppl-0.15.11.tar.gz"
mirror "http://gcc.cybermirror.org/infrastructure/cloog-ppl-0.15.11.tar.gz"
sha256 "7cd634d0b2b401b04096b545915ac67f883556e9a524e8e803a6bf6217a84d5f"
bottle do
cellar :any
sha256 "e80958bc126358051c2c40ba8b12aae5fa2e55a086dd103241f7469a6812df29" => :yosemite
sha256 "e18498773771e61e533c1521212ad4f2be43f62b5c00478c89fc52934850450f" => :mavericks
sha256 "ff20e10aa53c2650de8f008d8b6cd803ed1960e6d88282574c2217700ba0a81f" => :mountain_lion
end
keg_only "Conflicts with cloog in main repository."
depends_on "gmp4"
depends_on "ppl011"
def install
args = %W[
--disable-dependency-tracking
--prefix=#{prefix}
--with-gmp=#{Formula["gmp4"].opt_prefix}"
--with-ppl=#{Formula["ppl011"].opt_prefix}"
]
system "./configure", *args
system "make", "install"
end
end
+52
View File
@@ -0,0 +1,52 @@
class Cloog018 < Formula
desc "Generate code for scanning Z-polyhedra"
homepage "http://www.cloog.org/"
# Track gcc infrastructure releases.
url "http://www.bastoul.net/cloog/pages/download/count.php3?url=./cloog-0.18.0.tar.gz"
mirror "ftp://gcc.gnu.org/pub/gcc/infrastructure/cloog-0.18.0.tar.gz"
sha256 "1c4aa8dde7886be9cbe0f9069c334843b21028f61d344a2d685f88cb1dcf2228"
bottle do
cellar :any
revision 1
sha256 "95b8d981633d853151cae2efa07bcf6655e5af04dad88418087fc614de8f160d" => :el_capitan
sha256 "5befa09d6f42cebefe5085959a9d7267158bd9eb7a1d7d0a95c122c5377ccaa9" => :yosemite
sha256 "b64ee12cd97286090e012e25882119b82ce4dc9b8dbaacf7ac17f7570f327cfa" => :mavericks
end
keg_only "Conflicts with cloog in main repository."
depends_on "pkg-config" => :build
depends_on "gmp4"
depends_on "isl011"
def install
system "./configure", "--prefix=#{prefix}",
"--disable-dependency-tracking",
"--disable-silent-rules",
"--with-gmp-prefix=#{Formula["gmp4"].opt_prefix}",
"--with-isl-prefix=#{Formula["isl011"].opt_prefix}"
system "make", "install"
end
test do
cloog_source = <<-EOS.undent
c
0 2
0
1
1
0 2
0 0 0
0
0
EOS
assert_match "Generated from /dev/stdin by CLooG",
pipe_output("#{bin}/cloog /dev/stdin", cloog_source)
end
end
+28 -26
View File
@@ -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
+1
View File
@@ -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"
+1
View File
@@ -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
+9
View File
@@ -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"
+2 -2
View File
@@ -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
View File
@@ -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
View File
@@ -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__
+200
View File
@@ -0,0 +1,200 @@
class Gcc44 < 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 "GNU compiler collection"
homepage "https://gcc.gnu.org"
url "https://ftpmirror.gnu.org/gcc/gcc-4.4.7/gcc-4.4.7.tar.bz2"
mirror "https://ftp.gnu.org/gnu/gcc/gcc-4.4.7/gcc-4.4.7.tar.bz2"
sha256 "5ff75116b8f763fa0fb5621af80fc6fb3ea0f1b1a57520874982f03f26cd607f"
bottle do
sha256 "361c84608ef1ddaca2f9a3996aeface6bb08f4525388c563a09b8f20fcd40386" => :mavericks
sha256 "c5a7a27d0bfc30a3e6ecce048c786cefa7e3bb4038ad6ea3fdeeb3c6e6454bd1" => :mountain_lion
end
option "with-fortran", "Build the gfortran compiler"
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"
deprecated_option "enable-fortran" => "with-fortran"
deprecated_option "enable-java" => "with-java"
deprecated_option "enable-all-languages" => "with-all-languages"
deprecated_option "enable-nls" => "with-nls"
deprecated_option "enable-profiled-build" => "with-profiled-build"
depends_on "gmp4"
depends_on "mpfr2"
depends_on "ppl011"
depends_on "cloog-ppl015"
depends_on "ecj" if build.with?("java") || build.with?("all-languages")
depends_on MaximumMacOSRequirement => :mavericks
# Fix libffi for ppc, from MacPorts
patch :p0 do
url "https://trac.macports.org/export/110576/trunk/dports/lang/gcc44/files/ppc_fde_encoding.diff"
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?
MacOS::CLT.installed?
end
# GCC bootstraps itself, so it is OK to have an incompatible C++ stdlib
cxxstdlib_check :skip
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
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.
languages = %w[c c++ fortran java objc obj-c++]
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"
end
version_suffix = version.to_s.slice(/\d\.\d/)
args = [
"--build=#{arch}-apple-darwin#{osmajor}",
"--prefix=#{prefix}",
"--mandir=#{man}",
"--infodir=#{info}",
"--enable-languages=#{languages.join(",")}",
# Make most executables versioned to avoid conflicts.
"--program-suffix=-#{version_suffix}",
"--with-gmp=#{Formula["gmp4"].opt_prefix}",
"--with-mpfr=#{Formula["mpfr2"].opt_prefix}",
"--with-ppl=#{Formula["ppl011"].opt_prefix}",
"--disable-ppl-version-check",
"--with-cloog=#{Formula["cloog-ppl015"].opt_prefix}",
"--with-system-zlib",
# This ensures lib, libexec, include are sandboxed so that they
# don't wander around telling little children there is no Santa
# Claus.
"--enable-version-specific-runtime-libs",
"--enable-libstdcxx-time=yes",
"--enable-stage1-checking",
"--enable-checking=release",
# Multilib building is broken in GCC 4.4 on Darwin
"--disable-multilib",
# 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",
]
args << "--disable-nls" if build.without? "nls"
if build.with?("java") || build.with?("all-languages")
args << "--with-ecj-jar=#{Formula["ecj"].opt_prefix}/share/java/ecj.jar"
end
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 formula must be installed in order to do this.
system "make", "install"
end
# Handle conflicts between GCC formulae.
# Remove libffi stuff, which is not needed after GCC is built.
Dir.glob(prefix/"**/libffi.*") { |file| File.delete file }
# Rename libiberty.a.
Dir.glob(prefix/"**/libiberty.*") { |file| add_suffix file, version_suffix }
# 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
# Rename java properties
if build.with?("java") || build.with?("all-languages")
config_files = [
"#{lib}/logging.properties",
"#{lib}/security/classpath.security",
"#{lib}/i386/logging.properties",
"#{lib}/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)
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-4.4", "-o", "hello-c", "hello-c.c"
assert_equal "Hello, world!\n", `./hello-c`
end
end
+226
View File
@@ -0,0 +1,226 @@
class Gcc45 < 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 "GNU compiler collection"
homepage "https://gcc.gnu.org"
url "https://ftpmirror.gnu.org/gcc/gcc-4.5.4/gcc-4.5.4.tar.bz2"
mirror "https://ftp.gnu.org/gnu/gcc/gcc-4.5.4/gcc-4.5.4.tar.bz2"
sha256 "eef3f0456db8c3d992cbb51d5d32558190bc14f3bc19383dd93acc27acc6befc"
bottle do
sha256 "16c2a3e56e2da8ec6b38b36c54112d7c56bc05f71168fb867f586cb190c5fef7" => :yosemite
sha256 "51b73412c9628a593e765105a098ed1500b04574145391f3f93972e54d5b1b05" => :mavericks
sha256 "06806e0a4aa703b0cacb4a3e10b4c8738d3d97535c6dd52796ec5a85eee0638d" => :mountain_lion
end
option "with-fortran", "Build the gfortran compiler"
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"
# 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?
deprecated_option "enable-fortran" => "with-fortran"
deprecated_option "enable-java" => "with-java"
deprecated_option "enable-all-languages" => "with-all-languages"
deprecated_option "enable-nls" => "with-nls"
deprecated_option "enable-profiled-build" => "with-profiled-build"
deprecated_option "disable-multilib" => "without-multilib"
# with system ld on Tiger, build fails with countless messages of:
# "relocation overflow for relocation entry"
depends_on :ld64
depends_on "gmp4"
depends_on "libmpc08"
depends_on "mpfr2"
depends_on "ppl011"
depends_on "cloog-ppl015"
depends_on "ecj" if build.with?("java") || build.with?("all-languages")
# If someone wants to try and fix this, feel free to file a PR. Thanks!
# https://github.com/Homebrew/homebrew-versions/issues/1093
depends_on MaximumMacOSRequirement => :yosemite
# Fix libffi for ppc, from MacPorts
patch :p0 do
url "https://trac.macports.org/export/110576/trunk/dports/lang/gcc45/files/ppc_fde_encoding.diff"
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/gcc45/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?
MacOS::CLT.installed?
end
# GCC bootstraps itself, so it is OK to have an incompatible C++ stdlib
cxxstdlib_check :skip
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
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.
languages = %w[c c++ fortran java objc obj-c++]
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"
end
version_suffix = version.to_s.slice(/\d\.\d/)
args = [
"--build=#{arch}-apple-darwin#{osmajor}",
"--prefix=#{prefix}",
"--enable-languages=#{languages.join(",")}",
# Make most executables versioned to avoid conflicts.
"--program-suffix=-#{version_suffix}",
"--with-gmp=#{Formula["gmp4"].opt_prefix}",
"--with-mpfr=#{Formula["mpfr2"].opt_prefix}",
"--with-mpc=#{Formula["libmpc08"].opt_prefix}",
"--with-ppl=#{Formula["ppl011"].opt_prefix}",
"--with-cloog=#{Formula["cloog-ppl015"].opt_prefix}",
"--with-system-zlib",
# This ensures lib, libexec, include are sandboxed so that they
# don't wander around telling little children there is no Santa
# Claus.
"--enable-version-specific-runtime-libs",
"--enable-libstdcxx-time=yes",
"--enable-stage1-checking",
"--enable-checking=release",
# GCC 4.5 does not properly support LTO on Darwin.
"--disable-lto",
# 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 && Hardware.cpu_type == :intel
# 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")
args << "--with-ecj-jar=#{Formula["ecj"].opt_prefix}/share/java/ecj.jar"
end
if !MacOS.prefer_64_bit? || build.without?("multilib")
args << "--disable-multilib"
else
args << "--enable-multilib"
end
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 formula must be installed in order to do this.
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 && Hardware.cpu_type == :intel
end
# Handle conflicts between GCC formulae.
# Remove libffi stuff, which is not needed after GCC is built.
Dir.glob(prefix/"**/libffi.*") { |file| File.delete file }
# Rename libiberty.a.
Dir.glob(prefix/"**/libiberty.*") { |file| add_suffix file, version_suffix }
# 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
# Rename java properties
if build.with?("java") || build.with?("all-languages")
config_files = [
"#{lib}/logging.properties",
"#{lib}/security/classpath.security",
"#{lib}/i386/logging.properties",
"#{lib}/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)
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-4.5", "-o", "hello-c", "hello-c.c"
assert_equal "Hello, world!\n", `./hello-c`
end
end
+219
View File
@@ -0,0 +1,219 @@
class Gcc46 < 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 "GNU compiler collection"
homepage "https://gcc.gnu.org"
url "https://ftpmirror.gnu.org/gcc/gcc-4.6.4/gcc-4.6.4.tar.bz2"
mirror "https://ftp.gnu.org/gnu/gcc/gcc-4.6.4/gcc-4.6.4.tar.bz2"
sha256 "35af16afa0b67af9b8eb15cafb76d2bc5f568540552522f5dc2c88dd45d977e8"
bottle do
sha256 "23cb970d350f9096b17ad0a04c875d0c54ee71a0f22709e72bcf34e100412dfc" => :yosemite
sha256 "51a8a0efb2868c517258d2a504c45217fed8a10631ba724da437adb39064a632" => :mavericks
sha256 "8033c9313bf08a7bc825aca65c884027a877052b77418d9fcf1006dd27ac2287" => :mountain_lion
end
if MacOS.version >= :el_capitan
# Fixes build with Xcode 7.
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66523
patch do
url "https://gcc.gnu.org/bugzilla/attachment.cgi?id=35773"
sha256 "db4966ade190fff4ed39976be8d13e84839098711713eff1d08920d37a58f5ec"
end
end
option "with-fortran", "Build the gfortran compiler"
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"
# 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?
deprecated_option "enable-fortran" => "with-fortran"
deprecated_option "enable-java" => "with-java"
deprecated_option "enable-all-languages" => "with-all-languages"
deprecated_option "enable-nls" => "with-nls"
deprecated_option "enable-profiled-build" => "with-profiled-build"
deprecated_option "disable-multilib" => "without-multilib"
depends_on "gmp4"
depends_on "libmpc08"
depends_on "mpfr2"
depends_on "ppl011"
depends_on "cloog-ppl015"
depends_on "ecj" if build.with?("java") || build.with?("all-languages")
# 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 10.10 issues: https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=215251
patch :p0 do
url "https://trac.macports.org/export/126996/trunk/dports/lang/gcc48/files/patch-10.10.diff"
sha256 "61e5d0f18db59220cbd99717e9b644c1d0f3502b09ada746b60850cacda07328"
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
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
# currently only compilable on Linux.
languages = %w[c c++ fortran java objc obj-c++]
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"
end
version_suffix = version.to_s.slice(/\d\.\d/)
args = [
"--build=#{arch}-apple-darwin#{osmajor}",
"--prefix=#{prefix}",
"--enable-languages=#{languages.join(",")}",
# Make most executables versioned to avoid conflicts.
"--program-suffix=-#{version_suffix}",
"--with-gmp=#{Formula["gmp4"].opt_prefix}",
"--with-mpfr=#{Formula["mpfr2"].opt_prefix}",
"--with-mpc=#{Formula["libmpc08"].opt_prefix}",
"--with-ppl=#{Formula["ppl011"].opt_prefix}",
"--with-cloog=#{Formula["cloog-ppl015"].opt_prefix}",
"--with-system-zlib",
# This ensures lib, libexec, include are sandboxed so that they
# don't wander around telling little children there is no Santa
# Claus.
"--enable-version-specific-runtime-libs",
"--enable-libstdcxx-time=yes",
"--enable-stage1-checking",
"--enable-checking=release",
"--enable-lto",
# 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
# 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")
args << "--with-ecj-jar=#{Formula["ecj"].opt_prefix}/share/java/ecj.jar"
end
if !MacOS.prefer_64_bit? || build.without?("multilib")
args << "--disable-multilib"
else
args << "--enable-multilib"
end
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.
# Remove libffi stuff, which is not needed after GCC is built.
Dir.glob(prefix/"**/libffi.*") { |file| File.delete file }
# Rename libiberty.a.
Dir.glob(prefix/"**/libiberty.*") { |file| add_suffix file, version_suffix }
# 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
# Rename java properties
if build.with?("java") || build.with?("all-languages")
config_files = [
"#{lib}/logging.properties",
"#{lib}/security/classpath.security",
"#{lib}/i386/logging.properties",
"#{lib}/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)
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-4.6", "-o", "hello-c", "hello-c.c"
assert_equal "Hello, world!\n", `./hello-c`
end
end
+225
View File
@@ -0,0 +1,225 @@
class Gcc47 < Formula
desc "GNU compiler collection"
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
homepage "https://gcc.gnu.org"
url "https://ftpmirror.gnu.org/gcc/gcc-4.7.4/gcc-4.7.4.tar.bz2"
mirror "https://ftp.gnu.org/gnu/gcc/gcc-4.7.4/gcc-4.7.4.tar.bz2"
sha256 "92e61c6dc3a0a449e62d72a38185fda550168a86702dea07125ebd3ec3996282"
head "svn://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch"
bottle do
sha256 "de527788a6fedea2173e340fee47324478e8956ef31868d376c7ac561a8f2952" => :yosemite
sha256 "b418cec1d503d859e99cb13928a2df8434a9037524f898fe095ea35f615d87f2" => :mavericks
sha256 "fe211028f9a219f48d127bc946d5f7046b7b6e7f792fd4cd63c1deb393484db3" => :mountain_lion
end
if MacOS.version >= :el_capitan
# Fixes build with Xcode 7.
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66523
patch do
url "https://gcc.gnu.org/bugzilla/attachment.cgi?id=35773"
sha256 "db4966ade190fff4ed39976be8d13e84839098711713eff1d08920d37a58f5ec"
end
end
option "with-fortran", "Build the gfortran compiler"
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"
# 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?
deprecated_option "enable-fortran" => "with-fortran"
deprecated_option "enable-java" => "with-java"
deprecated_option "enable-all-languages" => "with-all-languages"
deprecated_option "enable-nls" => "with-nls"
deprecated_option "enable-profiled-build" => "with-profiled-build"
deprecated_option "disable-multilib" => "without-multilib"
depends_on "gmp4"
depends_on "libmpc08"
depends_on "mpfr2"
depends_on "ppl011"
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?
MacOS::CLT.installed?
end
# GCC bootstraps itself, so it is OK to have an incompatible C++ stdlib
cxxstdlib_check :skip
# Fix 10.10 issues: https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=215251
patch :p0 do
url "https://raw.githubusercontent.com/Homebrew/formula-patches/7293b7d3/gcc47/patch-10.10.diff"
sha256 "61e5d0f18db59220cbd99717e9b644c1d0f3502b09ada746b60850cacda07328"
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
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
# currently only compilable on Linux.
languages = %w[c c++ fortran java objc obj-c++]
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"
end
version_suffix = version.to_s.slice(/\d\.\d/)
args = [
"--build=#{arch}-apple-darwin#{osmajor}",
"--prefix=#{prefix}",
"--enable-languages=#{languages.join(",")}",
# Make most executables versioned to avoid conflicts.
"--program-suffix=-#{version_suffix}",
"--with-gmp=#{Formula["gmp4"].opt_prefix}",
"--with-mpfr=#{Formula["mpfr2"].opt_prefix}",
"--with-mpc=#{Formula["libmpc08"].opt_prefix}",
"--with-ppl=#{Formula["ppl011"].opt_prefix}",
"--with-cloog=#{Formula["cloog-ppl015"].opt_prefix}",
"--with-system-zlib",
# This ensures lib, libexec, include are sandboxed so that they
# don't wander around telling little children there is no Santa
# Claus.
"--enable-version-specific-runtime-libs",
"--enable-libstdcxx-time=yes",
"--enable-stage1-checking",
"--enable-checking=release",
"--enable-lto",
# 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
# 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")
args << "--with-ecj-jar=#{Formula["ecj"].opt_prefix}/share/java/ecj.jar"
end
if !MacOS.prefer_64_bit? || build.without?("multilib")
args << "--disable-multilib"
else
args << "--enable-multilib"
end
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.
# Remove libffi stuff, which is not needed after GCC is built.
Dir.glob(prefix/"**/libffi.*") { |file| File.delete file }
# Rename libiberty.a.
Dir.glob(prefix/"**/libiberty.*") { |file| add_suffix file, version_suffix }
# 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
# Rename java properties
if build.with?("java") || build.with?("all-languages")
config_files = [
"#{lib}/logging.properties",
"#{lib}/security/classpath.security",
"#{lib}/i386/logging.properties",
"#{lib}/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)
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-4.7", "-o", "hello-c", "hello-c.c"
assert_equal "Hello, world!\n", `./hello-c`
end
end
+236
View File
@@ -0,0 +1,236 @@
class Gcc48 < Formula
desc "GNU compiler collection"
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
homepage "https://gcc.gnu.org"
url "https://ftpmirror.gnu.org/gcc/gcc-4.8.5/gcc-4.8.5.tar.bz2"
mirror "https://ftp.gnu.org/gnu/gcc/gcc-4.8.5/gcc-4.8.5.tar.bz2"
sha256 "22fb1e7e0f68a63cee631d85b20461d1ea6bda162f03096350e38c8d427ecf23"
head "svn://gcc.gnu.org/svn/gcc/branches/gcc-4_8-branch"
bottle do
rebuild 1
sha256 "8cf53c3b1f03049538b9f78ea1ffe7ebf21fcc99a3b4147e4ede8defefc4cef4" => :el_capitan
sha256 "ae30faa242deae02d46bc92a318e0f0b8f6f0754521fec2225c2fb0403022e31" => :yosemite
sha256 "0bc974cb0c23ed4ca3536eb2b5e7f11e692a5e6246d99b82ad74880685f42736" => :mavericks
end
if MacOS.version >= :yosemite
# Fixes build on El Capitan
# https://trac.macports.org/ticket/48471
patch :p0 do
url "https://raw.githubusercontent.com/Homebrew/formula-patches/dcfc5a2e6/gcc48/define_non_standard_clang_macros.patch"
sha256 "e727383c9186fdc36f804c69ad550f5cfd2b996e37083be94c0c9aa8fde226ee"
end
# Fixes build with Xcode 7.
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66523
patch do
url "https://gcc.gnu.org/bugzilla/attachment.cgi?id=35773"
sha256 "db4966ade190fff4ed39976be8d13e84839098711713eff1d08920d37a58f5ec"
end
end
option "without-fortran", "Build without the gfortran compiler"
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"
# 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?
deprecated_option "enable-java" => "with-java"
deprecated_option "enable-all-languages" => "with-all-languages"
deprecated_option "enable-nls" => "with-nls"
deprecated_option "enable-profiled-build" => "with-profiled-build"
deprecated_option "disable-multilib" => "without-multilib"
depends_on "gmp4"
depends_on "libmpc08"
depends_on "mpfr2"
depends_on "cloog018"
depends_on "isl011"
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
fails_with :gcc_4_0
# 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
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
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
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++]
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"
end
version_suffix = version.to_s.slice(/\d\.\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["gmp4"].opt_prefix}",
"--with-mpfr=#{Formula["mpfr2"].opt_prefix}",
"--with-mpc=#{Formula["libmpc08"].opt_prefix}",
"--with-cloog=#{Formula["cloog018"].opt_prefix}",
"--with-isl=#{Formula["isl011"].opt_prefix}",
"--with-system-zlib",
"--enable-libstdcxx-time=yes",
"--enable-stage1-checking",
"--enable-checking=release",
"--enable-lto",
# 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",
]
# Use 'bootstrap-debug' build configuration to force stripping of object
# files prior to comparison during bootstrap (broken by Xcode 6.3).
# This causes bottle errors for gcc48 on Mountain Lion, so scope it to 10.10.
args << "--with-build-config=bootstrap-debug" if MacOS.version >= :yosemite
# "Building GCC with plugin support requires a host that supports
# -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")
args << "--with-ecj-jar=#{Formula["ecj"].opt_prefix}/share/java/ecj.jar"
end
if !MacOS.prefer_64_bit? || build.without?("multilib")
args << "--disable-multilib"
else
args << "--enable-multilib"
end
# 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-header"s 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 libiberty.a.
Dir.glob(prefix/"**/libiberty.*") { |file| add_suffix file, version_suffix }
# 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
# Rename java properties
if build.with?("java") || build.with?("all-languages")
config_files = [
"#{lib}/logging.properties",
"#{lib}/security/classpath.security",
"#{lib}/i386/logging.properties",
"#{lib}/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)
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-4.8", "-o", "hello-c", "hello-c.c"
assert_equal "Hello, world!\n", `./hello-c`
end
end
+209
View File
@@ -0,0 +1,209 @@
class Gcc49 < 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://ftpmirror.gnu.org/gcc/gcc-4.9.3/gcc-4.9.3.tar.bz2"
mirror "https://ftp.gnu.org/gnu/gcc/gcc-4.9.3/gcc-4.9.3.tar.bz2"
sha256 "2332b2a5a321b57508b9031354a8503af6fdfb868b8c1748d33028d100a8b67e"
head "svn://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch"
bottle do
rebuild 3
sha256 "0acf2b010e3c2210fcb5fdc03de9dc14f0556cf5295347d8f72f2d8d1cfab4ff" => :el_capitan
sha256 "5b635a24e9f7464fb94d2933b00a8d1b1cfc0efb1de140fe568e313d24965140" => :yosemite
sha256 "dc24f86a9652fbb0ec0bc9dd0103d23bb68c315bd490ee5d0b10a7144453ecc4" => :mavericks
end
if MacOS.version >= :yosemite
# Fixes build with Xcode 7.
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66523
patch do
url "https://gcc.gnu.org/bugzilla/attachment.cgi?id=35773"
sha256 "db4966ade190fff4ed39976be8d13e84839098711713eff1d08920d37a58f5ec"
end
# Fixes assembler generation with XCode 7
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66509
patch do
url "https://gist.githubusercontent.com/tdsmith/d248e025029add31e7aa/raw/444e292786df41346a3a1cc6267bba587408a007/gcc.diff"
sha256 "636b65a160ccb7417cc4ffc263fc815382f8bb895e32262205cd10d65ea7804a"
end
end
option "without-fortran", "Build without the gfortran compiler"
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"
# 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?
deprecated_option "enable-java" => "with-java"
deprecated_option "enable-all-languages" => "with-all-languages"
deprecated_option "enable-nls" => "with-nls"
deprecated_option "enable-profiled-build" => "with-profiled-build"
deprecated_option "disable-multilib" => "without-multilib"
depends_on "gmp4"
depends_on "libmpc08"
depends_on "mpfr2"
depends_on "cloog018"
depends_on "isl011"
depends_on "ecj" if build.with?("java") || build.with?("all-languages")
# 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
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
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
# currently only compilable on Linux.
languages = %w[c c++ fortran java objc obj-c++]
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"
end
version_suffix = version.to_s.slice(/\d\.\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["gmp4"].opt_prefix}",
"--with-mpfr=#{Formula["mpfr2"].opt_prefix}",
"--with-mpc=#{Formula["libmpc08"].opt_prefix}",
"--with-cloog=#{Formula["cloog018"].opt_prefix}",
"--with-isl=#{Formula["isl011"].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
# 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")
args << "--with-ecj-jar=#{Formula["ecj"].opt_prefix}/share/java/ecj.jar"
end
if !MacOS.prefer_64_bit? || build.without?("multilib")
args << "--disable-multilib"
else
args << "--enable-multilib"
end
# 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-4.9", "-o", "hello-c", "hello-c.c"
assert_equal "Hello, world!\n", `./hello-c`
end
end
+214
View File
@@ -0,0 +1,214 @@
class Gcc5 < 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://ftpmirror.gnu.org/gcc/gcc-5.4.0/gcc-5.4.0.tar.bz2"
mirror "https://ftp.gnu.org/gnu/gcc/gcc-5.4.0/gcc-5.4.0.tar.bz2"
sha256 "608df76dec2d34de6558249d8af4cbee21eceddbcb580d666f7a5a583ca3303a"
bottle do
sha256 "834b511f2f460db483e8126b446bb0a7fc7e2d7ee16bb53d6c4ec51910ce89be" => :el_capitan
sha256 "b44fcce2f25919f93d33fe9482c1f9cc1068e3332f6890340853c32007c0113b" => :yosemite
sha256 "7b4970b4c2c86558208476c3e281f242be4f6bfe7c1fa8391e52b9829ef4ba78" => :mavericks
end
# 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
patch :DATA
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
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
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",
# 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
# 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")
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-5", "-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)
+218
View File
@@ -0,0 +1,218 @@
class Gcc6 < 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://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
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
patch :DATA
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
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
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 > :leopard
# 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
View File
@@ -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
+93
View File
@@ -0,0 +1,93 @@
class Gmp4 < Formula
desc "GNU multiple precision arithmetic library"
homepage "http://gmplib.org/"
# Track gcc infrastructure releases.
url "https://ftpmirror.gnu.org/gmp/gmp-4.3.2.tar.bz2"
mirror "https://ftp.gnu.org/gnu/gmp/gmp-4.3.2.tar.bz2"
mirror "ftp://ftp.gmplib.org/pub/gmp-4.3.2/gmp-4.3.2.tar.bz2"
mirror "ftp://gcc.gnu.org/pub/gcc/infrastructure/gmp-4.3.2.tar.bz2"
sha256 "936162c0312886c21581002b79932829aa048cfaf9937c6265aeaa14f1cd1775"
bottle do
cellar :any
revision 1
sha256 "5c5d632ea58479fba37a0844d0b9a4fd1e865e809286ada95d5484d72ab50a78" => :el_capitan
sha256 "932a2d0987dd26bbc3cb54b7d38d4cf6b0e5a4bd46fef8442b79b75f067abf6e" => :yosemite
sha256 "b7012c46ac9e5b5aa1004184e85a2e99fc047d9f92f1e8b82699ba1f1ea1f7bf" => :mavericks
end
keg_only "Conflicts with gmp in main repository."
option "with-32-bit"
option "without-check", "Do not run `make check` to verify libraries"
deprecated_option "32-bit" => "with-32-bit"
deprecated_option "skip-check" => "without-check"
fails_with :gcc_4_0 do
cause "Reports of problems using gcc 4.0 on Leopard: https://github.com/mxcl/homebrew/issues/issue/2302"
end
# Patches gmp.h to remove the __need_size_t define, which
# was preventing libc++ builds from getting the ptrdiff_t type
# Applied upstream in http://gmplib.org:8000/gmp/raw-rev/6cd3658f5621
patch :DATA
def install
args = ["--prefix=#{prefix}", "--enable-cxx"]
# Build 32-bit where appropriate, and help configure find 64-bit CPUs
if MacOS.prefer_64_bit? && !build.build_32_bit?
ENV.m64
args << "--build=x86_64-apple-darwin"
else
ENV.m32
args << "--host=none-apple-darwin"
end
system "./configure", *args
system "make"
ENV.deparallelize # Doesn't install in parallel on 8-core Mac Pro
system "make", "install"
# Different compilers and options can cause tests to fail even
# if everything compiles, so yes, we want to do this step.
system "make", "check" if build.with? "check"
end
test do
(testpath/"test.c").write <<-EOS.undent
#include <gmp.h>
int main()
{
mpz_t integ;
mpz_init (integ);
mpz_clear (integ);
return 0;
}
EOS
system ENV.cc, "test.c", "-L#{lib}", "-lgmp", "-I#{include}", "-o", "test"
system "./test"
end
end
__END__
diff --git a/gmp-h.in b/gmp-h.in
index d7fbc34..3c57c48 100644
--- a/gmp-h.in
+++ b/gmp-h.in
@@ -46,13 +46,11 @@ along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */
#ifndef __GNU_MP__
#define __GNU_MP__ 4
-#define __need_size_t /* tell gcc stddef.h we only want size_t */
#if defined (__cplusplus)
#include <cstddef> /* for size_t */
#else
#include <stddef.h> /* for size_t */
#endif
-#undef __need_size_t
/* Instantiated by configure. */
#if ! defined (__GMP_WITHIN_CONFIGURE)
+111
View File
@@ -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
+5 -7
View File
@@ -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
+46
View File
@@ -0,0 +1,46 @@
class Isl011 < Formula
desc "Integer Set Library for the polyhedral model"
homepage "http://freecode.com/projects/isl"
# Track gcc infrastructure releases.
url "http://isl.gforge.inria.fr/isl-0.11.1.tar.bz2"
mirror "ftp://gcc.gnu.org/pub/gcc/infrastructure/isl-0.11.1.tar.bz2"
sha256 "095f4b54c88ca13a80d2b025d9c551f89ea7ba6f6201d701960bfe5c1466a98d"
bottle do
cellar :any
revision 1
sha256 "13e867965cd3a068d7261b4f07cb9835f8f3e4661f27d151318a3b04fccacbd0" => :el_capitan
sha256 "6d59cb6e7fc0aa67ff5a0734d00aaf712f424dcd6094f29b0dbbfa5d5f205a98" => :yosemite
sha256 "d747feae5b551c03d783886fd3aa58a86ce04a73753d1d8347b196f953d54ddd" => :mavericks
end
keg_only "Conflicts with isl in main repository."
depends_on "gmp4"
def install
system "./configure", "--disable-dependency-tracking",
"--disable-silent-rules",
"--prefix=#{prefix}",
"--with-gmp=system",
"--with-gmp-prefix=#{Formula["gmp4"].opt_prefix}"
system "make", "install"
(share/"gdb/auto-load").install Dir["#{lib}/*-gdb.py"]
end
test do
(testpath/"test.c").write <<-EOS.undent
#include <isl/ctx.h>
int main()
{
isl_ctx* ctx = isl_ctx_alloc();
isl_ctx_free(ctx);
return 0;
}
EOS
system ENV.cc, "test.c", "-L#{lib}", "-lisl",
"-I#{include}", "-I#{Formula["gmp4"].include}", "-o", "test"
system "./test"
end
end
+45
View File
@@ -0,0 +1,45 @@
class Isl014 < Formula
desc "Integer Set Library for the polyhedral model"
homepage "http://freecode.com/projects/isl"
# Track gcc infrastructure releases.
url "http://isl.gforge.inria.fr/isl-0.14.tar.bz2"
mirror "ftp://gcc.gnu.org/pub/gcc/infrastructure/isl-0.14.tar.bz2"
sha256 "7e3c02ff52f8540f6a85534f54158968417fd676001651c8289c705bd0228f36"
bottle do
cellar :any
sha256 "a6166d161841d901af54319a5434e955964712ae5cc19a88705d4f28669dc36b" => :yosemite
sha256 "cbcb2862709fa87913927a3ce261ac989f650a3506abde6c9eaa4da2d58b2b53" => :mavericks
sha256 "04997936c670ba1289574c526a62c69eae7e82c94c20b680df2f995df83b6d59" => :mountain_lion
end
keg_only "Conflicts with isl in main repository."
depends_on "gmp"
def install
system "./configure", "--disable-dependency-tracking",
"--disable-silent-rules",
"--prefix=#{prefix}",
"--with-gmp=system",
"--with-gmp-prefix=#{Formula["gmp"].opt_prefix}"
system "make"
system "make", "install"
(share/"gdb/auto-load").install Dir["#{lib}/*-gdb.py"]
end
test do
(testpath/"test.c").write <<-EOS.undent
#include <isl/ctx.h>
int main()
{
isl_ctx* ctx = isl_ctx_alloc();
isl_ctx_free(ctx);
return 0;
}
EOS
system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lisl", "-o", "test"
system "./test"
end
end
+13 -13
View File
@@ -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
+57
View File
@@ -0,0 +1,57 @@
class Libmpc08 < Formula
desc "C library for high precision complex numbers"
homepage "http://multiprecision.org"
# Track gcc infrastructure releases.
url "http://multiprecision.org/mpc/download/mpc-0.8.1.tar.gz"
mirror "ftp://gcc.gnu.org/pub/gcc/infrastructure/mpc-0.8.1.tar.gz"
sha256 "e664603757251fd8a352848276497a4c79b7f8b21fd8aedd5cc0598a38fee3e4"
bottle do
cellar :any
revision 1
sha256 "e3bb3e309c6c5bd709fee9a136a642289357fcc4aa9c793df1c96785947c99d9" => :el_capitan
sha256 "79a024cd86280716cc82f35e88ae9695f0606d2b09e585d3d9a0f7fc800eec20" => :yosemite
sha256 "105469fc116eae8a19000848c91ea1bea71ad5e3f395624938030c3813eca0ed" => :mavericks
end
keg_only "Conflicts with libmpc in main repository."
depends_on "gmp4"
depends_on "mpfr2"
def install
args = [
"--prefix=#{prefix}",
"--disable-dependency-tracking",
"--with-gmp=#{Formula["gmp4"].opt_prefix}",
"--with-mpfr=#{Formula["mpfr2"].opt_prefix}",
]
system "./configure", *args
system "make"
system "make", "check"
system "make", "install"
end
test do
(testpath/"test.c").write <<-EOS.undent
#include <mpc.h>
int main()
{
mpc_t x;
mpc_init2 (x, 256);
mpc_clear (x);
return 0;
}
EOS
gmp4 = Formula["gmp4"]
mpfr2 = Formula["mpfr2"]
system ENV.cc, "test.c",
"-I#{gmp4.include}", "-L#{gmp4.lib}", "-lgmp",
"-I#{mpfr2.include}", "-L#{mpfr2.lib}", "-lmpfr",
"-I#{include}", "-L#{lib}", "-lmpc",
"-o", "test"
system "./test"
end
end
+4 -4
View File
@@ -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}",
+41
View File
@@ -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
+6 -7
View File
@@ -1,17 +1,16 @@
class Miniupnpc < Formula
desc "UpnP IGD client library and daemon"
homepage "http://miniupnp.tuxfamily.org"
url "http://miniupnp.tuxfamily.org/files/download.php?file=miniupnpc-1.9.20150609.tar.gz"
sha256 "86e6ccec5b660ba6889893d1f3fca21db087c6466b1a90f495a1f87ab1cd1c36"
homepage "https://miniupnp.tuxfamily.org"
url "http://miniupnp.tuxfamily.org/files/download.php?file=miniupnpc-2.0.20170509.tar.gz"
sha256 "d3c368627f5cdfb66d3ebd64ca39ba54d6ff14a61966dbecb8dd296b7039f16a"
bottle do
cellar :any
sha256 "aecb5c84e988af64b0d3d4c3f090d033a6daaad5fe145cbec599537bcba65646" => :el_capitan
sha256 "b31e62a6331c82219bdf674c9d5b366f1288f203b947f446bbade154ab54025d" => :yosemite
sha256 "ffc0d9665983408ee86c4e5aae53c66abb22f56d700c8ceea6bd01f2a3875c75" => :mavericks
sha256 "ba1333c0e47f68fb0b11e945ada0aff81b69517aea4356f936fed0eaf357475e" => :mountain_lion
end
# /usr/bin/ld: -i argument: nstall_name must have a ':' between its symbol names
depends_on :ld64
def install
system "make", "INSTALLPREFIX=#{prefix}", "install"
end
+5 -14
View File
@@ -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"
+57
View File
@@ -0,0 +1,57 @@
class Mpfr2 < Formula
desc "Multiple-precision floating-point computations C lib"
homepage "http://www.mpfr.org/"
# Track gcc infrastructure releases.
url "http://www.mpfr.org/mpfr-2.4.2/mpfr-2.4.2.tar.bz2"
mirror "ftp://gcc.gnu.org/pub/gcc/infrastructure/mpfr-2.4.2.tar.bz2"
sha256 "c7e75a08a8d49d2082e4caee1591a05d11b9d5627514e678f02d66a124bcf2ba"
bottle do
cellar :any
revision 1
sha256 "08e5aa9a8b8631afe6478ab7973a152316237cbddcb0f76ddaebebec99ee77b0" => :el_capitan
sha256 "bb6d912bd1688077a961a91ae12a94e372e339546df84295013473bb9882def5" => :yosemite
sha256 "8745f1ca353d9bd28c07ac4c602b2836ca6d39477fa8736baba55fc46ce66d85" => :mavericks
end
option "with-32-bit"
deprecated_option "32-bit" => "with-32-bit"
depends_on "gmp4"
keg_only "Conflicts with mpfr in main repository."
fails_with :clang do
build 421
cause <<-EOS.undent
clang build 421 segfaults while building in superenv;
see https://github.com/mxcl/homebrew/issues/15061
EOS
end
def install
gmp4 = Formula["gmp4"]
args = %W[
--disable-dependency-tracking
--prefix=#{prefix}
--with-gmp=#{gmp4.opt_prefix}
]
# Build 32-bit where appropriate, and help configure find 64-bit CPUs
# Note: This logic should match what the GMP formula does.
if MacOS.prefer_64_bit? && !build.build_32_bit?
ENV.m64
args << "--build=x86_64-apple-darwin"
else
ENV.m32
args << "--build=none-apple-darwin"
end
system "./configure", *args
system "make"
system "make", "check"
system "make", "install"
end
end
+1 -1
View File
@@ -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
+7 -10
View File
@@ -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
+42
View File
@@ -0,0 +1,42 @@
class Ppl011 < Formula
homepage "http://bugseng.com/products/ppl/"
# Track gcc infrastructure releases.
url "http://bugseng.com/products/ppl/download/ftp/releases/0.11/ppl-0.11.tar.gz"
mirror "ftp://gcc.gnu.org/pub/gcc/infrastructure/ppl-0.11.tar.gz"
sha256 "3453064ac192e095598576c5b59ecd81a26b268c597c53df05f18921a4f21c77"
revision 1
bottle do
sha256 "be178bf8fc11a049a27b83d0b00660a3ee4426845657f3d8279b31e10730a878" => :yosemite
sha256 "f89fff76bdc39bea26763f765188523ba34eb9d07d3834c79a8d50a489a9aabc" => :mavericks
sha256 "f257cca9615ae1fb0a239c1fbf4f505dbcba139744999a9c8d7f512b5dbb7fa4" => :mountain_lion
end
depends_on "m4" => :build if MacOS.version < :leopard
depends_on "gmp4"
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
# Using different patch from upstream bug report to avoid autoreconf.
patch do
url "https://gist.githubusercontent.com/manphiz/9507743/raw/45081e12c2f1faf81e8536f365af05173c6dab5c/patch-ppl-flexible-array-clang_v2.patch"
sha256 "db8ced5366ec4c3efb6fd20d3b4e440de3f8b9ec1d930a33b6a23d006dc25944"
end
def install
system "./configure", "--prefix=#{prefix}",
"--disable-dependency-tracking",
"--disable-silent-rules",
"--disable-ppl_lpsol",
"--disable-ppl_lcdd",
"--disable-ppl_pips",
"--with-gmp-prefix=#{Formula["gmp4"].opt_prefix}"
system "make", "install"
end
test do
system bin/"ppl-config", "--bindir", "--libdir", "--license"
end
end
+40 -101
View File
@@ -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
View File
@@ -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
View File
@@ -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"
sha256 "0b32b6af97d7079302ee4a76699ffe232b4121f5488079b8e757161170cea0d9"
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
+1 -2
View File
@@ -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
+2 -1
View File
@@ -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
+8 -8
View File
@@ -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`
+9 -9
View File
@@ -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
+4 -3
View File
@@ -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 -1
View File
@@ -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"
+1 -1
View File
@@ -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"
+1
View File
@@ -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
-11
View File
@@ -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
+1 -1
View File
@@ -92,7 +92,7 @@ module Homebrew
def make_request(path, data, auth)
headers = {
"User-Agent" => HOMEBREW_USER_AGENT,
"User-Agent" => HOMEBREW_USER_AGENT_CURL,
"Accept" => "application/vnd.github.v3+json",
"Content-Type" => "application/json"
}
+19
View File
@@ -39,4 +39,23 @@ module Homebrew
def help_s
HOMEBREW_HELP
end
def help_for_command(cmd)
cmd_path = if File.exist?(HOMEBREW_LIBRARY_PATH/"cmd/#{cmd}.sh")
HOMEBREW_LIBRARY_PATH/"cmd/#{cmd}.sh"
elsif ARGV.homebrew_developer? && File.exist?(HOMEBREW_LIBRARY_PATH/"dev-cmd/#{cmd}.sh")
HOMEBREW_LIBRARY_PATH/"dev-cmd/#{cmd}.sh"
elsif File.exist?(HOMEBREW_LIBRARY_PATH/"cmd/#{cmd}.rb")
HOMEBREW_LIBRARY_PATH/"cmd/#{cmd}.rb"
elsif ARGV.homebrew_developer? && File.exist?(HOMEBREW_LIBRARY_PATH/"dev-cmd/#{cmd}.rb")
HOMEBREW_LIBRARY_PATH/"dev-cmd/#{cmd}.rb"
end
return if cmd_path.nil?
cmd_path.read.
split("\n").
grep(/^#:/).
map { |line| line.slice(2..-1).delete("`").sub(/^ \* /, "brew ") }.
join("\n")
end
end
+28 -8
View File
@@ -25,15 +25,35 @@ module Homebrew
puts "Writing HTML fragments to #{DOC_PATH}"
puts "Writing manpages to #{TARGET_PATH}"
target_file = nil
Dir["#{SOURCE_PATH}/*.md"].each do |source_file|
target_html = DOC_PATH/"#{File.basename(source_file, ".md")}.html"
safe_system "ronn --fragment --pipe --organization='Tigerbrew' --manual='brew' #{source_file} > #{target_html}"
target_man = TARGET_PATH/File.basename(source_file, ".md")
safe_system "ronn --roff --pipe --organization='Tigerbrew' --manual='brew' #{source_file} > #{target_man}"
end
header = (SOURCE_PATH/"header.1.md").read
footer = (SOURCE_PATH/"footer.1.md").read
sub_commands = Pathname.glob("#{HOMEBREW_LIBRARY_PATH}/cmd/*.{rb,sh}").
sort_by { |source_file| source_file.basename.sub(/\.(rb|sh)$/, "") }.
map { |source_file|
source_file.read.
split("\n").
grep(/^#:/).
map { |line| line.slice(2..-1) }.
join("\n")
}.
reject { |s| s.strip.empty? }.
join("\n\n")
system "man", target_file if ARGV.flag? "--verbose"
target_md = SOURCE_PATH/"brew.1.md"
target_md.atomic_write(header + sub_commands + footer)
args = %W[
--pipe
--organization=Tigerbrew
--manual=brew
#{SOURCE_PATH}/brew.1.md
]
target_html = DOC_PATH/"brew.1.html"
target_html.atomic_write Utils.popen_read("ronn", "--fragment", *args)
target_man = TARGET_PATH/"brew.1"
target_man.atomic_write Utils.popen_read("ronn", "--roff", *args)
end
end
end
+44
View File
@@ -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
}
+233
View File
@@ -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
}
+2 -2
View File
@@ -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
View File
@@ -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"))
+32
View File
@@ -0,0 +1,32 @@
#: * `linkage` [`--test`] [`--reverse`] <formula>:
#: Checks the library links of an installed formula.
#:
#: Only works on installed formulae. An error is raised if it is run on
#: uninstalled formulae.
#:
#: If `--test` is passed, only display missing libraries and exit with a
#: non-zero exit code if any missing libraries were found.
#:
#: If `--reverse` is passed, print the dylib followed by the binaries
#: which link to it for each library the keg references.
require "os/mac/linkage_checker"
module Homebrew
module_function
def linkage
ARGV.kegs.each do |keg|
ohai "Checking #{keg.name} linkage" if ARGV.kegs.size > 1
result = LinkageChecker.new(keg)
if ARGV.include?("--test")
result.display_test_output
Homebrew.failed = true if result.broken_dylibs?
elsif ARGV.include?("--reverse")
result.display_reverse_output
else
result.display_normal_output
end
end
end
end
+1 -1
View File
@@ -200,7 +200,7 @@ module Stdenv
self["CPATH"] = "#{HOMEBREW_PREFIX}/include"
prepend "LDFLAGS", "-L#{HOMEBREW_PREFIX}/lib"
if (sdk = MacOS.sdk_path(version)) && !MacOS::CLT.installed? || Hardware::CPU.ppc?
if (sdk = MacOS.sdk_path(version)) && !MacOS::CLT.installed?
# Extra setup to support Xcode 4.3+ without CLT.
self["SDKROOT"] = sdk
# Tell clang/gcc where system include's are:
+2 -11
View File
@@ -280,17 +280,8 @@ class Pathname
end
def sha256
if MacOS.version == :tiger
sha256_vendored_sha2
else
require "digest/sha2"
incremental_hash(Digest::SHA2)
end
end
def sha256_vendored_sha2
str = Open3.popen3("#{HOMEBREW_REPOSITORY}/Library/Homebrew/vendor/sha256", "-256", self.to_s) {|_, stdout, _| stdout.read.chomp}
str.match(/= ((\d|[a-z])+)/).captures.first
require "digest/sha2"
incremental_hash(Digest::SHA256)
end
def verify_checksum(expected)
+5 -2
View File
@@ -17,7 +17,7 @@ require "extend/leopard" if RUBY_VERSION <= "1.8.6"
ARGV.extend(HomebrewArgvExtension)
HOMEBREW_VERSION = "0.9.5"
HOMEBREW_VERSION = ENV["HOMEBREW_VERSION"]
HOMEBREW_WWW = "https://github.com/mistydemeo/tigerbrew"
require "config"
@@ -43,7 +43,10 @@ else
end
HOMEBREW_GITHUB_API_TOKEN = ENV["HOMEBREW_GITHUB_API_TOKEN"]
HOMEBREW_USER_AGENT = "Tigerbrew #{HOMEBREW_VERSION} (Ruby #{RUBY_VERSION}; #{OS_VERSION})"
HOMEBREW_USER_AGENT_CURL = ENV["HOMEBREW_USER_AGENT_CURL"]
ruby_version = "#{RUBY_VERSION}#{"-p#{RUBY_PATCHLEVEL}" if defined? RUBY_PATCHLEVEL}"
HOMEBREW_USER_AGENT_RUBY = "#{ENV["HOMEBREW_USER_AGENT"]} ruby/#{ruby_version}"
HOMEBREW_CURL_ARGS = "-f#LA"
+8
View File
@@ -7,12 +7,20 @@ module OS
/linux/i === RUBY_PLATFORM
end
::OS_VERSION = ENV["HOMEBREW_OS_VERSION"]
if OS.mac?
require "os/mac"
ISSUES_URL = "https://github.com/mistydemeo/tigerbrew/wiki/troubleshooting"
PATH_OPEN = "/usr/bin/open"
# compatibility
::MACOS_FULL_VERSION = OS::Mac.full_version.to_s
::MACOS_VERSION = OS::Mac.version.to_s
elsif OS.linux?
ISSUES_URL = "https://github.com/Homebrew/linuxbrew/wiki/troubleshooting"
PATH_OPEN = "xdg-open"
# compatibility
::MACOS_FULL_VERSION = ::MACOS_VERSION = "0"
else
raise "Unknown operating system"
end
+7 -3
View File
@@ -12,7 +12,13 @@ module OS
# This can be compared to numerics, strings, or symbols
# using the standard Ruby Comparable methods.
def version
@version ||= Version.new(MACOS_VERSION)
@version ||= Version.new(full_version.to_s[/10\.\d+/])
end
# This can be compared to numerics, strings, or symbols
# using the standard Ruby Comparable methods.
def full_version
@full_version ||= Version.new(ENV["HOMEBREW_OSX_VERSION"].chomp)
end
def cat
@@ -80,8 +86,6 @@ module OS
opts << "#{Xcode.prefix}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX#{v}.sdk"
# Xcode < 4.3 style
opts << "/Developer/SDKs/MacOSX#{v}.sdk"
# Tiger-style
opts << "/Developer/SDKs/MacOSX#{v}u.sdk"
@sdk_path[key] = opts.map { |a| Pathname.new(a) }.detect(&:directory?)
end
end
+142
View File
@@ -0,0 +1,142 @@
require "set"
require "keg"
require "formula"
class LinkageChecker
attr_reader :keg, :formula
attr_reader :brewed_dylibs, :system_dylibs, :broken_dylibs, :variable_dylibs
attr_reader :undeclared_deps, :reverse_links
def initialize(keg, formula = nil)
@keg = keg
@formula = formula || resolve_formula(keg)
@brewed_dylibs = Hash.new { |h, k| h[k] = Set.new }
@system_dylibs = Set.new
@broken_dylibs = Set.new
@variable_dylibs = Set.new
@undeclared_deps = []
@reverse_links = Hash.new { |h, k| h[k] = Set.new }
check_dylibs
end
def check_dylibs
@keg.find do |file|
next if file.symlink? || file.directory?
next unless file.dylib? || file.mach_o_executable? || file.mach_o_bundle?
# weakly loaded dylibs may not actually exist on disk, so skip them
# when checking for broken linkage
file.dynamically_linked_libraries.each do |dylib|
@reverse_links[dylib] << file
if dylib.start_with? "@"
@variable_dylibs << dylib
else
begin
owner = Keg.for Pathname.new(dylib)
rescue NotAKegError
@system_dylibs << dylib
rescue Errno::ENOENT
@broken_dylibs << dylib
else
tap = Tab.for_keg(owner).tap
f = if tap.nil? || tap.core_tap?
owner.name
else
"#{tap}/#{owner.name}"
end
@brewed_dylibs[f] << dylib
end
end
end
end
@undeclared_deps = check_undeclared_deps if formula
end
def check_undeclared_deps
filter_out = proc do |dep|
next true if dep.build?
next false unless dep.optional? || dep.recommended?
formula.build.without?(dep)
end
declared_deps = formula.deps.reject { |dep| filter_out.call(dep) }.map(&:name)
declared_requirement_deps = formula.requirements.reject { |req| filter_out.call(req) }.map(&:default_formula).compact
declared_dep_names = (declared_deps + declared_requirement_deps).map { |dep| dep.split("/").last }
undeclared_deps = @brewed_dylibs.keys.select do |full_name|
name = full_name.split("/").last
next false if name == formula.name
!declared_dep_names.include?(name)
end
undeclared_deps.sort do |a, b|
if a.include?("/") && !b.include?("/")
1
elsif !a.include?("/") && b.include?("/")
-1
else
a <=> b
end
end
end
def display_normal_output
display_items "System libraries", @system_dylibs
display_items "Homebrew libraries", @brewed_dylibs
display_items "Variable-referenced libraries", @variable_dylibs
display_items "Missing libraries", @broken_dylibs
display_items "Possible undeclared dependencies", @undeclared_deps
end
def display_reverse_output
return if @reverse_links.empty?
sorted = @reverse_links.sort
sorted.each do |dylib, files|
puts dylib
files.each do |f|
unprefixed = f.to_s.strip_prefix "#{@keg}/"
puts " #{unprefixed}"
end
puts unless dylib == sorted.last[0]
end
end
def display_test_output
display_items "Missing libraries", @broken_dylibs
puts "No broken dylib links" if @broken_dylibs.empty?
end
def broken_dylibs?
!@broken_dylibs.empty?
end
def undeclared_deps?
!@undeclared_deps.empty?
end
private
# Display a list of things.
# Things may either be an array, or a hash of (label -> array)
def display_items(label, things)
return if things.empty?
puts "#{label}:"
if things.is_a? Hash
things.sort.each do |list_label, list|
list.sort.each do |item|
puts " #{item} (#{list_label})"
end
end
else
things.sort.each do |item|
puts " #{item}"
end
end
end
def resolve_formula(keg)
f = Formulary.from_rack(keg.rack)
f.build = Tab.for_keg(keg)
f
rescue FormulaUnavailableError
opoo "Formula unavailable: #{keg.name}"
end
end
+1 -1
View File
@@ -1,7 +1,7 @@
# match expressions when taps are given as ARGS, e.g. someuser/sometap
HOMEBREW_TAP_ARGS_REGEX = %r{^([\w-]+)/(homebrew-)?([\w-]+)$}
# match taps' formulae, e.g. someuser/sometap/someformula
HOMEBREW_TAP_FORMULA_REGEX = %r{^([\w-]+)/([\w-]+)/([\w+-.]+)$}
HOMEBREW_TAP_FORMULA_REGEX = %r{^([\w-]+)/([\w-]+)/([\w+-.@]+)$}
# match core's formulae, e.g. homebrew/homebrew/someformula
HOMEBREW_CORE_FORMULA_REGEX = %r{^homebrew/homebrew/([\w+-.]+)$}i
# match taps' directory paths, e.g. HOMEBREW_LIBRARY/Taps/someuser/sometap
+4 -11
View File
@@ -235,22 +235,15 @@ def quiet_system(cmd, *args)
end
def curl(*args)
brewed_curl = HOMEBREW_PREFIX/"opt/curl/bin/curl"
curl_certs = HOMEBREW_PREFIX/"opt/curl-ca-bundle"
use_curl = MacOS.version <= "10.6" && brewed_curl.exist? && curl_certs.exist?
curl = if use_curl
brewed_curl
else
Pathname.new "/usr/bin/curl"
end
curl = Pathname.new ENV["HOMEBREW_CURL"]
raise "#{curl} is not executable" unless curl.exist? && curl.executable?
flags = HOMEBREW_CURL_ARGS
flags = flags.delete("#") if ARGV.verbose?
args = [flags, HOMEBREW_USER_AGENT, *args]
args = [flags, HOMEBREW_USER_AGENT_CURL, *args]
# See https://github.com/Homebrew/homebrew/issues/6103
args << "--insecure" if MacOS.version < "10.6" unless use_curl
args << "--insecure" if MacOS.version <= "10.6" if ENV["HOMEBREW_CURL"] == "/usr/bin/curl"
args << "--verbose" if ENV["HOMEBREW_CURL_VERBOSE"]
args << "--silent" unless $stdout.tty?
@@ -432,7 +425,7 @@ module GitHub
require "net/https"
headers = {
"User-Agent" => HOMEBREW_USER_AGENT,
"User-Agent" => HOMEBREW_USER_AGENT_RUBY,
"Accept" => "application/vnd.github.v3+json"
}
+57
View File
@@ -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
}
+57
View File
@@ -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
View File
@@ -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
File diff suppressed because it is too large. Load diff
+1
View File
@@ -0,0 +1 @@
7.58.0
+1
View File
@@ -0,0 +1 @@
2.3.3
BIN
View File
Binary file not shown.
-28
View File
@@ -1,28 +0,0 @@
AUTHOR: Aaron D. Gifford - http://www.aarongifford.com/
Copyright (c) 2000-2001, Aaron D. Gifford
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTOR(S) ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTOR(S) BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
+329
View File
@@ -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)
+21 -5
View File
@@ -116,11 +116,27 @@ begin
# It should never affect external commands so they can handle usage
# arguments themselves.
if empty_argv || (help_flag && (cmd.nil? || internal_cmd))
# TODO: - `brew help cmd` should display subcommand help
require "cmd/help"
puts ARGV.usage
exit ARGV.any? ? 0 : 1
if empty_argv
$stderr.puts ARGV.usage
exit 1
elsif help_flag
if cmd.nil?
puts ARGV.usage
exit 0
else
# Handle both internal ruby and shell commands
require "cmd/help"
help_text = Homebrew.help_for_command(cmd)
if help_text.nil?
# External command, let it handle help by itself
elsif help_text.empty?
puts "No help available for #{cmd}"
exit 1
else
puts help_text
exit 0
end
end
end
if internal_cmd
+219
View File
@@ -0,0 +1,219 @@
HOMEBREW_VERSION="0.9.5"
odie() {
if [[ -t 2 ]] # check whether stderr is a tty.
then
echo -ne "\033[4;31mError\033[0m: " >&2 # highlight Error with underline and red color
else
echo -n "Error: " >&2
fi
if [[ $# -eq 0 ]]
then
/bin/cat >&2
else
echo "$*" >&2
fi
exit 1
}
safe_cd() {
cd "$@" >/dev/null || odie "Error: failed to cd to $*!"
}
brew() {
"$HOMEBREW_BREW_FILE" "$@"
}
# Force UTF-8 to avoid encoding issues for users with broken locale settings.
if [[ "$(locale charmap 2> /dev/null)" != "UTF-8" ]]
then
export LC_ALL="en_US.UTF-8"
fi
# Where we store built products; /usr/local/Cellar if it exists,
# otherwise a Cellar relative to the Repository.
if [[ -d "$HOMEBREW_PREFIX/Cellar" ]]
then
HOMEBREW_CELLAR="$HOMEBREW_PREFIX/Cellar"
else
HOMEBREW_CELLAR="$HOMEBREW_REPOSITORY/Cellar"
fi
case "$*" in
--prefix) echo "$HOMEBREW_PREFIX"; exit 0 ;;
--cellar) echo "$HOMEBREW_CELLAR"; exit 0 ;;
--repository|--repo) echo "$HOMEBREW_REPOSITORY"; exit 0 ;;
esac
if [[ "$HOMEBREW_PREFIX" = "/" || "$HOMEBREW_PREFIX" = "/usr" ]]
then
# it may work, but I only see pain this route and don't want to support it
odie "Cowardly refusing to continue at this prefix: $HOMEBREW_PREFIX"
fi
# Users may have these set, pointing the system Ruby
# at non-system gem paths
unset GEM_HOME
unset GEM_PATH
HOMEBREW_SYSTEM="$(uname -s)"
case "$HOMEBREW_SYSTEM" in
Darwin) HOMEBREW_OSX="1";;
Linux) HOMEBREW_LINUX="1";;
esac
HOMEBREW_CURL="/usr/bin/curl"
if [[ -n "$HOMEBREW_OSX" ]]
then
HOMEBREW_PROCESSOR="$(uname -p)"
HOMEBREW_PRODUCT="Homebrew"
HOMEBREW_SYSTEM="Macintosh"
# This is i386 even on x86_64 machines
[[ "$HOMEBREW_PROCESSOR" = "i386" ]] && HOMEBREW_PROCESSOR="Intel"
HOMEBREW_OSX_VERSION="$(/usr/bin/sw_vers -productVersion)"
HOMEBREW_OS_VERSION="Mac OS X $HOMEBREW_OSX_VERSION"
HOMEBREW_OSX_VERSION_NUMERIC="$(printf "%02d%02d%02d" $(echo "${HOMEBREW_OSX_VERSION//./ }"))"
else
HOMEBREW_PROCESSOR="$(uname -m)"
HOMEBREW_PRODUCT="${HOMEBREW_SYSTEM}brew"
[[ -n "$HOMEBREW_LINUX" ]] && HOMEBREW_OS_VERSION="$(lsb_release -sd 2>/dev/null)"
: "${HOMEBREW_OS_VERSION:=$(uname -r)}"
fi
HOMEBREW_USER_AGENT="$HOMEBREW_PRODUCT/$HOMEBREW_VERSION ($HOMEBREW_SYSTEM; $HOMEBREW_PROCESSOR $HOMEBREW_OS_VERSION)"
HOMEBREW_CURL_VERSION="$("$HOMEBREW_CURL" --version 2>/dev/null | head -n1 | /usr/bin/awk '{print $1"/"$2}')"
HOMEBREW_USER_AGENT_CURL="$HOMEBREW_USER_AGENT $HOMEBREW_CURL_VERSION"
if [[ -z "$HOMEBREW_CACHE" ]]
then
HOMEBREW_CACHE="$HOME/Library/Caches/Homebrew"
fi
# Declared in bin/brew
export HOMEBREW_BREW_FILE
export HOMEBREW_PREFIX
export HOMEBREW_REPOSITORY
export HOMEBREW_LIBRARY
# Declared in brew.sh
export HOMEBREW_VERSION
export HOMEBREW_CACHE
export HOMEBREW_CELLAR
export HOMEBREW_SYSTEM
export HOMEBREW_CURL
export HOMEBREW_OS_VERSION
export HOMEBREW_OSX_VERSION
export HOMEBREW_USER_AGENT
export HOMEBREW_USER_AGENT_CURL
if [[ -n "$HOMEBREW_OSX" ]]
then
if [[ -f "/usr/bin/xcode-select" ]] && [[ "$('/usr/bin/xcode-select' --print-path)" = "/" ]]
then
odie <<EOS
Your xcode-select path is currently set to '/'.
This causes the 'xcrun' tool to hang, and can render Homebrew unusable.
If you are using Xcode, you should:
sudo xcode-select -switch /Applications/Xcode.app
Otherwise, you should:
sudo rm -rf /usr/share/xcode-select
EOS
fi
XCRUN_OUTPUT="$(/usr/bin/xcrun clang 2>&1)"
XCRUN_STATUS="$?"
if [[ "$XCRUN_STATUS" -ne 0 && "$XCRUN_OUTPUT" = *license* ]]
then
odie <<EOS
You have not agreed to the Xcode license. Please resolve this by running:
sudo xcodebuild -license
EOS
fi
fi
# Many Pathname operations use getwd when they shouldn't, and then throw
# odd exceptions. Reduce our support burden by showing a user-friendly error.
if [[ ! -d "$(pwd)" ]]
then
odie "The current working directory doesn't exist, cannot proceed."
fi
if [[ "$1" = -v ]]
then
# Shift the -v to the end of the parameter list
shift
set -- "$@" -v
fi
HOMEBREW_ARG_COUNT="$#"
HOMEBREW_COMMAND="$1"
shift
case "$HOMEBREW_COMMAND" in
ls) HOMEBREW_COMMAND="list";;
homepage) HOMEBREW_COMMAND="home";;
-S) HOMEBREW_COMMAND="search";;
up) HOMEBREW_COMMAND="update";;
ln) HOMEBREW_COMMAND="link";;
instal) HOMEBREW_COMMAND="install";; # gem does the same
rm) HOMEBREW_COMMAND="uninstall";;
remove) HOMEBREW_COMMAND="uninstall";;
configure) HOMEBREW_COMMAND="diy";;
abv) HOMEBREW_COMMAND="info";;
dr) HOMEBREW_COMMAND="doctor";;
--repo) HOMEBREW_COMMAND="--repository";;
environment) HOMEBREW_COMMAND="--env";;
--config) HOMEBREW_COMMAND="config";;
esac
if [[ -f "$HOMEBREW_LIBRARY/Homebrew/cmd/$HOMEBREW_COMMAND.sh" ]]; then
HOMEBREW_BASH_COMMAND="$HOMEBREW_LIBRARY/Homebrew/cmd/$HOMEBREW_COMMAND.sh"
elif [[ -n "$HOMEBREW_DEVELOPER" && -f "$HOMEBREW_LIBRARY/Homebrew/dev-cmd/$HOMEBREW_COMMAND.sh" ]]; then
HOMEBREW_BASH_COMMAND="$HOMEBREW_LIBRARY/Homebrew/dev-cmd/$HOMEBREW_COMMAND.sh"
fi
if [[ "$(id -u)" = "0" && "$(/usr/bin/stat -f%u "$HOMEBREW_BREW_FILE")" != "0" ]]
then
case "$HOMEBREW_COMMAND" in
install|reinstall|postinstall|link|pin|update|upgrade|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.
However, this is both not recommended and completely unsupported so do so at
your own risk.
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
# memory before it is run. This makes running a Bash script behave more like
# a Ruby script and avoids hard-to-debug issues if the Bash script is updated
# at the same time as being run.
#
# Hide shellcheck complaint:
# shellcheck source=/dev/null
source "$HOMEBREW_BASH_COMMAND"
{ "homebrew-$HOMEBREW_COMMAND" "$@"; exit $?; }
else
# Unshift command back into argument list (unless argument list was empty).
[[ "$HOMEBREW_ARG_COUNT" -gt 0 ]] && set -- "$HOMEBREW_COMMAND" "$@"
exec "$HOMEBREW_RUBY_PATH" -W0 "$HOMEBREW_LIBRARY/brew.rb" "$@"
fi
+2 -2
View File
@@ -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
-------
+5 -33
View File
@@ -1,15 +1,8 @@
#!/bin/sh
#!/bin/bash
chdir() {
cd "$@" >/dev/null
}
# Force UTF-8 to avoid encoding issues for users with broken locale settings.
if [ "$(locale charmap 2> /dev/null)" != "UTF-8" ]
then
export LC_ALL="en_US.UTF-8"
fi
BREW_FILE_DIRECTORY="$(chdir "${0%/*}" && pwd -P)"
HOMEBREW_BREW_FILE="$BREW_FILE_DIRECTORY/${0##*/}"
@@ -21,29 +14,8 @@ then
chdir "$BREW_SYMLINK_DIRECTORY" && pwd -P)"
fi
BREW_LIBRARY_DIRECTORY="$(chdir "$BREW_FILE_DIRECTORY"/../Library && pwd -P)"
HOMEBREW_PREFIX="$(chdir "$(dirname "$(dirname "$HOMEBREW_BREW_FILE")")" && pwd -P)"
HOMEBREW_REPOSITORY="$(chdir "$BREW_FILE_DIRECTORY"/../ && pwd -P)"
HOMEBREW_LIBRARY="$(chdir "$BREW_FILE_DIRECTORY"/../Library && pwd -P)"
# Users may have these set, pointing the system Ruby
# at non-system gem paths
unset GEM_HOME
unset GEM_PATH
if [ -z "$HOMEBREW_DEVELOPER" ]
then
unset HOMEBREW_RUBY_PATH
fi
if [ -z "$HOMEBREW_RUBY_PATH" ]
then
if [ "$(uname -s)" = "Darwin" ]
then
HOMEBREW_RUBY_PATH="/usr/bin/ruby"
else
HOMEBREW_RUBY_PATH="$(which ruby)"
fi
fi
export HOMEBREW_BREW_FILE
export HOMEBREW_RUBY_PATH
exec "$HOMEBREW_RUBY_PATH" -W0 "$BREW_LIBRARY_DIRECTORY/brew.rb" "$@"
source "$HOMEBREW_LIBRARY/brew.sh"