Gentoo Archives: gentoo-commits

From: Patrick McLean <chutzpah@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/openvpn/
Date: Sat, 03 Dec 2016 02:48:47
Message-Id: 1480733289.70af2daa2ec4edcd2ffa173b8aef77f6de288a3d.chutzpah@gentoo
1 commit: 70af2daa2ec4edcd2ffa173b8aef77f6de288a3d
2 Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
3 AuthorDate: Sat Dec 3 02:47:54 2016 +0000
4 Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
5 CommitDate: Sat Dec 3 02:48:09 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=70af2daa
7
8 net-misc/openvpn: Sync 9999 ebuild with 2.4 changes
9
10 Package-Manager: portage-2.3.2
11
12 net-misc/openvpn/openvpn-9999.ebuild | 62 +++++++++++++++++++++++-------------
13 1 file changed, 39 insertions(+), 23 deletions(-)
14
15 diff --git a/net-misc/openvpn/openvpn-9999.ebuild b/net-misc/openvpn/openvpn-9999.ebuild
16 index bbaf8aa..f084a32 100644
17 --- a/net-misc/openvpn/openvpn-9999.ebuild
18 +++ b/net-misc/openvpn/openvpn-9999.ebuild
19 @@ -2,74 +2,90 @@
20 # Distributed under the terms of the GNU General Public License v2
21 # $Id$
22
23 -EAPI=5
24 +EAPI=6
25
26 -inherit multilib autotools flag-o-matic user linux-info git-2
27 +inherit autotools flag-o-matic user systemd linux-info git-r3
28
29 DESCRIPTION="Robust and highly flexible tunneling application compatible with many OSes"
30 EGIT_REPO_URI="https://github.com/OpenVPN/${PN}.git"
31 +EGIT_SUBMODULES=(-cmocka)
32 HOMEPAGE="http://openvpn.net/"
33
34 LICENSE="GPL-2"
35 SLOT="0"
36 KEYWORDS=""
37 -IUSE="examples down-root iproute2 libressl +lzo pam passwordsave pkcs11 +plugins polarssl selinux socks +ssl static systemd userland_BSD"
38 +
39 +IUSE="down-root examples inotify iproute2 libressl lz4 +lzo mbedtls pam"
40 +IUSE+=" pkcs11 +plugins polarssl selinux +ssl static systemd test userland_BSD"
41
42 REQUIRED_USE="static? ( !plugins !pkcs11 )
43 - polarssl? ( ssl !libressl )
44 - pkcs11? ( ssl )
45 - !plugins? ( !pam !down-root )"
46 + lzo? ( !lz4 )
47 + pkcs11? ( ssl )
48 + mbedtls? ( ssl !libressl )
49 + pkcs11? ( ssl )
50 + !plugins? ( !pam !down-root )"
51
52 -DEPEND="
53 +CDEPEND="
54 kernel_linux? (
55 - iproute2? ( sys-apps/iproute2[-minimal] ) !iproute2? ( sys-apps/net-tools )
56 + iproute2? ( sys-apps/iproute2[-minimal] )
57 + !iproute2? ( sys-apps/net-tools )
58 )
59 pam? ( virtual/pam )
60 ssl? (
61 - !polarssl? (
62 - !libressl? ( >=dev-libs/openssl-0.9.7:* )
63 + !mbedtls? (
64 + !libressl? ( >=dev-libs/openssl-0.9.8:* )
65 libressl? ( dev-libs/libressl )
66 )
67 - polarssl? ( >=net-libs/polarssl-1.3.8 )
68 + mbedtls? ( net-libs/mbedtls )
69 )
70 - lzo? ( >=dev-libs/lzo-1.07 )
71 + lzo? ( app-arch/lz4 )
72 pkcs11? ( >=dev-libs/pkcs11-helper-1.11 )
73 systemd? ( sys-apps/systemd )"
74 -RDEPEND="${DEPEND}
75 - selinux? ( sec-policy/selinux-openvpn )
76 -"
77 +DEPEND="${CDEPEND}
78 + test? ( dev-util/cmocka )"
79 +RDEPEND="${CDEPEND}
80 + selinux? ( sec-policy/selinux-openvpn )"
81
82 CONFIG_CHECK="~TUN"
83
84 +PATCHES=(
85 + "${FILESDIR}/${PN}-external-cmocka.patch"
86 +)
87 +
88 pkg_setup() {
89 linux-info_pkg_setup
90 }
91
92 src_prepare() {
93 + default
94 eautoreconf
95 }
96
97 src_configure() {
98 - use static && LDFLAGS="${LDFLAGS} -Xcompiler -static"
99 - local myconf
100 - use polarssl && myconf="--with-crypto-library=polarssl"
101 + use static && append-ldflags -Xcompiler -static
102 econf \
103 - ${myconf} \
104 - --docdir="${EPREFIX}/usr/share/doc/${PF}" \
105 --with-plugindir="${ROOT}/usr/$(get_libdir)/$PN" \
106 - $(use_enable passwordsave password-save) \
107 - $(use_enable ssl) \
108 + $(usex mbedtls 'with-crypto-library' 'mbedtls' '' '') \
109 + $(use_enable inotify async-push) \
110 $(use_enable ssl crypto) \
111 + $(use_enable lz4) \
112 $(use_enable lzo) \
113 $(use_enable pkcs11) \
114 $(use_enable plugins) \
115 $(use_enable iproute2) \
116 - $(use_enable socks) \
117 $(use_enable pam plugin-auth-pam) \
118 $(use_enable down-root plugin-down-root) \
119 + $(use_enable test tests) \
120 $(use_enable systemd)
121 }
122
123 +src_test() {
124 + make check || die "top-level tests failed"
125 + pushd tests/unit_tests > /dev/null || die
126 + make check || die "unit tests failed"
127 + popd > /dev/null || die
128 +}
129 +
130 src_install() {
131 default
132 find "${ED}/usr" -name '*.la' -delete