mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-25 20:34:52 +03:00
* 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;
|
||||
$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);
|
||||
}
|
||||
|
@ -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"))
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user