homebrew-core/Formula/imap-uw.rb
2019-09-11 10:10:16 +02:00

59 lines
2.4 KiB
Ruby

class ImapUw < Formula
# imap-uw is unmaintained software; the author has passed away and there is
# no active successor project.
desc "University of Washington IMAP toolkit"
homepage "https://www.washington.edu/imap/"
url "https://mirrorservice.org/sites/ftp.cac.washington.edu/imap/imap-2007f.tar.gz"
mirror "https://fossies.org/linux/misc/old/imap-2007f.tar.gz"
sha256 "53e15a2b5c1bc80161d42e9f69792a3fa18332b7b771910131004eb520004a28"
revision 1
bottle do
cellar :any
sha256 "19d971ab778840ba44c24c3eef1316d1c65e6e0b6e1540933ad051c77ee745e0" => :mojave
sha256 "8c1c4d2cbbd6df372f258d7cc95b040db4f3c759c8928cfbde7c54da4fa6a426" => :sierra
end
depends_on "openssl@1.1"
# Two patches below are from Debian, to fix OpenSSL 1.1 compatibility
# https://salsa.debian.org/holmgren/uw-imap/tree/master/debian/patches
patch do
url "https://salsa.debian.org/holmgren/uw-imap/raw/master/debian/patches/1006_openssl1.1_autoverify.patch"
sha256 "7c41c4aec4f25546c998593a09386bbb1d6c526ba7d6f65e3f55a17c20644d0a"
end
patch do
url "https://salsa.debian.org/holmgren/uw-imap/raw/master/debian/patches/2014_openssl1.1.1_sni.patch"
sha256 "9db45ba5462292acd04793ac9fa856e332b37506f1e0991960136dff170a2cd3"
end
def install
ENV.deparallelize
inreplace "Makefile" do |s|
s.gsub! "SSLINCLUDE=/usr/include/openssl",
"SSLINCLUDE=#{Formula["openssl@1.1"].opt_include}/openssl"
s.gsub! "SSLLIB=/usr/lib",
"SSLLIB=#{Formula["openssl@1.1"].opt_lib}"
s.gsub! "-DMAC_OSX_KLUDGE=1", ""
end
inreplace "src/osdep/unix/ssl_unix.c", "#include <x509v3.h>\n#include <ssl.h>",
"#include <ssl.h>\n#include <x509v3.h>"
system "make", "oxp"
# email servers:
sbin.install "imapd/imapd", "ipopd/ipop2d", "ipopd/ipop3d"
# mail utilities:
bin.install "dmail/dmail", "mailutil/mailutil", "tmail/tmail"
# c-client library:
# Note: Installing the headers from the root c-client directory is not
# possible because they are symlinks and homebrew dutifully copies them
# as such. Pulling from within the src dir achieves the desired result.
doc.install Dir["docs/*"]
lib.install "c-client/c-client.a" => "libc-client.a"
(include + "imap").install "c-client/osdep.h", "c-client/linkage.h"
(include + "imap").install Dir["src/c-client/*.h", "src/osdep/unix/*.h"]
end
end