Merge pull request #2258 from jwiegley/mtr
Update mtr to 0.85, and allow building on any unix
This commit is contained in:
commit
5dae32553b
@ -10,10 +10,10 @@ let
|
||||
(builtins.attrNames (builtins.removeAttrs x helperArgNames));
|
||||
sourceInfo = rec {
|
||||
baseName="mtr";
|
||||
version="0.82";
|
||||
version="0.85";
|
||||
name="${baseName}-${version}";
|
||||
url="ftp://ftp.bitwizard.nl/${baseName}/${name}.tar.gz";
|
||||
hash="185nx4y6xn7vv6l3pbyc0ljmwfl4si4zszwad1jkbq1scb4mgd7k";
|
||||
hash="1jqrz8mil3lraaqgc87dyvx8d4bf3vq232pfx9mksxnkbphp4qvd";
|
||||
};
|
||||
in
|
||||
rec {
|
||||
@ -25,9 +25,11 @@ rec {
|
||||
inherit (sourceInfo) name version;
|
||||
inherit buildInputs;
|
||||
|
||||
patches = [ ./edd425.patch ];
|
||||
|
||||
/* doConfigure should be removed if not needed */
|
||||
phaseNames = ["doConfigure" "doMakeInstall"];
|
||||
|
||||
phaseNames = ["doConfigure" "doPatch" "doMakeInstall"];
|
||||
|
||||
meta = {
|
||||
description = "A network diagnostics tool";
|
||||
maintainers = with a.lib.maintainers;
|
||||
@ -35,7 +37,7 @@ rec {
|
||||
raskin
|
||||
];
|
||||
platforms = with a.lib.platforms;
|
||||
linux;
|
||||
unix;
|
||||
license = a.lib.licenses.gpl2;
|
||||
};
|
||||
passthru = {
|
||||
|
218
pkgs/tools/networking/mtr/edd425.patch
Normal file
218
pkgs/tools/networking/mtr/edd425.patch
Normal file
@ -0,0 +1,218 @@
|
||||
diff --git a/asn.c b/asn.c
|
||||
index eac8d5e..33622ca 100644
|
||||
--- a/asn.c
|
||||
+++ b/asn.c
|
||||
@@ -16,6 +16,8 @@
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
+#include "config.h"
|
||||
+
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -35,7 +37,6 @@
|
||||
#include <sys/socket.h>
|
||||
#include <search.h>
|
||||
|
||||
-#include "config.h"
|
||||
#include "mtr.h"
|
||||
#include "asn.h"
|
||||
|
||||
diff --git a/curses.c b/curses.c
|
||||
index eacc40d..b96daee 100644
|
||||
--- a/curses.c
|
||||
+++ b/curses.c
|
||||
@@ -16,7 +16,8 @@
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
-#include <config.h>
|
||||
+#include "config.h"
|
||||
+
|
||||
#include <strings.h>
|
||||
#include <unistd.h>
|
||||
|
||||
diff --git a/display.c b/display.c
|
||||
index aa369ee..3545467 100644
|
||||
--- a/display.c
|
||||
+++ b/display.c
|
||||
@@ -16,7 +16,8 @@
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
-#include <config.h>
|
||||
+#include "config.h"
|
||||
+
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
diff --git a/dns.c b/dns.c
|
||||
index e89fd4b..4076b71 100644
|
||||
--- a/dns.c
|
||||
+++ b/dns.c
|
||||
@@ -22,7 +22,8 @@
|
||||
Released under GPL, as above.
|
||||
*/
|
||||
|
||||
-#include <config.h>
|
||||
+#include "config.h"
|
||||
+
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/select.h>
|
||||
diff --git a/getopt.c b/getopt.c
|
||||
index 3d43e26..e2f8758 100644
|
||||
--- a/getopt.c
|
||||
+++ b/getopt.c
|
||||
@@ -27,7 +27,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
-#include <config.h>
|
||||
+#include "config.h"
|
||||
#endif
|
||||
|
||||
#if !defined (__STDC__) || !__STDC__
|
||||
diff --git a/getopt1.c b/getopt1.c
|
||||
index bccf8b2..0a2d405 100644
|
||||
--- a/getopt1.c
|
||||
+++ b/getopt1.c
|
||||
@@ -16,7 +16,7 @@
|
||||
Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
-#include <config.h>
|
||||
+#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "getopt.h"
|
||||
diff --git a/gtk.c b/gtk.c
|
||||
index 38ed507..7faa132 100644
|
||||
--- a/gtk.c
|
||||
+++ b/gtk.c
|
||||
@@ -17,7 +17,7 @@
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
-#include <config.h>
|
||||
+#include "config.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
diff --git a/mtr.c b/mtr.c
|
||||
index 50eb464..416b744 100644
|
||||
--- a/mtr.c
|
||||
+++ b/mtr.c
|
||||
@@ -16,19 +16,21 @@
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
+#include "config.h"
|
||||
+
|
||||
#include <sys/types.h>
|
||||
-#include <config.h>
|
||||
-#include <netdb.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
-#include <netinet/in.h>
|
||||
-#include <sys/socket.h>
|
||||
#include <unistd.h>
|
||||
-#include <strings.h>
|
||||
-#include <time.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
+#include <strings.h>
|
||||
+
|
||||
+#include <netdb.h>
|
||||
+#include <netinet/in.h>
|
||||
+#include <sys/socket.h>
|
||||
+#include <time.h>
|
||||
#include <ctype.h>
|
||||
#include <assert.h>
|
||||
#include <fcntl.h>
|
||||
diff --git a/net.c b/net.c
|
||||
index 1c8d28f..d648804 100644
|
||||
--- a/net.c
|
||||
+++ b/net.c
|
||||
@@ -16,7 +16,7 @@
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
-#include <config.h>
|
||||
+#include "config.h"
|
||||
|
||||
#if defined(HAVE_SYS_XTI_H)
|
||||
#include <sys/xti.h>
|
||||
@@ -1562,4 +1562,4 @@ void net_harvest_fds(void)
|
||||
net_add_fds(&writefd, &maxfd);
|
||||
select(maxfd, NULL, &writefd, NULL, &tv);
|
||||
net_process_fds(&writefd);
|
||||
-}
|
||||
\ No newline at end of file
|
||||
+}
|
||||
diff --git a/raw.c b/raw.c
|
||||
index 8b0df47..0e1f4f4 100644
|
||||
--- a/raw.c
|
||||
+++ b/raw.c
|
||||
@@ -18,7 +18,8 @@
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
-#include <config.h>
|
||||
+#include "config.h"
|
||||
+
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@@ -27,7 +28,6 @@
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
-
|
||||
#include "mtr.h"
|
||||
#include "raw.h"
|
||||
#include "net.h"
|
||||
diff --git a/report.c b/report.c
|
||||
index 71040e4..39b2fb2 100644
|
||||
--- a/report.c
|
||||
+++ b/report.c
|
||||
@@ -16,7 +16,8 @@
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
-#include <config.h>
|
||||
+#include "config.h"
|
||||
+
|
||||
#include <sys/types.h>
|
||||
#include <stdio.h>
|
||||
#include <netdb.h>
|
||||
diff --git a/select.c b/select.c
|
||||
index 31bfd5f..7553675 100644
|
||||
--- a/select.c
|
||||
+++ b/select.c
|
||||
@@ -16,7 +16,8 @@
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
-#include <config.h>
|
||||
+#include "config.h"
|
||||
+
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include <stdlib.h>
|
||||
diff --git a/split.c b/split.c
|
||||
index 642353e..5ead235 100644
|
||||
--- a/split.c
|
||||
+++ b/split.c
|
||||
@@ -20,7 +20,8 @@
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
-#include <config.h>
|
||||
+#include "config.h"
|
||||
+
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
Loading…
Reference in New Issue
Block a user