summaryrefslogtreecommitdiff
path: root/databases
diff options
context:
space:
mode:
authorsno <sno>2010-07-31 07:24:38 +0000
committersno <sno>2010-07-31 07:24:38 +0000
commitddf07a55a8b0e259e28d1dd076ae8442cf90d074 (patch)
tree46fbe0074cceb68420bb5b143ba4b32ff8e8e2bd /databases
parent178f00a896ccc8e203a1bb2327b0393c76516ce9 (diff)
downloadpkgsrc-ddf07a55a8b0e259e28d1dd076ae8442cf90d074.tar.gz
Updating databases/p5-Tie-DBI from 1.02 to 1.05.
pkgsrc changes: - apply patches from RT#58813 - add license definition Upstream changes: 1.05 Sat Apr10 01:00 2010 need to make DBD::SQLite to pre-req to get tests to succeed. This shouldn't really be an undue burden 1.04 Mon Mar 31 22:25 2010 Add DBD::SQLite to build_requires meta so automated testing won't fail 1.03 Mon Mar 29 13:00 2010 RT 3695 - SQLite support - Thanks RURBAN RT 19833 - Don't Chomp blanks. The user can do that in their script if they intended it. NOTE!!! This may break your code if you were depending on this behavior. Please open an RT ticket if you feel this needs to be put back in. Test suite to Test::More
Diffstat (limited to 'databases')
-rw-r--r--databases/p5-Tie-DBI/Makefile12
-rw-r--r--databases/p5-Tie-DBI/distinfo10
-rw-r--r--databases/p5-Tie-DBI/patches/patch-aa64
-rw-r--r--databases/p5-Tie-DBI/patches/patch-ab88
4 files changed, 166 insertions, 8 deletions
diff --git a/databases/p5-Tie-DBI/Makefile b/databases/p5-Tie-DBI/Makefile
index cdd89573ec2..788b0a5fef2 100644
--- a/databases/p5-Tie-DBI/Makefile
+++ b/databases/p5-Tie-DBI/Makefile
@@ -1,21 +1,25 @@
-# $NetBSD: Makefile,v 1.1.1.1 2009/06/14 22:36:41 sno Exp $
+# $NetBSD: Makefile,v 1.2 2010/07/31 07:24:38 sno Exp $
#
-DISTNAME= Tie-DBI-1.02
+DISTNAME= Tie-DBI-1.05
PKGNAME= p5-${DISTNAME}
CATEGORIES= databases perl5
MASTER_SITES= ${MASTER_SITE_PERL_CPAN:=Tie/}
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://search.cpan.org/dist/Tie-DBI/
-COMMENT= Tie hashes to DBI relational databases
+COMMENT= Tie hashes to DBI relational databases
+LICENSE= ${PERL5_LICENSE}
PKG_DESTDIR_SUPPORT= user-destdir
-DEPENDS+= p5-Encode-[0-9]*:../../textproc/p5-Encode
+ALL_ENV+= DBI_DSN=dbi:DBM:dbm_mldbm=Storable
PERL5_PACKLIST= auto/Tie/DBI/.packlist
+pre-configure:
+ cd ${WRKSRC} && find `pwd` -name "*.orig" -type f | xargs rm
+
.include "../../databases/p5-DBI/buildlink3.mk"
.include "../../lang/perl5/module.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/databases/p5-Tie-DBI/distinfo b/databases/p5-Tie-DBI/distinfo
index 18878153882..c02fc892499 100644
--- a/databases/p5-Tie-DBI/distinfo
+++ b/databases/p5-Tie-DBI/distinfo
@@ -1,5 +1,7 @@
-$NetBSD: distinfo,v 1.1.1.1 2009/06/14 22:36:41 sno Exp $
+$NetBSD: distinfo,v 1.2 2010/07/31 07:24:38 sno Exp $
-SHA1 (Tie-DBI-1.02.tar.gz) = 4f328e2129be1fa0feb32a78e9b61b6eef1f3243
-RMD160 (Tie-DBI-1.02.tar.gz) = b8e0c1107049f19202541b3a174f2baa6c18780e
-Size (Tie-DBI-1.02.tar.gz) = 23857 bytes
+SHA1 (Tie-DBI-1.05.tar.gz) = f949e34e29b0290f7489359ea00e332f88a8f907
+RMD160 (Tie-DBI-1.05.tar.gz) = 1536fcc99a0c0fc803efc6c1cd91fb398430a6ed
+Size (Tie-DBI-1.05.tar.gz) = 24212 bytes
+SHA1 (patch-aa) = e3ee17fdc5572a513c6c9e1ca5a5c2791aa255fc
+SHA1 (patch-ab) = c5c953aea316d92358693e4929c1be896f4805ad
diff --git a/databases/p5-Tie-DBI/patches/patch-aa b/databases/p5-Tie-DBI/patches/patch-aa
new file mode 100644
index 00000000000..f7ca92c4d19
--- /dev/null
+++ b/databases/p5-Tie-DBI/patches/patch-aa
@@ -0,0 +1,64 @@
+$NetBSD: patch-aa,v 1.1 2010/07/31 07:24:38 sno Exp $
+
+Respect DBI_DSN etc. - and do not prompt for test DSN's
+
+--- t/DBI.t.orig 2010-06-19 13:01:36.000000000 +0000
++++ t/DBI.t
+@@ -1,10 +1,10 @@
+ use strict;
+ use warnings;
+-use Test::More tests => 26;
++use Test::More;
+
+ my $DRIVER = $ENV{DRIVER};
+-use constant USER => $ENV{USER};
+-use constant PASS => $ENV{PASS};
++use constant USER => $ENV{USER} || $ENV{DBI_USER};
++use constant PASS => $ENV{PASS} || $ENV{DBI_PASS};
+ use constant DBNAME => $ENV{DB} || 'test';
+ use constant HOST => $ENV{HOST} || ($^O eq 'cygwin') ? '127.0.0.1' : 'localhost';
+
+@@ -13,6 +13,10 @@ use Tie::DBI;
+
+ ######################### End of black magic.
+
++if ($ENV{DBI_DSN} && !$DRIVER) {
++ ($DRIVER = $ENV{DBI_DSN}) =~ s/^dbi:([^:]+):.*$/$1/i;
++}
++
+ unless ($DRIVER) {
+ local($^W)=0; # kill uninitialized variable warning
+ # I like mysql best, followed by Oracle and Sybase
+@@ -22,9 +26,10 @@ unless ($DRIVER) {
+ }
+
+ if ($DRIVER) {
++ plan tests => 26;
+ diag("DBI.t - Using DBD driver $DRIVER...");
+ } else {
+- die "Found no DBD driver to use.\n";
++ plan skip_all => "Found no DBD driver to use.\n";
+ }
+
+ my %TABLES = (
+@@ -79,8 +84,9 @@ my @test_data = (
+ sub initialize_database {
+ local($^W) = 0;
+ my $dsn;
+- if ($DRIVER eq 'Pg') { $dsn = "dbi:$DRIVER:dbname=${\DBNAME}"; }
+- else { $dsn = "dbi:$DRIVER:${\DBNAME}:${\HOST}"; }
++ if( $ENV{DBI_DSN} ) { $dsn = $ENV{DBI_DSN}; }
++ elsif ($DRIVER eq 'Pg') { $dsn = "dbi:$DRIVER:dbname=${\DBNAME}"; }
++ else { $dsn = "dbi:$DRIVER:${\DBNAME}:${\HOST}"; }
+ my $dbh = DBI->connect($dsn,USER,PASS,{PrintError=>0}) || return undef;
+ $dbh->do("DROP TABLE testTie");
+ return $dbh if $DRIVER eq 'ExampleP';
+@@ -121,7 +127,7 @@ isa_ok(tie(%h,'Tie::DBI',{db=>$dbh,table
+ is(scalar(keys %h), 0, '%h is empty');
+
+ {
+- local($^W = 0);
++ local $^W = 0;
+ ok(insert_data(\%h), "Insert data into db");
+ }
+ ok(exists($h{strawberries}));
diff --git a/databases/p5-Tie-DBI/patches/patch-ab b/databases/p5-Tie-DBI/patches/patch-ab
new file mode 100644
index 00000000000..6c47f2f691f
--- /dev/null
+++ b/databases/p5-Tie-DBI/patches/patch-ab
@@ -0,0 +1,88 @@
+$NetBSD: patch-ab,v 1.1 2010/07/31 07:24:38 sno Exp $
+
+Fix several issue because of depreciated design
+
+--- lib/Tie/DBI.pm.orig 2010-04-10 06:15:01.000000000 +0000
++++ lib/Tie/DBI.pm
+@@ -27,23 +27,35 @@ my %DefaultOptions = (
+ # DBD drivers that work correctly with bound variables
+ my %CAN_BIND = (
+ 'ODBC' => 1,
++ 'AnyData' => 1,
+ 'mysql' => 1,
+ 'mSQL' => 1,
+ 'Oracle' => 1,
+ 'CSV' => 1,
++ 'DBM' => 1,
++ 'Sys' => 1,
+ 'Pg' => 1,
++ 'PO' => 1,
+ 'Informix' => 1,
+ 'Solid' => 1,
+ );
+ my %CANNOT_LISTFIELDS = (
+ 'SQLite' => 1,
+ 'Oracle' => 1,
++ 'CSV' => 1,
++ 'DBM' => 1,
++ 'PO' => 1,
++ 'AnyData' => 1,
+ );
+ my %CAN_BINDSELECT = (
+ 'mysql' => 1,
+ 'mSQL' => 1,
+ 'CSV' => 1,
+ 'Pg' => 1,
++ 'Sys' => 1,
++ 'DBM' => 1,
++ 'AnyData' => 1,
++ 'PO' => 1,
+ 'Informix' => 1,
+ 'Solid' => 1,
+ 'ODBC' => 1,
+@@ -59,6 +71,11 @@ my %DOES_IN = (
+ 'mysql' => 1,
+ 'Oracle' => 1,
+ 'Sybase' => 1,
++ 'CSV' => 1,
++ 'DBM' => 1, # at least with SQL::Statement
++ 'AnyData' => 1,
++ 'Sys' => 1,
++ 'PO' => 1,
+ );
+
+
+@@ -278,11 +295,11 @@ sub STORE {
+ $s->_update($key,\@fields,\@values)
+ : $s->_insert($key,\@fields,\@values);
+ } else {
+- $result = eval {
++ eval {
+ local($s->{'dbh'}->{PrintError}) = 0; # suppress warnings
+- $s->_insert($key,\@fields,\@values);
+- }
+- || $s->_update($key,\@fields,\@values);
++ $result = $s->_insert($key,\@fields,\@values);
++ };
++ $result or $result = $s->_update($key,\@fields,\@values);
+ }
+ croak "STORE: ",$s->errstr if $s->error;
+
+@@ -361,7 +378,7 @@ sub _run_query {
+ # if we get here, then we can't bind, so we replace ? with escaped parameters
+ while ( (my $pos = index($query, '?')) >= 0 ) {
+ my $value = shift(@bind_variables);
+- substr($query, $pos, 1) = (defined($value) ? $value : 'null');
++ substr($query, $pos, 1) = (defined($value) ? ( $self->{CanBind} ? $self->{'dbh'}->quote($value) : $value ) : 'null');
+ }
+ my $sth = $self->{'dbh'}->prepare($query);
+ return unless $sth && $sth->execute;
+@@ -375,7 +392,7 @@ sub _fields {
+ my ($dbh,$table) = @{$self}{'dbh','table'};
+
+ local($^W) = 0; # kill uninitialized variable warning
+- my $sth = $dbh->prepare("LISTFIELDS $table");
++ my $sth = $dbh->prepare("LISTFIELDS $table") unless($self->{CannotListfields});
+
+ # doesn't support LISTFIELDS, so try SELECT *
+ unless (!$self->{CannotListfields} && defined($sth) && $sth->execute) {