diff options
Diffstat (limited to 'databases/p5-Class-DBI-Loader-Relationship')
5 files changed, 87 insertions, 0 deletions
diff --git a/databases/p5-Class-DBI-Loader-Relationship/Makefile b/databases/p5-Class-DBI-Loader-Relationship/Makefile new file mode 100644 index 000000000000..9f3b1377419f --- /dev/null +++ b/databases/p5-Class-DBI-Loader-Relationship/Makefile @@ -0,0 +1,34 @@ +# New ports collection makefile for: p5-Class-DBI-Loader-Relationship +# Date created: Apr 4 2004 +# Whom: Lars Thegler <lars@thegler.dk> +# +# $FreeBSD$ + +PORTNAME= Class-DBI-Loader-Relationship +PORTVERSION= 1.2 +CATEGORIES= databases perl5 +MASTER_SITES= ${MASTER_SITE_PERL_CPAN} +MASTER_SITE_SUBDIR= Class +PKGNAMEPREFIX= p5- + +MAINTAINER= lars@thegler.dk +COMMENT= Easier relationship specification in CDBI::L + +BUILD_DEPENDS= ${SITE_PERL}/Class/DBI/Loader.pm:${PORTSDIR}/databases/p5-Class-DBI-Loader \ + ${SITE_PERL}/Lingua/EN/Inflect/Number.pm:${PORTSDIR}/textproc/p5-Lingua-EN-Inflect-Number +RUN_DEPENDS= ${BUILD_DEPENDS} + +PERL_CONFIGURE= yes + +MAN3= Class::DBI::Loader::Relationship.3 + +.include <bsd.port.pre.mk> + +.if ${PERL_LEVEL} < 500600 +EXTRA_PATCHES= ${PATCHDIR}/500503-Relationship.pm + +post-configure: + ${PERL} -pi -e 's,/usr/local/,\$$(PREFIX)/,g' ${WRKSRC}/Makefile +.endif + +.include <bsd.port.post.mk> diff --git a/databases/p5-Class-DBI-Loader-Relationship/distinfo b/databases/p5-Class-DBI-Loader-Relationship/distinfo new file mode 100644 index 000000000000..09d5755030bc --- /dev/null +++ b/databases/p5-Class-DBI-Loader-Relationship/distinfo @@ -0,0 +1,2 @@ +MD5 (Class-DBI-Loader-Relationship-1.2.tar.gz) = d5a3262146ee4c63a46a5c87205c5619 +SIZE (Class-DBI-Loader-Relationship-1.2.tar.gz) = 3109 diff --git a/databases/p5-Class-DBI-Loader-Relationship/files/500503-Relationship.pm b/databases/p5-Class-DBI-Loader-Relationship/files/500503-Relationship.pm new file mode 100644 index 000000000000..29af7047dbb8 --- /dev/null +++ b/databases/p5-Class-DBI-Loader-Relationship/files/500503-Relationship.pm @@ -0,0 +1,33 @@ +--- Relationship.pm.orig Mon Mar 1 16:48:45 2004 ++++ Relationship.pm Sun Apr 4 22:30:41 2004 +@@ -1,9 +1,8 @@ + package Class::DBI::Loader::Relationship; +-use 5.006; + use strict; +-use warnings; +-our $VERSION = '1.2'; +-our $DEBUG = 0; ++use vars qw($VERSION $DEBUG); ++$VERSION = '1.2'; ++$DEBUG = 0; + + 1; + +@@ -82,7 +81,7 @@ + "$via_c->has_a(".to_S($to)." => $to_c)\n". + "$from_c->$method($mapper => [ $via_c => ".to_S($to)." ])\n". + "$to_c->has_many(".to_PL($from)." => [ $via_c => ".to_S($from)." ])\n" +- if $DEBUG; ++ if $Class::DBI::Loader::Relationship::DEBUG; + + $via_c->has_a(to_S($from) => $from_c); + $via_c->has_a(to_S($to) => $to_c); +@@ -92,7 +91,7 @@ + } + return "$from_c->$method($mapper => $to_c);\n". + ($method ne "has_a" && "$to_c->has_a(".to_S($from)." => $from_c);\n") +- if $DEBUG; ++ if $Class::DBI::Loader::Relationship::DEBUG; + $from_c->$method($mapper => $to_c); + $to_c->has_a(to_S($from) => $from_c) unless $method eq "has_a"; + } diff --git a/databases/p5-Class-DBI-Loader-Relationship/pkg-descr b/databases/p5-Class-DBI-Loader-Relationship/pkg-descr new file mode 100644 index 000000000000..a2e89ea2f643 --- /dev/null +++ b/databases/p5-Class-DBI-Loader-Relationship/pkg-descr @@ -0,0 +1,9 @@ +This module acts as a mix-in, adding the relationship method to +Class::DBI::Loader. Since Class::DBI::Loader knows how to map between +table names and class names, there ought to be no need to replicate +the names. In addition, it is common (but not universal) to want +reverse relationships defined for has-many relationships, and for +has-a relationships to be defined for the linkages surrounding a +many-to-many table. + +WWW: http://search.cpan.org/dist/Class-DBI-Loader-Relationship/ diff --git a/databases/p5-Class-DBI-Loader-Relationship/pkg-plist b/databases/p5-Class-DBI-Loader-Relationship/pkg-plist new file mode 100644 index 000000000000..201a151d4eb9 --- /dev/null +++ b/databases/p5-Class-DBI-Loader-Relationship/pkg-plist @@ -0,0 +1,9 @@ +%%SITE_PERL%%/Class/DBI/Loader/Relationship.pm +%%SITE_PERL%%/%%PERL_ARCH%%/auto/Class/DBI/Loader/Relationship/.packlist +@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/Class/DBI/Loader/Relationship +@unexec rmdir %D/%%SITE_PERL%%/%%PERL_ARCH%%/auto/Class/DBI/Loader 2>/dev/null || true +@unexec rmdir %D/%%SITE_PERL%%/%%PERL_ARCH%%/auto/Class/DBI 2>/dev/null || true +@unexec rmdir %D/%%SITE_PERL%%/%%PERL_ARCH%%/auto/Class 2>/dev/null || true +@unexec rmdir %D/%%SITE_PERL%%/Class/DBI/Loader 2>/dev/null || true +@unexec rmdir %D/%%SITE_PERL%%/Class/DBI 2>/dev/null || true +@unexec rmdir %D/%%SITE_PERL%%/Class 2>/dev/null || true |