SHA256
1
0
forked from pool/perl

Accepting request 179095 from home:jengelh:db6

- Add perl-db6.diff to bring the DB_File module up to version 1.828
  where it supports building with libdb-6.0.

OBS-URL: https://build.opensuse.org/request/show/179095
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl?expand=0&rev=94
This commit is contained in:
Stephan Kulow 2013-06-15 17:27:52 +00:00 committed by Git OBS Bridge
parent 6e750a266d
commit 16db353fab
3 changed files with 126 additions and 0 deletions

118
perl-db6.diff Normal file
View File

@ -0,0 +1,118 @@
From: Jan Engelhardt <jengelh@inai.de>
Date: 2013-06-15 00:47:07.629124845 +0200
perl: support building with libdb-6.0.
This patch data was generated from the Perl5 git tree using
git diff --stat -p v5.18.0..blead cpan/DB_File/
to resolve
DB_File.xs: In function 'ParseOpenInfo':
DB_File.xs:1316:17: warning: passing argument 2 of 'dbp->set_bt_compare' from incompatible pointer type [enabled by default]
DB_File.xs:1316:17: note: expected 'int (*)(struct DB *, const struct DBT *, const struct DBT *, size_t *)' but argument is of type 'int (*)(struct DB *, const struct DBT *, const struct DBT *)'
cpan/DB_File/Changes | 4 ++++
cpan/DB_File/DB_File.pm | 8 +++-----
cpan/DB_File/DB_File.xs | 24 ++++++++++++++++++++----
3 files changed, 27 insertions(+), 9 deletions(-)
diff --git a/cpan/DB_File/Changes b/cpan/DB_File/Changes
index a650c75..c76b08e 100644
--- a/cpan/DB_File/Changes
+++ b/cpan/DB_File/Changes
@@ -1,3 +1,7 @@
+1.828 7 May 2013
+
+ * Minor change to build with Berkeley DB 6.x
+
1.827 25 Jan 2012
* DB_File.pm - Don't use "@_" construct
diff --git a/cpan/DB_File/DB_File.pm b/cpan/DB_File/DB_File.pm
index 58cbebe..2828770 100644
--- a/cpan/DB_File/DB_File.pm
+++ b/cpan/DB_File/DB_File.pm
@@ -1,10 +1,8 @@
# DB_File.pm -- Perl 5 interface to Berkeley DB
#
-# written by Paul Marquess (pmqs@cpan.org)
-# last modified 28th October 2007
-# version 1.818
+# Written by Paul Marquess (pmqs@cpan.org)
#
-# Copyright (c) 1995-2009 Paul Marquess. All rights reserved.
+# Copyright (c) 1995-2013 Paul Marquess. All rights reserved.
# This program is free software; you can redistribute it and/or
# modify it under the same terms as Perl itself.
@@ -165,7 +163,7 @@ our ($db_version, $use_XSLoader, $splice_end_array_no_length, $splice_end_array,
use Carp;
-$VERSION = "1.827" ;
+$VERSION = "1.828" ;
$VERSION = eval $VERSION; # needed for dev releases
{
diff --git a/cpan/DB_File/DB_File.xs b/cpan/DB_File/DB_File.xs
index 6790d5d..d7958fe 100644
--- a/cpan/DB_File/DB_File.xs
+++ b/cpan/DB_File/DB_File.xs
@@ -2,13 +2,11 @@
DB_File.xs -- Perl 5 interface to Berkeley DB
- written by Paul Marquess <pmqs@cpan.org>
- last modified 4th February 2007
- version 1.818
+ Written by Paul Marquess <pmqs@cpan.org>
All comments/suggestions/problems are welcome
- Copyright (c) 1995-2012 Paul Marquess. All rights reserved.
+ Copyright (c) 1995-2013 Paul Marquess. All rights reserved.
This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
@@ -208,6 +206,10 @@
# define AT_LEAST_DB_4_3
#endif
+#if DB_VERSION_MAJOR >= 6
+# define AT_LEAST_DB_6_0
+#endif
+
#ifdef AT_LEAST_DB_3_3
# define WANT_ERROR
#endif
@@ -536,6 +538,19 @@ tidyUp(DB_File db)
static int
+
+#ifdef AT_LEAST_DB_6_0
+#ifdef CAN_PROTOTYPE
+btree_compare(DB * db, const DBT *key1, const DBT *key2, size_t* locp)
+#else
+btree_compare(db, key1, key2, locp)
+DB * db ;
+const DBT * key1 ;
+const DBT * key2 ;
+size_t* locp;
+#endif /* CAN_PROTOTYPE */
+
+#else /* Berkeley DB < 6.0 */
#ifdef AT_LEAST_DB_3_2
#ifdef CAN_PROTOTYPE
@@ -558,6 +573,7 @@ const DBT * key2 ;
#endif
#endif
+#endif
{
#ifdef dTHX

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Jun 14 22:51:27 UTC 2013 - jengelh@inai.de
- Add perl-db6.diff to bring the DB_File module up to version 1.828
where it supports building with libdb-6.0.
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Jun 11 11:49:17 UTC 2013 - coolo@suse.com Tue Jun 11 11:49:17 UTC 2013 - coolo@suse.com

View File

@ -37,6 +37,7 @@ Patch3: perl-nroff.diff
Patch4: perl-netcmdutf8.diff Patch4: perl-netcmdutf8.diff
Patch5: perl-HiRes.t-timeout.diff Patch5: perl-HiRes.t-timeout.diff
Patch6: perl-saverecontext.diff Patch6: perl-saverecontext.diff
Patch7: perl-db6.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: perl-base = %version PreReq: perl-base = %version
#PreReq: %fillup_prereq #PreReq: %fillup_prereq
@ -163,6 +164,7 @@ cp -p %{S:3} .
%patch4 %patch4
%patch5 %patch5
%patch6 %patch6
%patch -P 7 -p1
%build %build
cp -a lib savelib cp -a lib savelib