diff options
author | Jeroen Roovers <jer@gentoo.org> | 2014-10-25 09:25:30 +0000 |
---|---|---|
committer | Jeroen Roovers <jer@gentoo.org> | 2014-10-25 09:25:30 +0000 |
commit | 7583cb4f76408d3acad3a9f949b43557f36015dc (patch) | |
tree | 75af1c4df0eb118a7c7b4b9b3e71ffd9b0ba3636 /net-analyzer/iftop | |
parent | leading whitespace (diff) | |
download | gentoo-2-7583cb4f76408d3acad3a9f949b43557f36015dc.tar.gz gentoo-2-7583cb4f76408d3acad3a9f949b43557f36015dc.tar.bz2 gentoo-2-7583cb4f76408d3acad3a9f949b43557f36015dc.zip |
Replace broken sizeof checks.
(Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key A792A613)
Diffstat (limited to 'net-analyzer/iftop')
-rw-r--r-- | net-analyzer/iftop/ChangeLog | 8 | ||||
-rw-r--r-- | net-analyzer/iftop/files/iftop-1.0_pre4-ac_check_sizeof.patch | 64 | ||||
-rw-r--r-- | net-analyzer/iftop/iftop-1.0_pre4-r1.ebuild | 46 |
3 files changed, 117 insertions, 1 deletions
diff --git a/net-analyzer/iftop/ChangeLog b/net-analyzer/iftop/ChangeLog index fd65b492ee9a..76736cbf7c96 100644 --- a/net-analyzer/iftop/ChangeLog +++ b/net-analyzer/iftop/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for net-analyzer/iftop # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/iftop/ChangeLog,v 1.71 2014/10/22 23:02:08 jer Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/iftop/ChangeLog,v 1.72 2014/10/25 09:25:30 jer Exp $ + +*iftop-1.0_pre4-r1 (25 Oct 2014) + + 25 Oct 2014; Jeroen Roovers <jer@gentoo.org> +iftop-1.0_pre4-r1.ebuild, + +files/iftop-1.0_pre4-ac_check_sizeof.patch: + Replace broken sizeof checks. 22 Oct 2014; Jeroen Roovers <jer@gentoo.org> -iftop-0.17.ebuild, -iftop-1.0_pre2.ebuild, -iftop-1.0_pre3.ebuild, diff --git a/net-analyzer/iftop/files/iftop-1.0_pre4-ac_check_sizeof.patch b/net-analyzer/iftop/files/iftop-1.0_pre4-ac_check_sizeof.patch new file mode 100644 index 000000000000..3710cf8d258c --- /dev/null +++ b/net-analyzer/iftop/files/iftop-1.0_pre4-ac_check_sizeof.patch @@ -0,0 +1,64 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -98,45 +98,14 @@ + AC_CHECK_FUNCS(inet_aton inet_pton) + + dnl +-dnl Find integers of known physical size. This is a pain in the arse because +-dnl we can't use AC_CHECK_SIZEOF to find the original variables, since that +-dnl function doesn't permit us to include a header file. Sigh. ++dnl Find integers of known physical size. + dnl + +-for type in u_int8_t u_int16_t u_int32_t ; do +- AC_MSG_CHECKING([size of $type]) +- AC_RUN_IFELSE([AC_LANG_SOURCE([ +-#include <sys/types.h> +-#include <stdio.h> +-int main() { +- $type dummy; +- FILE *f=fopen("conftestval", "w"); +- if (!f) exit(1); +- fprintf(f, "%d\n", sizeof($1)); +- exit(0); +-} +- ])], [ +- x=`cat conftestval` +- eval "size_$type=$x" +- AC_MSG_RESULT([$x]) +- ], [ +- eval "size_$type=0" +- AC_MSG_RESULT([unknown type]) +- ], [ +- eval "size_$type=0" +- AC_MSG_RESULT([can't determine when cross-compiling]) +- ]) +-done +- +-dnl Groan. Have to do things this way so that autoheader can do its thing.... +-AC_DEFINE_UNQUOTED(SIZEOF_U_INT8_T, [$size_u_int8_t], [size of u_int8_t]) +-AC_DEFINE_UNQUOTED(SIZEOF_U_INT16_T, [$size_u_int16_t], [size of u_int16_t]) +-AC_DEFINE_UNQUOTED(SIZEOF_U_INT32_T, [$size_u_int32_t], [size of u_int32_t]) ++AC_CHECK_SIZEOF([u_int8_t]) ++AC_CHECK_SIZEOF([u_int16_t]) ++AC_CHECK_SIZEOF([u_int32_t]) + +-dnl If we already have these types, don't piss about any more.... +- +-if test $size_u_int8_t != 1 || test $size_u_int16_t != 2 || test $size_u_int32_t != 4 ; then +-dnl XXXif test $size_u_int8_t != 1 -o $size_u_int16_t != 2 -o $size_u_int32_t != 4 ; then ++if test $ac_cv_sizeof_u_int8_t = 0 || test $ac_cv_sizeof_u_int16_t = 0 || test $ac_cv_sizeof_u_int32_t = 0; then + do_int_types=1 + AC_CHECK_HEADERS( + stdint.h dnl C99 +@@ -154,6 +123,10 @@ + fi + fi + ++AC_DEFINE_UNQUOTED([SIZEOF_U_INT8_T],[$ac_cv_sizeof_u_int8_t],[size of u_int8_t]) ++AC_DEFINE_UNQUOTED([SIZEOF_U_INT16_T],[$ac_cv_sizeof_u_int16_t],[size of u_int16_t]) ++AC_DEFINE_UNQUOTED([SIZEOF_U_INT32_T],[$ac_cv_sizeof_u_int32_t],[size of u_int32_t]) ++ + dnl + dnl Name resolution. + dnl diff --git a/net-analyzer/iftop/iftop-1.0_pre4-r1.ebuild b/net-analyzer/iftop/iftop-1.0_pre4-r1.ebuild new file mode 100644 index 000000000000..7eec828e741e --- /dev/null +++ b/net-analyzer/iftop/iftop-1.0_pre4-r1.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/iftop/iftop-1.0_pre4-r1.ebuild,v 1.1 2014/10/25 09:25:30 jer Exp $ + +EAPI=5 + +inherit autotools eutils + +DESCRIPTION="display bandwidth usage on an interface" +SRC_URI="http://www.ex-parrot.com/pdw/iftop/download/${P/_/}.tar.gz" +HOMEPAGE="http://www.ex-parrot.com/pdw/iftop/" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" +IUSE="" + +RDEPEND=" + net-libs/libpcap + sys-libs/ncurses +" +DEPEND=" + ${RDEPEND} + virtual/pkgconfig +" + +S="${WORKDIR}"/${P/_/} + +src_prepare() { + epatch \ + "${FILESDIR}"/${P}-ac_check_sizeof.patch \ + "${FILESDIR}"/${P}-pthread.patch \ + "${FILESDIR}"/${P}-tinfo.patch + + # bug 490168 + cat "${FILESDIR}"/ax_pthread.m4 >> "${S}"/acinclude.m4 || die + + eautoreconf +} + +src_install() { + dosbin iftop + doman iftop.8 + + dodoc AUTHORS ChangeLog README "${FILESDIR}"/iftoprc +} |