diff options
author | Peter Volkov <pva@gentoo.org> | 2008-11-17 11:54:06 +0000 |
---|---|---|
committer | Peter Volkov <pva@gentoo.org> | 2008-11-17 11:54:06 +0000 |
commit | 56d3dfda72f438039e5499ef81e0e5ffe6889cf4 (patch) | |
tree | 1e1b69572ebe032991901d7ef825edf3f32963bd /net-analyzer | |
parent | Added -j1 to emake install as a temporary fix for parallel install problems (... (diff) | |
download | historical-56d3dfda72f438039e5499ef81e0e5ffe6889cf4.tar.gz historical-56d3dfda72f438039e5499ef81e0e5ffe6889cf4.tar.bz2 historical-56d3dfda72f438039e5499ef81e0e5ffe6889cf4.zip |
Fixed build issue with libpcap-1.0.0, bug #247128, thank Matthias Liebig for report and fix. Changed a bit patches so everything respect CC, CFLAGS and etc... Added patch from debian to make regexps respect locale.
Package-Manager: portage-2.2_rc14/cvs/Linux 2.6.26-openvz.git-35f41f1 i686
Diffstat (limited to 'net-analyzer')
-rw-r--r-- | net-analyzer/ngrep/ChangeLog | 11 | ||||
-rw-r--r-- | net-analyzer/ngrep/Manifest | 15 | ||||
-rw-r--r-- | net-analyzer/ngrep/files/ngrep-1.45-build-fixes.patch | 191 | ||||
-rw-r--r-- | net-analyzer/ngrep/files/ngrep-1.45-setlocale.patch | 23 | ||||
-rw-r--r-- | net-analyzer/ngrep/ngrep-1.45-r2.ebuild | 45 |
5 files changed, 273 insertions, 12 deletions
diff --git a/net-analyzer/ngrep/ChangeLog b/net-analyzer/ngrep/ChangeLog index d133fa5678a1..7e19f9de6995 100644 --- a/net-analyzer/ngrep/ChangeLog +++ b/net-analyzer/ngrep/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for net-analyzer/ngrep # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/ngrep/ChangeLog,v 1.53 2008/09/10 10:42:44 pva Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/ngrep/ChangeLog,v 1.54 2008/11/17 11:54:06 pva Exp $ + +*ngrep-1.45-r2 (17 Nov 2008) + + 17 Nov 2008; Peter Volkov <pva@gentoo.org> + +files/ngrep-1.45-build-fixes.patch, +files/ngrep-1.45-setlocale.patch, + +ngrep-1.45-r2.ebuild: + Fixed build issue with libpcap-1.0.0, bug #247128, thank Matthias Liebig + for report and fix. Changed a bit patches so everything respect CC, CFLAGS + and etc... Added patch from debian to make regexps respect locale. 10 Sep 2008; Peter Volkov <pva@gentoo.org> ngrep-1.45-r1.ebuild: enewuser/enewgroup die on their own, no need to || die diff --git a/net-analyzer/ngrep/Manifest b/net-analyzer/ngrep/Manifest index b9454da9fd9d..a46d168025f5 100644 --- a/net-analyzer/ngrep/Manifest +++ b/net-analyzer/ngrep/Manifest @@ -1,17 +1,10 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - AUX ngrep-1.45-Makefile.in.patch 395 RMD160 a05ea1cc784ef271d424aa0cbb695f2289f7c4d7 SHA1 f0b89b01e4a6ba60e4256f5c506cda26643dfd66 SHA256 25bc9e8de6d9396220d7c07d662b43121d2f025648c841f6b96ff3dc592b89e9 +AUX ngrep-1.45-build-fixes.patch 5246 RMD160 61c33a509132197a8a2ea7dfddc0f14d14d03bd0 SHA1 f1f358d35f4c005c7e0bc39e06416b9523635e23 SHA256 4af21aef682c00b78fbf0d93355609ad801f6662e8c38ecd4fc1b24b67787167 +AUX ngrep-1.45-setlocale.patch 526 RMD160 cf85c9168a922182e2eafb3dc600209003548d1c SHA1 2340c79cc0a1a763e79aafe408c307e10da4f542 SHA256 46fbee8a32f168838afdaf147b614149fec673abc1181a18ae49ba357596723c AUX ngrep-1.45.patch 911 RMD160 24b2b968bc547f73f2c0d31e711519d8b3627fad SHA1 ba188bd25da03fd43133f03e8d417208f1d3fb03 SHA256 586349b83f9d61a8791be62b26c1ee816b20f5eaf6b8b3671c4833f730dda333 DIST ngrep-1.45.tar.bz2 463361 RMD160 d4b89dfa23f6a7c65d3ccefc846362054a46605f SHA1 f26090a6ac607db66df99c6fa9aef74968f3330f SHA256 aea6dd337da8781847c75b3b5b876e4de9c58520e0d77310679a979fc6402fa7 EBUILD ngrep-1.45-r1.ebuild 1015 RMD160 eb55daa5b0cc0d4e8261584733e7a5656799b9b1 SHA1 f48785dd5d9ff2eb391726863e2b4947ba3b2d19 SHA256 f708806492d81e255da8b95f67e740c68fd0159affda4a5c50df29511bbf80e9 +EBUILD ngrep-1.45-r2.ebuild 1114 RMD160 24ec15c40fe968c915a4ee1d8d71376c5dafda84 SHA1 857979160e8c17cbce97b04de6de9b2dc4db7701 SHA256 c6969b3959b74513a0980b7a6486fdaa526c431311cec57a83c78dcfa251a8ea EBUILD ngrep-1.45.ebuild 865 RMD160 ff54887823adc58d6034e3027d797183d8383a2f SHA1 fdf1af58a848608b6607548b1a60695892a8fa2e SHA256 d6a0b5fba4cb762417a5b96e57f3701ea40032c0d58616f6e6e6a05657f037c6 -MISC ChangeLog 6454 RMD160 5c405bd8e862595ad656d3a9a0396a6a731f4f8f SHA1 17a9cffdac1455ed5dcfa8b03606417c9781f1ee SHA256 ecc734c144331f567a10109673761fb9ee50d9c2b57652630b83e501e7f92c76 +MISC ChangeLog 6850 RMD160 6a800ce69967617f4ff634a8b8dc707bee46d95c SHA1 488524d8f3f917c62af8cca4d69c91b5d0d66cfb SHA256 27c3ed91b59a0a148affe9a33558c595795cf3d5709b6fd2921703e1fee6be69 MISC metadata.xml 501 RMD160 26af8f66fce54937141d226342ed7bb3101a423c SHA1 6e5cda83d6cdeaa782c830c02b12e211acea6102 SHA256 19f8270fac394a4ad440ceaef68850f7b3add04bbaee3e77170de26def82ac0d ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.9 (GNU/Linux) - -iEYEARECAAYFAkkW04gACgkQ67wieSYcaxeUZgCbBWth2Bp734MBcVI0Cgs1VdK3 -n/wAnjzP1t0rfxEADBvmc/inJl6ljIIE -=rVO1 ------END PGP SIGNATURE----- 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..1e30ca9a0c80 --- /dev/null +++ b/net-analyzer/ngrep/files/ngrep-1.45-build-fixes.patch @@ -0,0 +1,191 @@ +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) + +=== modified file 'Makefile.in' +--- Makefile.in 2008-11-17 09:02:30 +0000 ++++ Makefile.in 2008-11-17 10:42:09 +0000 +@@ -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 + + +=== modified file 'configure.in' +--- configure.in 2008-11-17 09:02:30 +0000 ++++ configure.in 2008-11-17 10:11:29 +0000 +@@ -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 + +=== modified file 'ngrep.c' +--- ngrep.c 2008-11-17 09:02:30 +0000 ++++ ngrep.c 2008-11-17 09:55:32 +0000 +@@ -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 + +=== modified file 'regex-0.12/Makefile.in' +--- regex-0.12/Makefile.in 2008-11-17 09:02:30 +0000 ++++ regex-0.12/Makefile.in 2008-11-17 10:20:52 +0000 +@@ -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 + +=== modified file 'regex-0.12/configure.in' +--- regex-0.12/configure.in 2008-11-17 09:02:30 +0000 ++++ regex-0.12/configure.in 2008-11-17 10:19:18 +0000 +@@ -34,4 +34,4 @@ + + esac + +-AC_OUTPUT(Makefile doc/Makefile test/Makefile) ++AC_OUTPUT(Makefile) + +=== modified file 'regex-0.12/regex.c' +--- regex-0.12/regex.c 2008-11-17 09:02:30 +0000 ++++ regex-0.12/regex.c 2008-11-17 10:15:58 +0000 +@@ -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-setlocale.patch b/net-analyzer/ngrep/files/ngrep-1.45-setlocale.patch new file mode 100644 index 000000000000..d43f225cab0c --- /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 . + +--- ngrep-1.45.ds1.orig/ngrep.c ++++ ngrep-1.45.ds1/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/ngrep-1.45-r2.ebuild b/net-analyzer/ngrep/ngrep-1.45-r2.ebuild new file mode 100644 index 000000000000..07efb58889a1 --- /dev/null +++ b/net-analyzer/ngrep/ngrep-1.45-r2.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/ngrep/ngrep-1.45-r2.ebuild,v 1.1 2008/11/17 11:54:06 pva Exp $ + +inherit eutils autotools + +DESCRIPTION="A grep for network layers" +HOMEPAGE="http://ngrep.sourceforge.net/" +SRC_URI="mirror://sourceforge/ngrep/${P}.tar.bz2" + +LICENSE="as-is" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" +IUSE="ipv6 pcre" + +DEPEND="net-libs/libpcap + pcre? ( dev-libs/libpcre )" + +src_unpack() { + unpack ${A} + cd "${S}" + # Remove bundled libpcre to avoid occasional linking with them + rm -rf pcre-5.0 + epatch "${FILESDIR}/${P}-build-fixes.patch" + epatch "${FILESDIR}/${P}-setlocale.patch" + eautoreconf +} + +src_compile() { + econf --with-dropprivs-user=ngrep \ + --with-pcap-includes=/usr/include \ + $(use_enable pcre) \ + $(use_enable ipv6) + emake || die "emake failed" +} + +pkg_preinst() { + enewgroup ngrep + enewuser ngrep -1 -1 -1 ngrep +} + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed" + dodoc doc/*.txt +} |