pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/databases/p5-Template-DBI Importing package of p5 modu...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/a7d8220e2800
branches:  trunk
changeset: 560597:a7d8220e2800
user:      sno <sno%pkgsrc.org@localhost>
date:      Sun Jun 14 22:42:57 2009 +0000

description:
Importing package of p5 module Template::Plugin::DBI 2.64.

This Template Toolkit plugin module provides an interface to the Perl DBI/DBD
modules, allowing to integrate SQL queries into template documents.  It also
provides an interface via the Tie::DBI module (if installed) so that database
records can be accessed without having to embed any SQL in templates.

diffstat:

 databases/p5-Template-DBI/DESCR            |    4 +
 databases/p5-Template-DBI/Makefile         |   24 +++++
 databases/p5-Template-DBI/distinfo         |    6 +
 databases/p5-Template-DBI/patches/patch-aa |  134 +++++++++++++++++++++++++++++
 4 files changed, 168 insertions(+), 0 deletions(-)

diffs (184 lines):

diff -r a62dbcc9554d -r a7d8220e2800 databases/p5-Template-DBI/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/p5-Template-DBI/DESCR   Sun Jun 14 22:42:57 2009 +0000
@@ -0,0 +1,4 @@
+This Template Toolkit plugin module provides an interface to the Perl DBI/DBD
+modules, allowing to integrate SQL queries into template documents.  It also
+provides an interface via the Tie::DBI module (if installed) so that database
+records can be accessed without having to embed any SQL in templates.
diff -r a62dbcc9554d -r a7d8220e2800 databases/p5-Template-DBI/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/p5-Template-DBI/Makefile        Sun Jun 14 22:42:57 2009 +0000
@@ -0,0 +1,24 @@
+# $NetBSD: Makefile,v 1.1.1.1 2009/06/14 22:42:57 sno Exp $
+#
+
+DISTNAME=      Template-DBI-2.64
+PKGNAME=       p5-${DISTNAME}
+PKGREVISION=   1
+CATEGORIES=    textproc
+MASTER_SITES=  ${MASTER_SITE_PERL_CPAN:=Template/}
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=      http://search.cpan.org/dist/Template-DBI/
+COMMENT=       Template interface to the DBI module
+LICENSE=       gnu-gpl-v2 # OR artistic
+
+PKG_DESTDIR_SUPPORT=   user-destdir
+
+DEPENDS+=      p5-Template-Toolkit>=2.15:../../www/p5-Template-Toolkit
+DEPENDS+=      p5-Tie-DBI-[0-9]*:../../databases/p5-Tie-DBI
+
+PERL5_PACKLIST=                auto/Template/DBI/.packlist
+
+.include "../../databases/p5-DBI/buildlink3.mk"
+.include "../../lang/perl5/module.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r a62dbcc9554d -r a7d8220e2800 databases/p5-Template-DBI/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/p5-Template-DBI/distinfo        Sun Jun 14 22:42:57 2009 +0000
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.1.1.1 2009/06/14 22:42:57 sno Exp $
+
+SHA1 (Template-DBI-2.64.tar.gz) = 9f32974f4f9b53489d818c9c8546d65fd4921f18
+RMD160 (Template-DBI-2.64.tar.gz) = e7093c7498b245fc3ab2af04e567733c93012fb9
+Size (Template-DBI-2.64.tar.gz) = 13645 bytes
+SHA1 (patch-aa) = b6318935fb553efe2536b744f782d28dfff8f4b7
diff -r a62dbcc9554d -r a7d8220e2800 databases/p5-Template-DBI/patches/patch-aa
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/p5-Template-DBI/patches/patch-aa        Sun Jun 14 22:42:57 2009 +0000
@@ -0,0 +1,134 @@
+$NetBSD: patch-aa,v 1.1.1.1 2009/06/14 22:42:57 sno Exp $
+
+Skipping user interaction for running DBI tests
+
+--- Makefile.PL.orig   2009-06-03 20:23:48.000000000 +0000
++++ Makefile.PL        2009-06-03 20:32:01.000000000 +0000
+@@ -24,7 +24,7 @@
+ dbi_config();
+ 
+ my %opts = (
+-    'NAME'           => 'Template-DBI',
++    'NAME'           => 'Template::DBI',
+     'VERSION_FROM' => 'lib/Template/Plugin/DBI.pm',
+     'PMLIBDIRS'    => [ 'lib' ], 
+     'PREREQ_PM'    => { 
+@@ -59,63 +59,63 @@
+ sub dbi_config {
+     my ($dsn, $user, $pass) = ('') x 3;
+ 
+-    if (ttprompt("Do you want to run the DBI tests?\n" .
+-             "It requires access to an existing test database.",
+-             $RUN_TESTS) =~ /y/i) {
+-
+-        $RUN_TESTS = 1;
+-        my ($driver, $dbname);
+-        require DBI;
+-        my @drivers = DBI->available_drivers();
+-        local $" = ', ';
+-        
+-        my $default = (grep(/m.?sql/i, @drivers))[0] 
+-            || $drivers[0] || '';
+-        
+-        message(<<EOF);
+-
+-DBI Test Configuration
+-----------------------
+-
+-Please enter the driver name for the test database.
+-The DBD drivers installed on your system are
+-
+-    @drivers
+-
+-EOF
+-
+-        while (! $driver) {
+-            $driver = ttprompt("Enter driver name: ", $default);
+-            message("! No such DBD driver\n"), undef $driver
+-                unless grep(/^$driver$/, @drivers);
+-        }
+-        
+-        message(<<EOF);
+-
+-Now enter the data source (DSN) for the test database.
+-Many DBD drivers require only a database name (e.g. 'test') while
+-others may require an alternate format or additional parameters
+-(e.g. 'dbname=test').  Please consult your DBD documentation for
+-further details.
+-
+-EOF
+-
+-      my $dbname_eg = $driver eq 'Pg' ? 'dbname=test' : 'test';
+-        while (! $dbname) {
+-            $dbname = ttprompt('Database name: ', $dbname_eg);
+-        }
+-    
+-        $dsn = "dbi:$driver:$dbname";
+-      $user = ttprompt('Enter user name : ', '');
+-      $pass = ttprompt('Enter password  : ', '');
+-      $user = '' unless defined $user;
+-        $pass = '' unless defined $pass;
+-    }
+-    else {
++#    if (ttprompt("Do you want to run the DBI tests?\n" .
++#            "It requires access to an existing test database.",
++#            $RUN_TESTS) =~ /y/i) {
++#
++#        $RUN_TESTS = 1;
++#        my ($driver, $dbname);
++#        require DBI;
++#        my @drivers = DBI->available_drivers();
++#        local $" = ', ';
++#        
++#        my $default = (grep(/m.?sql/i, @drivers))[0] 
++#            || $drivers[0] || '';
++#        
++#        message(<<EOF);
++#
++#DBI Test Configuration
++#----------------------
++#
++#Please enter the driver name for the test database.
++#The DBD drivers installed on your system are
++#
++#    @drivers
++#
++#EOF
++#
++#        while (! $driver) {
++#            $driver = ttprompt("Enter driver name: ", $default);
++#            message("! No such DBD driver\n"), undef $driver
++#                unless grep(/^$driver$/, @drivers);
++#        }
++#        
++#        message(<<EOF);
++#
++#Now enter the data source (DSN) for the test database.
++#Many DBD drivers require only a database name (e.g. 'test') while
++#others may require an alternate format or additional parameters
++#(e.g. 'dbname=test').  Please consult your DBD documentation for
++#further details.
++#
++#EOF
++#
++#     my $dbname_eg = $driver eq 'Pg' ? 'dbname=test' : 'test';
++#        while (! $dbname) {
++#            $dbname = ttprompt('Database name: ', $dbname_eg);
++#        }
++#    
++#        $dsn = "dbi:$driver:$dbname";
++#     $user = ttprompt('Enter user name : ', '');
++#     $pass = ttprompt('Enter password  : ', '');
++#     $user = '' unless defined $user;
++#        $pass = '' unless defined $pass;
++#    }
++#    else {
+         $RUN_TESTS = 0;
+-    }
++#    }
+ 
+-    message("\nwriting $CONFIG_PATH\n");
++#    message("\nwriting $CONFIG_PATH\n");
+     open(CFGFILE, ">$CONFIG_PATH") || die "$CONFIG_PATH: $!\n";
+     print CFGFILE <<EOF;
+ \$run  = $RUN_TESTS;



Home | Main Index | Thread Index | Old Index