Gentoo Archives: gentoo-commits

From: Ian Delaney <idella4@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/vde/files/, net-misc/vde/
Date: Sun, 03 Jan 2016 08:39:51
Message-Id: 1451810369.8efc88270606d78f64045fff6c70583e5052230e.idella4@gentoo
1 commit: 8efc88270606d78f64045fff6c70583e5052230e
2 Author: Nicholas Vinson <nvinson234 <AT> gmail <DOT> com>
3 AuthorDate: Sun Jan 3 04:15:50 2016 +0000
4 Commit: Ian Delaney <idella4 <AT> gentoo <DOT> org>
5 CommitDate: Sun Jan 3 08:39:29 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8efc8827
7
8 net-misc/vde: Fix for bug #543006
9
10 Added vde-2.2.2-gcc53.patch. Starting with GCC 5, GCC uses Std. C semantics for
11 inline kewords instead of non-compliant GNU C semantics. This patch corrects
12 the source with respect to the semantic difference.
13
14 Package-Manager: portage-2.2.26
15
16 net-misc/vde/files/vde-2.2.2-gcc53.patch | 66 ++++++++++++++++++++++++++++++++
17 net-misc/vde/vde-2.2.2-r1.ebuild | 53 +++++++++++++++++++++++++
18 2 files changed, 119 insertions(+)
19
20 diff --git a/net-misc/vde/files/vde-2.2.2-gcc53.patch b/net-misc/vde/files/vde-2.2.2-gcc53.patch
21 new file mode 100644
22 index 0000000..60fb98c
23 --- /dev/null
24 +++ b/net-misc/vde/files/vde-2.2.2-gcc53.patch
25 @@ -0,0 +1,66 @@
26 +--- src/slirpvde/misc.c 2016-01-02 22:54:35.746094904 -0500
27 ++++ src/slirpvde/misc.c.old 2016-01-02 22:54:33.152132668 -0500
28 +@@ -120,11 +120,15 @@ getouraddr()
29 + struct quehead_32 {
30 + u_int32_t qh_link;
31 + u_int32_t qh_rlink;
32 + };
33 +
34 ++#ifdef __GNUC_GNU_INLINE__
35 + inline void
36 ++#else
37 ++extern inline void
38 ++#endif
39 + insque_32(a, b)
40 + void *a;
41 + void *b;
42 + {
43 + register struct quehead_32 *element = (struct quehead_32 *) a;
44 +@@ -134,11 +134,15 @@ insque_32(a, b)
45 + element->qh_rlink = (u_int32_t)head;
46 + ((struct quehead_32 *)(element->qh_link))->qh_rlink
47 + = (u_int32_t)element;
48 + }
49 +
50 ++#ifdef __GNUC_GNU_INLINE__
51 + inline void
52 ++#else
53 ++extern inline void
54 ++#endif
55 + remque_32(void *a)
56 + {
57 + register struct quehead_32 *element = (struct quehead_32 *) a;
58 + ((struct quehead_32 *)(element->qh_link))->qh_rlink = element->qh_rlink;
59 + ((struct quehead_32 *)(element->qh_rlink))->qh_link = element->qh_link;
60 +@@ -150,11 +150,15 @@ remque_32(void *a)
61 + struct quehead {
62 + struct quehead *qh_link;
63 + struct quehead *qh_rlink;
64 + };
65 +
66 ++#ifdef __GNUC_GNU_INLINE__
67 + inline void
68 ++#else
69 ++extern inline void
70 ++#endif
71 + insque(a, b)
72 + void *a, *b;
73 + {
74 + register struct quehead *element = (struct quehead *) a;
75 + register struct quehead *head = (struct quehead *) b;
76 +@@ -163,11 +163,15 @@ insque(a, b)
77 + element->qh_rlink = (struct quehead *)head;
78 + ((struct quehead *)(element->qh_link))->qh_rlink
79 + = (struct quehead *)element;
80 + }
81 +
82 ++#ifdef __GNUC_GNU_INLINE__
83 + inline void
84 ++#else
85 ++extern inline void
86 ++#endif
87 + remque(a)
88 + void *a;
89 + {
90 + register struct quehead *element = (struct quehead *) a;
91 + ((struct quehead *)(element->qh_link))->qh_rlink = element->qh_rlink;
92
93 diff --git a/net-misc/vde/vde-2.2.2-r1.ebuild b/net-misc/vde/vde-2.2.2-r1.ebuild
94 new file mode 100644
95 index 0000000..242951d
96 --- /dev/null
97 +++ b/net-misc/vde/vde-2.2.2-r1.ebuild
98 @@ -0,0 +1,53 @@
99 +# Copyright 1999-2016 Gentoo Foundation
100 +# Distributed under the terms of the GNU General Public License v2
101 +# $Id$
102 +
103 +EAPI=5
104 +
105 +inherit eutils flag-o-matic user
106 +
107 +MY_P="${PN}2-${PV}"
108 +S="${WORKDIR}/${MY_P}"
109 +
110 +DESCRIPTION="Virtual distributed ethernet emulator for emulators like qemu, bochs, and uml"
111 +SRC_URI="mirror://sourceforge/vde/${MY_P}.tar.bz2"
112 +HOMEPAGE="http://vde.sourceforge.net/"
113 +SLOT="0"
114 +LICENSE="GPL-2"
115 +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
116 +
117 +# The slirpvde-buffer-overflow patch was made by Ludwig Nussel and submitted upstream at
118 +# http://sourceforge.net/tracker/?func=detail&aid=2138410&group_id=95403&atid=611248
119 +PATCHES=(
120 + "${FILESDIR}/${P}-gcc43.patch"
121 + "${FILESDIR}/${P}-slirpvde-buffer-overflow.patch"
122 + "${FILESDIR}/${P}-gcc53.patch"
123 +)
124 +
125 +src_prepare() {
126 + epatch "${PATCHES[@]}"
127 + epatch_user
128 +}
129 +
130 +src_configure() {
131 + append-cflags $(test-flags-CC -fno-strict-aliasing)
132 + econf
133 +}
134 +
135 +src_install() {
136 + emake DESTDIR="${D}" install || die "emake install failed"
137 + newinitd "${FILESDIR}"/vde.init vde
138 + newconfd "${FILESDIR}"/vde.conf vde
139 +
140 + dodoc INSTALL README
141 +}
142 +
143 +pkg_postinst() {
144 + # default group already used in kqemu
145 + enewgroup qemu
146 + einfo "To start vde automatically add it to the default runlevel:"
147 + einfo "# rc-update add vde default"
148 + einfo "You need to setup tap0 in /etc/conf.d/net"
149 + einfo "To use it as a user be sure to set a group in /etc/conf.d/vde"
150 + einfo "Users of the group can then run: $ vdeq qemu -sock /var/run/vde.ctl ..other opts"
151 +}