Adding patches to make fdm build using OpenSSL 1.1

This commit is contained in:
Gerardo J. Puerta Cardelles
2019-06-04 13:58:09 +02:00
parent 6abe42487b
commit ac90cb8c8a
7 changed files with 230 additions and 0 deletions

3
net-mail/fdm/Manifest Normal file
View File

@ -0,0 +1,3 @@
DIST fdm-1.7.tar.gz 199808 SHA512 d438c96b1d3bdf08d14cfbb3b78ab5180e6bbc32121b7dfdd47ac14a4f8a19d1309f7742f78cc9db2d68b64b3422ec96f8f729931168d2fc411c36d0cc3e9386
DIST fdm-1.8.tar.gz 193220 SHA512 eaf868628c7c98385804ebdcf1756547ee487109fe02ca3d8177eb25ebdc4c61e6d4ad820c52fd9e39ac4d2f93408aa6787446e8330a87a6cb75da2be0b5f337
DIST fdm-1.9.tar.gz 299916 SHA512 e7e5c8aae8be3e82ff6015d2d87fd9d0dad4fe24796b4f30d6874f761e2df6900c8940d39de28bb2db6ee3ea3faf494c57149037657d986a3b54db3a6a601ca7

View File

@ -0,0 +1,47 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
inherit eutils multilib toolchain-funcs user
DESCRIPTION="fetch, filter and deliver mail"
HOMEPAGE="http://fdm.sourceforge.net"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE="courierauth examples pcre"
DEPEND="dev-libs/openssl:0
sys-libs/tdb
courierauth? ( net-libs/courier-authlib )
pcre? ( dev-libs/libpcre )"
RDEPEND="${DEPEND}"
pkg_setup() {
enewuser _fdm
}
src_prepare() {
rm Makefile || die
sed -e '/^FDEBUG=/s:=.*:=:' \
-e "/ifdef COURIER/aLIBS+=-L/usr/$(get_libdir)/courier-authlib" \
-i GNUmakefile || die
}
src_compile() {
emake CC="$(tc-getCC)" \
COURIER=$(use courierauth && echo 1) \
PCRE=$(use pcre && echo 1)
}
src_install() {
emake DESTDIR="${D}" PREFIX=/usr MANDIR=/usr/share/man install
dodoc CHANGES README TODO
if use examples ; then
docinto examples
dodoc examples/*
fi
}

View File

@ -0,0 +1,48 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
inherit eutils multilib toolchain-funcs user
DESCRIPTION="fetch, filter and deliver mail"
HOMEPAGE="https://github.com/nicm/fdm"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="courierauth examples pcre"
DEPEND="dev-libs/openssl:0
sys-libs/tdb
courierauth? ( net-libs/courier-authlib )
pcre? ( dev-libs/libpcre )"
RDEPEND="${DEPEND}"
pkg_setup() {
enewuser _fdm
}
src_prepare() {
rm Makefile || die
sed -e '/^FDEBUG=/s:=.*:=:' \
-e "/ifdef COURIER/aLIBS+=-L${EROOT}usr/$(get_libdir)/courier-authlib" \
-e '/CPPFLAGS/s: -I/usr/local/include : :' \
-i GNUmakefile || die
}
src_compile() {
emake CC="$(tc-getCC)" \
COURIER=$(use courierauth && echo 1) \
PCRE=$(use pcre && echo 1)
}
src_install() {
emake DESTDIR="${D}" PREFIX=/usr MANDIR=/usr/share/man install
dodoc CHANGES README TODO MANUAL
if use examples ; then
docinto examples
dodoc examples/*
fi
}

View File

@ -0,0 +1,48 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
inherit eutils multilib toolchain-funcs user autotools
DESCRIPTION="fetch, filter and deliver mail"
HOMEPAGE="https://github.com/nicm/fdm"
SRC_URI="https://github.com/nicm/fdm/releases/download/${PV}/${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="courierauth examples libressl pcre"
DEPEND="!libressl? ( dev-libs/openssl:0= )
libressl? ( dev-libs/libressl:0= )
sys-libs/tdb
courierauth? ( net-libs/courier-authlib )
pcre? ( dev-libs/libpcre )"
RDEPEND="${DEPEND}"
pkg_setup() {
enewuser _fdm
}
src_prepare() {
epatch "${FILESDIR}/openssl-1.1.patch"
eautomake
eaclocal
eautoreconf
}
src_compile() {
emake CC="$(tc-getCC)" \
COURIER=$(use courierauth && echo 1) \
PCRE=$(use pcre && echo 1)
}
src_install() {
emake DESTDIR="${D}" PREFIX=/usr MANDIR=/usr/share/man install
dodoc CHANGES README TODO MANUAL
if use examples ; then
docinto examples
dodoc examples/*
fi
}

View File

@ -0,0 +1,41 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
inherit eutils multilib toolchain-funcs user
DESCRIPTION="fetch, filter and deliver mail"
HOMEPAGE="https://github.com/nicm/fdm"
SRC_URI="https://github.com/nicm/fdm/releases/download/${PV}/${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="courierauth examples libressl pcre"
DEPEND="!libressl? ( dev-libs/openssl:0= )
libressl? ( dev-libs/libressl:0= )
sys-libs/tdb
courierauth? ( net-libs/courier-authlib )
pcre? ( dev-libs/libpcre )"
RDEPEND="${DEPEND}"
pkg_setup() {
enewuser _fdm
}
src_compile() {
emake CC="$(tc-getCC)" \
COURIER=$(use courierauth && echo 1) \
PCRE=$(use pcre && echo 1)
}
src_install() {
emake DESTDIR="${D}" PREFIX=/usr MANDIR=/usr/share/man install
dodoc CHANGES README TODO MANUAL
if use examples ; then
docinto examples
dodoc examples/*
fi
}

View File

@ -0,0 +1,28 @@
diff -ruN fdm-1.9.orig/configure.ac fdm-1.9/configure.ac
--- fdm-1.9.orig/configure.ac 2015-06-05 20:30:34.000000000 +0200
+++ fdm-1.9/configure.ac 2019-06-04 13:41:51.686892288 +0200
@@ -83,7 +83,7 @@
AC_MSG_ERROR("libcrypto not found")
fi
AC_SEARCH_LIBS(
- SSL_library_init,
+ SSL_SESSION_new,
[ssl],
found_libssl=yes,
found_libssl=no
diff -ruN fdm-1.9.orig/fdm.c fdm-1.9/fdm.c
--- fdm-1.9.orig/fdm.c 2015-09-14 16:40:25.000000000 +0200
+++ fdm-1.9/fdm.c 2019-06-04 13:44:42.559415945 +0200
@@ -717,8 +717,12 @@
}
conf.lock_file = lock;
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
SSL_library_init();
SSL_load_error_strings();
+#else
+ OPENSSL_init_ssl(0, NULL);
+#endif
/* Filter account list. */
TAILQ_INIT(&actaq);

15
net-mail/fdm/metadata.xml Normal file
View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>xmw@gentoo.org</email>
<name>Michael Weber</name>
</maintainer>
<use>
<flag name="courierauth">Add support for Courier authentication library</flag>
</use>
<upstream>
<remote-id type="sourceforge">fdm</remote-id>
<remote-id type="github">nicm/fdm</remote-id>
</upstream>
</pkgmetadata>