1 |
commit: b2f0b933b0eae84c4160776aabc7e5f18c1cc07c |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Mar 2 13:26:38 2019 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Mar 2 13:44:53 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b2f0b933 |
7 |
|
8 |
net-vpn/openvpn: Fix external-cmocka.patch |
9 |
|
10 |
Maintainer-timeout commit. |
11 |
|
12 |
Thanks-to: techno <AT> fastmail.nl |
13 |
Closes: https://bugs.gentoo.org/672542 |
14 |
Package-Manager: Portage-2.3.62, Repoman-2.3.12 |
15 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
16 |
|
17 |
.../files/openvpn-2.5-external-cmocka.patch | 65 ++++++++++++++++++++++ |
18 |
net-vpn/openvpn/openvpn-9999.ebuild | 4 +- |
19 |
2 files changed, 67 insertions(+), 2 deletions(-) |
20 |
|
21 |
diff --git a/net-vpn/openvpn/files/openvpn-2.5-external-cmocka.patch b/net-vpn/openvpn/files/openvpn-2.5-external-cmocka.patch |
22 |
new file mode 100644 |
23 |
index 00000000000..d339dcd558b |
24 |
--- /dev/null |
25 |
+++ b/net-vpn/openvpn/files/openvpn-2.5-external-cmocka.patch |
26 |
@@ -0,0 +1,65 @@ |
27 |
+diff --git a/configure.ac b/configure.ac |
28 |
+index 1e6891b1..c801789c 100644 |
29 |
+--- a/configure.ac |
30 |
++++ b/configure.ac |
31 |
+@@ -1312,6 +1312,21 @@ if test "${enable_async_push}" = "yes"; then |
32 |
+ ) |
33 |
+ fi |
34 |
+ |
35 |
++AC_ARG_ENABLE( |
36 |
++ [tests], |
37 |
++ AS_HELP_STRING([--enable-tests], [enable unit tests @<:@default=no@:>@]) |
38 |
++) |
39 |
++ |
40 |
++if test "${enable_tests}" = "yes"; then |
41 |
++ PKG_CHECK_MODULES([CMOCKA], [cmocka]) |
42 |
++ TEST_CFLAGS="${CMOCKA_CFLAGS}" |
43 |
++ TEST_LDFLAGS="${CMOCKA_LIBS}" |
44 |
++ AC_SUBST([TEST_CFLAGS]) |
45 |
++ AC_SUBST([TEST_LDFLAGS]) |
46 |
++fi |
47 |
++AM_CONDITIONAL([ENABLE_TESTS], [test "${enable_tests}" = "yes"]) |
48 |
++AM_CONDITIONAL([CMOCKA_INITIALIZED], [false]) |
49 |
++ |
50 |
+ CONFIGURE_DEFINES="`set | grep '^enable_.*=' ; set | grep '^with_.*='`" |
51 |
+ AC_DEFINE_UNQUOTED([CONFIGURE_DEFINES], ["`echo ${CONFIGURE_DEFINES}`"], [Configuration settings]) |
52 |
+ |
53 |
+@@ -1360,27 +1375,6 @@ AC_SUBST([VENDOR_SRC_ROOT]) |
54 |
+ AC_SUBST([VENDOR_BUILD_ROOT]) |
55 |
+ AC_SUBST([VENDOR_DIST_ROOT]) |
56 |
+ |
57 |
+-TEST_LDFLAGS="${OPTIONAL_CRYPTO_LIBS} ${OPTIONAL_PKCS11_LIBS} -lcmocka -L\$(abs_top_builddir)/vendor/dist/lib -Wl,-rpath,\$(abs_top_builddir)/vendor/dist/lib" |
58 |
+-TEST_CFLAGS="${OPTIONAL_CRYPTO_CFLAGS} ${OPTIONAL_PKCS11_CFLAGS} -I\$(top_srcdir)/include -I\$(abs_top_builddir)/vendor/dist/include" |
59 |
+- |
60 |
+-AC_SUBST([TEST_LDFLAGS]) |
61 |
+-AC_SUBST([TEST_CFLAGS]) |
62 |
+- |
63 |
+-# Check if cmake is available and cmocka git submodule is initialized, |
64 |
+-# needed for unit testing |
65 |
+-AC_CHECK_PROGS([CMAKE], [cmake]) |
66 |
+-if test -n "${CMAKE}"; then |
67 |
+- if test -f "${srcdir}/vendor/cmocka/CMakeLists.txt"; then |
68 |
+- AM_CONDITIONAL([CMOCKA_INITIALIZED], [true]) |
69 |
+- else |
70 |
+- AM_CONDITIONAL([CMOCKA_INITIALIZED], [false]) |
71 |
+- AC_MSG_RESULT([!! WARNING !! The cmoka git submodule has not been initialized or updated. Unit testing cannot be performed.]) |
72 |
+- fi |
73 |
+-else |
74 |
+- AC_MSG_RESULT([!! WARNING !! CMake is NOT available. Unit testing cannot be performed.]) |
75 |
+- AM_CONDITIONAL([CMOCKA_INITIALIZED], [false]) |
76 |
+-fi |
77 |
+- |
78 |
+ |
79 |
+ AC_CONFIG_FILES([ |
80 |
+ version.sh |
81 |
+diff --git a/tests/unit_tests/Makefile.am b/tests/unit_tests/Makefile.am |
82 |
+index 31d37b89..4b7fb41d 100644 |
83 |
+--- a/tests/unit_tests/Makefile.am |
84 |
++++ b/tests/unit_tests/Makefile.am |
85 |
+@@ -1,5 +1,5 @@ |
86 |
+ AUTOMAKE_OPTIONS = foreign |
87 |
+ |
88 |
+-if CMOCKA_INITIALIZED |
89 |
++if ENABLE_TESTS |
90 |
+ SUBDIRS = example_test openvpn plugins |
91 |
+ endif |
92 |
|
93 |
diff --git a/net-vpn/openvpn/openvpn-9999.ebuild b/net-vpn/openvpn/openvpn-9999.ebuild |
94 |
index eb65ce756e9..66a7682edf9 100644 |
95 |
--- a/net-vpn/openvpn/openvpn-9999.ebuild |
96 |
+++ b/net-vpn/openvpn/openvpn-9999.ebuild |
97 |
@@ -1,4 +1,4 @@ |
98 |
-# Copyright 1999-2018 Gentoo Foundation |
99 |
+# Copyright 1999-2019 Gentoo Authors |
100 |
# Distributed under the terms of the GNU General Public License v2 |
101 |
|
102 |
EAPI=6 |
103 |
@@ -50,7 +50,7 @@ RDEPEND="${CDEPEND} |
104 |
CONFIG_CHECK="~TUN" |
105 |
|
106 |
PATCHES=( |
107 |
- "${FILESDIR}/${PN}-external-cmocka.patch" |
108 |
+ "${FILESDIR}/${PN}-2.5-external-cmocka.patch" |
109 |
) |
110 |
|
111 |
pkg_setup() { |