summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Feldman <NP-Hardass@gentoo.org>2020-04-23 20:19:47 -0400
committerAdam Feldman <NP-Hardass@gentoo.org>2020-04-23 20:51:29 -0400
commit831d1cc65c3c86a50cfd3a695394d44288e3e494 (patch)
tree1570495f21da4c8a9971ec6b7c2ab6c2f0b17d48 /net-misc/vde
parentdev-libs/xapian-bindings: add python 3.7 and 3.8, bug #718284 (diff)
downloadgentoo-831d1cc65c3c86a50cfd3a695394d44288e3e494.tar.gz
gentoo-831d1cc65c3c86a50cfd3a695394d44288e3e494.tar.bz2
gentoo-831d1cc65c3c86a50cfd3a695394d44288e3e494.zip
net-misc/vde: Drop python bindings and multiple bugfixes
Bug: https://bugs.gentoo.org/705936 Closes: https://bugs.gentoo.org/661818 Closes: https://bugs.gentoo.org/705934 Package-Manager: Portage-2.3.96, Repoman-2.3.21 Signed-off-by: Adam Feldman <NP-Hardass@gentoo.org>
Diffstat (limited to 'net-misc/vde')
-rw-r--r--net-misc/vde/files/vde-2.3.2-fix-inline-funcs.patch21
-rw-r--r--net-misc/vde/vde-2.3.2-r5.ebuild68
2 files changed, 89 insertions, 0 deletions
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
new file mode 100644
index 000000000000..5e2102617caa
--- /dev/null
+++ b/net-misc/vde/files/vde-2.3.2-fix-inline-funcs.patch
@@ -0,0 +1,21 @@
+# Sourced from https://raw.githubusercontent.com/OpenMandrivaAssociation/vde2/master/vd2-2.3.2-clang.patch
+
+--- a/vde2-2.3.2/src/vde_switch/fstp.c 2014-10-29 22:54:18.659988435 +0000
++++ b/vde2-2.3.2/src/vde_switch/fstp.c 2014-10-29 22:54:44.912986501 +0000
+@@ -30,14 +30,14 @@
+ #ifdef FSTP
+ #include <fstp.h>
+ /*********************** sending macro used by FSTP & Core ******************/
+-void inline ltonstring(unsigned long l,unsigned char *s) {
++void ltonstring(unsigned long l,unsigned char *s) {
+ s[3]=l; l>>=8;
+ s[2]=l; l>>=8;
+ s[1]=l; l>>=8;
+ s[0]=l;
+ }
+
+-unsigned long inline nstringtol(unsigned char *s) {
++unsigned long nstringtol(unsigned char *s) {
+ return (s[0]<<24)+(s[1]<<16)+(s[2]<<8)+s[3];
+ }
+
diff --git a/net-misc/vde/vde-2.3.2-r5.ebuild b/net-misc/vde/vde-2.3.2-r5.ebuild
new file mode 100644
index 000000000000..54380de44558
--- /dev/null
+++ b/net-misc/vde/vde-2.3.2-r5.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic
+
+MY_P="${PN}2-${PV}"
+
+DESCRIPTION="Virtual distributed ethernet emulator for emulators like qemu, bochs, and uml"
+SRC_URI="mirror://sourceforge/vde/${MY_P}.tar.bz2"
+HOMEPAGE="https://virtualsquare.org"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~x86"
+IUSE="pcap python selinux ssl libressl static-libs"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+COMMON_DEPS="pcap? ( net-libs/libpcap )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )"
+DEPEND="${COMMON_DEPS}"
+RDEPEND="${COMMON_DEPS}
+ acct-group/qemu
+ selinux? ( sec-policy/selinux-vde )"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}/${P}-format-security.patch"
+ "${FILESDIR}/${P}-fix-inline-funcs.patch
+)
+
+src_prepare() {
+ default
+ has_version ">=dev-libs/openssl-1.1.0" && \
+ eapply "${FILESDIR}/${P}-openssl-1.1.patch"
+}
+
+src_configure() {
+ econf \
+ --disable-python
+ $(use_enable pcap) \
+ $(use_enable ssl cryptcab) \
+ $(use_enable static-libs static)
+}
+
+src_compile() {
+ emake -j1
+}
+
+src_install() {
+ default
+ find "${D}" -name '*.la' -type f -delete || die
+
+ newinitd "${FILESDIR}"/vde.init-r1 vde
+ newconfd "${FILESDIR}"/vde.conf-r1 vde
+}
+
+pkg_postinst() {
+ 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 an user be sure to set a group in /etc/conf.d/vde"
+}