summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick McLean <chutzpah@gentoo.org>2016-12-02 18:47:54 -0800
committerPatrick McLean <chutzpah@gentoo.org>2016-12-02 18:48:09 -0800
commit70af2daa2ec4edcd2ffa173b8aef77f6de288a3d (patch)
treeeb8ee7b7f37c26ac4f97190215e10380760e40a5
parentnet-misc/openvpn: Version bump to 2.4_rc1 (diff)
downloadgentoo-70af2daa.tar.gz
gentoo-70af2daa.tar.bz2
gentoo-70af2daa.zip
net-misc/openvpn: Sync 9999 ebuild with 2.4 changes
Package-Manager: portage-2.3.2
-rw-r--r--net-misc/openvpn/openvpn-9999.ebuild62
1 files changed, 39 insertions, 23 deletions
diff --git a/net-misc/openvpn/openvpn-9999.ebuild b/net-misc/openvpn/openvpn-9999.ebuild
index bbaf8aa13121..f084a32ce489 100644
--- a/net-misc/openvpn/openvpn-9999.ebuild
+++ b/net-misc/openvpn/openvpn-9999.ebuild
@@ -2,74 +2,90 @@
# Distributed under the terms of the GNU General Public License v2
# $Id$
-EAPI=5
+EAPI=6
-inherit multilib autotools flag-o-matic user linux-info git-2
+inherit autotools flag-o-matic user systemd linux-info git-r3
DESCRIPTION="Robust and highly flexible tunneling application compatible with many OSes"
EGIT_REPO_URI="https://github.com/OpenVPN/${PN}.git"
+EGIT_SUBMODULES=(-cmocka)
HOMEPAGE="http://openvpn.net/"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS=""
-IUSE="examples down-root iproute2 libressl +lzo pam passwordsave pkcs11 +plugins polarssl selinux socks +ssl static systemd userland_BSD"
+
+IUSE="down-root examples inotify iproute2 libressl lz4 +lzo mbedtls pam"
+IUSE+=" pkcs11 +plugins polarssl selinux +ssl static systemd test userland_BSD"
REQUIRED_USE="static? ( !plugins !pkcs11 )
- polarssl? ( ssl !libressl )
- pkcs11? ( ssl )
- !plugins? ( !pam !down-root )"
+ lzo? ( !lz4 )
+ pkcs11? ( ssl )
+ mbedtls? ( ssl !libressl )
+ pkcs11? ( ssl )
+ !plugins? ( !pam !down-root )"
-DEPEND="
+CDEPEND="
kernel_linux? (
- iproute2? ( sys-apps/iproute2[-minimal] ) !iproute2? ( sys-apps/net-tools )
+ iproute2? ( sys-apps/iproute2[-minimal] )
+ !iproute2? ( sys-apps/net-tools )
)
pam? ( virtual/pam )
ssl? (
- !polarssl? (
- !libressl? ( >=dev-libs/openssl-0.9.7:* )
+ !mbedtls? (
+ !libressl? ( >=dev-libs/openssl-0.9.8:* )
libressl? ( dev-libs/libressl )
)
- polarssl? ( >=net-libs/polarssl-1.3.8 )
+ mbedtls? ( net-libs/mbedtls )
)
- lzo? ( >=dev-libs/lzo-1.07 )
+ lzo? ( app-arch/lz4 )
pkcs11? ( >=dev-libs/pkcs11-helper-1.11 )
systemd? ( sys-apps/systemd )"
-RDEPEND="${DEPEND}
- selinux? ( sec-policy/selinux-openvpn )
-"
+DEPEND="${CDEPEND}
+ test? ( dev-util/cmocka )"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-openvpn )"
CONFIG_CHECK="~TUN"
+PATCHES=(
+ "${FILESDIR}/${PN}-external-cmocka.patch"
+)
+
pkg_setup() {
linux-info_pkg_setup
}
src_prepare() {
+ default
eautoreconf
}
src_configure() {
- use static && LDFLAGS="${LDFLAGS} -Xcompiler -static"
- local myconf
- use polarssl && myconf="--with-crypto-library=polarssl"
+ use static && append-ldflags -Xcompiler -static
econf \
- ${myconf} \
- --docdir="${EPREFIX}/usr/share/doc/${PF}" \
--with-plugindir="${ROOT}/usr/$(get_libdir)/$PN" \
- $(use_enable passwordsave password-save) \
- $(use_enable ssl) \
+ $(usex mbedtls 'with-crypto-library' 'mbedtls' '' '') \
+ $(use_enable inotify async-push) \
$(use_enable ssl crypto) \
+ $(use_enable lz4) \
$(use_enable lzo) \
$(use_enable pkcs11) \
$(use_enable plugins) \
$(use_enable iproute2) \
- $(use_enable socks) \
$(use_enable pam plugin-auth-pam) \
$(use_enable down-root plugin-down-root) \
+ $(use_enable test tests) \
$(use_enable systemd)
}
+src_test() {
+ make check || die "top-level tests failed"
+ pushd tests/unit_tests > /dev/null || die
+ make check || die "unit tests failed"
+ popd > /dev/null || die
+}
+
src_install() {
default
find "${ED}/usr" -name '*.la' -delete