Date: Tue, 21 Jun 2016 06:14:41 +0000 (UTC) From: Bernard Spil <brnrd@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r417187 - in head/mail/fetchmail: . files Message-ID: <201606210614.u5L6EfIQ012835@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: brnrd Date: Tue Jun 21 06:14:41 2016 New Revision: 417187 URL: https://svnweb.freebsd.org/changeset/ports/417187 Log: mail/fetchmail: Fix build without SSLv3 - Fix build with OpenSSL 1.1 and LibreSSL - Stop using pkg-install/pkg-deinstall scripts - Use pkg-plist keywords - Use GSSAPI ports framework - Change X11, POP2 options to use options framework PR: 210130 Submitted by: freebsd-ports@charlieroot.de Reviewed by: Corey Halpin <chalpin@cs.wisc.edu> (maintainer) Approved by: Corey Halpin <chalpin@cs.wisc.edu> (maintainer) Added: head/mail/fetchmail/files/patch-fetchmail.c (contents, props changed) head/mail/fetchmail/files/patch-socket.c (contents, props changed) Deleted: head/mail/fetchmail/files/pkg-deinstall.in head/mail/fetchmail/files/pkg-install.in Modified: head/mail/fetchmail/Makefile head/mail/fetchmail/pkg-plist Modified: head/mail/fetchmail/Makefile ============================================================================== --- head/mail/fetchmail/Makefile Tue Jun 21 06:13:25 2016 (r417186) +++ head/mail/fetchmail/Makefile Tue Jun 21 06:14:41 2016 (r417187) @@ -3,7 +3,7 @@ PORTNAME= fetchmail PORTVERSION= 6.3.26 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= mail ipv6 MASTER_SITES= SF/${PORTNAME}/branch_6.3/ \ http://mandree.home.pages.de/${PORTNAME}/ @@ -16,7 +16,6 @@ LICENSE_COMB= dual RUN_DEPENDS= ${LOCALBASE}/share/certs/ca-root-nss.crt:security/ca_root_nss -# Note USERS can only contain a single word as parts below rely on that. USERS= ${PORTNAME} GROUPS= ${USERS} @@ -24,8 +23,7 @@ USES= cpe gmake shebangfix tar:xz SHEBANG_FILES= fetchmailconf.py USE_RC_SUBR= fetchmail -SUB_FILES= pkg-message pkg-install pkg-deinstall -SUB_LIST+= USERS=${USERS} GROUPS=${GROUPS} PORTNAME=${PORTNAME} +SUB_FILES= pkg-message GNU_CONFIGURE= yes USE_OPENSSL= yes @@ -36,60 +34,42 @@ CONFIGURE_ENV= ac_cv_have_decl_SSLv2_cli LDFLAGS+= -L${LOCALBASE}/lib -OPTIONS_DEFINE= X11 NLS NTLM GSSAPI POP2 DOCS -OPTIONS_DEFAULT= GSSAPI +OPTIONS_DEFINE= X11 NLS NTLM POP2 DOCS +OPTIONS_SINGLE= GSSAPI +OPTIONS_SINGLE_GSSAPI= GSSAPI_BASE GSSAPI_HEIMDAL GSSAPI_MIT GSSAPI_NONE +OPTIONS_DEFAULT= GSSAPI_BASE OPTIONS_SUB= yes + +GSSAPI_BASE_USES= gssapi +GSSAPI_BASE_CONFIGURE_ON= --with-gssapi=${GSSAPIBASEDIR} ${GSSAPI_CONFIGURE_ARGS} +GSSAPI_HEIMDAL_USES= gssapi:heimdal +GSSAPI_HEIMDAL_CONFIGURE_ON= --with-gssapi=${GSSAPIBASEDIR} ${GSSAPI_CONFIGURE_ARGS} +GSSAPI_MIT_USES= gssapi:mit +GSSAPI_MIT_CONFIGURE_ON= --with-gssapi=${GSSAPIBASEDIR} ${GSSAPI_CONFIGURE_ARGS} +GSSAPI_NONE_CONFIGURE_ON= --without-gssapi + X11_DESC= Python/Tkinter dependencies for ``fetchmailconf'' POP2_DESC= POP2 Protocol support[obsolete] NLS_USES= gettext NLS_CONFIGURE_ENABLE= nls -NLS_CONFIGURE_ON= --enable-nls -NLS_CONFIGURE_OFF= --disable-nls - -PORTDOCS= FAQ FEATURES NEWS NOTES README README.SSL \ - design-notes.html fetchmail-FAQ.html fetchmail-features.html \ - esrs-design-notes.html -.include <bsd.port.options.mk> +NTLM_CONFIGURE_ENABLE= NTLM +NTLM_PORTDOCS= README.NTLM -# Pop2 is obsolete -.if ${PORT_OPTIONS:MPOP2} -CONFIGURE_ARGS+= --enable-POP2 -.endif +# POP2 is obsolete +POP2_CONFIGURE_ENABLE= POP2 -.if ${PORT_OPTIONS:MX11} -USES+= python -RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}tkinter>=0:x11-toolkits/py-tkinter -PLIST_SUB+= NOX11="@comment " -.else -CONFIGURE_ARGS+= PYTHON=: -SUB_FILES+= fetchmailconf -PLIST_SUB+= NOX11="" -.endif +X11_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}tkinter>=0:x11-toolkits/py-tkinter +X11_USES= python +X11_CONFIGURE_OFF= PYTHON=: +X11_SUB_FILES_OFF= fetchmailconf -.if ${PORT_OPTIONS:MGSSAPI} -.if !defined(KRB5_HOME) -.if exists(${LOCALBASE}/lib/libkrb5.a) -KRB5_HOME= ${LOCALBASE} -.elif exists(/usr/lib/libkrb5.a) -KRB5_HOME= /usr -.endif -.endif - -.if defined(KRB5_HOME) && !exists(${KRB5_HOME}/lib/libkrb5.a) -BROKEN= KRB5_HOME is set but doesn\'t provide lib/libkrb5.a -.endif - -.if defined(KRB5_HOME) && exists(${KRB5_HOME}/lib/libkrb5.a) -CONFIGURE_ARGS+= --with-gssapi=${KRB5_HOME} -.endif -.endif +PORTDOCS= FAQ FEATURES NEWS NOTES README README.SSL \ + design-notes.html fetchmail-FAQ.html fetchmail-features.html \ + esrs-design-notes.html -.if ${PORT_OPTIONS:MNTLM} -CONFIGURE_ARGS+= --enable-NTLM -PORTDOCS+= README.NTLM -.endif +#.include <bsd.port.options.mk> post-patch: .if !exists(/usr/lib/libcom_err.so) @@ -99,7 +79,8 @@ post-patch: post-build: @${MAKE_CMD} -C ${WRKSRC} check -post-install: +post-stage: + ${INSTALL} -d ${STAGEDIR}/var/run/fetchmail ${INSTALL_DATA} ${FILESDIR}/fetchmailrc.sample \ ${STAGEDIR}${PREFIX}/etc/fetchmailrc.sample Added: head/mail/fetchmail/files/patch-fetchmail.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/mail/fetchmail/files/patch-fetchmail.c Tue Jun 21 06:14:41 2016 (r417187) @@ -0,0 +1,26 @@ +--- fetchmail.c.orig 2013-04-23 20:00:45 UTC ++++ fetchmail.c +@@ -50,6 +50,10 @@ + #include <arpa/nameser.h> + #include <resolv.h> + ++#ifdef SSL_ENABLE ++#include <openssl/ssl.h> ++#endif ++ + #ifndef ENETUNREACH + #define ENETUNREACH 128 /* Interactive doesn't know this */ + #endif /* ENETUNREACH */ +@@ -263,6 +267,12 @@ int main(int argc, char **argv) + #ifdef SSL_ENABLE + "+SSL" + #endif ++#ifdef OPENSSL_NO_SSL2 ++ "-SSLv2" ++#endif ++#ifdef OPENSSL_NO_SSL3_METHOD ++ "-SSLv3" ++#endif + #ifdef OPIE_ENABLE + "+OPIE" + #endif /* OPIE_ENABLE */ Added: head/mail/fetchmail/files/patch-socket.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/mail/fetchmail/files/patch-socket.c Tue Jun 21 06:14:41 2016 (r417187) @@ -0,0 +1,24 @@ +--- socket.c.orig 2013-04-23 20:00:45 UTC ++++ socket.c +@@ -907,14 +907,19 @@ int SSLOpen(int sock, char *mycert, char + _ssl_context[sock] = NULL; + if(myproto) { + if(!strcasecmp("ssl2",myproto)) { +-#if HAVE_DECL_SSLV2_CLIENT_METHOD + 0 > 0 ++#ifndef OPENSSL_NO_SSL2 + _ctx[sock] = SSL_CTX_new(SSLv2_client_method()); + #else +- report(stderr, GT_("Your operating system does not support SSLv2.\n")); ++ report(stderr, GT_("Your OpenSSL version does not support SSLv2.\n")); + return -1; + #endif + } else if(!strcasecmp("ssl3",myproto)) { ++#ifndef OPENSSL_NO_SSL3_METHOD + _ctx[sock] = SSL_CTX_new(SSLv3_client_method()); ++#else ++ report(stderr, GT_("Your OpenSSL version does not support SSLv3.\n")); ++ return -1; ++#endif + } else if(!strcasecmp("tls1",myproto)) { + _ctx[sock] = SSL_CTX_new(TLSv1_client_method()); + } else if (!strcasecmp("ssl23",myproto)) { Modified: head/mail/fetchmail/pkg-plist ============================================================================== --- head/mail/fetchmail/pkg-plist Tue Jun 21 06:13:25 2016 (r417186) +++ head/mail/fetchmail/pkg-plist Tue Jun 21 06:14:41 2016 (r417187) @@ -2,7 +2,7 @@ bin/fetchmail bin/fetchmailconf man/man1/fetchmail.1.gz man/man1/fetchmailconf.1.gz -%%NOX11%%libexec/fetchmailconf.py +%%X11%%libexec/fetchmailconf.py %%NLS%%share/locale/ca/LC_MESSAGES/fetchmail.mo %%NLS%%share/locale/cs/LC_MESSAGES/fetchmail.mo %%NLS%%share/locale/da/LC_MESSAGES/fetchmail.mo @@ -30,4 +30,5 @@ man/man1/fetchmailconf.1.gz %%X11%%%%PYTHON_SITELIBDIR%%/fetchmailconf.py %%X11%%%%PYTHON_SITELIBDIR%%/fetchmailconf.pyc %%X11%%%%PYTHON_SITELIBDIR%%/fetchmailconf.pyo -@sample etc/fetchmailrc.sample +@sample(fetchmail,fetchmail,600) etc/fetchmailrc.sample +@dir(fetchmail,fetchmail,755) /var/run/fetchmail
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201606210614.u5L6EfIQ012835>