aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcsmk <csmk@cmsrv.org>2015-12-27 15:57:33 +0900
committercsmk <csmk@cmsrv.org>2015-12-27 15:57:33 +0900
commit44671c673d48c86f05318d5d7c861d6aab4fed4d (patch)
treef580962b9d8c3b7e075324e672a4e6013173cfce /mail-filter
parentAdd mail-filter/spamassassin for LibreSSL >= 2.3.0 (diff)
downloadlibressl-44671c673d48c86f05318d5d7c861d6aab4fed4d.tar.gz
libressl-44671c673d48c86f05318d5d7c861d6aab4fed4d.tar.bz2
libressl-44671c673d48c86f05318d5d7c861d6aab4fed4d.zip
Add mail-filter/imapfilter for LibreSSL >= 2.3.0
Diffstat (limited to 'mail-filter')
-rw-r--r--mail-filter/imapfilter/Manifest1
-rw-r--r--mail-filter/imapfilter/files/imapfilter-2.5.7-no-ssl3.patch53
-rw-r--r--mail-filter/imapfilter/imapfilter-2.5.7-r2.ebuild46
-rw-r--r--mail-filter/imapfilter/metadata.xml8
4 files changed, 108 insertions, 0 deletions
diff --git a/mail-filter/imapfilter/Manifest b/mail-filter/imapfilter/Manifest
new file mode 100644
index 0000000..bc205af
--- /dev/null
+++ b/mail-filter/imapfilter/Manifest
@@ -0,0 +1 @@
+DIST imapfilter-2.5.7.tar.gz 54861 SHA256 c792d6a3a187cdc14fc38470837b45722a3750dabd2c6f71672806eeef79fad0 SHA512 9297e98812312fbf2c92aa5477bdfecb522048e45b4bc4922e312bd89a72b020a98f5547e3f0882ae665c24db21e6995eda839b762947adc48bc413ab0c882f1 WHIRLPOOL 514507840c9bc4d53823e5233704fb60815fc964bd938acd6bffe7457d786892ba259e84894a3e51e43a710346b55ab9cc4113bbfdf9b66a984438138b37faf0
diff --git a/mail-filter/imapfilter/files/imapfilter-2.5.7-no-ssl3.patch b/mail-filter/imapfilter/files/imapfilter-2.5.7-no-ssl3.patch
new file mode 100644
index 0000000..cc2d34c
--- /dev/null
+++ b/mail-filter/imapfilter/files/imapfilter-2.5.7-no-ssl3.patch
@@ -0,0 +1,53 @@
+--- src/imapfilter.c.orig 2014-11-17 00:36:40.000000000 +0000
++++ src/imapfilter.c 2015-12-27 11:04:14.643145411 +0000
+@@ -21,7 +21,10 @@
+
+ extern buffer ibuf, obuf, nbuf, cbuf;
+ extern regexp responses[];
+-extern SSL_CTX *ssl3ctx, *ssl23ctx, *tls1ctx;
++extern SSL_CTX *ssl23ctx, *tls1ctx;
++#ifndef OPENSSL_NO_SSL3_METHOD
++extern SSL_CTX *ssl3ctx;
++#endif
+ #if OPENSSL_VERSION_NUMBER >= 0x01000100fL
+ extern SSL_CTX *tls11ctx, *tls12ctx;
+ #endif
+@@ -51,7 +54,7 @@
+ opts.config = NULL;
+ opts.oneline = NULL;
+ opts.debug = NULL;
+- opts.truststore = "/etc/ssl/certs";
++ opts.truststore = "/etc/ssl/cert.pem";
+
+ env.home = NULL;
+ env.pathmax = -1;
+@@ -108,7 +111,9 @@
+
+ SSL_library_init();
+ SSL_load_error_strings();
++#ifndef OPENSSL_NO_SSL3_METHOD
+ ssl3ctx = SSL_CTX_new(SSLv3_client_method());
++#endif
+ ssl23ctx = SSL_CTX_new(SSLv23_client_method());
+ tls1ctx = SSL_CTX_new(TLSv1_client_method());
+ #if OPENSSL_VERSION_NUMBER >= 0x01000100fL
+@@ -116,7 +121,9 @@
+ tls12ctx = SSL_CTX_new(TLSv1_2_client_method());
+ #endif
+ if (exists_dir(opts.truststore)) {
++#ifndef OPENSSL_NO_SSL3_METHOD
+ SSL_CTX_load_verify_locations(ssl3ctx, NULL, opts.truststore);
++#endif
+ SSL_CTX_load_verify_locations(ssl23ctx, NULL, opts.truststore);
+ SSL_CTX_load_verify_locations(tls1ctx, NULL, opts.truststore);
+ #if OPENSSL_VERSION_NUMBER >= 0x01000100fL
+@@ -142,7 +149,9 @@
+ #endif
+ stop_lua();
+
++#ifndef OPENSSL_NO_SSL3_METHOD
+ SSL_CTX_free(ssl3ctx);
++#endif
+ SSL_CTX_free(ssl23ctx);
+ SSL_CTX_free(tls1ctx);
+ #if OPENSSL_VERSION_NUMBER >= 0x01000100fL
diff --git a/mail-filter/imapfilter/imapfilter-2.5.7-r2.ebuild b/mail-filter/imapfilter/imapfilter-2.5.7-r2.ebuild
new file mode 100644
index 0000000..92a05aa
--- /dev/null
+++ b/mail-filter/imapfilter/imapfilter-2.5.7-r2.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="An IMAP mail filtering utility"
+HOMEPAGE="http://imapfilter.hellug.gr"
+SRC_URI="https://github.com/lefcha/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+IUSE="libressl"
+
+RDEPEND="
+ !libressl? ( dev-libs/openssl:0 )
+ libressl? ( dev-libs/libressl )
+ dev-libs/libpcre
+ dev-lang/lua:*"
+DEPEND="${RDEPEND}"
+
+DOCS="AUTHORS NEWS README samples/*"
+
+src_prepare() {
+ # Fix for LibreSSL >= 2.3.0
+ epatch "${FILESDIR}"/${PN}-2.5.7-no-ssl3.patch
+
+ sed -i -e "/^PREFIX/s:/usr/local:${EPREFIX}/usr:" \
+ -e "/^MANDIR/s:man:share/man:" \
+ -e "/^CFLAGS/s:CFLAGS =:CFLAGS +=:" \
+ -e "/^CFLAGS/s/-O//" \
+ src/Makefile || die
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}"
+}
+
+src_install() {
+ default
+ doman doc/imapfilter.1 doc/imapfilter_config.5
+}
diff --git a/mail-filter/imapfilter/metadata.xml b/mail-filter/imapfilter/metadata.xml
new file mode 100644
index 0000000..389142a
--- /dev/null
+++ b/mail-filter/imapfilter/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>net-mail</herd>
+ <upstream>
+ <remote-id type="github">lefcha/imapfilter</remote-id>
+ </upstream>
+</pkgmetadata>