Gentoo Archives: gentoo-commits

From: Adam Feldman <np-hardass@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/vde/, net-misc/vde/files/
Date: Fri, 24 Apr 2020 00:52:02
Message-Id: 1587689489.831d1cc65c3c86a50cfd3a695394d44288e3e494.np-hardass@gentoo
1 commit: 831d1cc65c3c86a50cfd3a695394d44288e3e494
2 Author: Adam Feldman <NP-Hardass <AT> gentoo <DOT> org>
3 AuthorDate: Fri Apr 24 00:19:47 2020 +0000
4 Commit: Adam Feldman <np-hardass <AT> gentoo <DOT> org>
5 CommitDate: Fri Apr 24 00:51:29 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=831d1cc6
7
8 net-misc/vde: Drop python bindings and multiple bugfixes
9
10 Bug: https://bugs.gentoo.org/705936
11 Closes: https://bugs.gentoo.org/661818
12 Closes: https://bugs.gentoo.org/705934
13 Package-Manager: Portage-2.3.96, Repoman-2.3.21
14 Signed-off-by: Adam Feldman <NP-Hardass <AT> gentoo.org>
15
16 .../vde/files/vde-2.3.2-fix-inline-funcs.patch | 21 +++++++
17 net-misc/vde/vde-2.3.2-r5.ebuild | 68 ++++++++++++++++++++++
18 2 files changed, 89 insertions(+)
19
20 diff --git a/net-misc/vde/files/vde-2.3.2-fix-inline-funcs.patch b/net-misc/vde/files/vde-2.3.2-fix-inline-funcs.patch
21 new file mode 100644
22 index 00000000000..5e2102617ca
23 --- /dev/null
24 +++ b/net-misc/vde/files/vde-2.3.2-fix-inline-funcs.patch
25 @@ -0,0 +1,21 @@
26 +# Sourced from https://raw.githubusercontent.com/OpenMandrivaAssociation/vde2/master/vd2-2.3.2-clang.patch
27 +
28 +--- a/vde2-2.3.2/src/vde_switch/fstp.c 2014-10-29 22:54:18.659988435 +0000
29 ++++ b/vde2-2.3.2/src/vde_switch/fstp.c 2014-10-29 22:54:44.912986501 +0000
30 +@@ -30,14 +30,14 @@
31 + #ifdef FSTP
32 + #include <fstp.h>
33 + /*********************** sending macro used by FSTP & Core ******************/
34 +-void inline ltonstring(unsigned long l,unsigned char *s) {
35 ++void ltonstring(unsigned long l,unsigned char *s) {
36 + s[3]=l; l>>=8;
37 + s[2]=l; l>>=8;
38 + s[1]=l; l>>=8;
39 + s[0]=l;
40 + }
41 +
42 +-unsigned long inline nstringtol(unsigned char *s) {
43 ++unsigned long nstringtol(unsigned char *s) {
44 + return (s[0]<<24)+(s[1]<<16)+(s[2]<<8)+s[3];
45 + }
46 +
47
48 diff --git a/net-misc/vde/vde-2.3.2-r5.ebuild b/net-misc/vde/vde-2.3.2-r5.ebuild
49 new file mode 100644
50 index 00000000000..54380de4455
51 --- /dev/null
52 +++ b/net-misc/vde/vde-2.3.2-r5.ebuild
53 @@ -0,0 +1,68 @@
54 +# Copyright 1999-2020 Gentoo Authors
55 +# Distributed under the terms of the GNU General Public License v2
56 +
57 +EAPI=6
58 +
59 +inherit flag-o-matic
60 +
61 +MY_P="${PN}2-${PV}"
62 +
63 +DESCRIPTION="Virtual distributed ethernet emulator for emulators like qemu, bochs, and uml"
64 +SRC_URI="mirror://sourceforge/vde/${MY_P}.tar.bz2"
65 +HOMEPAGE="https://virtualsquare.org"
66 +
67 +LICENSE="GPL-2"
68 +SLOT="0"
69 +KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~x86"
70 +IUSE="pcap python selinux ssl libressl static-libs"
71 +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
72 +
73 +COMMON_DEPS="pcap? ( net-libs/libpcap )
74 + ssl? (
75 + !libressl? ( dev-libs/openssl:0= )
76 + libressl? ( dev-libs/libressl:0= )
77 + )"
78 +DEPEND="${COMMON_DEPS}"
79 +RDEPEND="${COMMON_DEPS}
80 + acct-group/qemu
81 + selinux? ( sec-policy/selinux-vde )"
82 +
83 +S="${WORKDIR}/${MY_P}"
84 +
85 +PATCHES=(
86 + "${FILESDIR}/${P}-format-security.patch"
87 + "${FILESDIR}/${P}-fix-inline-funcs.patch
88 +)
89 +
90 +src_prepare() {
91 + default
92 + has_version ">=dev-libs/openssl-1.1.0" && \
93 + eapply "${FILESDIR}/${P}-openssl-1.1.patch"
94 +}
95 +
96 +src_configure() {
97 + econf \
98 + --disable-python
99 + $(use_enable pcap) \
100 + $(use_enable ssl cryptcab) \
101 + $(use_enable static-libs static)
102 +}
103 +
104 +src_compile() {
105 + emake -j1
106 +}
107 +
108 +src_install() {
109 + default
110 + find "${D}" -name '*.la' -type f -delete || die
111 +
112 + newinitd "${FILESDIR}"/vde.init-r1 vde
113 + newconfd "${FILESDIR}"/vde.conf-r1 vde
114 +}
115 +
116 +pkg_postinst() {
117 + einfo "To start vde automatically add it to the default runlevel:"
118 + einfo "# rc-update add vde default"
119 + einfo "You need to setup tap0 in /etc/conf.d/net"
120 + einfo "To use it as an user be sure to set a group in /etc/conf.d/vde"
121 +}