2014-11-03 23:45:49 +00:00
|
|
|
require "formula"
|
2010-03-16 04:25:50 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Alpine < Formula
|
2014-11-03 23:45:49 +00:00
|
|
|
homepage "http://patches.freeiz.com/alpine/"
|
|
|
|
url "http://patches.freeiz.com/alpine/release/src/alpine-2.11.tar.xz"
|
|
|
|
sha1 "656556f5d2e5ec7e3680d1760cd02aa3a0072c46"
|
|
|
|
|
|
|
|
bottle do
|
2014-11-04 23:32:47 +00:00
|
|
|
sha1 "51fb44fd30777e0a64924689978e4f2d795176a5" => :yosemite
|
|
|
|
sha1 "70ff0f3bf57301618a5e62eee32949626fe944e0" => :mavericks
|
|
|
|
sha1 "bf5133161a796b895e07d0637ea4beae5457a96c" => :mountain_lion
|
2014-11-03 23:45:49 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
depends_on "openssl"
|
2010-03-16 04:25:50 +00:00
|
|
|
|
2014-03-16 23:54:12 +00:00
|
|
|
# Upstream builds are broken on Snow Leopard due to a hack put in for prior
|
|
|
|
# versions of OS X. See: http://trac.macports.org/ticket/20971
|
2014-11-03 23:45:49 +00:00
|
|
|
if MacOS.version >= :snow_leopard
|
|
|
|
patch do
|
|
|
|
url "https://trac.macports.org/export/89747/trunk/dports/mail/alpine/files/alpine-osx-10.6.patch"
|
|
|
|
sha1 "8cc6b95b6aba844ceef8454868b8f2c205de9792"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
# Patch to fix Yosemite compile necessary due to different language in mach.h on 10.10.
|
|
|
|
# Upstream reply: https://gist.github.com/DomT4/6a73cd8c6f8678d79479
|
|
|
|
# Should be fixed in next stable release & can remove then. (Test first, though).
|
|
|
|
if MacOS.version >= :yosemite
|
|
|
|
patch do
|
|
|
|
url "https://raw.githubusercontent.com/DomT4/scripts/master/Homebrew_Resources/Alpine/yosemitemountains.diff"
|
|
|
|
sha1 "04eddec32fe9a6d5cbbe9ed5d2980d428f84b56a"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
# Patch for tcl issues when Alpine is built against TCL 8.6.
|
|
|
|
# Submitted upstream by Misty De Meo.
|
2014-03-16 23:54:12 +00:00
|
|
|
patch do
|
2014-11-03 23:45:49 +00:00
|
|
|
url "https://raw.githubusercontent.com/DomT4/scripts/master/Homebrew_Resources/Alpine/tclfix.diff"
|
|
|
|
sha1 "5dec826ebf05996a4efac0249417f9b837c71fad"
|
2013-09-15 16:39:15 +00:00
|
|
|
end
|
2010-03-16 04:25:50 +00:00
|
|
|
|
2014-11-03 23:45:49 +00:00
|
|
|
# Two patches that fix build problems:
|
|
|
|
# 1. Don't hardcode OpenSSL location in imap Makefile. Homebrew-specific.
|
|
|
|
# 2. #ifdef DEBUG for stray use of global debug level var in web-alpine LDAP module.
|
|
|
|
# These are both fixed in the Alpha release of Alpine & will be in the next stable release.
|
2014-03-16 23:54:12 +00:00
|
|
|
patch :DATA
|
|
|
|
|
2011-04-08 18:16:37 +00:00
|
|
|
def install
|
2010-03-16 04:25:50 +00:00
|
|
|
ENV.j1
|
2011-04-08 18:16:37 +00:00
|
|
|
system "./configure", "--disable-debug",
|
2014-11-03 23:45:49 +00:00
|
|
|
"--with-ssl-dir=#{Formula["openssl"].prefix}",
|
|
|
|
"--with-ssl-certs-dir=#{etc}/openssl",
|
|
|
|
"--prefix=#{prefix}"
|
|
|
|
system "make", "install"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
system "#{bin}/alpine", "-supported"
|
2010-03-16 04:25:50 +00:00
|
|
|
end
|
|
|
|
end
|
2013-09-11 05:38:36 +00:00
|
|
|
|
|
|
|
__END__
|
2014-11-03 23:45:49 +00:00
|
|
|
diff -ur alpine-2.11.OLD/imap/Makefile alpine-2.11.NEW/imap/Makefile
|
|
|
|
--- alpine-2.11.OLD/imap/Makefile 2013-08-15 00:36:13.000000000 -0400
|
|
|
|
+++ alpine-2.11.NEW/imap/Makefile 2014-04-09 16:37:45.000000000 -0400
|
|
|
|
@@ -427,7 +427,7 @@
|
|
|
|
$(TOUCH) ip6
|
|
|
|
$(BUILD) BUILDTYPE=osx IP=$(IP6) EXTRAAUTHENTICATORS="$(EXTRAAUTHENTICATORS) gss" \
|
|
|
|
PASSWDTYPE=pam \
|
|
|
|
- SPECIALS="SSLINCLUDE=/usr/include/openssl SSLLIB=/usr/lib SSLCERTS=/System/Library/OpenSSL/certs SSLKEYS=/System/Library/OpenSSL/private GSSINCLUDE=/usr/include GSSLIB=/usr/lib PAMDLFLAGS=-lpam"
|
|
|
|
+ SPECIALS="GSSINCLUDE=/usr/include GSSLIB=/usr/lib PAMDLFLAGS=-lpam"
|
|
|
|
|
|
|
|
osx: osxok an
|
|
|
|
$(TOUCH) ip6
|
|
|
|
diff -urN alpine-2.11.OLD/web/src/alpined.d/alpineldap.c alpine-2.11.NEW/web/src/alpined.d/alpineldap.c
|
|
|
|
--- alpine-2.11.OLD/web/src/alpined.d/alpineldap.c 2013-08-15 00:36:01.000000000 -0400
|
|
|
|
+++ alpine-2.11.NEW/web/src/alpined.d/alpineldap.c 2014-02-06 11:47:22.000000000 -0500
|
|
|
|
@@ -106,7 +106,9 @@
|
|
|
|
pine_state = new_pine_struct();
|
|
|
|
ps_global = pine_state;
|
|
|
|
vars = ps_global->vars;
|
|
|
|
+#ifdef DEBUG
|
|
|
|
debug = 0;
|
|
|
|
+#endif /* DEBUG */
|
2013-09-11 05:38:36 +00:00
|
|
|
|
2014-11-03 23:45:49 +00:00
|
|
|
for(i = 1 ; i < argc; i++){
|
|
|
|
if(*argv[i] == '-'){
|