svn commit: r431794 - in head/devel/git: . files
Renato Botelho
garga at FreeBSD.org
Wed Jan 18 12:40:55 UTC 2017
Author: garga
Date: Wed Jan 18 12:40:53 2017
New Revision: 431794
URL: https://svnweb.freebsd.org/changeset/ports/431794
Log:
Remove dependency of DEPRECATED mail/p5-Net-SMTP-SSL from devel/git
PR: 214335
Obtained from: git development mailing list
Sponsored by: Rubicon Communications (Netgate)
Added:
head/devel/git/files/patch-git-send-email.perl (contents, props changed)
Modified:
head/devel/git/Makefile
Modified: head/devel/git/Makefile
==============================================================================
--- head/devel/git/Makefile Wed Jan 18 12:02:39 2017 (r431793)
+++ head/devel/git/Makefile Wed Jan 18 12:40:53 2017 (r431794)
@@ -3,7 +3,7 @@
PORTNAME= git
DISTVERSION= 2.11.0
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= devel
MASTER_SITES= KERNEL_ORG/software/scm/git
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
@@ -71,8 +71,7 @@ PCRE_LIB_DEPENDS= libpcre.so:devel/pcre
PCRE_CONFIGURE_WITH= libpcre
SEND_EMAIL_IMPLIES= PERL
-SEND_EMAIL_RUN_DEPENDS= p5-Net-SMTP-SSL>=0:mail/p5-Net-SMTP-SSL \
- p5-Authen-SASL>=0:security/p5-Authen-SASL
+SEND_EMAIL_RUN_DEPENDS= p5-Authen-SASL>=0:security/p5-Authen-SASL
ICONV_USES= iconv
ICONV_MAKE_ARGS_OFF= NO_ICONV=1
Added: head/devel/git/files/patch-git-send-email.perl
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/devel/git/files/patch-git-send-email.perl Wed Jan 18 12:40:53 2017 (r431794)
@@ -0,0 +1,82 @@
+Refactor send_message() to remove dependency on deprecated
+Net::SMTP::SSL:
+
+<http://search.cpan.org/~rjbs/Net-SMTP-SSL-1.04/lib/Net/SMTP/SSL.pm#DEPRECATED>
+
+Signed-off-by: Mike Fisher <mfisher at csh.rit.edu>
+--- git-send-email.perl.orig 2016-11-29 21:06:51 UTC
++++ git-send-email.perl
+@@ -1335,10 +1335,13 @@ Message-Id: $message_id
+ die "The required SMTP server is not properly defined."
+ }
+
++ require Net::SMTP;
++ $smtp_domain ||= maildomain();
++ my $smtp_ssl = 0;
++
+ if ($smtp_encryption eq 'ssl') {
+ $smtp_server_port ||= 465; # ssmtp
+- require Net::SMTP::SSL;
+- $smtp_domain ||= maildomain();
++ $smtp_ssl = 1;
+ require IO::Socket::SSL;
+
+ # Suppress "variable accessed once" warning.
+@@ -1347,37 +1350,31 @@ Message-Id: $message_id
+ $IO::Socket::SSL::DEBUG = 1;
+ }
+
+- # Net::SMTP::SSL->new() does not forward any SSL options
+ IO::Socket::SSL::set_client_defaults(
+ ssl_verify_params());
+- $smtp ||= Net::SMTP::SSL->new($smtp_server,
+- Hello => $smtp_domain,
+- Port => $smtp_server_port,
+- Debug => $debug_net_smtp);
+ }
+ else {
+- require Net::SMTP;
+- $smtp_domain ||= maildomain();
+ $smtp_server_port ||= 25;
+- $smtp ||= Net::SMTP->new($smtp_server,
+- Hello => $smtp_domain,
+- Debug => $debug_net_smtp,
+- Port => $smtp_server_port);
+- if ($smtp_encryption eq 'tls' && $smtp) {
+- require Net::SMTP::SSL;
+- $smtp->command('STARTTLS');
+- $smtp->response();
+- if ($smtp->code == 220) {
+- $smtp = Net::SMTP::SSL->start_SSL($smtp,
+- ssl_verify_params())
+- or die "STARTTLS failed! ".IO::Socket::SSL::errstr();
+- $smtp_encryption = '';
+- # Send EHLO again to receive fresh
+- # supported commands
+- $smtp->hello($smtp_domain);
+- } else {
+- die "Server does not support STARTTLS! ".$smtp->message;
+- }
++ }
++
++ $smtp ||= Net::SMTP->new($smtp_server,
++ Hello => $smtp_domain,
++ Port => $smtp_server_port,
++ Debug => $debug_net_smtp,
++ SSL => $smtp_ssl);
++
++ if ($smtp_encryption eq 'tls' && $smtp) {
++ $smtp->command('STARTTLS');
++ $smtp->response();
++ if ($smtp->code == 220) {
++ $smtp->starttls(ssl_verify_params())
++ or die "STARTTLS failed! ".IO::Socket::SSL::errstr();
++ $smtp_encryption = '';
++ # Send EHLO again to receive fresh
++ # supported commands
++ $smtp->hello($smtp_domain);
++ } else {
++ die "Server does not support STARTTLS! ".$smtp->message;
+ }
+ }
+
More information about the svn-ports-all
mailing list