[Pkg-voip-commits] [asterisk] 01/03: Link against radcli rather than freeradius-client or radiusclient-ng: Add patch to autodetect radcli. Build-depend on libradcli-dev, with libfreeradius-client-dev or libradiusclient-ng-dev only as fallbacks. Closes: Bug#822339. Thanks to Daniel Pocock.

Jonas Smedegaard dr at jones.dk
Wed May 18 13:17:03 UTC 2016


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository asterisk.

commit 1c540349c4eda75e77600638fad8eace68433e85
Author: Jonas Smedegaard <dr at jones.dk>
Date:   Wed May 18 12:56:06 2016 +0200

    Link against radcli rather than freeradius-client or radiusclient-ng: Add patch to autodetect radcli. Build-depend on libradcli-dev, with libfreeradius-client-dev or libradiusclient-ng-dev only as fallbacks. Closes: Bug#822339. Thanks to Daniel Pocock.
---
 debian/control                        |  2 +-
 debian/patches/radcli-detection.patch | 62 +++++++++++++++++++++++++++++++++++
 debian/patches/series                 |  2 ++
 3 files changed, 65 insertions(+), 1 deletion(-)

diff --git a/debian/control b/debian/control
index 30899de..4cb9d6f 100644
--- a/debian/control
+++ b/debian/control
@@ -25,7 +25,7 @@ Build-Depends:
  libcap-dev [linux-any],
  libcurl4-openssl-dev | libcurl-dev,
  libedit-dev,
- libfreeradius-client-dev | libradiusclient-ng-dev,
+ libradcli-dev | libfreeradius-client-dev | libradiusclient-ng-dev,
  libgmime-2.6-dev,
  libgsm1-dev,
  libical-dev,
diff --git a/debian/patches/radcli-detection.patch b/debian/patches/radcli-detection.patch
new file mode 100644
index 0000000..a856b1d
--- /dev/null
+++ b/debian/patches/radcli-detection.patch
@@ -0,0 +1,62 @@
+Description: Autodetect radcli, favored over freeradius-client or radiusclient-ng
+Author: Jonas Smedegaard <dr at jones.dk>
+Last-Update: 2016-05-18
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -2323,11 +2323,16 @@
+ 
+ # Accept either RADIUS client library, their APIs are fully compatible,
+ # just different header filenames and different SONAMEs
+-AST_EXT_LIB_CHECK([RADIUS], [freeradius-client], [rc_read_config], [freeradius-client.h])
++AST_EXT_LIB_CHECK([RADIUS], [radcli], [rc_read_config], [radcli/radcli.h])
+ if test "x${PBX_RADIUS}" = "x1"; then
+-	AC_DEFINE(FREERADIUS_CLIENT, [], [Use the FreeRADIUS-client library])
++	AC_DEFINE(RADCLI, [], [Use the radcli library])
+ else
+-	AST_EXT_LIB_CHECK([RADIUS], [radiusclient-ng], [rc_read_config], [radiusclient-ng.h])
++	AST_EXT_LIB_CHECK([RADIUS], [freeradius-client], [rc_read_config], [freeradius-client.h])
++	if test "x${PBX_RADIUS}" = "x1"; then
++		AC_DEFINE(FREERADIUS_CLIENT, [], [Use the FreeRADIUS-client library])
++	else
++		AST_EXT_LIB_CHECK([RADIUS], [radiusclient-ng], [rc_read_config], [radiusclient-ng.h])
++	fi
+ fi
+ 
+ AST_EXT_LIB_CHECK([COROSYNC], [cpg], [cpg_join], [corosync/cpg.h], [-lcfg])
+--- a/cdr/cdr_radius.c
++++ b/cdr/cdr_radius.c
+@@ -41,11 +41,15 @@
+ 
+ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+ 
++#ifdef RADCLI
++#include <radcli/radcli.h>
++#else
+ #ifdef FREERADIUS_CLIENT
+ #include <freeradius-client.h>
+ #else
+ #include <radiusclient-ng.h>
+ #endif
++#endif
+ 
+ #include "asterisk/channel.h"
+ #include "asterisk/cdr.h"
+--- a/cel/cel_radius.c
++++ b/cel/cel_radius.c
+@@ -35,11 +35,15 @@
+ 
+ ASTERISK_FILE_VERSION(__FILE__, "$Rev$")
+ 
++#ifdef RADCLI
++#include <radcli/radcli.h>
++#else
+ #ifdef FREERADIUS_CLIENT
+ #include <freeradius-client.h>
+ #else
+ #include <radiusclient-ng.h>
+ #endif
++#endif
+ 
+ #include "asterisk/channel.h"
+ #include "asterisk/cel.h"
diff --git a/debian/patches/series b/debian/patches/series
index facf105..b202bc2 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -34,3 +34,5 @@ amr.patch
 
 ffmpeg-detection.patch
 ffmpeg-includes.patch
+
+radcli-detection.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-voip/asterisk.git



More information about the Pkg-voip-commits mailing list