head	1.2;
access;
symbols
	pkgsrc-2013Q2:1.1.0.14
	pkgsrc-2013Q2-base:1.1
	pkgsrc-2013Q1:1.1.0.12
	pkgsrc-2013Q1-base:1.1
	pkgsrc-2012Q4:1.1.0.10
	pkgsrc-2012Q4-base:1.1
	pkgsrc-2012Q3:1.1.0.8
	pkgsrc-2012Q3-base:1.1
	pkgsrc-2012Q2:1.1.0.6
	pkgsrc-2012Q2-base:1.1
	pkgsrc-2012Q1:1.1.0.4
	pkgsrc-2012Q1-base:1.1
	pkgsrc-2011Q4:1.1.0.2
	pkgsrc-2011Q4-base:1.1;
locks; strict;
comment	@# @;


1.2
date	2013.08.15.11.12.06;	author marino;	state dead;
branches;
next	1.1;
commitid	H8gHqh7qKxKFBx1x;

1.1
date	2011.11.02.21.13.30;	author marino;	state Exp;
branches;
next	;


desc
@@


1.2
log
@Remove pkgtools/tinderbox-dragonfly

This package is no longer in use, and is far behind upstream now.
It is heavily customized so maintenance is far from trivial.  There were
no objections to the announcement of my intentions to remove this package
which I made on package-users@@ a month ago.

I feel it is better to retire this package than allow it to bitrot further.
@
text
@$NetBSD: patch-az,v 1.1 2011/11/02 21:13:30 marino Exp $

--- ../FreeBSD/lib/Tinderbox/TinderboxDS.pm	2011-10-16 00:52:55.000000000 +0000
+++ lib/Tinderbox/TinderboxDS.pm
@@@@ -753,6 +753,96 @@@@ sub clearDependenciesForPort {
         return $rc;
 }
 
+sub getDependencyCascades_search {
+        my $self      = shift;
+        my $build_id  = shift;
+        my $port_id   = shift;
+        my $typelimit = shift;
+
+        my @@results = ();
+        my @@params = ($build_id, $port_id);
+        my $query = "SELECT build_port_id " . 
+                    "FROM build_ports " .
+                    "WHERE build_id=? AND port_id=?";
+        my $rc = $self->_doQueryHashRef($query, \@@results, @@params);
+        if (!$rc) {
+                return undef;
+        }
+        my $build_port_id = $results[0]->{'build_port_id'};
+
+        @@results = ();
+        @@params = ($build_port_id);
+        $query = "SELECT port_id " . 
+                 "FROM port_dependencies " .
+                 "WHERE build_port_id=? "; 
+
+        if ($typelimit) {
+                $query .= "AND dependency_type IN " . 
+                          "('DEPENDS','RUN_DEPENDS','LIB_DEPENDS')";
+        }
+
+        $rc = $self->_doQueryHashRef($query, \@@results, @@params);
+        if (!$rc) {
+                return undef;
+        }
+
+        my @@deps = ();
+        foreach my $result (@@results) {
+                push @@deps, $result->{'port_id'};
+        }
+        return @@deps;
+}
+
+sub getDependencyCascades {
+        my $self    = shift;
+        my $port    = shift;
+        my $build   = shift;
+
+        $self->verifyType(1, $port,  'Port');
+        $self->verifyType(2, $build, 'Build');
+
+        my $pkg;
+        my @@CascadeSet = ();
+        my %CheckList = ($port->getId(), 1);
+        my @@FirstList = $self->getDependencyCascades_search (
+                               $build->getId(), $port->getId(), 0);
+        foreach $pkg(@@FirstList) {
+                $CheckList{$pkg} = 0;
+        }
+        my $cascadePkg;
+        my @@NextList;
+        my @@mandate = @@FirstList;
+        my $advance = (scalar keys %CheckList > 0);
+        while ($advance) {
+                foreach $pkg (@@mandate) {
+                        $CheckList{$pkg} = 1;
+                        @@NextList = $self->getDependencyCascades_search (
+                                           $build->getId(), $pkg, 1);
+                        foreach $cascadePkg (@@NextList) {
+                                if (!exists $CheckList{$cascadePkg}) {
+                                        $CheckList{$cascadePkg} = 0;
+                                        push @@CascadeSet, $cascadePkg;
+                                }
+                        }
+                }
+                @@mandate = ();
+                $advance = 0;
+                foreach $pkg (keys %CheckList) {
+                        if ($CheckList{$pkg} == 0) {
+                                push @@mandate, $pkg;
+                                $advance = 1;
+                        }
+                }
+        }
+
+        my @@deps = ();
+        foreach $pkg (@@CascadeSet) {
+                my $pCls = $self->getPortById($pkg);
+                push @@deps, $pCls if (defined($pCls));
+        }
+        return @@deps;
+}
+
 sub getDependenciesForPort {
         my $self    = shift;
         my $port    = shift;
@


1.1
log
@Import pkgtools/tinderbox-dragonfly

Tinderbox is a well-known package building system for FreeBSD.
This commit ports the original Tinderbox to DragonFly.  The scripts
are highly platform specific, so only one operating system can be
supported per package.  With interest, alternative versions such as
tinderbox-netbsd and tinderbox-sunos could be developed fairly easily
as they would share the pkgsrc-specific changes with this package.

The repository for the project is:
https://github.com/jrmarino/pkgsrc-tinderbox
@
text
@d1 1
a1 1
$NetBSD$
@

