diff options
author | Adam Feldman <NP-Hardass@gentoo.org> | 2021-03-18 11:54:26 -0400 |
---|---|---|
committer | Adam Feldman <NP-Hardass@gentoo.org> | 2021-03-18 11:59:24 -0400 |
commit | 8b77fed6ae4f0145da7fe9f8ece1544e168a0b61 (patch) | |
tree | 1a6057015518c6a715c5f95888801af02e66242d /net-misc | |
parent | dev-util/pkgconf: Removed old (diff) | |
download | gentoo-8b77fed6ae4f0145da7fe9f8ece1544e168a0b61.tar.gz gentoo-8b77fed6ae4f0145da7fe9f8ece1544e168a0b61.tar.bz2 gentoo-8b77fed6ae4f0145da7fe9f8ece1544e168a0b61.zip |
net-misc/vde: Fix compilation with slibtool
Closes: https://bugs.gentoo.org/775272
Package-Manager: Portage-2.3.103, Repoman-2.3.23
Signed-off-by: Adam Feldman <NP-Hardass@gentoo.org>
Diffstat (limited to 'net-misc')
-rw-r--r-- | net-misc/vde/files/vde-2.3.2-slibtool-support.patch | 49 | ||||
-rw-r--r-- | net-misc/vde/vde-2.3.2_p20191011-r1.ebuild | 91 |
2 files changed, 140 insertions, 0 deletions
diff --git a/net-misc/vde/files/vde-2.3.2-slibtool-support.patch b/net-misc/vde/files/vde-2.3.2-slibtool-support.patch new file mode 100644 index 000000000000..5eeb3a5c9026 --- /dev/null +++ b/net-misc/vde/files/vde-2.3.2-slibtool-support.patch @@ -0,0 +1,49 @@ +From d11d9dd8b370016a2d10ffd35c450c9f68e578a5 Mon Sep 17 00:00:00 2001 +From: orbea <orbea@riseup.net> +Date: Wed, 17 Mar 2021 15:14:45 -0700 +Subject: [PATCH] build: Only use -module for libraries. + +--- + src/vde_l3/Makefile.am | 9 +++++++-- + src/vde_router/Makefile.am | 2 +- + 2 files changed, 8 insertions(+), 3 deletions(-) + +diff --git a/src/vde_l3/Makefile.am b/src/vde_l3/Makefile.am +index 748cb78..855081c 100644 +--- a/src/vde_l3/Makefile.am ++++ b/src/vde_l3/Makefile.am +@@ -1,7 +1,6 @@ +- + moddir = $(pkglibdir)/vde_l3 + +-AM_LDFLAGS = -module -avoid-version -export-dynamic ++AM_LDFLAGS = -avoid-version -export-dynamic + AM_LIBTOOLFLAGS = --tag=disable-static + AM_CPPFLAGS = -I$(top_srcdir)/include + +@@ -15,6 +14,12 @@ pfifo_la_SOURCES = pfifo.c vde_buff.h + tbf_la_SOURCES = tbf.c vde_buff.h + bfifo_la_SOURCES = bfifo.c vde_buff.h + ++vde_l3_lib_LDFLAGS = -module ++ ++pfifo_la_LDFLAGS = $(vde_l3_lib_LDFLAGS) ++bfifo_la_LDFLAGS = $(vde_l3_lib_LDFLAGS) ++tbf_la_LDFLAGS = $(vde_l3_lib_LDFLAGS) ++ + pfifo_la_LIBADD = $(top_builddir)/src/common/libvdecommon.la + bfifo_la_LIBADD = $(top_builddir)/src/common/libvdecommon.la + tbf_la_LIBADD = $(top_builddir)/src/common/libvdecommon.la +diff --git a/src/vde_router/Makefile.am b/src/vde_router/Makefile.am +index d872388..d055259 100644 +--- a/src/vde_router/Makefile.am ++++ b/src/vde_router/Makefile.am +@@ -1,7 +1,7 @@ + + moddir = $(pkglibdir)/vde_router + +-AM_LDFLAGS = -module -avoid-version -export-dynamic ++AM_LDFLAGS = -avoid-version -export-dynamic + AM_LIBTOOLFLAGS = --tag=disable-static + AM_CPPFLAGS = -I$(top_srcdir)/include + diff --git a/net-misc/vde/vde-2.3.2_p20191011-r1.ebuild b/net-misc/vde/vde-2.3.2_p20191011-r1.ebuild new file mode 100644 index 000000000000..142f3837ed9b --- /dev/null +++ b/net-misc/vde/vde-2.3.2_p20191011-r1.ebuild @@ -0,0 +1,91 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit flag-o-matic + +if [[ ${PV} == 9999 ]]; then + inherit autotools git-r3 + EGIT_REPO_URI="https://github.com/virtualsqaure/MY_PN" + KEYWORDS="" +elif [[ ${PV} = *_p* ]]; then + inherit autotools + MY_PN="vde-2" + COMMIT="c7b36a57831a9067c8619c3e17a03e595623b3eb" + SRC_URI="https://github.com/virtualsquare/${MY_PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~x86" + + S="${WORKDIR}/${MY_PN}-${COMMIT}" +else + MY_P="${PN}2-${PV}" + SRC_URI="mirror://sourceforge/vde/${MY_P}.tar.bz2" + KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~x86" + S="${WORKDIR}/${MY_P}" +fi + +DESCRIPTION="Virtual distributed ethernet emulator for emulators like qemu, bochs, and uml" +HOMEPAGE="https://virtualsquare.org" + +LICENSE="GPL-2" +SLOT="0" +#IUSE="pcap selinux ssl libressl static-libs" +# upstream switched to wolfssl +IUSE="pcap selinux static-libs" + +COMMON_DEPS="pcap? ( net-libs/libpcap )" +# upstream switched to wolfssl +# 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 )" + +PATCHES=( + "${FILESDIR}/${PN}-2.3.2-slibtool-support.patch" +) + +# upstream switched to wolfssl +src_prepare() { + default + if [[ ${PV} == 9999 ]] || [[ ${PV} == *_p* ]]; then + eautoreconf + fi +# upstream switched to wolfssl +# has_version ">=dev-libs/openssl-1.1.0" && \ +# eapply "${FILESDIR}/${PN}-2.3.2-openssl-1.1.patch" +} + +src_configure() { + filter-flags -O0 -Os +# upstream switched to wolfssl +# $(use_enable ssl cryptcab) \ + econf \ + --disable-python \ + --disable-cryptcab \ + $(use_enable pcap) \ + $(use_enable static-libs static) +} + +src_compile() { + # https://github.com/virtualsquare/vde-2/issues/6 + 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" +} |