Update of /cvsroot/fink/experimental/beren12/finkinfo/fink
In directory usw-pr-cvs1:/tmp/cvs-serv4534

Added Files:
        fink-builddir.patch 
Log Message:
still 1 bug..

--- NEW FILE: fink-builddir.patch ---
diff -ruN Fink/Config.pm Fink.new/Config.pm
--- Fink/Config.pm      Sun Sep  8 20:11:38 2002
+++ Fink.new/Config.pm  Thu Nov  7 18:48:53 2002
@@ -36,12 +36,12 @@
   @ISA         = qw(Exporter Fink::Base);
   @EXPORT      = qw();
   @EXPORT_OK   = qw($config $basepath $libpath $debarch $darwin_version 
$macosx_version $distribution
-                    &get_option &set_options &verbosity_level);
+                    &get_option &set_options &verbosity_level $buildpath);
   %EXPORT_TAGS = ( );   # eg: TAG => [ qw!name1 name2! ],
 }
 our @EXPORT_OK;
 
-our ($config, $basepath, $libpath, $debarch, $darwin_version, $macosx_version, 
$distribution);
+our ($config, $basepath, $libpath, $debarch, $darwin_version, $macosx_version, 
+$distribution, $buildpath);
 $debarch = "darwin-powerpc";
 
 my %globals = ();
@@ -87,6 +87,11 @@
   $basepath = $self->param("Basepath");
   die "Basepath not set in config file \"".$self->{_path}."\"!\n"
     unless (defined $basepath and $basepath);
+
+  #hmm...a hidden option atm ;-)
+  unless ( $buildpath = $self->param("Buildpath") ) {
+    $buildpath = "$basepath/src"; }
+
   $libpath = "$basepath/lib/fink";
   $distribution = $self->param("Distribution");
 
diff -ruN Fink/PkgVersion.pm Fink.new/PkgVersion.pm
--- Fink/PkgVersion.pm  Sun Oct 13 19:37:23 2002
+++ Fink.new/PkgVersion.pm      Thu Nov  7 19:01:20 2002
@@ -28,7 +28,7 @@
                      &prompt_boolean &prompt_selection
                      &collapse_space &read_properties_var
                      &file_MD5_checksum);
-use Fink::Config qw($config $basepath $libpath $debarch);
+use Fink::Config qw($config $basepath $libpath $debarch $buildpath);
 use Fink::NetAccess qw(&fetch_url_to_file);
 use Fink::Mirror;
 use Fink::Package;
@@ -122,11 +122,11 @@
   # percent-expansions
   $configure_params = "--prefix=\%p ".
     $self->param_default("ConfigureParams", "");
-  $destdir = "$basepath/src/root-".$self->{_fullname};
+  $destdir = "$buildpath/root-".$self->{_fullname};
   if ($self->{_type} eq "splitoff") {
     my $parent = $self->{parent};
     $parentpkgname = $parent->{_name};
-    $parentdestdir = "$basepath/src/root-".$parent->{_fullname};
+    $parentdestdir = "$buildpath/root-".$parent->{_fullname};
   } else {
     $parentpkgname = $pkgname;
     $parentdestdir = $destdir;
@@ -306,13 +306,13 @@
   my ($destdir);
   my $splitoff;
 
-  $destdir = "$basepath/src/root-".$self->{_fullname};
+  $destdir = "$buildpath/root-".$self->{_fullname};
   $self->{_expand}->{p} = $basepath;
   $self->{_expand}->{d} = $destdir;
   $self->{_expand}->{i} = $destdir.$basepath;
   if ($self->{_type} eq "splitoff") {
     my $parent = $self->{parent};
-    my $parentdestdir = "$basepath/src/root-".$parent->{_fullname};
+    my $parentdestdir = "$buildpath/root-".$parent->{_fullname};
     $self->{_expand}->{D} = $parentdestdir;
     $self->{_expand}->{I} = $parentdestdir.$basepath;
   } else {
@@ -474,7 +474,7 @@
     $self->{_builddir} = $self->get_fullname()."/".$dir;
   }
 
-  $self->{_expand}->{b} = "$basepath/src/".$self->{_builddir};
+  $self->{_expand}->{b} = "$buildpath/".$self->{_builddir};
   return $self->{_builddir};
 }
 
@@ -934,7 +934,7 @@
   }
 
   # remove dir if it exists
