mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 09:49:18 -04:00
- Modify patch-collection to fit release
This commit is contained in:
parent
9f77225ee7
commit
4fa3f58c5b
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=120089
6 changed files with 21 additions and 202 deletions
|
@ -7,6 +7,7 @@
|
|||
|
||||
PORTNAME= SQL-Translator
|
||||
PORTVERSION= 0.06
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= databases perl5
|
||||
MASTER_SITES= ${MASTER_SITE_PERL_CPAN}
|
||||
MASTER_SITE_SUBDIR= SQL
|
||||
|
@ -91,8 +92,7 @@ MAN3= SQL::Translator.3 \
|
|||
.if ${PERL_LEVEL} < 500600
|
||||
BUILD_DEPENDS+= ${SITE_PERL}/File/Spec.pm:${PORTSDIR}/devel/p5-File-Spec \
|
||||
${SITE_PERL}/${PERL_ARCH}/IO/Dir.pm:${PORTSDIR}/devel/p5-IO
|
||||
EXTRA_PATCHES+= ${PATCHDIR}/5.005_03-patch-lib::SQL::Translator::Parser::Excel.pm \
|
||||
${PATCHDIR}/5.005_03-patch-lib::SQL::Translator::Parser::xSV.pm \
|
||||
EXTRA_PATCHES+= ${PATCHDIR}/5.005_03-patch-lib::SQL::Translator::Parser::xSV.pm \
|
||||
${PATCHDIR}/5.005_03-patch-lib::SQL::Translator::Producer::Diagram.pm \
|
||||
${PATCHDIR}/5.005_03-patch-lib::SQL::Translator::Producer::GraphViz.pm \
|
||||
${PATCHDIR}/5.005_03-patch-lib::SQL::Translator::Producer::HTML.pm \
|
||||
|
@ -100,11 +100,9 @@ EXTRA_PATCHES+= ${PATCHDIR}/5.005_03-patch-lib::SQL::Translator::Parser::Excel.p
|
|||
${PATCHDIR}/5.005_03-patch-lib::SQL::Translator::Schema::Table.pm \
|
||||
${PATCHDIR}/5.005_03-patch-lib::SQL::Translator::Utils.pm \
|
||||
${PATCHDIR}/5.005_03-patch-t::05bgep-re.t \
|
||||
${PATCHDIR}/5.005_03-patch-t::16xml-parser.t \
|
||||
${PATCHDIR}/5.005_03-patch-t::17sqlfxml-producer.t \
|
||||
${PATCHDIR}/5.005_03-patch-t::18ttschema-producer.t \
|
||||
${PATCHDIR}/5.005_03-patch-t::19sybase-parser.t \
|
||||
${PATCHDIR}/5.005_03-patch-t::27sqlite-parser.t
|
||||
${PATCHDIR}/5.005_03-patch-t::27sqlite-parser.t \
|
||||
${PATCHDIR}/5.005_03-patch-t::31dumper.t
|
||||
|
||||
.endif
|
||||
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
--- lib/SQL/Translator/Parser/Excel.pm.orig Sun May 9 14:49:45 2004
|
||||
+++ lib/SQL/Translator/Parser/Excel.pm Sun May 9 14:50:21 2004
|
||||
@@ -183,9 +183,9 @@
|
||||
$size = [ $size->[0] + $size->[1] ];
|
||||
}
|
||||
|
||||
- my $field = $table->get_field( $field );
|
||||
- $field->size( $size ) if $size;
|
||||
- $field->data_type( $data_type );
|
||||
+ my $f = $table->get_field( $field );
|
||||
+ $f->size( $size ) if $size;
|
||||
+ $f->data_type( $data_type );
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,23 +1,17 @@
|
|||
--- lib/SQL/Translator/Producer/XML/SQLFairy.pm.orig Sun May 9 15:11:42 2004
|
||||
+++ lib/SQL/Translator/Producer/XML/SQLFairy.pm Sun May 9 15:13:45 2004
|
||||
@@ -224,9 +224,9 @@
|
||||
# Use array to ensure consistant (ie not hash) ordering of attribs
|
||||
# The order comes from the meths list passes in.
|
||||
my @attr = map {
|
||||
- my $val = $obj->$_;
|
||||
+ my $val = $obj->$_();
|
||||
($_ => ref($val) eq 'ARRAY' ? join(', ', @$val) : $val);
|
||||
- } grep { defined $obj->$_ } @meths;
|
||||
+ } grep { defined $obj->$_() } @meths;
|
||||
$empty_tag ? $xml->emptyTag( [ $Namespace => $tag ], @attr )
|
||||
: $xml->startTag( [ $Namespace => $tag ], @attr );
|
||||
}
|
||||
@@ -247,7 +247,7 @@
|
||||
my $emit_empty = $PArgs->{'emit_empty_tags'};
|
||||
|
||||
for my $method ( @methods ) {
|
||||
- my $val = $obj->$method;
|
||||
+ my $val = $obj->$method();
|
||||
debug " ".ref($obj)."->$method=",
|
||||
(defined $val ? "'$val'" : "<UNDEF>");
|
||||
next unless $emit_empty || defined $val;
|
||||
--- lib/SQL/Translator/Producer/XML/SQLFairy.pm.orig Fri Sep 3 16:27:14 2004
|
||||
+++ lib/SQL/Translator/Producer/XML/SQLFairy.pm Sun Oct 24 17:00:03 2004
|
||||
@@ -349,11 +349,11 @@
|
||||
# The order comes from the meths list passed in.
|
||||
my @tags;
|
||||
my @attr;
|
||||
- foreach ( grep { defined $obj->$_ } @meths ) {
|
||||
+ foreach ( grep { defined $obj->$_() } @meths ) {
|
||||
my $what = m/$elements_re/ ? \@tags : \@attr;
|
||||
my $val = $_ eq 'extra'
|
||||
- ? { $obj->$_ }
|
||||
- : $obj->$_;
|
||||
+ ? { $obj->$_() }
|
||||
+ : $obj->$_();
|
||||
$val = ref $val eq 'ARRAY' ? join(',', @$val) : $val;
|
||||
push @$what, $_ => $val;
|
||||
};
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
--- t/16xml-parser.t.orig Sun May 9 19:15:25 2004
|
||||
+++ t/16xml-parser.t Sun May 9 19:27:08 2004
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
use strict;
|
||||
use Test::More;
|
||||
-use Test::Exception;
|
||||
+#use Test::Exception; # not actually used
|
||||
|
||||
use strict;
|
||||
use Data::Dumper;
|
||||
@@ -49,16 +49,16 @@
|
||||
if ( exists $test->{$attr} ) {
|
||||
my $ans = $test->{$attr};
|
||||
if ( $attr =~ m/^is_/ ) {
|
||||
- if ($ans) { ok $fld->$attr, "$name - $attr true"; }
|
||||
- else { ok !$fld->$attr, "$name - $attr false"; }
|
||||
+ if ($ans) { ok $fld->$attr(), "$name - $attr true"; }
|
||||
+ else { ok !$fld->$attr(), "$name - $attr false"; }
|
||||
}
|
||||
else {
|
||||
- is $fld->$attr, $ans, "$name - $attr = '"
|
||||
+ is $fld->$attr(), $ans, "$name - $attr = '"
|
||||
.(defined $ans ? $ans : "NULL" )."'";
|
||||
}
|
||||
}
|
||||
else {
|
||||
- ok !$fld->$attr, "$name - $attr not set";
|
||||
+ ok !$fld->$attr(), "$name - $attr not set";
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,98 +0,0 @@
|
|||
--- t/17sqlfxml-producer.t.orig Sun May 9 20:51:50 2004
|
||||
+++ t/17sqlfxml-producer.t Sun May 9 20:55:44 2004
|
||||
@@ -8,7 +8,10 @@
|
||||
|
||||
use strict;
|
||||
use Test::More;
|
||||
-use Test::Exception;
|
||||
+use vars '$no_test_exception';
|
||||
+$no_test_exception = 0;
|
||||
+eval { require Test::Exception; };
|
||||
+$no_test_exception = $@;
|
||||
|
||||
use Data::Dumper;
|
||||
my %opt;
|
||||
@@ -149,7 +152,12 @@
|
||||
from => 'MySQL',
|
||||
to => 'XML-SQLFairy',
|
||||
);
|
||||
-lives_ok {$xml = $obj->translate($file);} "Translate (emit_empty_tags=>0) ran";
|
||||
+if ($no_test_exception) {
|
||||
+ $xml = $obj->translate($file);
|
||||
+ pass "Translate (emit_empty_tags=>0) ran";
|
||||
+} else {
|
||||
+ lives_ok {$xml = $obj->translate($file);} "Translate (emit_empty_tags=>0) ran";
|
||||
+}
|
||||
ok("$xml" ne "" ,"Produced something!");
|
||||
print "XML:\n$xml" if DEBUG;
|
||||
# Strip sqlf header with its variable date so we diff safely
|
||||
@@ -270,7 +278,12 @@
|
||||
to => 'XML-SQLFairy',
|
||||
producer_args => { emit_empty_tags => 1 },
|
||||
);
|
||||
-lives_ok { $xml=$obj->translate($file); } "Translate (emit_empty_tags=>1) ran";
|
||||
+if ($no_test_exception) {
|
||||
+ $xml=$obj->translate($file);
|
||||
+ pass "Translate (emit_empty_tags=>1) ran";
|
||||
+} else {
|
||||
+ lives_ok { $xml=$obj->translate($file); } "Translate (emit_empty_tags=>1) ran";
|
||||
+}
|
||||
ok("$xml" ne "" ,"Produced something!");
|
||||
print "XML emit_empty_tags=>1:\n$xml" if DEBUG;
|
||||
# Strip sqlf header with its variable date so we diff safely
|
||||
@@ -314,7 +327,12 @@
|
||||
to => "XML-SQLFairy",
|
||||
producer_args => { attrib_values => 1 },
|
||||
);
|
||||
-lives_ok {$xml = $obj->translate($file);} "Translate (attrib_values=>1) ran";
|
||||
+if ($no_test_exception) {
|
||||
+ $xml = $obj->translate($file);
|
||||
+ pass "Translate (attrib_values=>1) ran";
|
||||
+} else {
|
||||
+ lives_ok {$xml = $obj->translate($file);} "Translate (attrib_values=>1) ran";
|
||||
+}
|
||||
ok("$xml" ne "" ,"Produced something!");
|
||||
print "XML attrib_values=>1:\n$xml" if DEBUG;
|
||||
# Strip sqlf header with its variable date so we diff safely
|
||||
@@ -364,7 +382,12 @@
|
||||
|
||||
# As we have created a Schema we give translate a dummy string so that
|
||||
# it will run the produce.
|
||||
- lives_ok {$xml =$obj->translate("FOO");} "Translate (View) ran";
|
||||
+ if ($no_test_exception) {
|
||||
+ $xml =$obj->translate("FOO");
|
||||
+ pass "Translate (View) ran";
|
||||
+ } else {
|
||||
+ lives_ok {$xml =$obj->translate("FOO");} "Translate (View) ran";
|
||||
+ }
|
||||
ok("$xml" ne "" ,"Produced something!");
|
||||
print "XML attrib_values=>1:\n$xml" if DEBUG;
|
||||
# Strip sqlf header with its variable date so we diff safely
|
||||
@@ -418,7 +441,12 @@
|
||||
|
||||
# As we have created a Schema we give translate a dummy string so that
|
||||
# it will run the produce.
|
||||
- lives_ok {$xml =$obj->translate("FOO");} "Translate (Trigger) ran";
|
||||
+ if ($no_test_exception) {
|
||||
+ $xml =$obj->translate("FOO");
|
||||
+ pass "Translate (Trigger) ran";
|
||||
+ } else {
|
||||
+ lives_ok {$xml =$obj->translate("FOO");} "Translate (Trigger) ran";
|
||||
+ }
|
||||
ok("$xml" ne "" ,"Produced something!");
|
||||
print "XML attrib_values=>1:\n$xml" if DEBUG;
|
||||
# Strip sqlf header with its variable date so we diff safely
|
||||
@@ -472,7 +500,12 @@
|
||||
|
||||
# As we have created a Schema we give translate a dummy string so that
|
||||
# it will run the produce.
|
||||
- lives_ok {$xml =$obj->translate("FOO");} "Translate (Procedure) ran";
|
||||
+ if ($no_test_exception) {
|
||||
+ $xml =$obj->translate("FOO");
|
||||
+ pass "Translate (Procedure) ran";
|
||||
+ } else {
|
||||
+ lives_ok {$xml =$obj->translate("FOO");} "Translate (Procedure) ran";
|
||||
+ }
|
||||
ok("$xml" ne "" ,"Produced something!");
|
||||
print "XML attrib_values=>1:\n$xml" if DEBUG;
|
||||
# Strip sqlf header with its variable date so we diff safely
|
|
@ -1,28 +0,0 @@
|
|||
--- t/18ttschema-producer.t.orig Sun May 9 20:56:35 2004
|
||||
+++ t/18ttschema-producer.t Sun May 9 20:57:54 2004
|
||||
@@ -6,7 +6,10 @@
|
||||
|
||||
use strict;
|
||||
use Test::More;
|
||||
-use Test::Exception;
|
||||
+use vars '$no_test_exception';
|
||||
+$no_test_exception = 0;
|
||||
+eval { require Test::Exception; };
|
||||
+$no_test_exception = $@;
|
||||
|
||||
use Data::Dumper;
|
||||
use vars '%opt';
|
||||
@@ -47,7 +50,12 @@
|
||||
},
|
||||
);
|
||||
my $out;
|
||||
-lives_ok { $out = $obj->translate; } "Translate ran";
|
||||
+if ($no_test_exception) {
|
||||
+ $out = $obj->translate;
|
||||
+ pass "Translate ran";
|
||||
+} else {
|
||||
+ lives_ok { $out = $obj->translate; } "Translate ran";
|
||||
+}
|
||||
ok $out ne "" ,"Produced something!";
|
||||
local $/ = undef; # slurp
|
||||
eq_or_diff $out, <DATA> ,"Output looks right";
|
Loading…
Add table
Reference in a new issue