From 9e39ab6753b6b6fafc73ebc8e70967084c507c17 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Mon, 18 Mar 2019 22:22:17 -0500 Subject: [PATCH] generate-expr-from-tarballs.pl: more detection, detect gettext usage --- pkgs/servers/x11/xorg/default.nix | 12 ++++++------ pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl | 4 +++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/pkgs/servers/x11/xorg/default.nix b/pkgs/servers/x11/xorg/default.nix index 9bf1674b87c..40ef6c0d59e 100644 --- a/pkgs/servers/x11/xorg/default.nix +++ b/pkgs/servers/x11/xorg/default.nix @@ -936,7 +936,7 @@ lib.makeScope newScope (self: with self; { meta.platforms = stdenv.lib.platforms.unix; }) {}; - libXpm = callPackage ({ stdenv, pkgconfig, fetchurl, libX11, libXext, xorgproto, libXt }: stdenv.mkDerivation { + libXpm = callPackage ({ stdenv, pkgconfig, fetchurl, libX11, libXext, xorgproto, libXt, gettext }: stdenv.mkDerivation { name = "libXpm-3.5.12"; builder = ./builder.sh; src = fetchurl { @@ -944,7 +944,7 @@ lib.makeScope newScope (self: with self; { sha256 = "1v5xaiw4zlhxspvx76y3hq4wpxv7mpj6parqnwdqvpj8vbinsspx"; }; hardeningDisable = [ "bindnow" "relro" ]; - nativeBuildInputs = [ pkgconfig ]; + nativeBuildInputs = [ pkgconfig gettext ]; buildInputs = [ libX11 libXext xorgproto libXt ]; meta.platforms = stdenv.lib.platforms.unix; }) {}; @@ -2340,7 +2340,7 @@ lib.makeScope newScope (self: with self; { meta.platforms = stdenv.lib.platforms.unix; }) {}; - xfd = callPackage ({ stdenv, pkgconfig, fetchurl, libxkbfile, fontconfig, libXaw, libXft, libXmu, xorgproto, libXrender, libXt }: stdenv.mkDerivation { + xfd = callPackage ({ stdenv, pkgconfig, fetchurl, libxkbfile, fontconfig, libXaw, libXft, libXmu, xorgproto, libXrender, libXt, gettext }: stdenv.mkDerivation { name = "xfd-1.1.3"; builder = ./builder.sh; src = fetchurl { @@ -2348,7 +2348,7 @@ lib.makeScope newScope (self: with self; { sha256 = "0n6r1v8sm0z0ycqch035xpm46nv5v4mav3kxh36883l3ln5r6bqr"; }; hardeningDisable = [ "bindnow" "relro" ]; - nativeBuildInputs = [ pkgconfig ]; + nativeBuildInputs = [ pkgconfig gettext ]; buildInputs = [ libxkbfile fontconfig libXaw libXft libXmu xorgproto libXrender libXt ]; meta.platforms = stdenv.lib.platforms.unix; }) {}; @@ -2535,7 +2535,7 @@ lib.makeScope newScope (self: with self; { meta.platforms = stdenv.lib.platforms.unix; }) {}; - xload = callPackage ({ stdenv, pkgconfig, fetchurl, libX11, libXaw, libXmu, xorgproto, libXt }: stdenv.mkDerivation { + xload = callPackage ({ stdenv, pkgconfig, fetchurl, libX11, libXaw, libXmu, xorgproto, libXt, gettext }: stdenv.mkDerivation { name = "xload-1.1.3"; builder = ./builder.sh; src = fetchurl { @@ -2543,7 +2543,7 @@ lib.makeScope newScope (self: with self; { sha256 = "01sr6yd6yhyyfgn88l867w6h9dn5ikcynaz5rwji6xqxhw1lhkpk"; }; hardeningDisable = [ "bindnow" "relro" ]; - nativeBuildInputs = [ pkgconfig ]; + nativeBuildInputs = [ pkgconfig gettext ]; buildInputs = [ libX11 libXaw libXmu xorgproto libXt ]; meta.platforms = stdenv.lib.platforms.unix; }) {}; diff --git a/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl b/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl index 599a7843c2f..58083d2701f 100755 --- a/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl +++ b/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl @@ -26,7 +26,7 @@ my %pcMap; my %extraAttrs; -my @missingPCs = ("fontconfig", "libdrm", "libXaw", "zlib", "perl", "python", "mkfontscale", "bdftopcf", "libxslt", "openssl", "gperf", "m4", "libinput", "libevdev", "mtdev", "xorgproto", "cairo" ); +my @missingPCs = ("fontconfig", "libdrm", "libXaw", "zlib", "perl", "python", "mkfontscale", "bdftopcf", "libxslt", "openssl", "gperf", "m4", "libinput", "libevdev", "mtdev", "xorgproto", "cairo", "gettext" ); $pcMap{$_} = $_ foreach @missingPCs; $pcMap{"freetype2"} = "freetype"; $pcMap{"libpng12"} = "libpng"; @@ -214,6 +214,7 @@ while (<>) { #process \@requires, $1 while $file =~ /PKG_CHECK_MODULES\([^,]*,\s*[\[]?([^\)\[]*)/g; process \@requires, $1 while $file =~ /PKG_CHECK_MODULES\([^,]*,([^\)\,]*)/g; + process \@requires, $1 while $file =~ /AC_SEARCH_LIBS\([^,]*,([^\)\,]*)/g; process \@requires, $1 while $file =~ /MODULES=\"(.*)\"/g; process \@requires, $1 while $file =~ /REQUIRED_LIBS=\"(.*)\"/g; process \@requires, $1 while $file =~ /REQUIRED_MODULES=\"(.*)\"/g; @@ -225,6 +226,7 @@ while (<>) { process \@requires, $1 while $file =~ /ivo_requires=\"(.*)\"/g; process \@requires, $1 while $file =~ /XORG_DRIVER_CHECK_EXT\([^,]*,([^\)]*)\)/g; + push @nativeRequires, "gettext" if $file =~ /USE_GETTEXT/; push @requires, "libxslt" if $pkg =~ /libxcb/; push @requires, "gperf", "m4", "xorgproto" if $pkg =~ /xcbutil/;