bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fix build-aux/announce-gen for Perl 5.14


From: Reuben Thomas
Subject: Fix build-aux/announce-gen for Perl 5.14
Date: Tue, 20 Mar 2012 20:18:06 -0000

The following patch copes with a renamed module:

>From 670ec3363bbbfefe927de0100a4be6f5f556a332 Mon Sep 17 00:00:00 2001
From: Reuben Thomas <address@hidden>
Date: Tue, 20 Mar 2012 20:17:22 +0000
Subject: [PATCH] announce-gen: make it work with Perl 5.14.

* build-aux/announce-gen: Use either Digest::SHA1 or Digest::SHA
according to Perl version.
---
 ChangeLog              |    6 ++++++
 build-aux/announce-gen |   10 ++++++++--
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 748f098..a356632 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2012-03-20  Reuben Thomas  <address@hidden>
 
+       announce-gen: make it work with Perl 5.14.
+       * build-aux/announce-gen: Use either Digest::SHA1 or Digest::SHA
+       according to Perl version.
+
+2012-03-20  Reuben Thomas  <address@hidden>
+
        README-release: simplify slightly
        * top/README-release: Run "git checkout master" only once.
 
diff --git a/build-aux/announce-gen b/build-aux/announce-gen
index 3ca90a9..4f28049 100755
--- a/build-aux/announce-gen
+++ b/build-aux/announce-gen
@@ -3,7 +3,7 @@ eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}'
     if 0;
 # Generate a release announcement message.
 
-my $VERSION = '2012-01-06 07:46'; # UTC
+my $VERSION = '2012-03-20 20:14'; # UTC
 # The definition above must lie within the first 8 lines in order
 # for the Emacs time-stamp write hook (at end) to update it.
 # If you change this file with Emacs, please let the write hook
@@ -30,7 +30,13 @@ use strict;
 
 use Getopt::Long;
 use Digest::MD5;
-use Digest::SHA1;
+if (!$^V or $^V lt v5.14.0) {
+  require Digest::SHA1;
+  Digest::SHA1->import();
+} else {
+  use Digest::SHA;
+  Digest::SHA->import();
+}
 use POSIX qw(strftime);
 
 (my $ME = $0) =~ s|.*/||;
-- 
1.7.9.1



-- 
http://rrt.sc3d.org/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]