mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Merge branch 'master' into osx-functional
This commit is contained in:
commit
8f15ced146
@ -4,15 +4,15 @@ install:
|
|||||||
- uname -a
|
- uname -a
|
||||||
- sudo apt-get update
|
- sudo apt-get update
|
||||||
- sudo apt-get -y install libssl-dev libexpat1-dev libncursesw5-dev libglib2.0-dev libnotify-dev libcurl3-dev libxss-dev libotr2-dev libgpgme11-dev uuid-dev expect-dev tcl-dev
|
- sudo apt-get -y install libssl-dev libexpat1-dev libncursesw5-dev libglib2.0-dev libnotify-dev libcurl3-dev libxss-dev libotr2-dev libgpgme11-dev uuid-dev expect-dev tcl-dev
|
||||||
- git clone git://github.com/strophe/libstrophe.git
|
- git clone git://github.com/boothj5/libmesode.git
|
||||||
- cd libstrophe
|
- cd libmesode
|
||||||
- mkdir m4
|
- mkdir m4
|
||||||
- ./bootstrap.sh
|
- ./bootstrap.sh
|
||||||
- ./configure --prefix=/usr
|
- ./configure --prefix=/usr
|
||||||
- make
|
- make
|
||||||
- sudo make install
|
- sudo make install
|
||||||
- cd ..
|
- cd ..
|
||||||
- rm -rf libstrophe
|
- rm -rf libmesode
|
||||||
- wget https://cmocka.org/files/1.0/cmocka-1.0.0.tar.xz
|
- wget https://cmocka.org/files/1.0/cmocka-1.0.0.tar.xz
|
||||||
- tar -xvf cmocka-1.0.0.tar.xz
|
- tar -xvf cmocka-1.0.0.tar.xz
|
||||||
- cd cmocka-1.0.0
|
- cd cmocka-1.0.0
|
||||||
|
57
configure.ac
57
configure.ac
@ -47,62 +47,17 @@ AC_ARG_ENABLE([otr],
|
|||||||
[AS_HELP_STRING([--enable-otr], [enable otr encryption])])
|
[AS_HELP_STRING([--enable-otr], [enable otr encryption])])
|
||||||
AC_ARG_ENABLE([pgp],
|
AC_ARG_ENABLE([pgp],
|
||||||
[AS_HELP_STRING([--enable-pgp], [enable pgp])])
|
[AS_HELP_STRING([--enable-pgp], [enable pgp])])
|
||||||
AC_ARG_WITH([libxml2],
|
|
||||||
[AS_HELP_STRING([--with-libxml2], [link with libxml2 instead of expat])])
|
|
||||||
AC_ARG_WITH([xscreensaver],
|
AC_ARG_WITH([xscreensaver],
|
||||||
[AS_HELP_STRING([--with-xscreensaver], [use libXScrnSaver to determine idle time])])
|
[AS_HELP_STRING([--with-xscreensaver], [use libXScrnSaver to determine idle time])])
|
||||||
AC_ARG_WITH([themes],
|
AC_ARG_WITH([themes],
|
||||||
[AS_HELP_STRING([--with-themes[[=PATH]]], [install themes (default yes)])])
|
[AS_HELP_STRING([--with-themes[[=PATH]]], [install themes (default yes)])])
|
||||||
|
|
||||||
# Use the CFLAGS and libs provided by libstrophe.pc if libstrophe has pkg-config support.
|
### Check for libmesode, fall back to libstrophe
|
||||||
PKG_CHECK_MODULES([libstrophe], [libstrophe], [LIBS="$libstrophe_LIBS $LIBS"],
|
PKG_CHECK_MODULES([libmesode], [libmesode],
|
||||||
[
|
[LIBS="$libmesode_LIBS $LIBS" CFLAGS="$CFLAGS $libmesode_CFLAGS" AC_DEFINE([HAVE_LIBMESODE], [1], [libmesode])],
|
||||||
if test "x$PLATFORM" != xfreebsd; then
|
[PKG_CHECK_MODULES([libstrophe], [libstrophe],
|
||||||
AC_CHECK_LIB([resolv], [res_query], [],
|
[LIBS="$libstrophe_LIBS $LIBS" CFLAGS="$CFLAGS $libstrophe_CFLAGS" AC_DEFINE([HAVE_LIBSTROPHE], [1], [libstrophe])],
|
||||||
[AC_CHECK_LIB([resolv], [__res_query], [],
|
[AC_MSG_ERROR([Neither libmesode or libstrophe found, either is required for profanity])])])
|
||||||
[AC_MSG_ERROR([libresolv not found; libresolv required for profanity])])])
|
|
||||||
else
|
|
||||||
AC_MSG_NOTICE([skipping libresolv checks for freebsd])
|
|
||||||
fi
|
|
||||||
|
|
||||||
### Check for libstrophe dependencies
|
|
||||||
### Select first existing xml library among expat and libxml2
|
|
||||||
PARSER=""
|
|
||||||
PARSER_LIBS=""
|
|
||||||
PARSER_CFLAGS=""
|
|
||||||
AS_IF([test "x$with_libxml2" != xyes],
|
|
||||||
[PKG_CHECK_MODULES([expat], [expat],
|
|
||||||
[PARSER_CFLAGS="$expat_CFLAGS"; PARSER_LIBS="$expat_LIBS"; PARSER="expat"],
|
|
||||||
[AC_CHECK_LIB([expat], [XML_ParserCreate],
|
|
||||||
[PARSER_LIBS="-lexpat"; PARSER="expat"],
|
|
||||||
AS_IF([test "x$with_libxml2" = xno],
|
|
||||||
[AC_MSG_ERROR([expat is required but does not exist])]))])
|
|
||||||
])
|
|
||||||
|
|
||||||
AS_IF([test "x$PARSER" = x -a "x$with_libxml2" != xno],
|
|
||||||
[PKG_CHECK_MODULES([libxml2], [libxml-2.0],
|
|
||||||
[PARSER_CFLAGS="$libxml2_CFLAGS"; PARSER_LIBS="$libxml2_LIBS"; PARSER="libxml2"],
|
|
||||||
AS_IF([test "x$with_libxml2" = xyes],
|
|
||||||
[AC_MSG_ERROR([libxml2 is required but does not exist])]))
|
|
||||||
])
|
|
||||||
|
|
||||||
AS_IF([test "x$PARSER" = x],
|
|
||||||
[AC_MSG_ERROR([either expat or libxml2 is required for profanity])])
|
|
||||||
AM_CPPFLAGS="$AM_CPPFLAGS $PARSER_CFLAGS"
|
|
||||||
LIBS="$PARSER_LIBS $LIBS"
|
|
||||||
|
|
||||||
PKG_CHECK_MODULES([openssl], [openssl], [],
|
|
||||||
[AC_CHECK_HEADER(openssl/ssl.h, [openssl_LIBS="-lssl -lcrypto"], [AC_MSG_ERROR([openssl not found; openssl required for profanity])])])
|
|
||||||
AM_CPPFLAGS="$AM_CPPFLAGS $openssl_CFLAGS"
|
|
||||||
LIBS="$openssl_LIBS $LIBS"
|
|
||||||
|
|
||||||
CFLAGS_RESTORE="$CFLAGS"
|
|
||||||
CFLAGS="$CFLAGS $AM_CPPFLAGS"
|
|
||||||
AC_CHECK_LIB([strophe], [xmpp_ctx_new], [LIBS="-lstrophe $LIBS"; listrophe_CFLAGS=""],
|
|
||||||
[AC_MSG_ERROR([libstrophe linked with $PARSER is required for profanity])])
|
|
||||||
CFLAGS="$CFLAGS_RESTORE"
|
|
||||||
])
|
|
||||||
CFLAGS="$CFLAGS $libstrophe_CFLAGS"
|
|
||||||
|
|
||||||
### Check for ncurses library
|
### Check for ncurses library
|
||||||
PKG_CHECK_MODULES([ncursesw], [ncursesw],
|
PKG_CHECK_MODULES([ncursesw], [ncursesw],
|
||||||
|
@ -77,13 +77,13 @@ cygwin_prepare()
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
install_lib_strophe()
|
install_lib_mesode()
|
||||||
{
|
{
|
||||||
echo
|
echo
|
||||||
echo Profanity installer... installing libstrophe
|
echo Profanity installer... installing libmesode
|
||||||
echo
|
echo
|
||||||
git clone git://github.com/strophe/libstrophe.git
|
git clone git@github.com:boothj5/libmesode.git
|
||||||
cd libstrophe
|
cd libmesode
|
||||||
./bootstrap.sh
|
./bootstrap.sh
|
||||||
./configure --prefix=$1
|
./configure --prefix=$1
|
||||||
make
|
make
|
||||||
@ -105,13 +105,13 @@ install_profanity()
|
|||||||
sudo make install
|
sudo make install
|
||||||
}
|
}
|
||||||
|
|
||||||
cyg_install_lib_strophe()
|
cyg_install_lib_mesode()
|
||||||
{
|
{
|
||||||
echo
|
echo
|
||||||
echo Profanity installer... installing libstrophe
|
echo Profanity installer... installing libmesode
|
||||||
echo
|
echo
|
||||||
git clone git://github.com/strophe/libstrophe.git
|
git clone git@github.com:boothj5/libmesode.git
|
||||||
cd libstrophe
|
cd libmesode
|
||||||
./bootstrap.sh
|
./bootstrap.sh
|
||||||
./bootstrap.sh # second call seems to fix problem on cygwin
|
./bootstrap.sh # second call seems to fix problem on cygwin
|
||||||
./configure --prefix=/usr
|
./configure --prefix=/usr
|
||||||
@ -140,8 +140,8 @@ cleanup()
|
|||||||
echo Profanity installer... cleaning up
|
echo Profanity installer... cleaning up
|
||||||
echo
|
echo
|
||||||
|
|
||||||
echo Removing libstrophe repository...
|
echo Removing libmesode repository...
|
||||||
rm -rf libstrophe
|
rm -rf libmesode
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo Profanity installer... complete!
|
echo Profanity installer... complete!
|
||||||
@ -183,25 +183,25 @@ unknown) echo The install script will not work on this OS.
|
|||||||
exit
|
exit
|
||||||
;;
|
;;
|
||||||
fedora) fedora_prepare
|
fedora) fedora_prepare
|
||||||
install_lib_strophe /usr
|
install_lib_mesode /usr
|
||||||
install_profanity
|
install_profanity
|
||||||
;;
|
;;
|
||||||
debian) debian_prepare
|
debian) debian_prepare
|
||||||
install_lib_strophe /usr
|
install_lib_mesode /usr
|
||||||
install_profanity
|
install_profanity
|
||||||
;;
|
;;
|
||||||
opensuse) opensuse_prepare
|
opensuse) opensuse_prepare
|
||||||
install_lib_strophe /usr/local
|
install_lib_mesode /usr/local
|
||||||
sudo /sbin/ldconfig
|
sudo /sbin/ldconfig
|
||||||
install_profanity
|
install_profanity
|
||||||
;;
|
;;
|
||||||
centos) centos_prepare
|
centos) centos_prepare
|
||||||
install_lib_strophe /usr
|
install_lib_mesode /usr
|
||||||
sudo ldconfig
|
sudo ldconfig
|
||||||
install_profanity
|
install_profanity
|
||||||
;;
|
;;
|
||||||
cygwin) cygwin_prepare
|
cygwin) cygwin_prepare
|
||||||
cyg_install_lib_strophe
|
cyg_install_lib_mesode
|
||||||
cyg_install_profanity
|
cyg_install_profanity
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -98,6 +98,13 @@ main(int argc, char **argv)
|
|||||||
|
|
||||||
g_print("Build information:\n");
|
g_print("Build information:\n");
|
||||||
|
|
||||||
|
#ifdef HAVE_LIBMESODE
|
||||||
|
g_print("XMPP library: libmesode\n");
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_LIBSTROPHE
|
||||||
|
g_print("XMPP library: libstrophe\n");
|
||||||
|
#endif
|
||||||
|
|
||||||
gboolean notify_enabled = FALSE;
|
gboolean notify_enabled = FALSE;
|
||||||
|
|
||||||
#ifdef HAVE_OSXNOTIFY
|
#ifdef HAVE_OSXNOTIFY
|
||||||
|
@ -32,12 +32,20 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_LIBMESODE
|
||||||
|
#include <mesode.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_LIBSTROPHE
|
||||||
#include <strophe.h>
|
#include <strophe.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
@ -43,7 +43,13 @@
|
|||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <glib/gstdio.h>
|
#include <glib/gstdio.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_LIBMESODE
|
||||||
|
#include <mesode.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_LIBSTROPHE
|
||||||
#include <strophe.h>
|
#include <strophe.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
@ -35,7 +35,14 @@
|
|||||||
#ifndef XMPP_CAPABILITIES_H
|
#ifndef XMPP_CAPABILITIES_H
|
||||||
#define XMPP_CAPABILITIES_H
|
#define XMPP_CAPABILITIES_H
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
|
#ifdef HAVE_LIBMESODE
|
||||||
|
#include <mesode.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_LIBSTROPHE
|
||||||
#include <strophe.h>
|
#include <strophe.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "xmpp/xmpp.h"
|
#include "xmpp/xmpp.h"
|
||||||
|
|
||||||
|
@ -32,11 +32,18 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_LIBMESODE
|
||||||
|
#include <mesode.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_LIBSTROPHE
|
||||||
#include <strophe.h>
|
#include <strophe.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "chat_session.h"
|
#include "chat_session.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
@ -35,7 +35,14 @@
|
|||||||
#ifndef XMPP_CONNECTION_H
|
#ifndef XMPP_CONNECTION_H
|
||||||
#define XMPP_CONNECTION_H
|
#define XMPP_CONNECTION_H
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
|
#ifdef HAVE_LIBMESODE
|
||||||
|
#include <mesode.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_LIBSTROPHE
|
||||||
#include <strophe.h>
|
#include <strophe.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
|
|
||||||
|
@ -32,10 +32,18 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_LIBMESODE
|
||||||
|
#include <mesode.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_LIBSTROPHE
|
||||||
#include <strophe.h>
|
#include <strophe.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
@ -42,7 +42,13 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_LIBMESODE
|
||||||
|
#include <mesode.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_LIBSTROPHE
|
||||||
#include <strophe.h>
|
#include <strophe.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "muc.h"
|
#include "muc.h"
|
||||||
|
@ -32,10 +32,17 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_LIBMESODE
|
||||||
|
#include <mesode.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_LIBSTROPHE
|
||||||
#include <strophe.h>
|
#include <strophe.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "chat_session.h"
|
#include "chat_session.h"
|
||||||
#include "config/preferences.h"
|
#include "config/preferences.h"
|
||||||
|
@ -32,6 +32,8 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -39,6 +41,13 @@
|
|||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <glib/gprintf.h>
|
#include <glib/gprintf.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_LIBMESODE
|
||||||
|
#include <mesode.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_LIBSTROPHE
|
||||||
|
#include <strophe.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "config/preferences.h"
|
#include "config/preferences.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
@ -32,12 +32,20 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_LIBMESODE
|
||||||
|
#include <mesode.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_LIBSTROPHE
|
||||||
#include <strophe.h>
|
#include <strophe.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "profanity.h"
|
#include "profanity.h"
|
||||||
|
@ -32,11 +32,19 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_LIBMESODE
|
||||||
|
#include <mesode.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_LIBSTROPHE
|
||||||
#include <strophe.h>
|
#include <strophe.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
@ -35,7 +35,15 @@
|
|||||||
#ifndef XMPP_STANZA_H
|
#ifndef XMPP_STANZA_H
|
||||||
#define XMPP_STANZA_H
|
#define XMPP_STANZA_H
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
|
#ifdef HAVE_LIBMESODE
|
||||||
|
#include <mesode.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_LIBSTROPHE
|
||||||
#include <strophe.h>
|
#include <strophe.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <xmpp/xmpp.h>
|
#include <xmpp/xmpp.h>
|
||||||
|
|
||||||
#define STANZA_NAME_ACTIVE "active"
|
#define STANZA_NAME_ACTIVE "active"
|
||||||
|
@ -35,7 +35,14 @@
|
|||||||
#ifndef XMPP_XMPP_H
|
#ifndef XMPP_XMPP_H
|
||||||
#define XMPP_XMPP_H
|
#define XMPP_XMPP_H
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
|
#ifdef HAVE_LIBMESODE
|
||||||
|
#include <mesode.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_LIBSTROPHE
|
||||||
#include <strophe.h>
|
#include <strophe.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "config/accounts.h"
|
#include "config/accounts.h"
|
||||||
#include "contact.h"
|
#include "contact.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user