* Let populate-linkdirs.pl automatically merge libraries.

svn path=/nixpkgs/trunk/; revision=153
This commit is contained in:
Eelco Dolstra 2003-07-12 19:18:49 +00:00
parent 0f0a347992
commit 7ec635589f
2 changed files with 26 additions and 6 deletions

View file

@ -18,7 +18,8 @@ sub createLinks {
my $basename = $srcfile;
$basename =~ s/^.*\///g; # strip directory
my $dstfile = "$dstdir/$basename";
if (-d $srcfile) {
if ($srcfile =~ /\/envpkgs$/) {
} elsif (-d $srcfile) {
# !!! hack for resolving name clashes
if (!-e $dstfile) {
mkdir $dstfile, 0755 ||
@ -37,13 +38,34 @@ sub createLinks {
}
}
my %done;
sub addPkg {
my $pkgdir = shift;
return if (defined $done{$pkgdir});
$done{$pkgdir} = 1;
print "merging $pkgdir\n";
createLinks("$pkgdir", "$selfdir");
if (-f "$pkgdir/envpkgs") {
my $envpkgs = `cat $pkgdir/envpkgs`;
chomp $envpkgs;
my @envpkgs = split / +/, $envpkgs;
foreach my $envpkg (@envpkgs) {
addPkg($envpkg);
}
}
}
foreach my $name (keys %ENV) {
next unless ($name =~ /^act.*$/);
my $pkgdir = $ENV{$name};
print "merging $pkgdir\n";
createLinks("$pkgdir", "$selfdir");
addPkg($pkgdir);
}

View file

@ -2,9 +2,7 @@ Package(
[ ("name", "system")
, ("build", Relative("system/populate-linkdirs.pl"))
, ("actATerm", IncludeFix("aterm/aterm.fix"))
, ("actPkgConfig", IncludeFix("pkgconfig/pkgconfig.fix"))
, ("actOpenSSL", IncludeFix("openssl/openssl.fix"))
, ("actSubversion", IncludeFix("subversion/subversion.fix"))
, ("actPan", IncludeFix("pan/pan.fix"))
]