* Let populate-linkdirs.pl automatically merge libraries.
svn path=/nixpkgs/trunk/; revision=153
This commit is contained in:
parent
0f0a347992
commit
7ec635589f
|
@ -18,7 +18,8 @@ sub createLinks {
|
||||||
my $basename = $srcfile;
|
my $basename = $srcfile;
|
||||||
$basename =~ s/^.*\///g; # strip directory
|
$basename =~ s/^.*\///g; # strip directory
|
||||||
my $dstfile = "$dstdir/$basename";
|
my $dstfile = "$dstdir/$basename";
|
||||||
if (-d $srcfile) {
|
if ($srcfile =~ /\/envpkgs$/) {
|
||||||
|
} elsif (-d $srcfile) {
|
||||||
# !!! hack for resolving name clashes
|
# !!! hack for resolving name clashes
|
||||||
if (!-e $dstfile) {
|
if (!-e $dstfile) {
|
||||||
mkdir $dstfile, 0755 ||
|
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) {
|
foreach my $name (keys %ENV) {
|
||||||
|
|
||||||
next unless ($name =~ /^act.*$/);
|
next unless ($name =~ /^act.*$/);
|
||||||
|
|
||||||
my $pkgdir = $ENV{$name};
|
my $pkgdir = $ENV{$name};
|
||||||
|
|
||||||
print "merging $pkgdir\n";
|
addPkg($pkgdir);
|
||||||
|
|
||||||
createLinks("$pkgdir", "$selfdir");
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,9 +2,7 @@ Package(
|
||||||
[ ("name", "system")
|
[ ("name", "system")
|
||||||
, ("build", Relative("system/populate-linkdirs.pl"))
|
, ("build", Relative("system/populate-linkdirs.pl"))
|
||||||
|
|
||||||
, ("actATerm", IncludeFix("aterm/aterm.fix"))
|
|
||||||
, ("actPkgConfig", IncludeFix("pkgconfig/pkgconfig.fix"))
|
, ("actPkgConfig", IncludeFix("pkgconfig/pkgconfig.fix"))
|
||||||
, ("actOpenSSL", IncludeFix("openssl/openssl.fix"))
|
|
||||||
, ("actSubversion", IncludeFix("subversion/subversion.fix"))
|
, ("actSubversion", IncludeFix("subversion/subversion.fix"))
|
||||||
, ("actPan", IncludeFix("pan/pan.fix"))
|
, ("actPan", IncludeFix("pan/pan.fix"))
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue