summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net-analyzer/netselect/ChangeLog7
-rw-r--r--net-analyzer/netselect/files/digest-netselect-0.3-r12
-rw-r--r--net-analyzer/netselect/files/netselect-0.3-bsd.patch55
-rw-r--r--net-analyzer/netselect/netselect-0.3-r1.ebuild16
4 files changed, 73 insertions, 7 deletions
diff --git a/net-analyzer/netselect/ChangeLog b/net-analyzer/netselect/ChangeLog
index 0b4626973517..77852e1a6e84 100644
--- a/net-analyzer/netselect/ChangeLog
+++ b/net-analyzer/netselect/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for net-analyzer/netselect
# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/netselect/ChangeLog,v 1.27 2006/04/09 11:27:05 jokey Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/netselect/ChangeLog,v 1.28 2006/07/15 16:20:42 flameeyes Exp $
+
+ 15 Jul 2006; Diego Pettenò <flameeyes@gentoo.org>
+ +files/netselect-0.3-bsd.patch, netselect-0.3-r1.ebuild:
+ Add patch to make netselect work on non-Linux systems (BSDish), thanks to
+ Timothy Redaelli in bug #140414. Add ~x86-fbsd keyword.
09 Apr 2006; Markus Ullmann <jokey@gentoo.org> netselect-0.3-r1.ebuild:
Changing fperms wrt bug #129265 and clean up
diff --git a/net-analyzer/netselect/files/digest-netselect-0.3-r1 b/net-analyzer/netselect/files/digest-netselect-0.3-r1
index c6c319950d7b..b8cf6541048d 100644
--- a/net-analyzer/netselect/files/digest-netselect-0.3-r1
+++ b/net-analyzer/netselect/files/digest-netselect-0.3-r1
@@ -1 +1,3 @@
MD5 3a3714946db2458e5db3d55373057ef2 netselect-0.3.tar.gz 22047
+RMD160 f57b7348549a033c008d3b67b85ef12a3f91c9aa netselect-0.3.tar.gz 22047
+SHA256 fe81942589d5219d030e5cecfb12787fb6d3613416cb326dea4952bf53f9c978 netselect-0.3.tar.gz 22047
diff --git a/net-analyzer/netselect/files/netselect-0.3-bsd.patch b/net-analyzer/netselect/files/netselect-0.3-bsd.patch
new file mode 100644
index 000000000000..6e7f1cacca48
--- /dev/null
+++ b/net-analyzer/netselect/files/netselect-0.3-bsd.patch
@@ -0,0 +1,55 @@
+--- netselect.c.orig 2006-07-14 22:59:18.000000000 +0200
++++ netselect.c 2006-07-14 22:57:22.000000000 +0200
+@@ -39,14 +39,13 @@
+ * hey, great! Let me know. -- apenwarr
+ */
+
+-#ifdef __EMX__
+-# include <io.h>
+-# include <fcntl.h>
+-# include <sys/types.h>
+-# include <sys/select.h>
+-# include <machine/endian.h>
+-#else
+-# include <endian.h>
++#ifdef __linux__
++#include <endian.h>
++#elif defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__)
++#if defined(__OpenBSD__)
++#include <machine/types.h>
++#endif
++#include <machine/endian.h>
+ #endif
+
+ #include <sys/param.h>
+@@ -152,6 +151,7 @@
+ extern int optind;
+ int hostcount, startcount, endcount = 0, sent_one, lag, min_lag = 100;
+ int ch, seq, ttl, max_ttl = 30, min_tries = 10, num_score = 1;
++ int on = 1;
+ struct timeval now;
+ struct timezone tz;
+ OPacket outpacket; /* last output (udp) packet */
+@@ -234,7 +234,12 @@
+ if (verbose >= 1)
+ fprintf(stderr, "Running netselect to choose %d out of %d address%s.\n",
+ num_score, numhosts, numhosts==1 ? "" : "es");
+-
++
++ if (setsockopt(sndsock, IPPROTO_IP, IP_HDRINCL, &on, sizeof(on)) < 0) {
++ perror("IP_HDRINCL");
++ _exit(EXIT_FAILURE);
++ }
++
+ /* keep going until most of the hosts have been finished */
+ must_continue = numhosts;
+ while (must_continue && must_continue >= numhosts/2)
+@@ -712,7 +717,7 @@
+ ip->ip_off = 0;
+ ip->ip_hl = sizeof(*ip) >> 2;
+ ip->ip_p = IPPROTO_UDP;
+- ip->ip_len = 0; /* kernel fills this in */
++ ip->ip_len = sizeof(OPacket);
+ ip->ip_ttl = ttl;
+ ip->ip_v = IPVERSION;
+ ip->ip_id = htons(ident + seq);
diff --git a/net-analyzer/netselect/netselect-0.3-r1.ebuild b/net-analyzer/netselect/netselect-0.3-r1.ebuild
index 6a0631486afd..03529cf66676 100644
--- a/net-analyzer/netselect/netselect-0.3-r1.ebuild
+++ b/net-analyzer/netselect/netselect-0.3-r1.ebuild
@@ -1,8 +1,8 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/netselect/netselect-0.3-r1.ebuild,v 1.16 2006/04/09 11:27:05 jokey Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/netselect/netselect-0.3-r1.ebuild,v 1.17 2006/07/15 16:20:42 flameeyes Exp $
-inherit flag-o-matic
+inherit eutils flag-o-matic
DESCRIPTION="Ultrafast implementation of ping."
HOMEPAGE="http://www.worldvisions.ca/~apenwarr/netselect/"
@@ -10,11 +10,18 @@ SRC_URI="http://www.worldvisions.ca/~apenwarr/netselect/${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
-KEYWORDS="alpha amd64 arm hppa ia64 m68k mips ppc ~ppc-macos ppc64 s390 sh sparc x86"
+KEYWORDS="alpha amd64 arm hppa ia64 m68k mips ppc ~ppc-macos ppc64 s390 sh sparc x86 ~x86-fbsd"
IUSE=""
S="${WORKDIR}/${PN}"
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}/${P}-bsd.patch"
+}
+
src_compile() {
append-ldflags $(bindnow-flags)
@@ -26,9 +33,6 @@ src_compile() {
-e '34d' \
Makefile \
|| die "sed Makefile failed"
- if use ppc-macos; then
- sed -i -e "s:<endian.h>:<machine/endian.h>:" netselect.c || die "sed Makefile failed"
- fi
emake || die "emake failed"
}