├── LICENSE ├── README.md └── mutt.rb /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 Kevin Williams 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # homebrew-patches 2 | 3 | My "taps" for Mac Homebrew formulae which have patches not accepted by homebrew/homebrew. 4 | 5 | ### Usage 6 | 7 | You can access this repository using `brew tap`: 8 | 9 | brew tap kevwil/patches 10 | brew install ... 11 | 12 | Since these formulae will likely have collisions with standard homebrew/homebrew formulae, you can: 13 | 14 | brew install kevwil/patches/ 15 | 16 | ### License 17 | 18 | See [LICENSE](LICENSE) for details. 19 | -------------------------------------------------------------------------------- /mutt.rb: -------------------------------------------------------------------------------- 1 | class Mutt < Formula 2 | desc "Mongrel of mail user agents (part elm, pine, mush, mh, etc.)" 3 | homepage "http://www.mutt.org/" 4 | url "https://bitbucket.org/mutt/mutt/downloads/mutt-1.6.2.tar.gz" 5 | mirror "ftp://ftp.mutt.org/pub/mutt/mutt-1.6.2.tar.gz" 6 | sha256 "c5d02ef06486cdf04f9eeb9e9d7994890d8dfa7f47e7bfeb53a2a67da2ac1d8e" 7 | 8 | head do 9 | url "https://dev.mutt.org/hg/mutt#default", :using => :hg 10 | 11 | resource "html" do 12 | url "https://dev.mutt.org/doc/manual.html", :using => :nounzip 13 | end 14 | end 15 | 16 | #unless Tab.for_name('signing-party').with? 'rename-pgpring' 17 | # conflicts_with 'signing-party', 18 | # :because => 'mutt installs a private copy of pgpring' 19 | #end 20 | 21 | conflicts_with "tin", 22 | :because => "both install mmdf.5 and mbox.5 man pages" 23 | 24 | option "with-debug", "Build with debug option enabled" 25 | option "with-trash-patch", "Apply trash folder patch" 26 | option "with-sidebar-patch", "Apply sidebar patch" 27 | option "with-s-lang", "Build against slang instead of ncurses" 28 | #option "with-ignore-thread-patch", "Apply ignore-thread patch" 29 | #option "with-pgp-verbose-mime-patch", "Apply PGP verbose mime patch" 30 | option "with-confirm-attachment-patch", "Apply confirm attachment patch" 31 | 32 | depends_on "autoconf" => :build 33 | depends_on "automake" => :build 34 | 35 | depends_on "openssl" 36 | depends_on "tokyo-cabinet" 37 | depends_on "gettext" => :optional 38 | depends_on "gpgme" => :optional 39 | depends_on "libidn" => :optional 40 | depends_on 's-lang' => :optional 41 | 42 | patch do 43 | url "http://ftp.openbsd.org/pub/OpenBSD/distfiles/mutt/trashfolder-1.6.0.diff.gz" 44 | sha256 "b779c6df61a77f3069139aad8562b4a47c8eed8ab5b8f5681742a1c2eaa190b8" 45 | end if build.with? "trash-patch" 46 | 47 | patch do 48 | url "http://ftp.openbsd.org/pub/OpenBSD/distfiles/mutt/sidebar-1.6.0.diff.gz" 49 | sha256 "63b6b28d7008b6d52bd98151547b052251cd4bc87e467e47ffebe372dfe7155b" 50 | end if build.with? "sidebar-patch" 51 | 52 | # original source for this went missing, patch sourced from Arch at 53 | # https://aur.archlinux.org/packages/mutt-ignore-thread/ 54 | #patch do 55 | # url "https://gist.githubusercontent.com/mistydemeo/5522742/raw/1439cc157ab673dc8061784829eea267cd736624/ignore-thread-1.5.21.patch" 56 | # sha1 "dbcf5de46a559bca425028a18da0a63d34f722d3" 57 | #end if build.with? "ignore-thread-patch" 58 | 59 | #patch do 60 | # url "http://patch-tracker.debian.org/patch/series/dl/mutt/1.5.21-6.2+deb7u1/features-old/patch-1.5.4.vk.pgp_verbose_mime" 61 | # sha1 "a436f967aa46663cfc9b8933a6499ca165ec0a21" 62 | #end if build.with? "pgp-verbose-mime-patch" 63 | 64 | patch do 65 | url "https://gist.githubusercontent.com/tlvince/5741641/raw/c926ca307dc97727c2bd88a84dcb0d7ac3bb4bf5/mutt-attach.patch" 66 | sha256 "da2c9e54a5426019b84837faef18cc51e174108f07dc7ec15968ca732880cb14" 67 | end if build.with? "confirm-attachment-patch" 68 | 69 | 70 | def install 71 | user_admin = Etc.getgrnam("admin").mem.include?(ENV["USER"]) 72 | 73 | args = %W[ 74 | --disable-dependency-tracking 75 | --disable-warnings 76 | --prefix=#{prefix} 77 | --with-ssl=#{Formula['openssl'].opt_prefix} 78 | --with-sasl 79 | --with-gss 80 | --enable-imap 81 | --enable-smtp 82 | --enable-pop 83 | --enable-hcache 84 | --with-tokyocabinet 85 | ] 86 | 87 | # This is just a trick to keep 'make install' from trying 88 | # to chgrp the mutt_dotlock file (which we can't do if 89 | # we're running as an unprivileged user) 90 | args << "--with-homespool=.mbox" unless user_admin 91 | 92 | args << "--disable-nls" if build.without? "gettext" 93 | args << "--enable-gpgme" if build.with? "gpgme" 94 | args << "--with-slang" if build.with? "s-lang" 95 | 96 | if build.with? "debug" 97 | args << "--enable-debug" 98 | else 99 | args << "--disable-debug" 100 | end 101 | 102 | 103 | system "./prepare", *args 104 | system "make" 105 | 106 | # This permits the `mutt_dotlock` file to be installed under a group 107 | # that isn't `mail`. 108 | # https://github.com/Homebrew/homebrew/issues/45400 109 | if user_admin 110 | inreplace "Makefile", /^DOTLOCK_GROUP =.*$/, "DOTLOCK_GROUP = admin" 111 | end 112 | 113 | system "make", "install" 114 | doc.install resource("html") if build.head? 115 | end 116 | 117 | test do 118 | system bin/"mutt", "-D" 119 | end 120 | end 121 | --------------------------------------------------------------------------------