lsof: 4.89 -> 4.90

- The patch has been applied upstream.

- LSOF_INCLUDE was referring to wrong output, this broke the build.

- Remove an unneeded legacy sed.

- Maintain, while at it.
This commit is contained in:
Tuomas Tynkkynen 2018-03-08 15:44:22 +02:00
parent 3d251d06c2
commit c37e1e2ff9
2 changed files with 4 additions and 25 deletions

View File

@ -4,7 +4,7 @@ let dialect = with stdenv.lib; last (splitString "-" stdenv.system); in
stdenv.mkDerivation rec {
name = "lsof-${version}";
version = "4.89";
version = "4.90";
depsBuildBuild = [ buildPackages.stdenv.cc ];
buildInputs = [ ncurses ];
@ -23,22 +23,19 @@ stdenv.mkDerivation rec {
+ "${stdenv.lib.optionalString isOld "OLD/"}lsof_${version}.tar.bz2"
) [ false true ]
;
sha256 = "061p18v0mhzq517791xkjs8a5dfynq1418a1mwxpji69zp2jzb41";
sha256 = "1xhn3amvl5mmwji5g90nkw7lfmh2494v18qbv1f729hrg468853g";
};
unpackPhase = "tar xvjf $src; cd lsof_*; tar xvf lsof_*.tar; sourceRoot=$( echo lsof_*/); ";
patches = [ ./dfile.patch ];
postPatch = stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
substituteInPlace dialects/linux/dlsof.h --replace "defined(__UCLIBC__)" 1
'';
# Stop build scripts from searching global include paths
LSOF_INCLUDE = "${stdenv.cc.libc}/include";
LSOF_INCLUDE = "${stdenv.cc.libc.dev}/include";
configurePhase = "LINUX_CONF_CC=$CC_FOR_BUILD LSOF_CC=$CC LSOF_AR=\"$AR cr\" LSOF_RANLIB=$RANLIB ./Configure -n ${dialect}";
preBuild = ''
sed -i Makefile -e 's/^CFGF=/& -DHASIPv6=1/;' -e 's/-lcurses/-lncurses/'
for filepath in $(find dialects/${dialect} -type f); do
sed -i "s,/usr/include,$LSOF_INCLUDE,g" $filepath
done
@ -58,7 +55,7 @@ stdenv.mkDerivation rec {
socket (IPv6/IPv4/UNIX local), or partition (by opening a file
from it).
'';
maintainers = [ ];
maintainers = [ stdenv.lib.maintainers.dezgeg ];
platforms = stdenv.lib.platforms.unix;
};
}

View File

@ -1,18 +0,0 @@
--- lsof_4.89_src/dialects/darwin/libproc/dfile.c 2014-10-30 12:39:46.000000000 +0100
+++ lsof_4.89_src/dialects/darwin/libproc/dfile_new.c 2016-10-04 13:44:58.000000000 +0200
@@ -286,13 +286,13 @@
#if defined(PROC_FP_GUARDED)
if (extra > 1)
- putchar(`,');
+ putchar(',');
if (lf->guardflags) {
struct pff_tab *tp;
long gf;
(void) printf("guard=");
- tp = Pgf_tab;
+ tp = Pff_tab;
gf = lf->guardflags;
while (gf && !FsvFlagX) {
while (tp->nm) {