diff options
Diffstat (limited to 'net-analyzer/netselect')
-rw-r--r-- | net-analyzer/netselect/Manifest | 13 | ||||
-rw-r--r-- | net-analyzer/netselect/files/netselect-0.3-bsd.patch | 56 | ||||
-rw-r--r-- | net-analyzer/netselect/files/netselect-0.3-glibc.patch | 11 | ||||
-rw-r--r-- | net-analyzer/netselect/files/netselect-0.4-bsd.patch | 56 | ||||
-rw-r--r-- | net-analyzer/netselect/files/netselect-0.4-flags.patch | 12 | ||||
-rw-r--r-- | net-analyzer/netselect/metadata.xml | 8 | ||||
-rw-r--r-- | net-analyzer/netselect/netselect-0.3-r3.ebuild | 42 | ||||
-rw-r--r-- | net-analyzer/netselect/netselect-0.3-r4.ebuild | 42 | ||||
-rw-r--r-- | net-analyzer/netselect/netselect-0.4.ebuild | 44 |
9 files changed, 284 insertions, 0 deletions
diff --git a/net-analyzer/netselect/Manifest b/net-analyzer/netselect/Manifest new file mode 100644 index 000000000000..5b903c050f9e --- /dev/null +++ b/net-analyzer/netselect/Manifest @@ -0,0 +1,13 @@ +AUX netselect-0.3-bsd.patch 1621 SHA256 fe4b2217f2a3acbf8208f6bdd4092cf6157ad3341f161dffcc399c058582b9c3 SHA512 723be6cae82060d862bfd5afac674c701cc6c3b37fc74b7e020e347a584b31cfad1c7e1c87fe84ccf16384996ebb46da3b9b7bcfd7aa8dd323009f73b5edb966 WHIRLPOOL b1418f59b85b1ffb7f53ea4cbe320b5521181dc44c9d1e3f7db1cf231b7f5615d6b2741a98896ecd3ad6e85aad4b6067ce646c46e3b22237fb9c489b299173fa +AUX netselect-0.3-glibc.patch 264 SHA256 df8cdd028e4382a1ce3792ea18ac60db439c61b2d763c0a37777d1cb57d7ed62 SHA512 bcccfdb458b27903e204043c3ce5faeb0024c0f7e3c0dc4c6eff69b7168544adfe8802625daca50a0c5304e26cc2f252279aeec2013460f2a0bc6892c0df88ad WHIRLPOOL c4c9a7e34bbda34d70c541783b78493dbb736c4fe2c150d161f87619d6dfc1a4e2148a7ae325393ae498f8c75ef8322c2acb7299b4595f7d6f8e2897440daa9d +AUX netselect-0.4-bsd.patch 1573 SHA256 a9c483e866d8ff4911f5e10ce2f2fbbb6579199127e8bac4211c36265dd9fe71 SHA512 01dfb03b8e77def3d6742e827662316003ad807af41ea1ce236c4e216de3cca3678efc6405676c8022dab5f61e6ee7395aaa82b8b800e96eb0ac718b5f7b4f52 WHIRLPOOL 47a7beda16980fdf1b19fd126bbc2bff84f415e4973f6f25c4814c843b7bcd16a725a5620cd6ee2aaffd911a6c096bc3936ba38e56223067242873e1dceab628 +AUX netselect-0.4-flags.patch 172 SHA256 9566ccc9145bc7598b3116bcbd4cfe142c9ee973ebf5e5934cfed2b360dd88fb SHA512 3f665743859e243126de95340da5b9dd42ff671d82f3809e294b752a568b7ede96b13f6a63e18cc522ce19d1537b137d5c05e0e49ce533e8fc337922e18ea74a WHIRLPOOL 0b4e03bb1b7be1ad55888be3fa60692ad18e887e249a0cdb26934c2b3ce3ad22586b1d4d286e8c3d670f584d9263f2ea6866e22191253643985dc089ba6e22a1 +DIST netselect-0.3.tar.gz 22047 SHA256 fe81942589d5219d030e5cecfb12787fb6d3613416cb326dea4952bf53f9c978 SHA512 04a4b79c357a0110dcf377ad04ac729ed7854bec4b064ad16da632367ce1870379546fffc8396ea770bfa580618d7c0495c16b0ba30f736419511b890ce5dca5 WHIRLPOOL 2e49cb22b12c88a1d9f42da19b42284ae98d391739bf7bd1e134661b8780ef733b26f5f4be4ed61dce3a4a9922a6a10d9040698fa3f4910ceacc54df4a42afcc +DIST netselect-0.4-ipv6.patch.xz 18272 SHA256 be68354508c6b17927ffe01db2ed2f8e5f259a869d6f209ba8d2e648de01e143 SHA512 422b54df5be45379fe7d6776b6e653a8e49df6fb77421527f2eb6c687597f36cccc7ab5cc5206e9823c318f6facd84fb4e8c0dbffbf9641cee593401cb73abea WHIRLPOOL c51648b80c5e21388077d76ff793eda78f7986c395965df4c29179280469485bca4c7d1785036a67b2946c2772e26fefc9ee37511c24966739bb1debfc1021d6 +DIST netselect-0.4.tar.gz 22095 SHA256 ae343991c94b1fdeb5e7896bb11d357c1dd9297f5d842c507953f57935e15e19 SHA512 eee9639122b7cc89218c610794d090582aecb3df138bcef41472c8d40c0f7e998b2c4b04aace13795fda5c710ee28cc2c0784a680ad6d1aa6a14eb441a408bfa WHIRLPOOL 26560ff81683c48ad7c94e827029b4b0a127c29b94fe47fe2b95f3736eafeeeaa2c9b1e9f6feff7971a37cd15fdb51814acd195ebafd6e89face3d514eb872c3 +EBUILD netselect-0.3-r3.ebuild 976 SHA256 379b9bb0acf47df3583838301352932ccd4c68f81c810840c605faac0cd59def SHA512 c3a42dec4c8830765d1b5122465708c9c8f47d67c80a57a69ce91741f7c135de52963ac9ef2ed0a5306a32b9ba7f86e7383ed7faf5d3227434fcdf1c24ecfaef WHIRLPOOL 0760d9b6363c60dc722ceedcbdfd058dfb878d5497839fab192fe959ef7d50f3883020c9b795abeb7204aa9e810e4a80a222943946311f8425fd4d3e56db908b +EBUILD netselect-0.3-r4.ebuild 994 SHA256 cbf86b9132dfee38a432deee14320d8fb077b509eed13c44ffc8e5f434afebb8 SHA512 af56e7e5c74d79f4079d2721021f9c9b00183db5e92eec44e722a47c98701250910afc7057d7fae1a7d5bccd39104620625a46dd02ef8948caf734b80abbae6f WHIRLPOOL 1c1d89d1fbabc4c886ab0a05ded2b5a2372b090be5e2a5f245968d10a785475f18e583aea36bbe18ff8cb66849dd5f7ca4db71322ba7c4c20e8011647d9dbbe6 +EBUILD netselect-0.4.ebuild 961 SHA256 5f2fbdfdb6486736cf7e665bfd37ca2862a1ed35f9fe1468efcc962fd214a574 SHA512 83be0dd6c8d54bdba3ab8c7a8a78b573447685154e348fdb0436c4a085751ce14ef1d05765e36f8366e4e30f46d004f0043477a85f3cc41b7ccd3f4b81b2df07 WHIRLPOOL 4eee33a615bde0cabf2a913da7bdc6f843229b0ad76ef6a59b2a6e994c0e761f0a1e26529e862c724bb80b02c050afaa35595534b121e50f9de145ec8767ef46 +MISC ChangeLog 2565 SHA256 245eb6e12bcf6163aa7eb061ec8674a5f477e7e7247218b405f39f5cf3732053 SHA512 87acb3de44b14c6f8dc297437ccb52e62a74122fa8f423c70942b7bf1119e73694ae76cd9313f83ce3badf981abc79e599a900a93fda090c3cf758ceff091361 WHIRLPOOL d586e2c55286ca0ae505e9f398c68bb1574dc77181dd1bca56623ce7f22a1c4892aa12509313a23edcd1028478334f33a1b5ec1ec633ceabd8e5c239bc4ce152 +MISC ChangeLog-2015 6936 SHA256 891047180e6c481142eaca6ee07e7f33e7e63b38afe239b2be3e7618f385ade2 SHA512 735a652989a65c8a36d7fbe0269ee121061c118e5c8126b3b8d1e1070ac54aafe1825988b60e915f9def2d998f240841876bda10ea00cf69795dc9034d57bd3e WHIRLPOOL 3362214f6c083c2d97d28dc0f61137080a35dc17671a10706b6b4c334e4a77970c5c72f1fb9149d76db155650846ef616311d945a6d26a3cf881820845f29d17 +MISC metadata.xml 276 SHA256 d15d6b6bd9ffc8a642c7469d01788ba9158efb4ca27fcf3324d9e52d1b70ec93 SHA512 f0e6c6bc89659e01e157d9bf30d0a2f3fd2d71bc26c8d12489c4a44fc5237159946e25b46e7295ab4676aea63559194977a0b1e76aced31d81cf6387dd0f4250 WHIRLPOOL 26b9e81575f613b751f76234013c30a8da84a1c0dd75c12b8df32706ee753691bbc889a2dec5001cc8c4b05c47aca49ed9fabbb5a6fefed74aaa86d6c3f56cee 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..e9624d87215a --- /dev/null +++ b/net-analyzer/netselect/files/netselect-0.3-bsd.patch @@ -0,0 +1,56 @@ +--- a/netselect.c ++++ b/netselect.c +@@ -39,14 +39,14 @@ + * 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> ++#include <sys/types.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 +152,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 +235,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 +718,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/files/netselect-0.3-glibc.patch b/net-analyzer/netselect/files/netselect-0.3-glibc.patch new file mode 100644 index 000000000000..053e5865b341 --- /dev/null +++ b/net-analyzer/netselect/files/netselect-0.3-glibc.patch @@ -0,0 +1,11 @@ +--- a/netselect.c ++++ b/netselect.c +@@ -780,7 +780,7 @@ + #if !defined(__GLIBC__) + int fromlen = sizeof(from); + #else /* __GLIBC__ */ +- size_t fromlen = sizeof(from); ++ socklen_t fromlen = sizeof(from); + #endif /* __GLIBC__ */ + + FD_ZERO(&fds); diff --git a/net-analyzer/netselect/files/netselect-0.4-bsd.patch b/net-analyzer/netselect/files/netselect-0.4-bsd.patch new file mode 100644 index 000000000000..fd49a17682db --- /dev/null +++ b/net-analyzer/netselect/files/netselect-0.4-bsd.patch @@ -0,0 +1,56 @@ +--- a/netselect.c ++++ b/netselect.c +@@ -39,14 +39,14 @@ + * 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> ++#include <sys/types.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> +@@ -167,6 +167,7 @@ + extern int optind; + int hostcount, startcount, endcount = 0, sent_one, lag, min_lag = 100; + int ch, seq, ttl, max_ttl = 30, num_score = 1; ++ int on = 1; + int use_icmp = 0; + unsigned int min_tries = 10; + struct timeval now; +@@ -234,7 +235,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 +718,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/files/netselect-0.4-flags.patch b/net-analyzer/netselect/files/netselect-0.4-flags.patch new file mode 100644 index 000000000000..ffcfead8eb3a --- /dev/null +++ b/net-analyzer/netselect/files/netselect-0.4-flags.patch @@ -0,0 +1,12 @@ +--- a/Makefile ++++ b/Makefile +@@ -3,8 +3,7 @@ + MANDEST = ${PREFIX}/man/man1 + + CC = gcc +-CFLAGS = -O2 -Wall -I. -g +-LDFLAGS = -g ++CFLAGS += -Wall -I. + LIBS = + + ifdef OS2 diff --git a/net-analyzer/netselect/metadata.xml b/net-analyzer/netselect/metadata.xml new file mode 100644 index 000000000000..74c2baebb4ec --- /dev/null +++ b/net-analyzer/netselect/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> +</pkgmetadata> diff --git a/net-analyzer/netselect/netselect-0.3-r3.ebuild b/net-analyzer/netselect/netselect-0.3-r3.ebuild new file mode 100644 index 000000000000..d987e3985719 --- /dev/null +++ b/net-analyzer/netselect/netselect-0.3-r3.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils flag-o-matic toolchain-funcs + +DESCRIPTION="Ultrafast implementation of ping" +HOMEPAGE="http://apenwarr.ca/netselect/" +SRC_URI="${HOMEPAGE}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ia64 ~m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" + +S=${WORKDIR}/${PN} + +src_prepare() { + epatch \ + "${FILESDIR}/${P}-bsd.patch" \ + "${FILESDIR}/${P}-glibc.patch" + + sed -i \ + -e "s:PREFIX =.*:PREFIX = ${ED}usr:" \ + -e "s:CFLAGS =.*:CFLAGS = -Wall -I. ${CFLAGS}:" \ + -e "s:LDFLAGS =.*:LDFLAGS = ${LDFLAGS}:" \ + -e '23,27d' \ + -e '34d' \ + Makefile || die +} + +src_compile() { + emake CC="$(tc-getCC)" +} + +src_install () { + dobin netselect + if ! use prefix ; then + fowners root:wheel /usr/bin/netselect + fperms 4711 /usr/bin/netselect + fi + dodoc ChangeLog HISTORY README* +} diff --git a/net-analyzer/netselect/netselect-0.3-r4.ebuild b/net-analyzer/netselect/netselect-0.3-r4.ebuild new file mode 100644 index 000000000000..f5909a4d75c3 --- /dev/null +++ b/net-analyzer/netselect/netselect-0.3-r4.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils flag-o-matic toolchain-funcs + +DESCRIPTION="Ultrafast implementation of ping" +HOMEPAGE="http://apenwarr.ca/netselect/" +SRC_URI="${HOMEPAGE}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" + +S=${WORKDIR}/${PN} + +src_prepare() { + epatch \ + "${FILESDIR}/${P}-bsd.patch" \ + "${FILESDIR}/${P}-glibc.patch" + + sed -i \ + -e "s:PREFIX =.*:PREFIX = ${ED}usr:" \ + -e "s:CFLAGS =.*:CFLAGS = -Wall -I. ${CFLAGS}:" \ + -e "s:LDFLAGS =.*:LDFLAGS = ${LDFLAGS}:" \ + -e '23,27d' \ + -e '34d' \ + Makefile || die +} + +src_compile() { + emake CC="$(tc-getCC)" +} + +src_install () { + dobin netselect + if ! use prefix ; then + fowners root:wheel /usr/bin/netselect + fperms 4711 /usr/bin/netselect + fi + dodoc ChangeLog HISTORY README* +} diff --git a/net-analyzer/netselect/netselect-0.4.ebuild b/net-analyzer/netselect/netselect-0.4.ebuild new file mode 100644 index 000000000000..a6d716516f07 --- /dev/null +++ b/net-analyzer/netselect/netselect-0.4.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit eutils flag-o-matic toolchain-funcs + +DESCRIPTION="Ultrafast implementation of ping" +HOMEPAGE="http://apenwarr.ca/netselect/" +SRC_URI=" + https://github.com/apenwarr/${PN}/archive/${P}.tar.gz + ipv6? ( https://dev.gentoo.org/~jer/${P}-ipv6.patch.xz ) +" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" +IUSE="ipv6" + +PATCHES=( + "${FILESDIR}"/${PN}-0.4-bsd.patch + "${FILESDIR}"/${PN}-0.4-flags.patch +) +S=${WORKDIR}/${PN}-${P} + +src_prepare() { + use ipv6 && eapply "${WORKDIR}"/${PN}-0.4-ipv6.patch + + default + + tc-export CC +} + +src_install () { + dobin netselect + + if ! use prefix ; then + fowners root:wheel /usr/bin/netselect + fperms 4711 /usr/bin/netselect + fi + + dodoc HISTORY README + + doman netselect.1 +} |