- bump PORTREVISION

The port of devel/p5-File-HStore is/was going to be removed from CVS because it depends on security/p5-Digest-SHA2 which has been deprecated in favor of Digest::SHA

I created patches so that File-HStore makes use of Digest::SHA instead of Digest::SHA1 and Digest::SHA2. I have contacted the original author to attempt to get this patches accepted upstream, but it has been roughly a month and I have not heard back from him so I am hoping I can get those patches accepted into the tree to prevent File-HStore from being removed.

Additional information can be found here:
http://lists.freebsd.org/pipermail/freebsd-perl/2007-August/001619.html

PR:		ports/115911
Submitted by:	Steven Kreuzer <skreuzer_AT_exit2shell dot com>
This commit is contained in:
Cheng-Lung Sung 2007-09-05 01:32:59 +00:00
parent 60d55604b2
commit 919f3f39bc
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=198775
3 changed files with 79 additions and 4 deletions

View file

@ -7,21 +7,23 @@
PORTNAME= File-HStore
PORTVERSION= 0.09
PORTREVISION= 1
CATEGORIES= devel perl5
MASTER_SITES= ${MASTER_SITE_PERL_CPAN}
MASTER_SITE_SUBDIR= ../../authors/id/A/AD/ADULAU
MASTER_SITES= CPAN
PKGNAMEPREFIX= p5-
MAINTAINER= perl@FreeBSD.org
COMMENT= Store files on a filesystem using a very simple hash-based storage
RUN_DEPENDS= ${SITE_PERL}/${PERL_ARCH}/Digest/SHA1.pm:${PORTSDIR}/security/p5-Digest-SHA1 \
${SITE_PERL}/${PERL_ARCH}/Digest/SHA2.pm:${PORTSDIR}/security/p5-Digest-SHA2
RUN_DEPENDS= ${SITE_PERL}/${PERL_ARCH}/Digest/SHA.pm:${PORTSDIR}/security/p5-Digest-SHA
PERL_CONFIGURE= yes
MAN3= File::HStore.3
post-patch:
@${RM} ${WRKSRC}/lib/File/HStore.pm.orig
.include <bsd.port.pre.mk>
.if ${PERL_LEVEL} < 500600

View file

@ -0,0 +1,61 @@
--- ../File-HStore-0.09-original/lib/File/HStore.pm Sun Nov 26 11:43:50 2006
+++ lib/File/HStore.pm Tue Jul 17 18:24:13 2007
@@ -2,8 +2,7 @@
use strict;
use warnings;
-use Digest::SHA1;
-use Digest::SHA2;
+use Digest::SHA;
use File::Copy;
use File::Path;
@@ -69,7 +68,7 @@
my $lSubmitDate;
if ( $self->{digest} eq "FAT" ) {
- $ldigest = "SHA2";
+ $ldigest = "sha256";
}
else {
$ldigest = $self->{digest};
@@ -191,10 +190,10 @@
my $sha;
open( FILED, "$file" ) or die "Unable to open file $file";
if ( $digestdef eq "SHA1" ) {
- $sha = Digest::SHA1->new;
+ $sha = Digest::SHA->new("sha1");
}
elsif ( $digestdef eq "SHA2" ) {
- $sha = Digest::SHA2->new;
+ $sha = Digest::SHA->new("sha256");
}
else {
print "unknown digest method";
@@ -242,7 +241,7 @@
use File::HStore;
my $store = File::HStore ("/tmp/.mystore");
-
+
# Add a file in the store
my $id = $store->add("/foo/bar.txt");
@@ -272,7 +271,7 @@
=head1 METHODS
The object oriented interface to C<File::HFile> is described in this
-section.
+section.
The following methods are provided:
@@ -302,7 +301,7 @@
=item $store->remove($hashvalue)
-The $hashvalue is the file to be removed from the store.
+The $hashvalue is the file to be removed from the store.
Return false on success and undef on error.

View file

@ -0,0 +1,12 @@
--- ../File-HStore-0.09-original/Makefile.PL Sun Nov 26 11:05:53 2006
+++ Makefile.PL Tue Jul 17 18:08:11 2007
@@ -5,8 +5,7 @@
WriteMakefile(
NAME => 'File::HStore',
VERSION_FROM => 'lib/File/HStore.pm', # finds $VERSION
- PREREQ_PM => { 'Digest::SHA1' => '0',
- 'Digest::SHA2' => '0',
+ PREREQ_PM => { 'Digest::SHA' => '0',
'File::Copy' => '0',
'Test::More' => '0',
'File::Path' => '0' }, # e.g., Module::Name => 1.1