From 0d225fb86ab3fc65b22de0475b7392c4ea7c3b1c Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 19 Jul 2010 08:59:05 +0000 Subject: [PATCH] * Support *.pc.in files that are not in the top directory of the package. svn path=/nixpkgs/branches/x-updates/; revision=22659 --- pkgs/servers/x11/xorg/default.nix | 8 ++++---- .../x11/xorg/generate-expr-from-tarballs.pl | 15 +++++++-------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/pkgs/servers/x11/xorg/default.nix b/pkgs/servers/x11/xorg/default.nix index ad4796c16d78..ff9935da7d8b 100644 --- a/pkgs/servers/x11/xorg/default.nix +++ b/pkgs/servers/x11/xorg/default.nix @@ -1534,8 +1534,8 @@ let url = mirror://xorg/individual/driver/xf86-video-intel-2.12.0.tar.bz2; sha256 = "1pzzzpw0i55m6s48ac8c3a0453rskqrdb4v6s9dq5bvj3ywpysz1"; }; - buildInputs = [pkgconfig dri2proto fontsproto glproto libdrm libpciaccess randrproto renderproto libX11 libxcb libXext xextproto xf86driproto libXfixes xorgserver xproto libXvMC ]; - })) // {inherit dri2proto fontsproto glproto libdrm libpciaccess randrproto renderproto libX11 libxcb libXext xextproto xf86driproto libXfixes xorgserver xproto libXvMC ;}; + buildInputs = [pkgconfig dri2proto fontsproto glproto libdrm libpciaccess randrproto renderproto libX11 xcbutil libxcb libXext xextproto xf86driproto libXfixes xorgserver xproto libXvMC ]; + })) // {inherit dri2proto fontsproto glproto libdrm libpciaccess randrproto renderproto libX11 xcbutil libxcb libXext xextproto xf86driproto libXfixes xorgserver xproto libXvMC ;}; xf86videomach64 = (stdenv.mkDerivation ((if overrides ? xf86videomach64 then overrides.xf86videomach64 else x: x) { name = "xf86-video-mach64-6.8.2"; @@ -1974,8 +1974,8 @@ let url = mirror://xorg/individual/app/xlsclients-1.1.0.tar.bz2; sha256 = "037sph4zyar6061445xmf1bqrmm00k6qr9lpypjnrx4ragsm2nzr"; }; - buildInputs = [pkgconfig libxcb ]; - })) // {inherit libxcb ;}; + buildInputs = [pkgconfig libxcb xcbutil ]; + })) // {inherit libxcb xcbutil ;}; xmessage = (stdenv.mkDerivation ((if overrides ? xmessage then overrides.xmessage else x: x) { name = "xmessage-1.0.3"; diff --git a/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl b/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl index ff6d3815bb5e..01d25923842c 100755 --- a/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl +++ b/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl @@ -46,8 +46,7 @@ while (<>) { die unless defined $1; my $pkg = $1; $pkg =~ s/-//g; - #next unless $pkg eq "printproto"; - #print "$pkg\n"; + #next unless $pkg eq "xcbutil"; $tarball =~ /\/([^\/]*)\.tar\.bz2$/; my $pkgName = $1; @@ -77,25 +76,25 @@ while (<>) { my $pkgDir = `echo $tmpDir/*`; chomp $pkgDir; - my $provides = `cd $pkgDir && ls *.pc.in`; + my $provides = `find $pkgDir -name "*.pc.in"`; my @provides2 = split '\n', $provides; my @requires = (); - print "PROVIDES @provides2\n\n"; foreach my $pcFile (@provides2) { my $pc = $pcFile; + $pc =~ s/.*\///; $pc =~ s/.pc.in//; - die "collission with $pcMap{$pc}" if defined $pcMap{$pc}; + print "PROVIDES $pc\n"; + die "collision with $pcMap{$pc}" if defined $pcMap{$pc}; $pcMap{$pc} = $pkg; - print "$pkgDir/$pcFile\n"; - open FOO, "<$pkgDir/$pcFile" or die; + open FOO, "<$pcFile" or die; while () { if (/Requires:(.*)/) { my @reqs = split ' ', $1; foreach my $req (@reqs) { next unless $req =~ /^[a-z]+$/; - print "REQUIRE (from $pcFile): $req\n"; + print "REQUIRE (from $pc): $req\n"; push @requires, $req; } }