summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-analyzer/hexinject')
-rw-r--r--net-analyzer/hexinject/Manifest1
-rw-r--r--net-analyzer/hexinject/files/hexinject-1.5-fix-build-system.patch15
-rw-r--r--net-analyzer/hexinject/hexinject-1.5.ebuild37
-rw-r--r--net-analyzer/hexinject/metadata.xml19
4 files changed, 72 insertions, 0 deletions
diff --git a/net-analyzer/hexinject/Manifest b/net-analyzer/hexinject/Manifest
new file mode 100644
index 000000000000..75d69e9f3894
--- /dev/null
+++ b/net-analyzer/hexinject/Manifest
@@ -0,0 +1 @@
+DIST hexinject-1.5.tar.gz 14449 SHA256 329f0686069988ac0dae4a00082b205ac9669bc8e202d4b112c600bcbc198ce9 SHA512 cd145b6f2ae9d739effca03959fb474df11d28ff015c0e5bd1e30c341f60085154795f3c8a601b7241623944b3868b6fc9a3e1530a3aa4e7aaa2b3794a5aa34a WHIRLPOOL 96e065ca7135f12db6e5949fb8fd537e0981f5b0cc1d57d40eb59003aabc87ae2459872cb11108727c0032b6c5282d385512678859da081d783bc692f8044c93
diff --git a/net-analyzer/hexinject/files/hexinject-1.5-fix-build-system.patch b/net-analyzer/hexinject/files/hexinject-1.5-fix-build-system.patch
new file mode 100644
index 000000000000..046d083710df
--- /dev/null
+++ b/net-analyzer/hexinject/files/hexinject-1.5-fix-build-system.patch
@@ -0,0 +1,15 @@
+Respect user flags
+
+--- a/Makefile
++++ b/Makefile
+@@ -1,7 +1,7 @@
+ all:
+- gcc -o hexinject hexinject.c -lpcap
+- gcc -o prettypacket prettypacket.c
+- gcc -o hex2raw hex2raw.c
++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o hexinject hexinject.c -lpcap
++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o prettypacket prettypacket.c
++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o hex2raw hex2raw.c
+
+ clean:
+ rm -f hexinject prettypacket hex2raw *~
diff --git a/net-analyzer/hexinject/hexinject-1.5.ebuild b/net-analyzer/hexinject/hexinject-1.5.ebuild
new file mode 100644
index 000000000000..5c68e66abfd2
--- /dev/null
+++ b/net-analyzer/hexinject/hexinject-1.5.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="Network packet sniffer and injector"
+HOMEPAGE="http://hexinject.sourceforge.net/"
+SRC_URI="http://downloads.sourceforge.net/project/${PN}/${P}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+tools experimental"
+
+DEPEND="net-libs/libpcap"
+RDEPEND="${DEPEND}
+ experimental? ( dev-lang/tcl )"
+
+S="${WORKDIR}/${PN}"
+
+PATCHES=( "${FILESDIR}"/${PN}-1.5-fix-build-system.patch )
+
+src_prepare() {
+ default
+ append-cflags -std=gnu89
+ tc-export CC
+}
+
+src_install() {
+ dobin hexinject
+ use tools && dobin hex2raw prettypacket
+ use experimental && dobin packets.tcl
+ einstalldocs
+}
diff --git a/net-analyzer/hexinject/metadata.xml b/net-analyzer/hexinject/metadata.xml
new file mode 100644
index 000000000000..4f674dbf4333
--- /dev/null
+++ b/net-analyzer/hexinject/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <longdescription lang="en">
+ HexInject is a very versatile packet injector and sniffer, that provide
+ a command-line framework for raw network access. It's designed to work
+ together with others command-line utilities, and for this reason it
+ facilitates the creation of powerful shell scripts capable of reading,
+ intercepting and modifying network traffic in a transparent manner.
+ </longdescription>
+ <use>
+ <flag name="tools">Install hex2raw and prettypacket tools</flag>
+ <flag name="experimental">Install experimental packets.tcl</flag>
+ </use>
+</pkgmetadata>