From 5407a549398d41b571b28acaf1f994360523f3ae Mon Sep 17 00:00:00 2001 From: Ned Ludd Date: Thu, 19 Jan 2006 21:30:29 +0000 Subject: - ebtables-2.0.6 does not build with gcc-4.x; Bug #119489 (Portage version: 2.1_pre3-r1) --- net-firewall/ebtables/ChangeLog | 10 +- net-firewall/ebtables/Manifest | 21 ++-- net-firewall/ebtables/ebtables-2.0.6-r1.ebuild | 40 +++++++ .../ebtables/files/digest-ebtables-2.0.6-r1 | 1 + .../ebtables/files/ebtables-2.0.6-gcc4.patch | 116 +++++++++++++++++++++ 5 files changed, 171 insertions(+), 17 deletions(-) create mode 100644 net-firewall/ebtables/ebtables-2.0.6-r1.ebuild create mode 100644 net-firewall/ebtables/files/digest-ebtables-2.0.6-r1 create mode 100644 net-firewall/ebtables/files/ebtables-2.0.6-gcc4.patch (limited to 'net-firewall/ebtables') diff --git a/net-firewall/ebtables/ChangeLog b/net-firewall/ebtables/ChangeLog index 29ab5a3d4684..1c33f66735e1 100644 --- a/net-firewall/ebtables/ChangeLog +++ b/net-firewall/ebtables/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for net-firewall/ebtables -# Copyright 2000-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-firewall/ebtables/ChangeLog,v 1.9 2005/06/08 02:14:47 solar Exp $ +# Copyright 2000-2006 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-firewall/ebtables/ChangeLog,v 1.10 2006/01/19 21:30:29 solar Exp $ + +*ebtables-2.0.6-r1 (19 Jan 2006) + + 19 Jan 2006; +files/ebtables-2.0.6-gcc4.patch, + +ebtables-2.0.6-r1.ebuild: + - ebtables-2.0.6 does not build with gcc-4.x; Bug #119489 07 Jun 2005; ebtables-2.0.6.ebuild: - ebtables used the host compiler vs the cross compiler while merging. We use diff --git a/net-firewall/ebtables/Manifest b/net-firewall/ebtables/Manifest index 28d304c80fd4..54fdb75a2dbd 100644 --- a/net-firewall/ebtables/Manifest +++ b/net-firewall/ebtables/Manifest @@ -1,17 +1,8 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - -MD5 9979552c18681dd6edfe1e91f6717609 ebtables-2.0.6.ebuild 975 MD5 3212022ecac9dfe74493b71305fe0ee3 ChangeLog 1347 -MD5 3eaf375e87551d0b332db3a82109c9d7 metadata.xml 221 -MD5 0488ef6b4eb8aa41352527597cb5d2ad files/ebtables-2.0.6-gcc34.patch 272 +MD5 c6946d41d99f09f7ef746777ae6e1610 ebtables-2.0.6-r1.ebuild 1076 +MD5 9979552c18681dd6edfe1e91f6717609 ebtables-2.0.6.ebuild 975 MD5 72232fd4c734d316f9f588216d3228f2 files/digest-ebtables-2.0.6 66 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.0 (GNU/Linux) - -iQCVAwUBQqZUpJ4WFLgrx1GWAQIcsAQAxwinc5q0S1SvqJbV6t8loNMMDzqHgD0+ -lDB5XJYZNk97nMV+UQB4JATLz4aemyYfs0WULDYsi6E+nWzMP9s/l6WjZiQkebu5 -13nAS18+A+jW8gVTPQzhsAh4MUZ5klg+kSeOWRT52NRGyKOd6OszdsPZmiBNYvev -NY8zv2L6izs= -=y9pC ------END PGP SIGNATURE----- +MD5 72232fd4c734d316f9f588216d3228f2 files/digest-ebtables-2.0.6-r1 66 +MD5 0488ef6b4eb8aa41352527597cb5d2ad files/ebtables-2.0.6-gcc34.patch 272 +MD5 49410b65a0fadade808e745f1e309bb9 files/ebtables-2.0.6-gcc4.patch 3966 +MD5 3eaf375e87551d0b332db3a82109c9d7 metadata.xml 221 diff --git a/net-firewall/ebtables/ebtables-2.0.6-r1.ebuild b/net-firewall/ebtables/ebtables-2.0.6-r1.ebuild new file mode 100644 index 000000000000..d12cd3fe8d25 --- /dev/null +++ b/net-firewall/ebtables/ebtables-2.0.6-r1.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-firewall/ebtables/ebtables-2.0.6-r1.ebuild,v 1.1 2006/01/19 21:30:29 solar Exp $ + +inherit eutils toolchain-funcs + +MY_P="${PN}-v${PV}" + +DESCRIPTION="Utility that enables basic Ethernet frame filtering on a Linux bridge, MAC NAT and brouting." +SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz" +HOMEPAGE="http://ebtables.sourceforge.net/" +KEYWORDS="~x86 ~ppc ~amd64" +IUSE="" +LICENSE="GPL-2" +SLOT="0" + +S="${WORKDIR}/${MY_P}" + +DEPEND="virtual/libc" + +src_compile() { + emake CC="$(tc-getCC)" || die "emake failed" +} + +src_unpack() { + unpack ${A} + cd ${S} + + # fix "label at end of compound statement" error that + # prevents ebtables from being compilable with >=gcc-3.4 + epatch ${FILESDIR}/ebtables-2.0.6-gcc34.patch + + # ebtables does not build with gcc-4.x; Bug #119489 + epatch ${FILESDIR}/ebtables-2.0.6-gcc4.patch +} + +src_install() { + dodir /sbin/ + einstall MANDIR=${D}/usr/share/man ETHERTYPESPATH=${D}/etc/ BINPATH=${D}/sbin/ || die +} diff --git a/net-firewall/ebtables/files/digest-ebtables-2.0.6-r1 b/net-firewall/ebtables/files/digest-ebtables-2.0.6-r1 new file mode 100644 index 000000000000..e5996dd6bdde --- /dev/null +++ b/net-firewall/ebtables/files/digest-ebtables-2.0.6-r1 @@ -0,0 +1 @@ +MD5 c4559af2366c764c6c42a3fdd40d60d3 ebtables-v2.0.6.tar.gz 71411 diff --git a/net-firewall/ebtables/files/ebtables-2.0.6-gcc4.patch b/net-firewall/ebtables/files/ebtables-2.0.6-gcc4.patch new file mode 100644 index 000000000000..cf64aed3aa28 --- /dev/null +++ b/net-firewall/ebtables/files/ebtables-2.0.6-gcc4.patch @@ -0,0 +1,116 @@ +# --- T2-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# T2 SDE: package/.../ebtables/gcc4.patch +# Copyright (C) 2004 - 2005 The T2 SDE Project +# +# More information can be found in the files COPYING and README. +# +# This patch file is dual-licensed. It is available under the license the +# patched project is licensed under, as long as it is an OpenSource license +# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms +# of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# --- T2-COPYRIGHT-NOTE-END --- +diff -Nur ebtables-v2.0.6.orig/extensions/ebt_ip.c ebtables-v2.0.6/extensions/ebt_ip.c +--- ebtables-v2.0.6.orig/extensions/ebt_ip.c 2003-11-02 20:22:56.000000000 +0200 ++++ ebtables-v2.0.6/extensions/ebt_ip.c 2005-11-01 18:48:56.000000000 +0200 +@@ -244,6 +244,7 @@ + struct ebt_ip_info *ipinfo = (struct ebt_ip_info *)(*match)->data; + char *end; + long int i; ++ unsigned char j; + + switch (c) { + case IP_SOURCE: +@@ -313,7 +314,7 @@ + ipinfo->invflags |= EBT_IP_PROTO; + if (optind > argc) + print_error("Missing IP protocol argument"); +- (unsigned char) i = strtoul(argv[optind - 1], &end, 10); ++ j = strtoul(argv[optind - 1], &end, 10); + if (*end != '\0') { + struct protoent *pe; + +@@ -324,7 +325,7 @@ + argv[optind - 1]); + ipinfo->protocol = pe->p_proto; + } else { +- ipinfo->protocol = (unsigned char) i; ++ ipinfo->protocol = j; + } + ipinfo->bitmask |= EBT_IP_PROTO; + break; +diff -Nur ebtables-v2.0.6.orig/extensions/ebt_limit.c ebtables-v2.0.6/extensions/ebt_limit.c +--- ebtables-v2.0.6.orig/extensions/ebt_limit.c 2003-11-02 20:22:56.000000000 +0200 ++++ ebtables-v2.0.6/extensions/ebt_limit.c 2005-11-01 18:48:56.000000000 +0200 +@@ -203,15 +203,15 @@ + + static struct ebt_u_match limit_match = + { +- .name EBT_LIMIT_MATCH, +- .size sizeof(struct ebt_limit_info), +- .help print_help, +- .init init, +- .parse parse, +- .final_check final_check, +- .print print, +- .compare compare, +- .extra_ops opts, ++ .name = EBT_LIMIT_MATCH, ++ .size = sizeof(struct ebt_limit_info), ++ .help = print_help, ++ .init = init, ++ .parse = parse, ++ .final_check = final_check, ++ .print = print, ++ .compare = compare, ++ .extra_ops = opts, + }; + + static void _init(void) __attribute((constructor)); +diff -Nur ebtables-v2.0.6.orig/extensions/ebt_vlan.c ebtables-v2.0.6/extensions/ebt_vlan.c +--- ebtables-v2.0.6.orig/extensions/ebt_vlan.c 2003-11-02 20:22:56.000000000 +0200 ++++ ebtables-v2.0.6/extensions/ebt_vlan.c 2005-11-01 18:48:56.000000000 +0200 +@@ -135,14 +135,16 @@ + (struct ebt_vlan_info *) (*match)->data; + char *end; + struct ebt_vlan_info local; ++ unsigned short id, encap; ++ unsigned char prio; + + switch (c) { + case VLAN_ID: + check_option(flags, OPT_VLAN_ID); + CHECK_INV_FLAG(EBT_VLAN_ID); + CHECK_IF_MISSING_VALUE; +- (unsigned short) local.id = +- strtoul(argv[optind - 1], &end, 10); ++ id = strtoul(argv[optind - 1], &end, 10); ++ local.id = (uint16_t) id; + CHECK_RANGE(local.id > 4094 || *end != '\0'); + vlaninfo->id = local.id; + SET_BITMASK(EBT_VLAN_ID); +@@ -152,8 +154,8 @@ + check_option(flags, OPT_VLAN_PRIO); + CHECK_INV_FLAG(EBT_VLAN_PRIO); + CHECK_IF_MISSING_VALUE; +- (unsigned char) local.prio = +- strtoul(argv[optind - 1], &end, 10); ++ prio = strtoul(argv[optind - 1], &end, 10); ++ local.prio = (uint8_t) prio; + CHECK_RANGE(local.prio >= 8 || *end != '\0'); + vlaninfo->prio = local.prio; + SET_BITMASK(EBT_VLAN_PRIO); +@@ -163,8 +165,8 @@ + check_option(flags, OPT_VLAN_ENCAP); + CHECK_INV_FLAG(EBT_VLAN_ENCAP); + CHECK_IF_MISSING_VALUE; +- (unsigned short) local.encap = +- strtoul(argv[optind - 1], &end, 16); ++ encap = strtoul(argv[optind - 1], &end, 16); ++ local.encap = (uint16_t) encap; + if (*end != '\0') { + ethent = getethertypebyname(argv[optind - 1]); + if (ethent == NULL) -- cgit v1.2.3-65-gdbad