networkmanager: support gnutls and nss

Signed-off-by: Adrian Freihofer <adrian.freihofer@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
This commit is contained in:
Adrian
2015-11-11 20:48:10 +01:00
committed by Martin Jansa
parent a37cb2ad94
commit 0f70410af9
2 changed files with 48 additions and 3 deletions
@@ -0,0 +1,41 @@
From a9261fee4a41045c42e0d292237cee532e11982c Mon Sep 17 00:00:00 2001
From: Adrian <adrian.freihofer@gmail.com>
Date: Thu, 27 Nov 2014 15:43:26 +0100
Subject: [PATCH] add pkg config for libgcrypt
---
configure.ac | 18 +++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)
diff --git a/configure.ac b/configure.ac
index 94b0758..654a015 100644
--- a/configure.ac
+++ b/configure.ac
@@ -480,17 +480,13 @@ if test x"$ac_crypto" = xnss; then
with_nss=yes
elif test x"$ac_crypto" = xgnutls; then
PKG_CHECK_MODULES(GNUTLS, [gnutls >= 1.2])
- AC_PATH_PROG(LIBGCRYPT_CONFIG, libgcrypt-config, no)
- if test x"$LIBGCRYPT_CONFIG" = xno; then
- AC_MSG_ERROR([gnutls explicitly requested but gcrypt not found on system])
- else
- AC_DEFINE(HAVE_GNUTLS, 1, [Define if you have libgnutls])
- LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG --cflags`
- LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG --libs`
- AC_SUBST(LIBGCRYPT_CFLAGS)
- AC_SUBST(LIBGCRYPT_LIBS)
- with_gnutls=yes
- fi
+ AC_DEFINE(HAVE_GNUTLS, 1, [Define if you have libgnutls])
+ PKG_CHECK_MODULES(LIBGCRYPT, [libgcrypt >= 1.1.42], [
+ AC_DEFINE(HAVE_GCRYPT, 1, [Define if gcrypt library is available.])
+ with_gnutls=yes
+ ], [
+ AC_MSG_ERROR([gnutls explicitly requested but gcrypt not found on system])
+ ])
else
AC_MSG_ERROR([Please choose either 'nss' or 'gnutls' for certificate and crypto operations])
fi
--
1.9.1
@@ -7,13 +7,14 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=cbbffd568227ada506640fe950a4823b \
file://docs/api/html/license.html;md5=51d7fb67bde992e58533a8481cee070b \
"
DEPENDS = "libnl dbus dbus-glib libgudev wireless-tools nss util-linux libndp"
DEPENDS = "libnl dbus dbus-glib libgudev wireless-tools util-linux libndp"
inherit gnomebase gettext systemd
SRC_URI = " \
${GNOME_MIRROR}/NetworkManager/${@gnome_verdir("${PV}")}/NetworkManager-${PV}.tar.xz \
file://0001-don-t-try-to-run-sbin-dhclient-to-get-the-version-nu.patch \
file://0002-add-pkg-config-for-libgcrypt.patch \
"
SRC_URI[md5sum] = "00f5f9ec69725a9f9b99366853c6f73e"
SRC_URI[sha256sum] = "38ea002403e3b884ffa9aae25aea431d2a8420f81f4919761c83fb92648254bd"
@@ -26,7 +27,6 @@ EXTRA_OECONF = " \
--disable-ifnet \
--disable-ifcfg-suse \
--with-netconfig \
--with-crypto=nss \
--disable-more-warnings \
--with-dhclient=${base_sbindir}/dhclient \
--with-iptables=${sbindir}/iptables \
@@ -34,7 +34,9 @@ EXTRA_OECONF = " \
--with-dnsmasq=${bindir}/dnsmasq \
"
PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd','consolekit',d)}"
PACKAGECONFIG ??= "nss \
${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd','consolekit',d)} \
"
PACKAGECONFIG[systemd] = " \
--with-systemdsystemunitdir=${systemd_unitdir}/system --with-session-tracking=systemd --enable-polkit, \
--without-systemdsystemunitdir, \
@@ -46,6 +48,8 @@ PACKAGECONFIG[consolekit] = "--with-session-tracking=consolekit,,consolekit,cons
PACKAGECONFIG[concheck] = "--with-libsoup=yes,--with-libsoup=no,libsoup-2.4"
PACKAGECONFIG[modemmanager] = "--with-modem-manager-1=yes,--with-modem-manager-1=no,modemmanager"
PACKAGECONFIG[ppp] = "--enable-ppp,--disable-ppp,ppp"
PACKAGECONFIG[nss] = "--with-crypto=nss,,nss"
PACKAGECONFIG[gnutls] = "--with-crypto=gnutls,,gnutls libgcrypt"
PACKAGES =+ "libnmutil libnmglib libnmglib-vpn ${PN}-tests ${PN}-bash-completion"