Bug 51573

Summary: UPDATE databases/p5-BerkeleyDB
Product: Ports & Packages Reporter: Mathieu Arnold <m>
Component: Individual Port(s)Assignee: Erwin Lansing <erwin>
Status: Closed FIXED    
Severity: Affects Only Me CC: m
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
p5-BerkeleyDB-0.20.diff
none
p5-BerkeleyDB-0.20.diff
none
p5-BerkeleyDB-0.21.diff
none
p5-BerkeleyDB-0.23.diff none

Description Mathieu Arnold 2003-04-29 12:00:33 UTC
Update to 0.20
Comment 1 Anton Berezin freebsd_committer freebsd_triage 2003-04-29 12:23:25 UTC
Responsible Changed
From-To: freebsd-ports-bugs->tobez

I'll handle this.
Comment 2 Mathieu Arnold 2003-04-29 18:32:23 UTC
This one is ok.

-- 
Mathieu Arnold
Comment 3 Oliver Eikemeier 2003-05-10 01:26:34 UTC
Please could you

- include support for Berkeley DB 4.x
- point to the right webpage

Thanks
    Oliver

proposed patch:

cat p5-BerkeleyDB-0.20.patch | patch -p0 -d /usr/ports
find /usr/ports/databases/p5-BerkeleyDB -name '*.orig' -delete

--- p5-BerkeleyDB-0.20.patch begins here ---
diff -Nur databases/p5-BerkeleyDB/Makefile.orig databases/p5-BerkeleyDB/Makefile
--- databases/p5-BerkeleyDB/Makefile.orig	Sat Feb 22 01:13:20 2003
+++ databases/p5-BerkeleyDB/Makefile	Sat May 10 01:37:57 2003
@@ -6,27 +6,34 @@
 #
 
 PORTNAME=	BerkeleyDB
-PORTVERSION=	0.19
+PORTVERSION=	0.20
 CATEGORIES=	databases perl5
-MASTER_SITES=	$(MASTER_SITE_PERL_CPAN)
+MASTER_SITES=	${MASTER_SITE_PERL_CPAN}
 MASTER_SITE_SUBDIR=	BerkeleyDB
 PKGNAMEPREFIX=	p5-
 
 MAINTAINER=	bill@twwells.com
-COMMENT=	Perl5 interface to the Berkeley DB package revision 3
+COMMENT=	Perl5 interface to the Berkeley DB package revision 3, 4 or 4.1
 
-LIB_DEPENDS=	db3.3:${PORTSDIR}/databases/db3
+.if !defined(WITH_BDB_VER) || ${WITH_BDB_VER} == 3
+LIB_DEPENDS=   db3.3:${PORTSDIR}/databases/db3
+.elif defined(WITH_BDB_VER) && ${WITH_BDB_VER} == 4
+LIB_DEPENDS=   db4.0:${PORTSDIR}/databases/db4
+.elif defined(WITH_BDB_VER) && ${WITH_BDB_VER} == 41
+LIB_DEPENDS=   db41.1:${PORTSDIR}/databases/db41
+.else
+.error WITH_BDB_VER must be 3, 4 or 41
+.endif
 
 PERL_CONFIGURE=	yes
 ALL_TARGET=	all test
 
 MAN3=		BerkeleyDB.3
-MAN3PREFIX=	${PREFIX}/lib/perl5/${PERL_VERSION}
 
 post-patch:
-	@${ECHO} "INCLUDE = ${LOCALBASE}/include/db3" > ${WRKSRC}/config.in
+	@${ECHO} "INCLUDE = ${LOCALBASE}/include/db${WITH_BDB_VER}" > ${WRKSRC}/config.in
 	@${ECHO} "LIB = ${LOCALBASE}/lib" >> ${WRKSRC}/config.in
-	@${ECHO} "DBNAME = -ldb3" >> ${WRKSRC}/config.in
+	@${ECHO} "DBNAME = -ldb${WITH_BDB_VER}" >> ${WRKSRC}/config.in
 	${PERL} -pi -e '$$_="" if /MAN3PODS/' ${WRKSRC}/Makefile.PL
 
 .include <bsd.port.mk>
diff -Nur databases/p5-BerkeleyDB/distinfo.orig databases/p5-BerkeleyDB/distinfo
--- databases/p5-BerkeleyDB/distinfo.orig	Fri Aug 23 02:15:05 2002
+++ databases/p5-BerkeleyDB/distinfo	Sat May 10 01:38:56 2003
@@ -1 +1 @@
-MD5 (BerkeleyDB-0.19.tar.gz) = 09db64e8c9a4c2af0c3580c41b1ac455
+MD5 (BerkeleyDB-0.20.tar.gz) = a9d68147127cadfa790dc7fcd2ad89bf
diff -Nur databases/p5-BerkeleyDB/pkg-descr.orig databases/p5-BerkeleyDB/pkg-descr
--- databases/p5-BerkeleyDB/pkg-descr.orig	Sun Jan  7 08:23:10 2001
+++ databases/p5-BerkeleyDB/pkg-descr	Sat May 10 01:52:34 2003
@@ -1,5 +1,5 @@
-This is the perl5 interface to Berkeley DB version 3, which it
-depends on.
+This is the perl5 interface to Berkeley DB version 3, 4 or 4.1,
+which it depends on.
 
 You may want to use this, instead of the default dbm that perl
 provides, as that one is based on version 1, which is seriously
