From 7ec635589fa40781ce114c5d6a39fb00b6446d60 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sat, 12 Jul 2003 19:18:49 +0000 Subject: [PATCH] * Let populate-linkdirs.pl automatically merge libraries. svn path=/nixpkgs/trunk/; revision=153 --- pkgs/system/populate-linkdirs.pl | 30 ++++++++++++++++++++++++++---- pkgs/system/system.fix | 2 -- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/pkgs/system/populate-linkdirs.pl b/pkgs/system/populate-linkdirs.pl index 4bff975f9cc..c551e9836cb 100755 --- a/pkgs/system/populate-linkdirs.pl +++ b/pkgs/system/populate-linkdirs.pl @@ -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); } diff --git a/pkgs/system/system.fix b/pkgs/system/system.fix index ef5458d6095..135617322a7 100644 --- a/pkgs/system/system.fix +++ b/pkgs/system/system.fix @@ -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")) ]