net-vpn/openconnect: fix tests to work with ocserv installed
authorMike Gilbert <floppym@gentoo.org>
Fri, 3 Apr 2020 04:06:40 +0000 (00:06 -0400)
committerMike Gilbert <floppym@gentoo.org>
Fri, 3 Apr 2020 04:06:40 +0000 (00:06 -0400)
Package-Manager: Portage-2.3.96_p4, Repoman-2.3.22_p1
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
net-vpn/openconnect/openconnect-8.06.ebuild
net-vpn/openconnect/openconnect-9999.ebuild

index 45d091c8dc3926e3afa4508073e8e9f772a15eeb..6119100597034958b6d06e2b7758f64403651b77 100644 (file)
@@ -90,9 +90,9 @@ src_configure() {
        addwrite /run/netns
 
        local myconf=(
-               --with-vpnc-script="${EPREFIX}/etc/openconnect/openconnect.sh"
-               $(use_enable static-libs static)
+               --disable-dsa-tests
                $(use_enable nls)
+               $(use_enable static-libs static)
                $(use_with !gnutls openssl)
                $(use_with gnutls)
                $(use_with libproxy)
@@ -100,12 +100,26 @@ src_configure() {
                $(use_with gssapi)
                $(use_with smartcard libpcsclite)
                $(use_with stoken)
+               --with-vpnc-script="${EPREFIX}/etc/openconnect/openconnect.sh"
                --without-java
        )
 
        econf "${myconf[@]}"
 }
 
+src_test() {
+       local charset
+       for charset in UTF-8 ISO8859-2; do
+               if [[ $(LC_ALL=cs_CZ.${charset} locale charmap 2>/dev/null) != ${charset} ]]; then
+                       # If we don't have valid cs_CZ locale data, auth-nonascii will fail.
+                       # Force a test skip by exiting with status 77.
+                       sed -i -e '2i exit 77' tests/auth-nonascii || die
+                       break
+               fi
+       done
+       default
+}
+
 src_install() {
        default
 
index 45d091c8dc3926e3afa4508073e8e9f772a15eeb..6119100597034958b6d06e2b7758f64403651b77 100644 (file)
@@ -90,9 +90,9 @@ src_configure() {
        addwrite /run/netns
 
        local myconf=(
-               --with-vpnc-script="${EPREFIX}/etc/openconnect/openconnect.sh"
-               $(use_enable static-libs static)
+               --disable-dsa-tests
                $(use_enable nls)
+               $(use_enable static-libs static)
                $(use_with !gnutls openssl)
                $(use_with gnutls)
                $(use_with libproxy)
@@ -100,12 +100,26 @@ src_configure() {
                $(use_with gssapi)
                $(use_with smartcard libpcsclite)
                $(use_with stoken)
+               --with-vpnc-script="${EPREFIX}/etc/openconnect/openconnect.sh"
                --without-java
        )
 
        econf "${myconf[@]}"
 }
 
+src_test() {
+       local charset
+       for charset in UTF-8 ISO8859-2; do
+               if [[ $(LC_ALL=cs_CZ.${charset} locale charmap 2>/dev/null) != ${charset} ]]; then
+                       # If we don't have valid cs_CZ locale data, auth-nonascii will fail.
+                       # Force a test skip by exiting with status 77.
+                       sed -i -e '2i exit 77' tests/auth-nonascii || die
+                       break
+               fi
+       done
+       default
+}
+
 src_install() {
        default