@@ -7,7 +7,7 @@
 things may happen to your dbm files. Never mind all the extra
 features....
 
-WWW: http://www.sleepycat.com/
+WWW: http://search.cpan.org/dist/BerkeleyDB/BerkeleyDB.pod
 
 Bill Wells
 bill@twwells.com
diff -Nur databases/p5-BerkeleyDB/pkg-plist.orig databases/p5-BerkeleyDB/pkg-plist
--- databases/p5-BerkeleyDB/pkg-plist.orig	Wed Apr  4 09:41:20 2001
+++ databases/p5-BerkeleyDB/pkg-plist	Sat May 10 02:13:54 2003
@@ -1,10 +1,10 @@
-lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/BerkeleyDB.pm
-lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/BerkeleyDB.pod
-lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/BerkeleyDB/Btree.pm
-lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/BerkeleyDB/Hash.pm
-lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/BerkeleyDB/.packlist
-lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/BerkeleyDB/BerkeleyDB.bs
-lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/BerkeleyDB/BerkeleyDB.so
-lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/BerkeleyDB/autosplit.ix
-@dirrm lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/BerkeleyDB
-@dirrm lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/BerkeleyDB
+%%SITE_PERL%%/%%PERL_ARCH%%/BerkeleyDB.pm
+%%SITE_PERL%%/%%PERL_ARCH%%/BerkeleyDB.pod
+%%SITE_PERL%%/%%PERL_ARCH%%/BerkeleyDB/Btree.pm
+%%SITE_PERL%%/%%PERL_ARCH%%/BerkeleyDB/Hash.pm
+%%SITE_PERL%%/%%PERL_ARCH%%/auto/BerkeleyDB/.packlist
+%%SITE_PERL%%/%%PERL_ARCH%%/auto/BerkeleyDB/BerkeleyDB.bs
+%%SITE_PERL%%/%%PERL_ARCH%%/auto/BerkeleyDB/BerkeleyDB.so
+%%SITE_PERL%%/%%PERL_ARCH%%/auto/BerkeleyDB/autosplit.ix
+@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/BerkeleyDB
+@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/BerkeleyDB
--- p5-BerkeleyDB-0.20.patch ends here ---
Comment 4 Mathieu Arnold 2003-05-12 13:04:39 UTC
Updated to 0.21, now supports Berkeley DB 2, 3, 4, 4.1

-- 
Mathieu Arnold
Comment 5 Oliver Eikemeier 2003-05-22 01:59:04 UTC
Hey, fun with patches! We are at .22:

cat p5-BerkeleyDB-0.22.patch | patch -p0 -d /usr/ports
find /usr/ports/databases/p5-BerkeleyDB -name '*.orig' -delete
 
--- p5-BerkeleyDB-0.22.patch begins here ---
diff -Nur databases/p5-BerkeleyDB/Makefile.orig databases/p5-BerkeleyDB/Makefile
--- databases/p5-BerkeleyDB/Makefile.orig	Fri Feb 21 12:15:01 2003
+++ databases/p5-BerkeleyDB/Makefile	Thu May 22 02:32:44 2003
@@ -6,27 +6,37 @@
 #
 
 PORTNAME=	BerkeleyDB
-PORTVERSION=	0.19
+PORTVERSION=	0.22
 CATEGORIES=	databases perl5
-MASTER_SITES=	$(MASTER_SITE_PERL_CPAN)
+MASTER_SITES=	${MASTER_SITE_PERL_CPAN}
 MASTER_SITE_SUBDIR=	BerkeleyDB
 PKGNAMEPREFIX=	p5-
 
 MAINTAINER=	bill@twwells.com
-COMMENT=	Perl5 interface to the Berkeley DB package revision 3
+COMMENT=	Perl5 interface to the Berkeley DB package revision 3, 4 or 4.1
 
-LIB_DEPENDS=	db3.3:${PORTSDIR}/databases/db3
+LIB_DEPENDS=	${BDB_LIB}:${PORTSDIR}/databases/db${WITH_BDB_VER}
+
+WITH_BDB_VER?=	3
+.if ${WITH_BDB_VER} == 3
+BDB_LIB=	db3.3
+.elif ${WITH_BDB_VER} == 4
+BDB_LIB=	db4.0
+.elif ${WITH_BDB_VER} == 41
+BDB_LIB=	db41.1
+.else
+.error WITH_BDB_VER must be 3, 4 or 41
+.endif
 
 PERL_CONFIGURE=	yes
 ALL_TARGET=	all test
 
 MAN3=		BerkeleyDB.3
-MAN3PREFIX=	${PREFIX}/lib/perl5/${PERL_VERSION}
 
 post-patch:
