diff options
author | Mike Frysinger <vapier@gentoo.org> | 2008-04-20 20:56:46 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2008-04-20 20:56:46 +0000 |
commit | 2e4618394658ef783143eb0d129aa74c6e8af727 (patch) | |
tree | d2caa44c9440d395672ac1df7173486c4663d7f9 /net-misc/iputils | |
parent | amd64/arm/s390/sh stable (diff) | |
download | historical-2e4618394658ef783143eb0d129aa74c6e8af727.tar.gz historical-2e4618394658ef783143eb0d129aa74c6e8af727.tar.bz2 historical-2e4618394658ef783143eb0d129aa74c6e8af727.zip |
Add support for USE=idn #218638 by Hanno Boeck.
Package-Manager: portage-2.2_pre5
Diffstat (limited to 'net-misc/iputils')
-rw-r--r-- | net-misc/iputils/ChangeLog | 8 | ||||
-rw-r--r-- | net-misc/iputils/Manifest | 12 | ||||
-rw-r--r-- | net-misc/iputils/files/iputils-20070202-idn.patch | 158 | ||||
-rw-r--r-- | net-misc/iputils/iputils-20071127-r1.ebuild | 78 |
4 files changed, 250 insertions, 6 deletions
diff --git a/net-misc/iputils/ChangeLog b/net-misc/iputils/ChangeLog index 4617c502532a..afe7326ab1a5 100644 --- a/net-misc/iputils/ChangeLog +++ b/net-misc/iputils/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for net-misc/iputils # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/iputils/ChangeLog,v 1.73 2008/04/20 20:55:59 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/iputils/ChangeLog,v 1.74 2008/04/20 20:56:45 vapier Exp $ + +*iputils-20071127-r1 (20 Apr 2008) + + 20 Apr 2008; Mike Frysinger <vapier@gentoo.org> + +files/iputils-20070202-idn.patch, +iputils-20071127-r1.ebuild: + Add support for USE=idn #218638 by Hanno Boeck. 20 Apr 2008; Mike Frysinger <vapier@gentoo.org> iputils-20071127.ebuild: Mark amd64 stable. diff --git a/net-misc/iputils/Manifest b/net-misc/iputils/Manifest index 08c2eb62d193..b19b84a322a6 100644 --- a/net-misc/iputils/Manifest +++ b/net-misc/iputils/Manifest @@ -5,6 +5,7 @@ AUX 021109-uclibc-no-ether_ntohost.patch 635 RMD160 234010cd5aadc5086beb638c1951 AUX iputils-021109-gcc34.patch 2313 RMD160 354dcdc651bcfb88bd96d9008367854e91a5f7f7 SHA1 97baa39948144d83f0d484d2c5df0c8efc924590 SHA256 f015536e6b043aacdc7e55afd2394ecdea4d1aeeb33780e3857374788321bf9e AUX iputils-20060512-kernel-ifaddr.patch 1732 RMD160 88d0f57dc248e67fd7a7c6ca5705a721c553a177 SHA1 6e2617524eb6167476bd51461f43b24e619fcc1a SHA256 6b6d1e80ecb2a1bf8b5887c653abd6403e5edd743638d60eb07bc491b91bd7fe AUX iputils-20060512-linux-headers.patch 213 RMD160 55c51196e4604e1810ab85faa5dfd195b0fddbf1 SHA1 8ff0acaf2ec425f860b6476dee71d2a07d9d4525 SHA256 b715bb3db742310727a87582d2c8eb79983160772c3fc8221d49efd3ed133c4f +AUX iputils-20070202-idn.patch 3303 RMD160 77cc510e77956cdb3b598297756998ed9728775d SHA1 aad5d04fbe861f049d58ecfc3d6efebb92b63f10 SHA256 449e356a14aee6ad27ac4581055d489da764403447df8f2a50ecb1c4ac71e533 AUX iputils-20070202-makefile.patch 982 RMD160 1b245b116eb9ede2698e7a37122cd1e6fb4c4dfd SHA1 aef3be153f43179c09289028ad945669bd19a0f5 SHA256 10da0ffbbf0d3df72f0a7218cd94a2668eff318e12f402ae3279fec090462b4a AUX iputils-20070202-no-open-max.patch 367 RMD160 e69a4be1e3ff09a7a5c77a5aee871bf9887919fd SHA1 5505cc56d715b459549d6f227d5d29087fd23e5d SHA256 e10fe24e5d07511ec6f1ee0822d314282952510d1b1e30b70f83d70542f7e513 AUX iputils-20071127-gcc34.patch 2312 RMD160 8f63290b181d68216fb2c849212e5a40a561a056 SHA1 1227638d432b1dd6b84d790133a976c3dd1ad409 SHA256 8780a50156a8dfa3126668e1bf2e041ee54dd9e1d558d7e2b9d772bc99a35845 @@ -13,14 +14,15 @@ DIST iputils-s20070202.tar.bz2 88678 RMD160 f6c3600a350537210d6ca43d1b82806bc0fa DIST iputils-s20071127-manpages.tar.bz2 11796 RMD160 ce07a3837501c32af297914260273c89e134f42a SHA1 76a333ef987bab15abdea77d7edcf5977f5d781e SHA256 891363d013e8c939892a5860e8b2d1e0f002d6f2372c546490346d9348318d0c DIST iputils-s20071127.tar.bz2 88796 RMD160 2ca3d0ca25c7e0a197176a7438d803171d4e74e6 SHA1 56c8b6c5999b96f47f5b3b37dcf014a33cc7cb22 SHA256 dbbd87554d66e438245487ac31aa4a542a1c6c1ec8273cfacbbfeda09eb44a93 EBUILD iputils-20070202.ebuild 2039 RMD160 9250defaf847acdd64d6c83b137ac250bcdd8562 SHA1 59584cf5c3e74758ec742f3df411387d85b0e449 SHA256 5962d7fd2d5f72e17dcbd36d25cc48f9f94b25ea073ba8b463f4d677fdf1022f -EBUILD iputils-20071127.ebuild 2063 RMD160 c8947fbd9d4cef8c18b750c26a5c4bfffb3221da SHA1 1051327f52ae69626049009ce9f365982dab9df7 SHA256 17fb3a9d3ff3e73c6a6ab49c035bf8cc7bed1916fb07a791d45c20fa1cea8e98 +EBUILD iputils-20071127-r1.ebuild 2192 RMD160 2f2538abfb9d787cc148abdfa1f1fd6e965ac5e5 SHA1 15157576ee579cf1e582c0a141519020e5541f8e SHA256 3fb3d190062b61ab9c3586d5b31432003bddfafcb425e13099d95f9d69f7cfa3 +EBUILD iputils-20071127.ebuild 2059 RMD160 bea5e3eb0cb791489dd732699b680b7131429732 SHA1 45be95f84871b9d68bb14dbc88c4dea5aa2aca4d SHA256 8cac35689da454772354202289eb01a36b29059dbf7929938c12b0bb09e97954 EBUILD iputils-99999999.ebuild 1690 RMD160 6a12ea8de1be1877c69117bccb296381f0a88fd4 SHA1 340e3dc9d7e354629db429930cb5a64082a62798 SHA256 5e15b7bf264c4ef2e5c69d6e2f78a2aa279a89e05e10651ec08f85788893b103 -MISC ChangeLog 10185 RMD160 1e5ecf01318e854dd9e6003fb2934c53c7a4eec7 SHA1 f0919754ed3b3c291bd0f454af85788e0cc22475 SHA256 480b42ad5e354d12277983f9ee88685f67930a5f68d78e9578b19f7dae8e13ac +MISC ChangeLog 10483 RMD160 ef194776c0468d4615e4bc3404cd1b32e0108908 SHA1 7e21dd1f6fb5328af78719a1fe2b86639ad6923c SHA256 5f614b255e237f37f3f289b814acb55ade9599b1996146d39ff565b29a07c3ff MISC metadata.xml 164 RMD160 f43cbec30b7074319087c9acffdb9354b17b0db3 SHA1 9c213f5803676c56439df3716be07d6692588856 SHA256 f5f2891f2a4791cd31350bb2bb572131ad7235cd0eeb124c9912c187ac10ce92 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.7 (GNU/Linux) -iD8DBQFIC6Iij9hvisErhMIRAlqCAKDh5EOkQ1gCFUnIU9hU1IbzGwYkXACdF+Xt -Yn7tfohJJg0Bco9L0M2fIxo= -=7dVR +iD8DBQFIC64Tj9hvisErhMIRArz3AJ9Ug297vm4PHaNaIpgDy7A1r1u0+gCgkwNI +e3OL+MIjGl6XeMC0STcrRag= +=pyo+ -----END PGP SIGNATURE----- diff --git a/net-misc/iputils/files/iputils-20070202-idn.patch b/net-misc/iputils/files/iputils-20070202-idn.patch new file mode 100644 index 000000000000..98dc3ce54575 --- /dev/null +++ b/net-misc/iputils/files/iputils-20070202-idn.patch @@ -0,0 +1,158 @@ +sniped from Fedora and made to not suck + +http://bugs.gentoo.org/218638 + +--- iputils-s20070202/Makefile ++++ iputils-s20070202/Makefile +@@ -22,6 +22,11 @@ + + all: $(TARGETS) + ++ifeq ($(IDN),yes) ++CPPFLAGS += -DIDN ++ping: LDLIBS += -lidn ++ping6: LDLIBS += -lidn ++endif + + tftpd: tftpd.o tftpsubs.o + ping: ping.o ping_common.o +--- iputils-s20070202/ping.c ++++ iputils-s20070202/ping.c +@@ -58,6 +58,11 @@ + * This program has to run SUID to ROOT to access the ICMP socket. + */ + ++#ifdef IDN ++#include <idna.h> ++#include <locale.h> ++#endif ++ + #include "ping_common.h" + + #include <netinet/ip.h> +@@ -122,6 +128,12 @@ + char *target, hnamebuf[MAXHOSTNAMELEN]; + char rspace[3 + 4 * NROUTES + 1]; /* record route space */ + ++#ifdef IDN ++ char *idn; ++ int rc = 0; ++ setlocale(LC_ALL, ""); ++#endif ++ + icmp_sock = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP); + socket_errno = errno; + +@@ -242,13 +254,35 @@ + if (argc == 1) + options |= F_NUMERIC; + } else { ++#ifdef IDN ++ rc = idna_to_ascii_lz (target, &idn, 0); ++ if (rc == IDNA_SUCCESS) ++ hp = gethostbyname (idn); ++ else { ++ fprintf(stderr, "ping: IDN encoding of '%s' failed with error code %d\n", target, rc); ++ exit(2); ++ } ++ free(idn); ++#else + hp = gethostbyname(target); ++#endif + if (!hp) { + fprintf(stderr, "ping: unknown host %s\n", target); + exit(2); + } + memcpy(&whereto.sin_addr, hp->h_addr, 4); ++#ifdef IDN ++ rc = idna_to_unicode_lzlz (hp->h_name, &idn, 0); ++ if (rc == IDNA_SUCCESS) ++ strncpy(hnamebuf, idn, sizeof(hnamebuf) - 1); ++ else { ++ fprintf(stderr, "ping: IDN encoding of '%s' failed with error code %d\n", hp->h_name, rc); ++ exit(2); ++ } ++ free(idn); ++#else + strncpy(hnamebuf, hp->h_name, sizeof(hnamebuf) - 1); ++#endif + hnamebuf[sizeof(hnamebuf) - 1] = 0; + hostname = hnamebuf; + } +--- iputils-s20070202/ping6.c ++++ iputils-s20070202/ping6.c +@@ -66,6 +66,13 @@ + * More statistics could always be gathered. + * This program has to run SUID to ROOT to access the ICMP socket. + */ ++#ifdef IDN ++#ifndef _GNU_SOURCE ++#define _GNU_SOURCE ++#endif ++#include <locale.h> ++#endif ++ + #include "ping_common.h" + + #include <linux/filter.h> +@@ -210,6 +216,10 @@ + int err, csum_offset, sz_opt; + static uint32_t scope_id = 0; + ++#ifdef IDN ++ setlocale(LC_ALL, ""); ++#endif ++ + icmp_sock = socket(AF_INET6, SOCK_RAW, IPPROTO_ICMPV6); + socket_errno = errno; + +@@ -296,6 +306,9 @@ + + memset(&hints, 0, sizeof(hints)); + hints.ai_family = AF_INET6; ++#ifdef IDN ++ hints.ai_flags = AI_IDN; ++#endif + gai = getaddrinfo(target, NULL, &hints, &ai); + if (gai) { + fprintf(stderr, "unknown host\n"); +@@ -328,6 +341,9 @@ + + memset(&hints, 0, sizeof(hints)); + hints.ai_family = AF_INET6; ++#ifdef IDN ++ hints.ai_flags = AI_IDN; ++#endif + gai = getaddrinfo(target, NULL, &hints, &ai); + if (gai) { + fprintf(stderr, "unknown host\n"); +--- iputils-s20070202/ping_common.c ++++ iputils-s20070202/ping_common.c +@@ -1,3 +1,7 @@ ++#ifdef IDN ++#include <locale.h> ++#endif ++ + #include "ping_common.h" + #include <ctype.h> + #include <sched.h> +@@ -97,6 +102,9 @@ + + void common_options(int ch) + { ++#ifdef IDN ++ setlocale(LC_ALL, "C"); ++#endif + switch(ch) { + case 'a': + options |= F_AUDIBLE; +@@ -222,6 +230,9 @@ + default: + abort(); + } ++#ifdef IDN ++ setlocale(LC_ALL, ""); ++#endif + } + + diff --git a/net-misc/iputils/iputils-20071127-r1.ebuild b/net-misc/iputils/iputils-20071127-r1.ebuild new file mode 100644 index 000000000000..8f8781fcb209 --- /dev/null +++ b/net-misc/iputils/iputils-20071127-r1.ebuild @@ -0,0 +1,78 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/iputils/iputils-20071127-r1.ebuild,v 1.1 2008/04/20 20:56:45 vapier Exp $ + +inherit flag-o-matic eutils toolchain-funcs + +DESCRIPTION="Network monitoring tools including ping and ping6" +HOMEPAGE="http://www.linux-foundation.org/en/Net:Iputils" +SRC_URI="http://www.skbuff.net/iputils/iputils-s${PV}.tar.bz2 + mirror://gentoo/iputils-s${PV}-manpages.tar.bz2" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" +IUSE="doc idn ipv6 static" + +DEPEND="virtual/os-headers + doc? ( + app-text/openjade + dev-perl/SGMLSpm + app-text/docbook-sgml-dtd + app-text/docbook-sgml-utils + )" +RDEPEND="!net-misc/rarpd + idn? ( net-dns/libidn )" + +S=${WORKDIR}/${PN}-s${PV} + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/${P}-gcc34.patch + epatch "${FILESDIR}"/021109-uclibc-no-ether_ntohost.patch + epatch "${FILESDIR}"/${PN}-20070202-makefile.patch + epatch "${FILESDIR}"/${P}-kernel-ifaddr.patch + epatch "${FILESDIR}"/${PN}-20060512-linux-headers.patch + epatch "${FILESDIR}"/${PN}-20070202-no-open-max.patch #195861 + epatch "${FILESDIR}"/${PN}-20070202-idn.patch #218638 + + use static && append-ldflags -static + use ipv6 || sed -i -e 's:IPV6_TARGETS=:#IPV6_TARGETS=:' Makefile + export IDN=$(use idn && echo yes) +} + +src_compile() { + tc-export CC + emake || die "make main failed" + + # We include the extra check for docbook2html + # because when we emerge from a stage1/stage2, + # it may not exist #23156 + if use doc && type -P docbook2html >/dev/null ; then + emake -j1 html || die + fi +} + +src_install() { + into / + dobin ping || die "ping" + use ipv6 && dobin ping6 + dosbin arping || die "arping" + into /usr + dosbin tracepath || die "tracepath" + use ipv6 && dosbin trace{path,route}6 + dosbin clockdiff rarpd rdisc ipg tftpd || die "misc sbin" + + fperms 4711 /bin/ping + use ipv6 && fperms 4711 /bin/ping6 /usr/sbin/traceroute6 + + dodoc INSTALL RELNOTES + use ipv6 \ + && dosym ping.8 /usr/share/man/man8/ping6.8 \ + || rm -f doc/*6.8 + rm -f doc/setkey.8 + doman doc/*.8 + + use doc && dohtml doc/*.html +} |