[sr-dev] git:master: modules_k/purple: Updated to compile on Fedora 16

Daniel-Constantin Mierla miconda at gmail.com
Mon May 7 14:46:14 CEST 2012


Hello,

what is the version of libpurple in fedora 16? IIRC, from an old mailing 
list discussion, the module was not compiling anymore with newer 
versions of purple library, I wonder if this is the fix for it, somehow 
I thought it was a change in the purple api.

Btw, have you played with the module, is it working?

Cheers,
Daniel

On 5/6/12 7:42 PM, Peter Dunkley wrote:
> Module: sip-router
> Branch: master
> Commit: fe10a2ef9d68b646885ccaa57052a7bf85fcab9e
> URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=fe10a2ef9d68b646885ccaa57052a7bf85fcab9e
>
> Author: Peter Dunkley<peter.dunkley at crocodile-rcs.com>
> Committer: Peter Dunkley<peter.dunkley at crocodile-rcs.com>
> Date:   Sun May  6 18:40:35 2012 +0100
>
> modules_k/purple: Updated to compile on Fedora 16
>
> - Updated Makefile to use pkg-config so that it selects the correct
>    libraries/versions.
> - Added missing include for glib.h to a few files.  Not sure why this is
>    needed now when it wasn't before - but a quick search has shown it should
>    continue to work with older glib versions too.
>
> ---
>
>   modules_k/purple/Makefile     |   16 ++++++++++++----
>   modules_k/purple/purple.h     |    1 +
>   modules_k/purple/purplepipe.h |    1 +
>   modules_k/purple/utils.h      |    2 +-
>   4 files changed, 15 insertions(+), 5 deletions(-)
>
> diff --git a/modules_k/purple/Makefile b/modules_k/purple/Makefile
> index 14f7928..f5b77ad 100644
> --- a/modules_k/purple/Makefile
> +++ b/modules_k/purple/Makefile
> @@ -1,12 +1,20 @@
>   include ../../Makefile.defs
>   auto_gen=
>   NAME=purple.so
> -LIBS=
> +BUILDER = $(shell which pkg-config)
>
> -DEFS+=-I/usr/lib/glib-2.0/include -I/usr/include/glib-2.0 \
> +ifeq ($(BUILDER),)
> +	DEFS+= -I/usr/lib/glib-2.0/include -I/usr/include/glib-2.0 \
>   		-I/usr/include/libxml2
> -LIBS+=-lglib-2.0 -lpurple -lxml2
> -
> +	LIBS= -lglib-2.0 -lpurple -lxml2
> +else
> +	DEFS+= $(shell pkg-config --cflags glib-2.0)
> +	LIBS=  $(shell pkg-config --libs glib-2.0)
> +	DEFS+= $(shell pkg-config --cflags purple)
> +	LIBS+= $(shell pkg-config --libs purple)
> +	DEFS+= $(shell pkg-config --cflags libxml-2.0)
> +	LIBS+= $(shell pkg-config --libs libxml-2.0)
> +endif
>
>   DEFS+=-DOPENSER_MOD_INTERFACE
>
> diff --git a/modules_k/purple/purple.h b/modules_k/purple/purple.h
> index 8e58d1e..4232dff 100644
> --- a/modules_k/purple/purple.h
> +++ b/modules_k/purple/purple.h
> @@ -20,6 +20,7 @@
>   #ifndef _PURPLE_H
>   #define _PURPLE_H
>
> +#include<glib.h>
>   #include<libpurple/status.h>
>
>   enum purple_cmd_type {
> diff --git a/modules_k/purple/purplepipe.h b/modules_k/purple/purplepipe.h
> index 6dc0fa8..df04e32 100644
> --- a/modules_k/purple/purplepipe.h
> +++ b/modules_k/purple/purplepipe.h
> @@ -21,6 +21,7 @@
>   #define _PURPLEPIPE_H
>
>   #include<stdlib.h>
> +#include<glib.h>
>   #include<libpurple/savedstatuses.h>
>   #include<libpurple/status.h>
>
> diff --git a/modules_k/purple/utils.h b/modules_k/purple/utils.h
> index f73464a..b2c58c2 100644
> --- a/modules_k/purple/utils.h
> +++ b/modules_k/purple/utils.h
> @@ -21,7 +21,7 @@
>   #define _UTILS_H
>
>   #include<stdlib.h>
> -
> +#include<glib.h>
>   #include<libpurple/savedstatuses.h>
>   #include<libpurple/status.h>
>
>
>
> _______________________________________________
> sr-dev mailing list
> sr-dev at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

-- 
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda




More information about the sr-dev mailing list