summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-biology/bioperl/files/biodbgff-enable-1.2.2.patch')
-rw-r--r--sci-biology/bioperl/files/biodbgff-enable-1.2.2.patch98
1 files changed, 98 insertions, 0 deletions
diff --git a/sci-biology/bioperl/files/biodbgff-enable-1.2.2.patch b/sci-biology/bioperl/files/biodbgff-enable-1.2.2.patch
new file mode 100644
index 000000000000..7bd66206a0b4
--- /dev/null
+++ b/sci-biology/bioperl/files/biodbgff-enable-1.2.2.patch
@@ -0,0 +1,98 @@
+--- Makefile.PL.orig 2003-07-14 16:09:49.000000000 +0100
++++ Makefile.PL 2003-07-14 16:15:56.000000000 +0100
+@@ -83,9 +83,6 @@
+ # Prompt user for BioDBGFF stuff
+ #
+
+-if( eval { require DBI } && grep {/mysql/} DBI->available_drivers) {
+- my $proceed = prompt("Do you want to run the BioDBGFF tests (requires a mysql database) y/n",'n');
+- if( $proceed =~ /^[yY]/) {
+ my $cfg = {dbd_driver => 'mysql'};
+ GFFQueryDb($cfg,{'prompt'=>1,'verbose'=>1});
+ if (open T,">t/do_biodbgff.tests") {
+@@ -94,13 +91,6 @@
+ }
+ close T;
+ }
+- } else {
+- if( -e "t/do_biodbgff.tests" ) {
+- unlink "t/do_biodbgff.tests";
+- }
+- }
+-}
+-
+
+ ############################################################################
+ #
+@@ -124,55 +114,27 @@
+ my $d = lc $driver;
+ my $prompt = $options->{'prompt'};
+
+- my $test_db = exists($options->{"$d-test-db"}) ?
+- $options->{"$d-test-db"} : ($cfg->{'test_db'} || 'test');
+- $test_db = prompt
+- ("Which database should I use for testing the $db drivers?",
+- $test_db) if $prompt;
+-
+- my $test_host = exists($options->{"$d-test-host"}) ?
+- $options->{"$d-test-host"} : ($cfg->{'test_host'} || 'localhost');
+- $test_host = prompt
+- ("On which host is database $test_db running (hostname, ip address or host:port)", $test_host) if $prompt;
+-
+- my($test_user, $test_pass);
+-
+- $test_user = exists($options->{"$d-test-user"}) ?
+- $options->{"$d-test-user"} : ($cfg->{'test_user'} || "undef");
+- $test_user = prompt
+- ("User name for connecting to database $test_db?", $test_user)
+- if $prompt;
+- $test_user = undef if $test_user eq 'undef';
+-
+- $test_pass = exists($options->{"$d-test-pass"}) ?
+- $options->{"$d-test-pass"} : ($cfg->{'test_pass'} || "undef");
+- $test_pass = prompt
+- ("Password for connecting to database $test_db?", $test_pass)
+- if $prompt;
+- $test_pass = undef if $test_pass eq 'undef';
+-
+- $cfg->{'test_db'} = $test_db;
+- $cfg->{'test_host'} = $test_host;
+- $cfg->{'test_user'} = $test_user;
+- $cfg->{'test_pass'} = $test_pass;
+- if ($test_host eq 'undef' || $test_host eq 'localhost') {
+- $test_host = '';
+- }
+- my $test_dsn = "DBI:$driver:database=$test_db";
+- $cfg->{test_dsn} = $test_dsn;
+- if ($test_host) {
+- $cfg->{'test_dsn'} .= ";host=$test_host";
+- }
++ $options->{"$d-test-db"} = 'test';
++ $options->{"$d-test-host"} = 'localhost';
++ $options->{"$d-test-user"} = n0b0dy;
++ $options->{"$d-test-pass"} = undef;
++
++ $cfg->{'test_db'} = $options->{"$d-test-db"};
++ $cfg->{'test_host'} = $options->{"$d-test-host"};
++ $cfg->{'test_user'} = $options->{"$d-test-user"};
++ $cfg->{'test_pass'} = $options->{"$d-test-pass"};
+
++ my $test_dsn = "DBI:$driver:database=" . $cfg->{test_db};
++ $cfg->{'test_dsn'} = $test_dsn;
+
+ if ($options->{'verbose'}) {
+ local $^W=0; # some uninitialized variable warning coming through
+ print("Driver $driver is using the following settings for tests:\n",
+- " Database $test_db\n",
+- " Host $test_host\n",
+- " DSN $test_dsn\n",
+- " User $test_user\n",
+- " Password $test_pass\n");
++ " Database ".$cfg->{test_db}. "\n",
++ " Host ".$cfg->{test_host}."\n",
++ " DSN ".$cfg->{test_dsn}. "\n",
++ " User ".$cfg->{test_user}."\n",
++ " Password ".$cfg->{test_pass}."\n");
+ }
+ }
+