diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /net-analyzer/ngrep |
reinit the tree, so we can have metadata
Diffstat (limited to 'net-analyzer/ngrep')
-rw-r--r-- | net-analyzer/ngrep/Manifest | 8 | ||||
-rw-r--r-- | net-analyzer/ngrep/files/ngrep-1.45-build-fixes.patch | 186 | ||||
-rw-r--r-- | net-analyzer/ngrep/files/ngrep-1.45-prefix.patch | 17 | ||||
-rw-r--r-- | net-analyzer/ngrep/files/ngrep-1.45-setlocale.patch | 23 | ||||
-rw-r--r-- | net-analyzer/ngrep/metadata.xml | 20 | ||||
-rw-r--r-- | net-analyzer/ngrep/ngrep-1.45-r3.ebuild | 54 |
6 files changed, 308 insertions, 0 deletions
diff --git a/net-analyzer/ngrep/Manifest b/net-analyzer/ngrep/Manifest new file mode 100644 index 000000000000..61f45987fc4e --- /dev/null +++ b/net-analyzer/ngrep/Manifest @@ -0,0 +1,8 @@ +AUX ngrep-1.45-build-fixes.patch 4778 SHA256 0c4ce5aa42491e17b0d2f8a6b8796e2983f14aae912e93f092c02b5464b482b5 SHA512 5e11682d6b360e96840135d8963bdf4c9bf5def0bd38ba716ce201c7bf9b5ce787338f2cff86d38318e0356d9118fde6985ed9a71728549842577ecdb3a5011e WHIRLPOOL 51f775049027362d49099063b8c96b55fdd3983f0fef4e62dac7713721147dbdc6582eab36cda5baa76fa5b898a14121751f44ba6a41145002f48e05d1dc8b2f +AUX ngrep-1.45-prefix.patch 575 SHA256 16042e174b74b00d2ac743b52c367dd13e34a032ae7b1d5342c9308b3b2c2635 SHA512 e33321ded5c0b86a279108a0d72d5e1d65699c39f50ac9291c4256867ce3f2b06d86d7186e51359deac82beadb7e8503ca5023c5401068aecebaffa4d01c2afc WHIRLPOOL b47d882f1c82f5ddff015dc213188209e42b036629c89b7bcc99bd597c002387ddfda350bfe86aa4df0b763103f8f82127310d5c61e2acf329cc6699779c85c5 +AUX ngrep-1.45-setlocale.patch 495 SHA256 ee2556afb076ca647896e53e46ef6c0b35966f8fdf27b2e2fe3ad4cb99d06d90 SHA512 007cf6793ef407b4069ebe84b9fe5e5a23c3d2d7f5c538ce0a81d1b6c2643b79387136854d50eb68b13aaaf6e3d7b1a469e7afdeebedba79efea1960b2d1a87e WHIRLPOOL e96a92c2b22e981e8311aeb17084f91ee844d1fb9194d0b6b991e4765a9c09078d956da4fb567d5d4e04fa02ab36361b24b8d3dc7a132d280c143c84fd5417cc +DIST ngrep-1.45.tar.bz2 463361 SHA256 aea6dd337da8781847c75b3b5b876e4de9c58520e0d77310679a979fc6402fa7 SHA512 0feb4080f834449d57ae99897c573d2b8148711cfb550fa4ff415169dedb1f0d23f4b03f625660162ca72f8ad06e19874c1af46da6afd8f8fe8dd553558c14f7 WHIRLPOOL 5560c8b341ec9c1b322f0b0838470dfa8cf0b86fe44cb7619d5ed162753bab0f08bcea4ba17af96b01ab1a56311eb964dc87fa8c202a160d9ab1d578af6df924 +EBUILD ngrep-1.45-r3.ebuild 1064 SHA256 1b661e64708c5cb93118f094d45c1be6d5cfbec11086b58053e36c7aa45b9368 SHA512 df65d35cd87e740eb28892572a897f90705d0db40669eda2422b82e77af2da3280433ec5386c4e2d82ba014eb263777e3bcd797f7f7b44a57a613e7add93077c WHIRLPOOL de100aaf2fb0a9c1faf3b930e808078e290e775c7fc96ab888793786e135c3e9f1f5fdb22bcb1ef79df5bf0b3974cf917cda785eb797983d31f87d75658c2e0b +MISC ChangeLog 2535 SHA256 92a35fca8bf43f30ccd899fa4c792ab3b6571fa65f011f016a13469ab7fee098 SHA512 e6f3d1cf4f05ebd12ed6b947c04fb2b3cd041df0f1e8d950642040fd6ecc87d0163f4ad9f097acea1d3567f7dbdabad562d32da12fca637ee17c0ce8fc28e076 WHIRLPOOL 0565c56fa695d5bdf6e7eb4113de13e9e88f1103ec0da711cee5a8c8b65c2ef84a4b8b4340fd3d8ab96d47dbb8a3285e3164fb92bf80f8c4889f53ee9f98865b +MISC ChangeLog-2015 9417 SHA256 0aa108e7ba2c40faeeb9ee3dcc710767fbab05b79974e83742cf46d707149f4e SHA512 aee014f5b0e32a0b6b32082424edd033d05f1d2a392f38cfaffedbb337c896ccd7f68aae43dada1a26c576f3aec1edbe29d9b4db112fa149c351e7df198c2c24 WHIRLPOOL 70fb1b0808116a1a2551afca39812cfdae2cd87d707c6ac0dca36aa1c769063c024487fb2cc4fe925439c82ba753709ce8fa1ab285727ac66d5e712dbe517199 +MISC metadata.xml 669 SHA256 c43dfd653114d641f4b66eeac3d5e5bfd9755932c946db67290f61d7014e93b3 SHA512 d680774ca1d7a66bbe9badb840ebf3f0249c80d0850a229797d17a09da27e2fad9510449ceecfb62b3141ad105fd2970713a14879df57e0bb14c26ac66c807ad WHIRLPOOL 6d0b59f7e021c37db8ab66546e501e253a5836a668a694256b65b979137c364da6b6dcded8754a8a766f34c015ec6295fcb4abe11732b18d6a79febf023729c6 diff --git a/net-analyzer/ngrep/files/ngrep-1.45-build-fixes.patch b/net-analyzer/ngrep/files/ngrep-1.45-build-fixes.patch new file mode 100644 index 000000000000..9cde0f81926d --- /dev/null +++ b/net-analyzer/ngrep/files/ngrep-1.45-build-fixes.patch @@ -0,0 +1,186 @@ +This patch fixes a number of problems with have with build: + + * more clean cut off pcre library; we'll never use bundled pcre library, so + some autoconf added REGEX_LIBS to pass correct system libs and header change. + + * We use AC_CONFIG_SUBDIRS to pass make autoconf reconfigure gnuregex library + - this way ./configure will be called correctly and correct comipler will be + selected automatically. + + * With the previous change some modifications were required to make gnuregex + buildable: a) we should not overide CFLAGS in Makefile.in (as they together + with -DHAVE_CONFIG_H will be passed to gnuregex and it'll fail to build, + since no config.h exist) b) obvious way to remove warning "_GNU_SOURCE" + redefined + + * also we don't pass $(MAKEFLAGS) since it caused us problems in the past (bug + #178684) + +--- a/Makefile.in ++++ b/Makefile.in +@@ -7,7 +7,8 @@ + + CC=@CC@ + +-CFLAGS=@CFLAGS@ -D@OS@ @DEFS@ @EXTRA_DEFINES@ ++# Never redefine CFLAGS, as it pollutes env and gnuregex build failes ++EXTRA_CFLAGS=@CFLAGS@ -D@OS@ @DEFS@ @EXTRA_DEFINES@ + INCLUDES=-I@srcdir@ @PCAP_INCLUDE@ @EXTRA_INCLUDES@ + + LDFLAGS=@LDFLAGS@ @PCAP_LINK@ +@@ -34,25 +35,25 @@ + + REGEX_DIR=@REGEX_DIR@ + REGEX_OBJS=@REGEX_OBJS@ +- ++REGEX_LIBS=@REGEX_LIBS@ + + all: $(TARGET) + + $(TARGET): $(REGEX_OBJS) $(OBJS) +- $(CC) $(CFLAGS) $(LDFLAGS) $(STRIPFLAG) -o $(TARGET) $(OBJS) $(REGEX_OBJS) $(LIBS) ++ $(CC) $(EXTRA_CFLAGS) $(LDFLAGS) -o $(TARGET) $(OBJS) $(REGEX_OBJS) $(REGEX_LIBS) $(LIBS) + + debug: $(REGEX_OBJS) $(OBJS) +- $(CC) $(CFLAGS) $(LDFLAGS) -g -o $(TARGET) $(OBJS) $(REGEX_OBJS) $(LIBS) ++ $(CC) $(EXTRA_CFLAGS) $(LDFLAGS) -g -o $(TARGET) $(OBJS) $(REGEX_OBJS) $(REGEX_LIBS) $(LIBS) + + static: $(REGEX_OBJS) $(OBJS) +- $(CC) $(CFLAGS) $(LDFLAGS) $(STRIPFLAG) -o $(TARGET).static -static $(OBJS) $(REGEX_OBJS) $(LIBS) ++ $(CC) $(EXTRA_CFLAGS) $(LDFLAGS) -o $(TARGET).static -static $(OBJS) $(REGEX_OBJS) $(REGEX_LIBS) $(LIBS) + + install: $(TARGET) + $(INSTALL) -c -m 0755 $(TARGET) $(DESTDIR)/$(BINDIR_INSTALL)/$(TARGET) + $(INSTALL) -c -m 0644 $(MANPAGE) $(DESTDIR)/$(MANDIR_INSTALL)/$(MANPAGE) + + .c.o: +- $(CC) $(CFLAGS) $(INCLUDES) -g -c $< ++ $(CC) $(EXTRA_CFLAGS) $(INCLUDES) -g -c $< + + clean: + make -C $(REGEX_DIR) clean +@@ -63,7 +64,7 @@ + rm -f config.status config.cache config.log config.h Makefile + + $(REGEX_OBJS): $(REGEX_OBJS:.o=.c) $(REGEX_DIR)/*.h +- $(MAKE) $(MAKEFLAGS) -C $(REGEX_DIR) $(notdir $(REGEX_OBJS)) ++ $(MAKE) -C $(REGEX_DIR) $(notdir $(REGEX_OBJS)) + + $(OBJS): Makefile ngrep.c ngrep.h + + +--- a/configure.in ++++ b/configure.in +@@ -124,14 +124,16 @@ + use_pcre="no" + ]) + ++REGEX_DIR="" ++REGEX_OBJS="" ++REGEX_LIBS="" + if test $use_pcre = yes; then + + echo +- echo 'Configuring Perl-Compatible Regular Expression (PCRE) library ...' ++ echo 'Using System Perl-Compatible Regular Expression (PCRE) library ...' + echo + +- REGEX_DIR='pcre-5.0' +- REGEX_OBJS="$REGEX_DIR/pcre.o $REGEX_DIR/study.o" ++ REGEX_LIBS="`pcre-config --libs`" + USE_PCRE="1" + + else +@@ -144,12 +146,19 @@ + REGEX_OBJS="$REGEX_DIR/regex.o" + USE_PCRE="0" + ++ AC_CONFIG_SUBDIRS([regex-0.12]) ++ ++ echo ++ echo 'GNU Regular Expression library is configured...' ++ echo ++ + fi + +-( cd $REGEX_DIR && ./configure ) + + AC_SUBST(REGEX_DIR) + AC_SUBST(REGEX_OBJS) ++AC_SUBST(REGEX_LIBS) ++ + + + echo + +--- a/ngrep.c ++++ b/ngrep.c +@@ -92,7 +92,7 @@ + #endif + + #if USE_PCRE +-#include "pcre-5.0/pcre.h" ++#include <pcre.h> + #else + #include "regex-0.12/regex.h" + #endif + +--- a/regex-0.12/Makefile.in ++++ b/regex-0.12/Makefile.in +@@ -18,23 +18,6 @@ + + version = 0.12 + +-# You can define CPPFLAGS on the command line. Aside from system-specific +-# flags, you can define: +-# -DREGEX_MALLOC to use malloc/realloc/free instead of alloca. +-# -DDEBUG to enable the compiled pattern disassembler and execution +-# tracing; code runs substantially slower. +-# -DEXTRACT_MACROS to use the macros EXTRACT_* (as opposed to +-# the corresponding C procedures). If not -DDEBUG, the macros +-# are used. +-CPPFLAGS = +- +-# Likewise, you can override CFLAGS to optimize, use -Wall, etc. +-CFLAGS = -g +- +-# Ditto for LDFLAGS and LOADLIBES. +-LDFLAGS = +-LOADLIBES = +- + srcdir = @srcdir@ + VPATH = @srcdir@ + +@@ -43,7 +26,7 @@ + + SHELL = /bin/sh + +-subdirs = doc test ++subdirs = + + default all:: regex.o + .PHONY: default all + +--- a/regex-0.12/configure.in ++++ b/regex-0.12/configure.in +@@ -34,4 +34,4 @@ + + esac + +-AC_OUTPUT(Makefile doc/Makefile test/Makefile) ++AC_OUTPUT(Makefile) + +=== modified file 'regex-0.12/regex.c' +--- a/regex-0.12/regex.c ++++ b/regex-0.12/regex.c +@@ -34,7 +34,9 @@ + #pragma alloca + #endif + ++#ifndef _GNU_SOURCE + #define _GNU_SOURCE ++#endif + + /* We need this for `regex.h', and perhaps for the Emacs include files. */ + #include <sys/types.h> + diff --git a/net-analyzer/ngrep/files/ngrep-1.45-prefix.patch b/net-analyzer/ngrep/files/ngrep-1.45-prefix.patch new file mode 100644 index 000000000000..8618f5daae31 --- /dev/null +++ b/net-analyzer/ngrep/files/ngrep-1.45-prefix.patch @@ -0,0 +1,17 @@ +* refrain from doing an absolutely insane check (to see if pcap is + installed in more than one place) + +--- a/configure.in ++++ b/configure.in +@@ -268,10 +268,7 @@ + + AC_MSG_CHECKING(for a complete set of pcap headers) + +-possible_dirs="`eval echo -n ${includedir}` \ +- /usr/include /usr/include/pcap \ +- /usr/local/include /usr/local/include/pcap \ +- /usr/share/include /usr/share/include/pcap" ++possible_dirs="`eval echo -n ${includedir}`" + + AC_ARG_WITH(pcap-includes, + [ --with-pcap-includes specify the pcap include directory], diff --git a/net-analyzer/ngrep/files/ngrep-1.45-setlocale.patch b/net-analyzer/ngrep/files/ngrep-1.45-setlocale.patch new file mode 100644 index 000000000000..8789e5b8c76b --- /dev/null +++ b/net-analyzer/ngrep/files/ngrep-1.45-setlocale.patch @@ -0,0 +1,23 @@ +Call setlocale to make isprint() decide what's printable depending +on the current locale. See bugs.debian.org/307496 . + +--- a/ngrep.c ++++ b/ngrep.c +@@ -97,6 +97,8 @@ + #include "regex-0.12/regex.h" + #endif + ++#include <locale.h> ++ + #include "ngrep.h" + + +@@ -195,6 +197,8 @@ + signal(SIGWINCH, update_windowsize); + #endif + ++ setlocale(LC_ALL, ""); ++ + while ((c = getopt(argc, argv, "LNhXViwqpevxlDtTRMs:n:c:d:A:I:O:S:P:F:W:")) != EOF) { + switch (c) { + case 'W': { diff --git a/net-analyzer/ngrep/metadata.xml b/net-analyzer/ngrep/metadata.xml new file mode 100644 index 000000000000..a8fcd8f42981 --- /dev/null +++ b/net-analyzer/ngrep/metadata.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>jpr5+gentoo@darkridge.com</email> + <name>Jordan Ritter</name> + <description>Program author who would like to be notified of bugs</description> + </maintainer> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <upstream> + <remote-id type="sourceforge">ngrep</remote-id> + </upstream> +</pkgmetadata> diff --git a/net-analyzer/ngrep/ngrep-1.45-r3.ebuild b/net-analyzer/ngrep/ngrep-1.45-r3.ebuild new file mode 100644 index 000000000000..070bfb219184 --- /dev/null +++ b/net-analyzer/ngrep/ngrep-1.45-r3.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit autotools eutils user + +DESCRIPTION="A grep for network layers" +HOMEPAGE="http://ngrep.sourceforge.net/" +SRC_URI="mirror://sourceforge/ngrep/${P}.tar.bz2" + +LICENSE="ngrep" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 s390 sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos" +IUSE="ipv6" + +DEPEND=" + dev-libs/libpcre + net-libs/libpcap +" +RDEPEND="${DEPEND}" + +DOCS=( + doc/CHANGES.txt + doc/CREDITS.txt + doc/README.txt + doc/REGEX.txt +) + +src_prepare() { + # Remove bundled libpcre to avoid occasional linking with them + rm -r pcre-5.0 || die + + epatch \ + "${FILESDIR}"/${P}-build-fixes.patch \ + "${FILESDIR}"/${P}-setlocale.patch \ + "${FILESDIR}"/${P}-prefix.patch + + eautoreconf +} + +src_configure() { + econf \ + $(use_enable ipv6) \ + --disable-pcap-restart \ + --enable-pcre \ + --with-dropprivs-user=ngrep \ + --with-pcap-includes="${EPREFIX}"/usr/include/pcap +} + +pkg_preinst() { + enewgroup ngrep + enewuser ngrep -1 -1 -1 ngrep +} |