diff options
Diffstat (limited to 'net-analyzer/driftnet')
-rw-r--r-- | net-analyzer/driftnet/Manifest | 7 | ||||
-rw-r--r-- | net-analyzer/driftnet/driftnet-0.1.6_p20090401-r1.ebuild | 85 | ||||
-rw-r--r-- | net-analyzer/driftnet/driftnet-0.1.6_p20090401.ebuild | 65 | ||||
-rw-r--r-- | net-analyzer/driftnet/files/driftnet-0.1.6-giflib-5.patch | 50 | ||||
-rw-r--r-- | net-analyzer/driftnet/metadata.xml | 9 |
5 files changed, 216 insertions, 0 deletions
diff --git a/net-analyzer/driftnet/Manifest b/net-analyzer/driftnet/Manifest new file mode 100644 index 000000000000..1432250fc487 --- /dev/null +++ b/net-analyzer/driftnet/Manifest @@ -0,0 +1,7 @@ +AUX driftnet-0.1.6-giflib-5.patch 1060 SHA256 7da1ccc9ebdd9ad616950890b68cbc8fb860bcfde9558de733d56c8340599298 SHA512 80dc8c0696f022e9034b01e48017f884f57e0044388cdc4d08c87fbd33bfdc7d3cad0bee332a3b7486cb06b9127469a0c6f088cde6e484d7873f3f59cfb5e97c WHIRLPOOL 2cd9b6741e6633c48b365b59360a7c3bd84e25c9929c071ce598f9990beb192fca2bb316e75671f39732d780bdcbf18ae573db6e0da6b930d10e024422012733 +DIST driftnet-0.1.6_p20090401.tar.gz 43683 SHA256 6ed5d66ddc219a9e98a3879aa1317a9437dc7fc97b7a2bf538a0cb8bb32f4dca SHA512 93b2f7b644603bf2fea09163c3c8cc6eed7ed61f3ad7f6770a754e1a31afde5a75e27464c399261bfdafbe37729f201e6bbcb06bb6c59bf52ac0ede4393a15fa WHIRLPOOL 2523114d08ee789cf0194fafb3cf1886b1173d1106091cd73973f9a213656a94fa721ef08c1037d1f5efa488caa79c936df527e9463414445ea8c0c4a87333a7 +EBUILD driftnet-0.1.6_p20090401-r1.ebuild 1822 SHA256 b77ac556a3ad21e0ec976335a462467ae190fb82749f3b9e8893cbd184dce5fd SHA512 51d05ea045ef4456792fc9785d2c6272f66bc1fd00523a9a857d3bd43f02ff94543f73062cb0f19aa7b849c5ab19abc50deefd601bc200e3fea40bcba99be3d0 WHIRLPOOL 4b72a3ad4701ea09a9bff9c2b614dec0f1583ab69fd229d31c171def8a55f38aa56554ff456b060e965490ebae958a3018cfdcc87e0ef5a52c486bf459925257 +EBUILD driftnet-0.1.6_p20090401.ebuild 1495 SHA256 eb4ef00a6f24f141a8de40c3cf1f8e69a1efcc9fc6b3d5c6c2259e44dba01187 SHA512 a5d5b9fe7749b2f98182290866a4c7c7de981547ea93f2d93fc3ece2f9b50233aa4290cf1263be85180f4247b1d010d43217d74f236cbd4b29f84fafaddf1736 WHIRLPOOL c0d907ada25ed68c8d811a1b3d2db43f5e3533891f5aa721d49deb7d20f55ca5f32f4b3c342998ef846f4c8bf50136f060778d566f6e6ec3a53beb27b487b18b +MISC ChangeLog 2879 SHA256 a031703b7ff3169f9f44eb7b8a2b1c1692dc0b3921518b6ab3b12d3fec43805b SHA512 71f7f25aafb7e129db8c8b7b8653e6224839b02fa7e79d6bddb7276b43d784c2e1f94a57397bb1d476e8116171d9cccf17728fab7b62b79bfd6de320a5bb9b3f WHIRLPOOL 6cb1d2908383c3eef91dfb9094910100afc46236a238ec4fe44e2b3fa889047786db260053c1249162f16a70d4d78b05b8085bd8232ee2d24b75c39750953766 +MISC ChangeLog-2015 6582 SHA256 fecba7f2c6f2b44e60d68ac0c56a8503a80bcc689f12dbce7c83f3b7fa40206c SHA512 cb1c20a79f127f11d523193808836e6ac0082208b43d1447fe7b21c513a4fe68d6a6d302147143ef0481f3a3bd2e255640991ca4ce8b46521a5c65a7eddbb298 WHIRLPOOL d415825fc4a59903eefb0bc319447080caae55d53bfd172d2adff19f40f8d5dc2dce267ec1b8523ec27ecdb11baff724f73f0e5e6a279e328a318d743fd88b74 +MISC metadata.xml 404 SHA256 2ad02e3010e586bc9d9e10a1b99baf40b899964bcfe615bb131d53d4d7c10af8 SHA512 e83bea4ca337cbe95398c6310932535246a00ceedf696574624408a5f783c9f5cc3c519216cc16bc9dd44ad2b4b62050707621814a9b2a26a23c6c0272bcfdfc WHIRLPOOL 019be4b57d48dcabce74c3d1021a18cd0598b5097e94222e478e6efe2f73789e32dc68093d86a5c6bf468213a06a3a140840d75b95d39dd7bdf44bcb5ffb8472 diff --git a/net-analyzer/driftnet/driftnet-0.1.6_p20090401-r1.ebuild b/net-analyzer/driftnet/driftnet-0.1.6_p20090401-r1.ebuild new file mode 100644 index 000000000000..8479e85a6794 --- /dev/null +++ b/net-analyzer/driftnet/driftnet-0.1.6_p20090401-r1.ebuild @@ -0,0 +1,85 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils fcaps flag-o-matic toolchain-funcs + +DESCRIPTION="A program which listens to network traffic and picks out images from TCP streams it observes" +HOMEPAGE="http://www.ex-parrot.com/~chris/driftnet/" +SRC_URI="mirror://github/rbu/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +KEYWORDS="amd64 ppc -sparc x86" +SLOT="0" +IUSE="gtk mp3 suid" + +CDEPEND=" + net-libs/libpcap + gtk? ( + x11-libs/gtk+:2 + virtual/jpeg:0 + media-libs/giflib:= + media-libs/libpng:= + ) +" + +DEPEND=" + ${CDEPEND} + virtual/pkgconfig +" +RDEPEND=" + ${CDEPEND} + mp3? ( media-sound/mpg123 ) +" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-0.1.6-giflib-5.patch + + sed -i \ + -e 's:png_set_gray_1_2_4_to_8:png_set_expand_gray_1_2_4_to_8:' \ + png.c || die + + # With newer libpng, --cflags causes build failures. + sed -i \ + -e 's:pkg-config --cflags libpng:$(PKG_CONFIG) --libs libpng:' \ + -e 's:_BSD_SOURCE:_DEFAULT_SOURCE:g' \ + Makefile || die +} + +src_compile() { + tc-export CC PKG_CONFIG + + if use gtk; then + emake + mv driftnet driftnet-gtk || die + emake clean + fi + + # build a non-gtk version for all users + sed -i 's:^\(.*gtk.*\)$:#\1:g' Makefile || die "sed disable gtk failed" + append-flags -DNO_DISPLAY_WINDOW + emake +} + +src_install() { + dosbin driftnet + doman driftnet.1 + + use gtk && dosbin driftnet-gtk + + dodoc CHANGES CREDITS README TODO + + if use suid ; then + elog "marking the no-display driftnet as setuid root." + fowners root:wheel "/usr/sbin/driftnet" + fperms 710 "/usr/sbin/driftnet" + fperms u+s "/usr/sbin/driftnet" + fi +} + +pkg_postinst() { + fcaps cap_dac_read_search,cap_net_raw,cap_net_admin \ + "${EROOT}"/usr/sbin/driftnet + use gtk && fcaps cap_dac_read_search,cap_net_raw,cap_net_admin \ + "${EROOT}"/usr/sbin/driftnet-gtk +} diff --git a/net-analyzer/driftnet/driftnet-0.1.6_p20090401.ebuild b/net-analyzer/driftnet/driftnet-0.1.6_p20090401.ebuild new file mode 100644 index 000000000000..609df1bb04e0 --- /dev/null +++ b/net-analyzer/driftnet/driftnet-0.1.6_p20090401.ebuild @@ -0,0 +1,65 @@ +# 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="A program which listens to network traffic and picks out images from TCP streams it observes" +HOMEPAGE="http://www.ex-parrot.com/~chris/driftnet/" +SRC_URI="mirror://github/rbu/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +KEYWORDS="~amd64 ppc -sparc x86" +SLOT="0" +IUSE="gtk mp3 suid" + +CDEPEND="net-libs/libpcap + gtk? ( x11-libs/gtk+:2 + virtual/jpeg + media-libs/giflib + media-libs/libpng )" + +DEPEND="${CDEPEND} + virtual/pkgconfig" +RDEPEND="${CDEPEND} + mp3? ( media-sound/mpg123 )" + +src_prepare() { + sed -i \ + -e 's:png_set_gray_1_2_4_to_8:png_set_expand_gray_1_2_4_to_8:' \ + png.c || die + # With newer libpng, --cflags causes build failures. + sed -i \ + -e 's:pkg-config --cflags libpng:pkg-config --libs libpng:' \ + Makefile || die +} + +src_compile() { + export CC=$(tc-getCC) + if use gtk; then + emake + mv driftnet driftnet-gtk || die + emake clean + fi + + # build a non-gtk version for all users + sed -i 's:^\(.*gtk.*\)$:#\1:g' Makefile || die "sed disable gtk failed" + append-flags -DNO_DISPLAY_WINDOW + emake +} + +src_install () { + dosbin driftnet + doman driftnet.1 + + use gtk && dosbin driftnet-gtk + + dodoc CHANGES CREDITS README TODO + + if use suid ; then + elog "marking the no-display driftnet as setuid root." + fowners root:wheel "/usr/sbin/driftnet" + fperms 710 "/usr/sbin/driftnet" + fperms u+s "/usr/sbin/driftnet" + fi +} diff --git a/net-analyzer/driftnet/files/driftnet-0.1.6-giflib-5.patch b/net-analyzer/driftnet/files/driftnet-0.1.6-giflib-5.patch new file mode 100644 index 000000000000..30ad62c38f47 --- /dev/null +++ b/net-analyzer/driftnet/files/driftnet-0.1.6-giflib-5.patch @@ -0,0 +1,50 @@ +--- a/gif.c ++++ b/gif.c +@@ -20,7 +20,12 @@ + */ + int gif_load_hdr(img I) { + GifFileType *g; ++#if GIFLIB_MAJOR > 4 ++ int *GifError = NULL; ++ g = I->us = DGifOpenFileHandle(fileno(I->fp), GifError); ++#else + g = I->us = DGifOpenFileHandle(fileno(I->fp)); ++#endif /* GIFLIB_MAJOR */ + if (!I->us) { + I->err = IE_HDRFORMAT; + return 0; +@@ -36,7 +41,12 @@ + * Abort loading a GIF file after the header is done. + */ + int gif_abort_load(img I) { ++#if GIFLIB_MAJOR > 4 ++ int *GifError = NULL; ++ DGifCloseFile((GifFileType*)I->us, GifError); ++#else + DGifCloseFile((GifFileType*)I->us); ++#endif /* GIFLIB_MAJOR */ + return 1; + } + +@@ -44,6 +54,9 @@ + * Load GIF image. + */ + int gif_load_img(img I) { ++#if GIFLIB_MAJOR > 4 ++ int *GifError = NULL; ++#endif /* GIFLIB_MAJOR */ + GifFileType *g = I->us; + struct SavedImage *si; + int ret = 0; +@@ -114,7 +127,11 @@ + ret = 1; + fail: + ++#if GIFLIB_MAJOR > 4 ++ DGifCloseFile(g, GifError); ++#else + DGifCloseFile(g); ++#endif /* GIFLIB_MAJOR */ + + return ret; + } diff --git a/net-analyzer/driftnet/metadata.xml b/net-analyzer/driftnet/metadata.xml new file mode 100644 index 000000000000..56038b1c27ca --- /dev/null +++ b/net-analyzer/driftnet/metadata.xml @@ -0,0 +1,9 @@ +<?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> +<longdescription>A program which listens to network traffic and picks out images from TCP streams it observes</longdescription> +</pkgmetadata> |