From 43a679bab72a9fa7d4e591b457e4828a034c2f6f Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 16 Jan 2006 15:07:03 +0000 Subject: [PATCH] * More dependencies. svn path=/nixpkgs/trunk/; revision=4562 --- pkgs/servers/x11/xorg/default.nix | 4 +- .../x11/xorg/generate-expr-from-tarballs.pl | 67 ++++++++++++------- 2 files changed, 45 insertions(+), 26 deletions(-) diff --git a/pkgs/servers/x11/xorg/default.nix b/pkgs/servers/x11/xorg/default.nix index d5ce38065284..551e518ec8c9 100644 --- a/pkgs/servers/x11/xorg/default.nix +++ b/pkgs/servers/x11/xorg/default.nix @@ -2622,8 +2622,8 @@ rec { url = http://mirror.switch.ch/ftp/mirror/X11/pub/X11R7.0/src/everything/xorg-server-X11R7.0-1.0.1.tar.bz2; md5 = "0e7527480fb845a3c2e333bd0f47ff50"; }; - buildInputs = [pkgconfig bigreqsproto compositeproto damageproto libdmx dmxproto evieext fixesproto fontcacheproto libfontenc fontsproto glproto inputproto liblbxutil libdrm printproto randrproto recordproto renderproto resourceproto scrnsaverproto trapproto videoproto libX11 libXau libXaw xcmiscproto libXdmcp libXext xextproto xf86bigfontproto xf86dgaproto xf86driproto xf86miscproto xf86vidmodeproto libXfont libXi xineramaproto libxkbfile libXmu libXpm xproto libXrender libXres libXt xtrans libXtst ]; - }) // {inherit bigreqsproto compositeproto damageproto libdmx dmxproto evieext fixesproto fontcacheproto libfontenc fontsproto glproto inputproto liblbxutil libdrm printproto randrproto recordproto renderproto resourceproto scrnsaverproto trapproto videoproto libX11 libXau libXaw xcmiscproto libXdmcp libXext xextproto xf86bigfontproto xf86dgaproto xf86driproto xf86miscproto xf86vidmodeproto libXfont libXi xineramaproto libxkbfile libXmu libXpm xproto libXrender libXres libXt xtrans libXtst ;}; + buildInputs = [pkgconfig bigreqsproto compositeproto damageproto libdmx dmxproto evieext fixesproto fontcacheproto libfontenc fontsproto glproto inputproto liblbxutil libdrm mesa perl printproto randrproto recordproto renderproto resourceproto scrnsaverproto trapproto videoproto libX11 libXau libXaw xcmiscproto libXdmcp libXext xextproto xf86bigfontproto xf86dgaproto xf86driproto xf86miscproto xf86vidmodeproto libXfont libXi xineramaproto libxkbfile libxkbui libXmu libXpm xproto libXrender libXres libXt xtrans libXtst libXxf86misc libXxf86vm zlib ]; + }) // {inherit bigreqsproto compositeproto damageproto libdmx dmxproto evieext fixesproto fontcacheproto libfontenc fontsproto glproto inputproto liblbxutil libdrm mesa perl printproto randrproto recordproto renderproto resourceproto scrnsaverproto trapproto videoproto libX11 libXau libXaw xcmiscproto libXdmcp libXext xextproto xf86bigfontproto xf86dgaproto xf86driproto xf86miscproto xf86vidmodeproto libXfont libXi xineramaproto libxkbfile libxkbui libXmu libXpm xproto libXrender libXres libXt xtrans libXtst libXxf86misc libXxf86vm zlib ;}; xorgsgmldoctools = (stdenv.mkDerivation { name = "xorg-sgml-doctools-1.0.1"; diff --git a/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl b/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl index 9c3044d5ab47..0b627c486226 100755 --- a/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl +++ b/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl @@ -27,9 +27,10 @@ $pcMap{"freetype2"} = "freetype"; $pcMap{"fontconfig"} = "fontconfig"; $pcMap{"libpng12"} = "libpng"; $pcMap{"libdrm"} = "libdrm"; -$pcMap{"libdrm"} = "libdrm"; $pcMap{"libXaw"} = "libXaw"; $pcMap{"zlib"} = "zlib"; +$pcMap{"perl"} = "perl"; +$pcMap{"mesa"} = "mesa"; $extraAttrs{"imake"} = " inherit xorgcffiles; x11BuildHook = ./imake.sh; patches = [./imake.patch]; "; @@ -54,6 +55,7 @@ while (<>) { die unless defined $1; my $pkg = $1; $pkg =~ s/-//g; +# next unless $pkg eq "xorgserverX11R7"; print "$pkg\n"; $pkg =~ s/$version//g if $version ne ""; $pkgURLs{$pkg} = $tarball; @@ -90,31 +92,48 @@ while (<>) { } my @requires = (); - open FOO, "cd '$tmpDir'/* && cat configure.ac |"; - while () { - if (/XAW_CHECK_XPRINT_SUPPORT/) { - push @requires, "libXaw"; - } - if (/zlib is required/ || /AC_CHECK_LIB\(z\,/) { - push @requires, "zlib"; - } - if (/PKG_CHECK_MODULES\([^,]*,\s*\[?([^\),\]]*)/ || - /MODULES=\"(.*)\"/ || - /REQUIRED_LIBS=\"(.*)\"/ || - /REQUIRES=\"(.*)\"/) - { - foreach my $req (split / /, $1) { - next if $req eq ">="; - next if $req =~ /^\$/; - next if $req =~ /^[0-9]/; - $req =~ s/\[//g; - $req =~ s/\]//g; - print "REQUIRE: $req\n"; - push @requires, $req; - } + my $file; + { + local $/; + open FOO, "cd '$tmpDir'/* && cat configure.ac |"; + $file = ; + close FOO; + } + + if ($file =~ /XAW_CHECK_XPRINT_SUPPORT/) { + push @requires, "libXaw"; + } + + if ($file =~ /zlib is required/ || $file =~ /AC_CHECK_LIB\(z\,/) { + push @requires, "zlib"; + } + + if ($file =~ /Perl is required/) { + push @requires, "perl"; + } + + sub process { + my $requires = shift; + foreach my $req (split / /, $1) { + next if $req eq ">="; + next if $req =~ /^\$/; + next if $req =~ /^[0-9]/; + $req =~ s/\[//g; + $req =~ s/\]//g; + print "REQUIRE: $req\n"; + push @{$requires}, $req; } } - print "REQUIRES @requires\n"; + + process \@requires, $1 while $file =~ /PKG_CHECK_MODULES\([^,]*,\s*\[?([^\),\]]*)/g; + process \@requires, $1 while $file =~ /MODULES=\"(.*)\"/g; + process \@requires, $1 while $file =~ /REQUIRED_LIBS=\"(.*)\"/g; + process \@requires, $1 while $file =~ /REQUIRES=\"(.*)\"/g; + + push @requires, "mesa" if $pkg =~ /xorgserver/; + push @requires, "zlib" if $pkg =~ /xorgserver/; + + print "REQUIRES @requires => $pkg\n"; $pkgRequires{$pkg} = \@requires; print "done\n";