inetutils: cross compile

authored by Michael Eden and committed by Frederik Rietdijk 19094e72 ad7e5872

+39 -1
+13 -1
pkgs/tools/networking/inetutils/default.nix
··· 11 11 patches = [ 12 12 ./whois-Update-Canadian-TLD-server.patch 13 13 ./service-name.patch 14 + # https://git.congatec.com/yocto/meta-openembedded/commit/3402bfac6b595c622e4590a8ff5eaaa854e2a2a3 15 + ./inetutils-1_9-PATH_PROCNET_DEV.patch 14 16 ]; 15 17 16 - buildInputs = [ ncurses /* for `talk' */ perl /* for `whois' */ help2man ]; 18 + nativeBuildInputs = [ help2man perl /* for `whois' */ ]; 19 + buildInputs = [ ncurses /* for `talk' */ ]; 20 + 21 + # Don't use help2man if cross-compiling 22 + # https://lists.gnu.org/archive/html/bug-sed/2017-01/msg00001.html 23 + # https://git.congatec.com/yocto/meta-openembedded/blob/3402bfac6b595c622e4590a8ff5eaaa854e2a2a3/meta-networking/recipes-connectivity/inetutils/inetutils_1.9.1.bb#L44 24 + preConfigure = let 25 + isCross = stdenv.hostPlatform != stdenv.buildPlatform; 26 + in lib.optionalString isCross '' 27 + export HELP2MAN=true 28 + ''; 17 29 18 30 configureFlags = [ "--with-ncurses-include-dir=${ncurses.dev}/include" ] 19 31 ++ lib.optionals stdenv.hostPlatform.isMusl [ # Musl doesn't define rcmd
+26
pkgs/tools/networking/inetutils/inetutils-1_9-PATH_PROCNET_DEV.patch
··· 1 + inetutils: define PATH_PROCNET_DEV if not already defined 2 + 3 + this prevents the following compilation error : 4 + system/linux.c:401:15: error: 'PATH_PROCNET_DEV' undeclared (first use in this function) 5 + 6 + this patch comes from : 7 + http://repository.timesys.com/buildsources/i/inetutils/inetutils-1.9/ 8 + 9 + Upstream-Status: Inappropriate [not author] 10 + 11 + Signed-of-by: Eric Bénard <eric@eukrea.com> 12 + --- 13 + diff -Naur inetutils-1.9.orig/ifconfig/system/linux.c inetutils-1.9/ifconfig/system/linux.c 14 + --- inetutils-1.9.orig/ifconfig/system/linux.c 2012-01-04 16:31:36.000000000 -0500 15 + +++ inetutils-1.9/ifconfig/system/linux.c 2012-01-04 16:40:53.000000000 -0500 16 + @@ -49,6 +49,10 @@ 17 + #include "../ifconfig.h" 18 + 19 + 20 + +#ifndef PATH_PROCNET_DEV 21 + + #define PATH_PROCNET_DEV "/proc/net/dev" 22 + +#endif 23 + + 24 + /* ARPHRD stuff. */ 25 + 26 + static void