From 8efc88270606d78f64045fff6c70583e5052230e Mon Sep 17 00:00:00 2001 From: Nicholas Vinson Date: Sat, 2 Jan 2016 23:15:50 -0500 Subject: net-misc/vde: Fix for bug #543006 Added vde-2.2.2-gcc53.patch. Starting with GCC 5, GCC uses Std. C semantics for inline kewords instead of non-compliant GNU C semantics. This patch corrects the source with respect to the semantic difference. Package-Manager: portage-2.2.26 --- net-misc/vde/files/vde-2.2.2-gcc53.patch | 66 ++++++++++++++++++++++++++++++++ net-misc/vde/vde-2.2.2-r1.ebuild | 53 +++++++++++++++++++++++++ 2 files changed, 119 insertions(+) create mode 100644 net-misc/vde/files/vde-2.2.2-gcc53.patch create mode 100644 net-misc/vde/vde-2.2.2-r1.ebuild (limited to 'net-misc/vde') diff --git a/net-misc/vde/files/vde-2.2.2-gcc53.patch b/net-misc/vde/files/vde-2.2.2-gcc53.patch new file mode 100644 index 000000000000..60fb98cc9a8d --- /dev/null +++ b/net-misc/vde/files/vde-2.2.2-gcc53.patch @@ -0,0 +1,66 @@ +--- src/slirpvde/misc.c 2016-01-02 22:54:35.746094904 -0500 ++++ src/slirpvde/misc.c.old 2016-01-02 22:54:33.152132668 -0500 +@@ -120,11 +120,15 @@ getouraddr() + struct quehead_32 { + u_int32_t qh_link; + u_int32_t qh_rlink; + }; + ++#ifdef __GNUC_GNU_INLINE__ + inline void ++#else ++extern inline void ++#endif + insque_32(a, b) + void *a; + void *b; + { + register struct quehead_32 *element = (struct quehead_32 *) a; +@@ -134,11 +134,15 @@ insque_32(a, b) + element->qh_rlink = (u_int32_t)head; + ((struct quehead_32 *)(element->qh_link))->qh_rlink + = (u_int32_t)element; + } + ++#ifdef __GNUC_GNU_INLINE__ + inline void ++#else ++extern inline void ++#endif + remque_32(void *a) + { + register struct quehead_32 *element = (struct quehead_32 *) a; + ((struct quehead_32 *)(element->qh_link))->qh_rlink = element->qh_rlink; + ((struct quehead_32 *)(element->qh_rlink))->qh_link = element->qh_link; +@@ -150,11 +150,15 @@ remque_32(void *a) + struct quehead { + struct quehead *qh_link; + struct quehead *qh_rlink; + }; + ++#ifdef __GNUC_GNU_INLINE__ + inline void ++#else ++extern inline void ++#endif + insque(a, b) + void *a, *b; + { + register struct quehead *element = (struct quehead *) a; + register struct quehead *head = (struct quehead *) b; +@@ -163,11 +163,15 @@ insque(a, b) + element->qh_rlink = (struct quehead *)head; + ((struct quehead *)(element->qh_link))->qh_rlink + = (struct quehead *)element; + } + ++#ifdef __GNUC_GNU_INLINE__ + inline void ++#else ++extern inline void ++#endif + remque(a) + void *a; + { + register struct quehead *element = (struct quehead *) a; + ((struct quehead *)(element->qh_link))->qh_rlink = element->qh_rlink; diff --git a/net-misc/vde/vde-2.2.2-r1.ebuild b/net-misc/vde/vde-2.2.2-r1.ebuild new file mode 100644 index 000000000000..242951dbed74 --- /dev/null +++ b/net-misc/vde/vde-2.2.2-r1.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils flag-o-matic user + +MY_P="${PN}2-${PV}" +S="${WORKDIR}/${MY_P}" + +DESCRIPTION="Virtual distributed ethernet emulator for emulators like qemu, bochs, and uml" +SRC_URI="mirror://sourceforge/vde/${MY_P}.tar.bz2" +HOMEPAGE="http://vde.sourceforge.net/" +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" + +# The slirpvde-buffer-overflow patch was made by Ludwig Nussel and submitted upstream at +# http://sourceforge.net/tracker/?func=detail&aid=2138410&group_id=95403&atid=611248 +PATCHES=( + "${FILESDIR}/${P}-gcc43.patch" + "${FILESDIR}/${P}-slirpvde-buffer-overflow.patch" + "${FILESDIR}/${P}-gcc53.patch" +) + +src_prepare() { + epatch "${PATCHES[@]}" + epatch_user +} + +src_configure() { + append-cflags $(test-flags-CC -fno-strict-aliasing) + econf +} + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed" + newinitd "${FILESDIR}"/vde.init vde + newconfd "${FILESDIR}"/vde.conf vde + + dodoc INSTALL README +} + +pkg_postinst() { + # default group already used in kqemu + enewgroup qemu + einfo "To start vde automatically add it to the default runlevel:" + einfo "# rc-update add vde default" + einfo "You need to setup tap0 in /etc/conf.d/net" + einfo "To use it as a user be sure to set a group in /etc/conf.d/vde" + einfo "Users of the group can then run: $ vdeq qemu -sock /var/run/vde.ctl ..other opts" +} -- cgit v1.2.3-65-gdbad