aboutsummaryrefslogtreecommitdiff
path: root/devel/p5-Workflow
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2009-04-28 22:14:43 +0000
committerMartin Wilke <miwi@FreeBSD.org>2009-04-28 22:14:43 +0000
commite845bb55b45bcd3373c441f26dae46f707cf8570 (patch)
tree8885d0f0d0e400a218860e71b931f431480abd1d /devel/p5-Workflow
parent496112748c7c98e56b3eb7fb521ec43d6d42a903 (diff)
downloadports-e845bb55b45bcd3373c441f26dae46f707cf8570.tar.gz
ports-e845bb55b45bcd3373c441f26dae46f707cf8570.zip
Notes
Diffstat (limited to 'devel/p5-Workflow')
-rw-r--r--devel/p5-Workflow/Makefile5
-rw-r--r--devel/p5-Workflow/files/patch-lib-Workflow-Factory.pm74
2 files changed, 79 insertions, 0 deletions
diff --git a/devel/p5-Workflow/Makefile b/devel/p5-Workflow/Makefile
index d5ed653cd076..d20567e88a6c 100644
--- a/devel/p5-Workflow/Makefile
+++ b/devel/p5-Workflow/Makefile
@@ -7,6 +7,7 @@
PORTNAME= Workflow
PORTVERSION= 1.32
+PORTREVISION= 1
CATEGORIES= devel perl5
MASTER_SITES= CPAN
PKGNAMEPREFIX= p5-
@@ -66,6 +67,7 @@ MAN3= Workflow.3 \
Workflow::Validator::InEnumeratedType.3 \
Workflow::Validator::MatchesDateFormat.3
+
.if !defined(NOPORTEXAMPLES)
PORTEXAMPLES= *
.endif
@@ -76,6 +78,9 @@ PORTDATA= *
PORTDOCS= *
.endif
+post-patch:
+ ${RM} ${WRKSRC}/lib/${PORTNAME}/Factory.pm.orig
+
post-install:
.if !defined(NOPORTEXAMPLES)
@${MKDIR} ${EXAMPLESDIR}
diff --git a/devel/p5-Workflow/files/patch-lib-Workflow-Factory.pm b/devel/p5-Workflow/files/patch-lib-Workflow-Factory.pm
new file mode 100644
index 000000000000..dfcc2fd9bc3e
--- /dev/null
+++ b/devel/p5-Workflow/files/patch-lib-Workflow-Factory.pm
@@ -0,0 +1,74 @@
+--- lib/Workflow/Factory.pm.orig 2009-01-26 18:07:31.000000000 +0300
++++ lib/Workflow/Factory.pm 2009-04-19 00:30:10.000000000 +0400
+@@ -1,6 +1,6 @@
+ package Workflow::Factory;
+
+-# $Id: Factory.pm 454 2009-01-12 10:04:02Z jonasbn $
++# $Id: Factory.pm 471 2009-04-18 20:29:51Z jonasbn $
+
+ use warnings;
+ use strict;
+@@ -11,7 +11,7 @@
+ use Carp qw(croak);
+ use English qw( -no_match_vars );
+
+-$Workflow::Factory::VERSION = '1.18';
++$Workflow::Factory::VERSION = '1.19';
+
+ my ($log);
+ my (%INSTANCES);
+@@ -494,13 +494,20 @@
+ foreach my $actions (@all_action_config) {
+ next unless ( ref $actions eq 'HASH' );
+
+- # Handle optional type.
++ # TODO Handle optional type.
+ # Should we check here to see if this matches an existing
+ # workflow type? Maybe do a type check at the end of the config
+ # process?
+ my $type = exists $actions->{type} ? $actions->{type} : 'default';
+
+- foreach my $action_config ( @{ $actions->{action} } ) {
++ my $a;
++ if ( exists $actions->{action} ) {
++ $a = $actions->{action};
++ } else {
++ push @{$a}, $actions;
++ }
++
++ foreach my $action_config ( @{$a} ) {
+ my $name = $action_config->{name};
+ $log->is_debug
+ && $log->debug(
+@@ -612,7 +619,14 @@
+ my $type
+ = exists $conditions->{type} ? $conditions->{type} : 'default';
+
+- foreach my $condition_config ( @{ $conditions->{condition} } ) {
++ my $c;
++ if ( exists $conditions->{condition} ) {
++ $c = $conditions->{condition};
++ } else {
++ push @{$c}, $conditions;
++ }
++
++ foreach my $condition_config ( @{$c} ) {
+ my $name = $condition_config->{name};
+ $log->is_debug
+ && $log->debug("Adding configuration for condition '$name'");
+@@ -679,7 +693,14 @@
+ foreach my $validators (@all_validator_config) {
+ next unless ( ref $validators eq 'HASH' );
+
+- for my $validator_config ( @{ $validators->{validator} } ) {
++ my $v;
++ if ( exists $validators->{validator} ) {
++ $v = $validators->{validator};
++ } else {
++ push @{$v}, $validators;
++ }
++
++ for my $validator_config ( @{$v} ) {
+ my $name = $validator_config->{name};
+ $log->is_debug
+ && $log->debug("Adding configuration for validator '$name'");