aboutsummaryrefslogtreecommitdiff
path: root/databases
diff options
context:
space:
mode:
authorMax Khon <fjoe@FreeBSD.org>2003-08-11 19:47:38 +0000
committerMax Khon <fjoe@FreeBSD.org>2003-08-11 19:47:38 +0000
commitce79f1753391125f42df267cd99dce9393b98c8e (patch)
tree3a9fa3c79fe29f91281e26b9e9d53fbfb20fe422 /databases
parent17a2b8c800cc0114a1dbf59be950b01249e568d6 (diff)
downloadports-ce79f1753391125f42df267cd99dce9393b98c8e.tar.gz
ports-ce79f1753391125f42df267cd99dce9393b98c8e.zip
Notes
Diffstat (limited to 'databases')
-rw-r--r--databases/p5-DBD-Pg-13/Makefile1
-rw-r--r--databases/p5-DBD-Pg-13/files/patch-Pg.pm60
-rw-r--r--databases/p5-DBD-Pg/Makefile1
-rw-r--r--databases/p5-DBD-Pg/files/patch-Pg.pm60
4 files changed, 122 insertions, 0 deletions
diff --git a/databases/p5-DBD-Pg-13/Makefile b/databases/p5-DBD-Pg-13/Makefile
index 9c43aa185e7c..4731b9967537 100644
--- a/databases/p5-DBD-Pg-13/Makefile
+++ b/databases/p5-DBD-Pg-13/Makefile
@@ -7,6 +7,7 @@
PORTNAME= DBD-Pg
PORTVERSION= 1.22
+PORTREVISION= 1
CATEGORIES= databases perl5
MASTER_SITES= ${MASTER_SITE_PERL_CPAN}
MASTER_SITE_SUBDIR= DBD
diff --git a/databases/p5-DBD-Pg-13/files/patch-Pg.pm b/databases/p5-DBD-Pg-13/files/patch-Pg.pm
new file mode 100644
index 000000000000..0420d22effb1
--- /dev/null
+++ b/databases/p5-DBD-Pg-13/files/patch-Pg.pm
@@ -0,0 +1,60 @@
+--- ./Pg.pm.orig Tue Aug 12 02:03:06 2003
++++ ./Pg.pm Tue Aug 12 02:31:41 2003
+@@ -70,8 +70,8 @@
+ sub pg_use_catalog {
+ my $dbh = shift;
+ my $version = DBD::Pg::pg_server_version($dbh);
+- $version =~ /^(\d+\.\d+)/;
+- return $1 < 7.3 ? "" : "pg_catalog.";
++ $version =~ s/^(\d+\.\d+).*/\1/;
++ return $version < 7.3 ? "" : "pg_catalog.";
+ }
+
+ 1;
+@@ -200,6 +200,7 @@
+ my $wh = ""; # ();
+ $wh = join( " AND ", '', @wh ) if (@wh);
+ my $version = DBD::Pg::pg_server_version($dbh);
++ $version =~ s/^(\d+\.\d+).*/\1/;
+ my $showschema = $version < 7.3 ? "NULL::text" : "n.nspname";
+ my $schemajoin = $version < 7.3 ? "" : "LEFT JOIN pg_catalog.pg_namespace n ON (n.oid = c.relnamespace)";
+ my $col_info_sql = qq{
+@@ -258,10 +259,10 @@
+ my @wh = (); my @dat = (); # Used to hold data for the attributes.
+
+ my $version = DBD::Pg::pg_server_version($dbh);
+- $version =~ /^(\d+)\.(\d)/;
++ $version =~ s/^(\d+\.\d+).*/\1/;
+
+ my @flds = qw/catname u.usename bc.relname/;
+- $flds[1] = 'n.nspname' unless ($1.$2 < 73);
++ $flds[1] = 'n.nspname' unless ($version < 7.3);
+
+ for my $idx (0 .. $#attrs) {
+ next if ($flds[$idx] eq 'catname'); # Skip catalog
+@@ -600,6 +601,7 @@
+ my $tbl_sql = ();
+
+ my $version = DBD::Pg::pg_server_version($dbh);
++ $version =~ s/^(\d+\.\d+).*/\1/;
+ my $CATALOG = DBD::Pg::pg_use_catalog($dbh);
+
+ if ( # Rules 19a
+@@ -804,6 +806,7 @@
+ sub tables {
+ my($dbh) = @_;
+ my $version = DBD::Pg::pg_server_version($dbh);
++ $version =~ s/^(\d+\.\d+).*/\1/;
+
+ my $SQL = ($version < 7.3) ?
+ "SELECT relname AS \"TABLE_NAME\"
+@@ -908,7 +911,8 @@
+ # by pg_constraint. To maintain compatibility, check
+ # version number and execute appropriate query.
+
+- my $version = pg_server_version( $dbh );
++ my $version = DBD::Pg::pg_server_version( $dbh );
++ $version =~ s/^(\d+\.\d+).*/\1/;
+
+ my $con_query = $version < 7.3
+ ? "SELECT rcsrc FROM pg_relcheck WHERE rcname = '${table}_$col_name'"
diff --git a/databases/p5-DBD-Pg/Makefile b/databases/p5-DBD-Pg/Makefile
index 9c43aa185e7c..4731b9967537 100644
--- a/databases/p5-DBD-Pg/Makefile
+++ b/databases/p5-DBD-Pg/Makefile
@@ -7,6 +7,7 @@
PORTNAME= DBD-Pg
PORTVERSION= 1.22
+PORTREVISION= 1
CATEGORIES= databases perl5
MASTER_SITES= ${MASTER_SITE_PERL_CPAN}
MASTER_SITE_SUBDIR= DBD
diff --git a/databases/p5-DBD-Pg/files/patch-Pg.pm b/databases/p5-DBD-Pg/files/patch-Pg.pm
new file mode 100644
index 000000000000..0420d22effb1
--- /dev/null
+++ b/databases/p5-DBD-Pg/files/patch-Pg.pm
@@ -0,0 +1,60 @@
+--- ./Pg.pm.orig Tue Aug 12 02:03:06 2003
++++ ./Pg.pm Tue Aug 12 02:31:41 2003
+@@ -70,8 +70,8 @@
+ sub pg_use_catalog {
+ my $dbh = shift;
+ my $version = DBD::Pg::pg_server_version($dbh);
+- $version =~ /^(\d+\.\d+)/;
+- return $1 < 7.3 ? "" : "pg_catalog.";
++ $version =~ s/^(\d+\.\d+).*/\1/;
++ return $version < 7.3 ? "" : "pg_catalog.";
+ }
+
+ 1;
+@@ -200,6 +200,7 @@
+ my $wh = ""; # ();
+ $wh = join( " AND ", '', @wh ) if (@wh);
+ my $version = DBD::Pg::pg_server_version($dbh);
++ $version =~ s/^(\d+\.\d+).*/\1/;
+ my $showschema = $version < 7.3 ? "NULL::text" : "n.nspname";
+ my $schemajoin = $version < 7.3 ? "" : "LEFT JOIN pg_catalog.pg_namespace n ON (n.oid = c.relnamespace)";
+ my $col_info_sql = qq{
+@@ -258,10 +259,10 @@
+ my @wh = (); my @dat = (); # Used to hold data for the attributes.
+
+ my $version = DBD::Pg::pg_server_version($dbh);
+- $version =~ /^(\d+)\.(\d)/;
++ $version =~ s/^(\d+\.\d+).*/\1/;
+
+ my @flds = qw/catname u.usename bc.relname/;
+- $flds[1] = 'n.nspname' unless ($1.$2 < 73);
++ $flds[1] = 'n.nspname' unless ($version < 7.3);
+
+ for my $idx (0 .. $#attrs) {
+ next if ($flds[$idx] eq 'catname'); # Skip catalog
+@@ -600,6 +601,7 @@
+ my $tbl_sql = ();
+
+ my $version = DBD::Pg::pg_server_version($dbh);
++ $version =~ s/^(\d+\.\d+).*/\1/;
+ my $CATALOG = DBD::Pg::pg_use_catalog($dbh);
+
+ if ( # Rules 19a
+@@ -804,6 +806,7 @@
+ sub tables {
+ my($dbh) = @_;
+ my $version = DBD::Pg::pg_server_version($dbh);
++ $version =~ s/^(\d+\.\d+).*/\1/;
+
+ my $SQL = ($version < 7.3) ?
+ "SELECT relname AS \"TABLE_NAME\"
+@@ -908,7 +911,8 @@
+ # by pg_constraint. To maintain compatibility, check
+ # version number and execute appropriate query.
+
+- my $version = pg_server_version( $dbh );
++ my $version = DBD::Pg::pg_server_version( $dbh );
++ $version =~ s/^(\d+\.\d+).*/\1/;
+
+ my $con_query = $version < 7.3
+ ? "SELECT rcsrc FROM pg_relcheck WHERE rcname = '${table}_$col_name'"