alpine 2.11

Merges Alpine-chappa into Alpine, following Debian & Ubuntu’s lead,
adds my patch for the Yosemite build failure.

Closes Homebrew/homebrew#33634.
This commit is contained in:
Dominyk Tiller 2014-11-03 23:45:49 +00:00 committed by Mike McQuaid
parent 89b35b834c
commit fbd34113b3
2 changed files with 70 additions and 102 deletions

View file

@ -1,71 +0,0 @@
require "formula"
class AlpineChappa < Formula
homepage "http://patches.freeiz.com/alpine/"
url "http://patches.freeiz.com/alpine/release/src/alpine-2.11.tar.xz"
sha1 "656556f5d2e5ec7e3680d1760cd02aa3a0072c46"
revision 1
bottle do
revision 1
sha1 "13ca00b366d11374431dbcf964a3c41360f14615" => :mavericks
sha1 "1a2169f175e1810dc647c4c48272a697510161ce" => :mountain_lion
sha1 "d8915dedd732097b35c485706bd7a33ad5f6d733" => :lion
end
depends_on "openssl"
conflicts_with "alpine", :because => "both install an `alpine` binary"
# 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
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
# Two patches that fix build problems:
# 1. Don't hardcode OpenSSL location in imap Makefile. Homebrew-specific, so
# not submitted upstream. Submitted upstream to chappa@gmx.com.
# 2. #ifdef DEBUG for stray use of global debug level var in web-alpine LDAP
# module. Submitted upstream to chappa@gmx.com.
patch :DATA
def install
ENV.j1
system "./configure", "--disable-debug",
"--with-ssl-dir=#{Formula['openssl'].prefix}",
"--with-ssl-certs-dir=#{etc}/openssl",
"--prefix=#{prefix}"
system "make", "install"
end
end
__END__
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 */
for(i = 1 ; i < argc; i++){
if(*argv[i] == '-'){

View file

@ -1,48 +1,87 @@
require 'formula'
require "formula"
class Alpine < Formula
homepage 'http://www.washington.edu/alpine/'
url 'ftp://ftp.cac.washington.edu/alpine/alpine-2.00.tar.gz'
sha1 '363b3aa5d3eb1319e168639fbbc42b033b16f15b'
homepage "http://patches.freeiz.com/alpine/"
url "http://patches.freeiz.com/alpine/release/src/alpine-2.11.tar.xz"
sha1 "656556f5d2e5ec7e3680d1760cd02aa3a0072c46"
bottle do
sha1 "13ca00b366d11374431dbcf964a3c41360f14615" => :mavericks
sha1 "1a2169f175e1810dc647c4c48272a697510161ce" => :mountain_lion
sha1 "d8915dedd732097b35c485706bd7a33ad5f6d733" => :lion
end
depends_on "openssl"
# 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
patch do
url "https://trac.macports.org/export/89747/trunk/dports/mail/alpine/files/alpine-osx-10.6.patch"
sha1 "8cc6b95b6aba844ceef8454868b8f2c205de9792"
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
# Fails to build against Tcl 8.6; reported upstream:
# http://mailman2.u.washington.edu/pipermail/alpine-info/2013-September/005291.html
# 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.
patch do
url "https://raw.githubusercontent.com/DomT4/scripts/master/Homebrew_Resources/Alpine/tclfix.diff"
sha1 "5dec826ebf05996a4efac0249417f9b837c71fad"
end
# 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.
patch :DATA
def install
ENV.j1
system "./configure", "--disable-debug",
"--prefix=#{prefix}",
"--with-ssl-include-dir=/usr/include/openssl"
system "make install"
"--with-ssl-dir=#{Formula["openssl"].prefix}",
"--with-ssl-certs-dir=#{etc}/openssl",
"--prefix=#{prefix}"
system "make", "install"
end
test do
system "#{bin}/alpine", "-supported"
end
end
__END__
diff --git a/web/src/alpined.d/alpined.c b/web/src/alpined.d/alpined.c
index 98c5a63..d2c63b5 100644
--- a/web/src/alpined.d/alpined.c
+++ b/web/src/alpined.d/alpined.c
@@ -751,10 +751,10 @@ main(int argc, char *argv[])
}
switch(Tcl_Eval(interp, &buf[co])){
- case TCL_OK : peReturn(cs, "OK", interp->result); break;
- case TCL_ERROR : peReturn(cs, "ERROR", interp->result); break;
- case TCL_BREAK : peReturn(cs, "BREAK", interp->result); break;
- case TCL_RETURN : peReturn(cs, "RETURN", interp->result); break;
+ case TCL_OK : peReturn(cs, "OK", Tcl_GetStringResult(interp)); break;
+ case TCL_ERROR : peReturn(cs, "ERROR", Tcl_GetStringResult(interp)); break;
+ case TCL_BREAK : peReturn(cs, "BREAK", Tcl_GetStringResult(interp)); break;
+ case TCL_RETURN : peReturn(cs, "RETURN", Tcl_GetStringResult(interp)); break;
default : peReturn(cs, "BOGUS", "eval returned unexpected value"); break;
}
}
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 */
for(i = 1 ; i < argc; i++){
if(*argv[i] == '-'){