-	@${ECHO} "INCLUDE = ${LOCALBASE}/include/db3" > ${WRKSRC}/config.in
+	@${ECHO} "INCLUDE = ${LOCALBASE}/include/db${WITH_BDB_VER}" > ${WRKSRC}/config.in
 	@${ECHO} "LIB = ${LOCALBASE}/lib" >> ${WRKSRC}/config.in
-	@${ECHO} "DBNAME = -ldb3" >> ${WRKSRC}/config.in
+	@${ECHO} "DBNAME = -ldb${WITH_BDB_VER}" >> ${WRKSRC}/config.in
 	${PERL} -pi -e '$$_="" if /MAN3PODS/' ${WRKSRC}/Makefile.PL
 
 .include <bsd.port.mk>
diff -Nur databases/p5-BerkeleyDB/distinfo.orig databases/p5-BerkeleyDB/distinfo
--- databases/p5-BerkeleyDB/distinfo.orig	Thu Aug 22 21:13:17 2002
+++ databases/p5-BerkeleyDB/distinfo	Thu May 22 02:24:55 2003
@@ -1 +1 @@
-MD5 (BerkeleyDB-0.19.tar.gz) = 09db64e8c9a4c2af0c3580c41b1ac455
+MD5 (BerkeleyDB-0.22.tar.gz) = be246088cb3dc9ca4fba503903329ff9
diff -Nur databases/p5-BerkeleyDB/pkg-descr.orig databases/p5-BerkeleyDB/pkg-descr
--- databases/p5-BerkeleyDB/pkg-descr.orig	Sun Jan  7 08:23:10 2001
+++ databases/p5-BerkeleyDB/pkg-descr	Sat May 10 01:52:34 2003
@@ -1,5 +1,5 @@
-This is the perl5 interface to Berkeley DB version 3, which it
-depends on.
+This is the perl5 interface to Berkeley DB version 3, 4 or 4.1,
+which it depends on.
 
 You may want to use this, instead of the default dbm that perl
 provides, as that one is based on version 1, which is seriously
@@ -7,7 +7,7 @@
 things may happen to your dbm files. Never mind all the extra
 features....
 
-WWW: http://www.sleepycat.com/
+WWW: http://search.cpan.org/dist/BerkeleyDB/BerkeleyDB.pod
 
 Bill Wells
 bill@twwells.com
diff -Nur databases/p5-BerkeleyDB/pkg-plist.orig databases/p5-BerkeleyDB/pkg-plist
--- databases/p5-BerkeleyDB/pkg-plist.orig	Wed Apr  4 09:41:20 2001
+++ databases/p5-BerkeleyDB/pkg-plist	Sat May 10 02:13:54 2003
@@ -1,10 +1,10 @@
-lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/BerkeleyDB.pm
-lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/BerkeleyDB.pod
-lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/BerkeleyDB/Btree.pm
-lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/BerkeleyDB/Hash.pm
-lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/BerkeleyDB/.packlist
-lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/BerkeleyDB/BerkeleyDB.bs
-lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/BerkeleyDB/BerkeleyDB.so
-lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/BerkeleyDB/autosplit.ix
-@dirrm lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/BerkeleyDB
-@dirrm lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/BerkeleyDB
+%%SITE_PERL%%/%%PERL_ARCH%%/BerkeleyDB.pm
+%%SITE_PERL%%/%%PERL_ARCH%%/BerkeleyDB.pod
+%%SITE_PERL%%/%%PERL_ARCH%%/BerkeleyDB/Btree.pm
+%%SITE_PERL%%/%%PERL_ARCH%%/BerkeleyDB/Hash.pm
+%%SITE_PERL%%/%%PERL_ARCH%%/auto/BerkeleyDB/.packlist
+%%SITE_PERL%%/%%PERL_ARCH%%/auto/BerkeleyDB/BerkeleyDB.bs
+%%SITE_PERL%%/%%PERL_ARCH%%/auto/BerkeleyDB/BerkeleyDB.so
+%%SITE_PERL%%/%%PERL_ARCH%%/auto/BerkeleyDB/autosplit.ix
+@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/BerkeleyDB
+@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/BerkeleyDB
--- p5-BerkeleyDB-0.22.patch ends here ---

... as portlintfriendly as it gets. If anybody likes to add support for Berkeley DB 2, so be it.

Something like
+.elif ${WITH_BDB_VER} == 2
+BDB_LIB=	db2.0
should work, but I'm too lazy to test this.

Regards
    Oliver
Comment 6 Mathieu Arnold 2003-06-23 15:24:42 UTC
We're at 0.23 now.

changelist from 0.19 too long :)
I guess the most important thing is support for db 2 3 4 or 4.1
the changelog is there :
<http://search.cpan.org/src/PMQS/BerkeleyDB-0.23/Changes>

-- 
Mathieu Arnold
Comment 7 Erwin Lansing freebsd_committer freebsd_triage 2003-06-25 19:35:23 UTC
Responsible Changed
From-To: tobez->erwin

I'll handle this for tobez
Comment 8 Erwin Lansing freebsd_committer freebsd_triage 2003-06-25 20:13:31 UTC
State Changed
From-To: open->closed

Committed, thanks!