-  chdir "$basepath/src";
+  chdir "$buildpath";
   if (-e $bdir) {
     if (&execute("rm -rf $bdir")) {
       die "can't remove existing directory $bdir\n";
@@ -942,7 +942,7 @@
   }
 
   if ($self->{_type} eq "nosource") {
-    $destdir = "$basepath/src/$bdir";
+    $destdir = "$buildpath/$bdir";
     if (&execute("mkdir -p $destdir")) {
       die "can't create directory $destdir\n";
     }
@@ -1045,7 +1045,7 @@
     }
 
     # calculate destination directory
-    $destdir = "$basepath/src/$bdir";
+    $destdir = "$buildpath/$bdir";
     if ($i > 1) {
       if ($self->has_param("Source".$i."ExtractDir")) {
        $destdir .= "/".&expand_percent($self->param("Source".$i."ExtractDir"), 
$self->{_expand});
@@ -1103,10 +1103,10 @@
   }
 
   $dir = $self->get_build_directory();
-  if (not -d "$basepath/src/$dir") {
-    die "directory $basepath/src/$dir doesn't exist, check the package description\n";
+  if (not -d "$buildpath/$dir") {
+    die "directory $buildpath/$dir doesn't exist, check the package description\n";
   }
-  chdir "$basepath/src/$dir";
+  chdir "$buildpath/$dir";
 
   $patch_script = "";
 
@@ -1189,10 +1189,10 @@
   }
 
   $dir = $self->get_build_directory();
-  if (not -d "$basepath/src/$dir") {
-    die "directory $basepath/src/$dir doesn't exist, check the package description\n";
+  if (not -d "$buildpath/$dir") {
+    die "directory $buildpath/$dir doesn't exist, check the package description\n";
   }
-  chdir "$basepath/src/$dir";
+  chdir "$buildpath/$dir";
 
   # generate compilation script
   if ($self->has_param("CompileScript")) {
@@ -1234,10 +1234,10 @@
     } else {
       $dir = $self->get_build_directory();
     }
-    if (not -d "$basepath/src/$dir") {
-      die "directory $basepath/src/$dir doesn't exist, check the package 
description\n";
+    if (not -d "$buildpath/$dir") {
+      die "directory $buildpath/$dir doesn't exist, check the package description\n";
     }
-    chdir "$basepath/src/$dir";
+    chdir "$buildpath/$dir";
   }
 
   # generate installation script
@@ -1394,7 +1394,7 @@
 
   if (not $do_splitoff) {
     $bdir = $self->get_fullname();
-    chdir "$basepath/src";
+    chdir "$buildpath";
     if (not $config->param_boolean("KeepBuildDir") and -e $bdir) {
       if (&execute("rm -rf $bdir")) {
        &print_breaking("WARNING: Can't remove build directory $bdir. ".
@@ -1427,9 +1427,9 @@
     return;
   }
 
-  chdir "$basepath/src";
+  chdir "$buildpath";
   $ddir = "root-".$self->get_fullname();
-  $destdir = "$basepath/src/$ddir";
+  $destdir = "$buildpath/$ddir";
 
   if (not -d "$destdir/DEBIAN") {
     if (&execute("mkdir -p $destdir/DEBIAN")) {
diff -ruN Fink/Validation.pm Fink.new/Validation.pm
--- Fink/Validation.pm  Sun Oct 13 21:36:43 2002
+++ Fink.new/Validation.pm      Thu Nov  7 19:06:38 2002
@@ -23,7 +23,7 @@
 package Fink::Validation;
 
 use Fink::Services qw(&read_properties &expand_percent);
-use Fink::Config qw($config $basepath);
+use Fink::Config qw($config $basepath $buildpath);
 
 use strict;
 use warnings;
@@ -172,7 +172,7 @@
   my ($properties, @parts);
   my ($pkgname, $pkgversion, $pkgrevision, $pkgfullname, $pkgdestdir, $pkgpatchpath);
   my ($field, $value);
-  my ($basepath, $expand);
+  my ($basepath, $expand $buildpath);
   my $looks_good = 1;
   my $error_found = 0;
 
@@ -185,12 +185,13 @@
   
   # determine the base path
   $basepath = $config->param("basepath");
+  $buildpath = $config->param("buildpath");
 
   $pkgname = $properties->{package};
   $pkgversion = $properties->{version};
   $pkgrevision = $properties->{revision};
   $pkgfullname = "$pkgname-$pkgversion-$pkgrevision";
-  $pkgdestdir = "$basepath/src/root-".$pkgfullname;
+  $pkgdestdir = "$buildpath/root-".$pkgfullname;
   
   @parts = split(/\//, $filename);
   $filename = pop @parts;   # remove filename



-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm 
Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
_______________________________________________
Fink-commits mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-commits

Reply via email to