add-cmake.diff
changeset 87 78238d26911a
parent 61 9b4f7e14c19c
child 88 0a87df8ad9c1
--- a/add-cmake.diff	Wed May 15 13:32:42 2013 +0300
+++ b/add-cmake.diff	Wed Nov 12 23:04:36 2014 +0200
@@ -1,19 +1,20 @@
 # HG changeset patch
-# Parent 19a36ac5d0b55244c4b3bdef8cb6f98874a9d961
-[work-in-progress] Add possibility to build with CMake
+# Parent 386f3b8646a61ba6af61609ff67f2da2cc70251e
+Add possibility to build with CMake
 
-diff -r 19a36ac5d0b5 .hgignore
---- a/.hgignore	Sun Jan 13 06:17:13 2013 +0200
-+++ b/.hgignore	Sun Jan 13 06:40:40 2013 +0200
-@@ -34,3 +34,5 @@
+diff --git a/.hgignore b/.hgignore
+--- a/.hgignore
++++ b/.hgignore
+@@ -36,3 +36,5 @@
  tags
  mcabber/ptodo
  mcabber/ppatches
 +
 +mcabber/build
-diff -r 19a36ac5d0b5 mcabber/CMakeLists.txt
---- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/mcabber/CMakeLists.txt	Sun Jan 13 06:40:40 2013 +0200
+diff --git a/mcabber/CMakeLists.txt b/mcabber/CMakeLists.txt
+new file mode 100644
+--- /dev/null
++++ b/mcabber/CMakeLists.txt
 @@ -0,0 +1,303 @@
 +## Copyright 2010-2012 Myhailo Danylenko
 +# This file is part of mcabber.
@@ -38,7 +39,6 @@
 +## User settable options
 +option ( ENABLE_DEBUG    "Enable debugging output"                       OFF ) # XXX is it really used?
 +option ( USE_SIGWINCH    "Compile with SIGWINCH handler"                 OFF )
-+option ( XEP0022         "Enable obsolete Message Events (XEP-0022)"     OFF ) # + XEP0085?
 +option ( MODULES_ENABLE  "Enable dynamic module loading"                 ON  )
 +option ( WANT_LIBIDN     "Compile with libidn support"                   ON  )
 +option ( WANT_GPGME      "Compile with PGP support (libgpgme required)"  ON  )
@@ -84,8 +84,10 @@
 +pkg_check_modules ( LM REQUIRED loudmouth-1.0>=1.4.2 )
 +set ( CMAKE_REQUIRED_INCLUDES  ${LM_INCLUDE_DIRS}         )
 +set ( CMAKE_REQUIRED_LIBRARIES ${LM_LIBRARIES}            )
-+set ( CMAKE_REQUIRESD_FLAGS    ${LM_LDFLAGS} ${LM_CFLAGS} )
++set ( CMAKE_REQUIRED_FLAGS    ${LM_LDFLAGS} ${LM_CFLAGS} )
 +check_symbol_exists ( lm_connection_unregister_reply_handler "loudmouth/loudmouth.h" HAVE_LM_CONNECTION_UNREGISTER_REPLY_HANDLER )
++check_symbol_exists ( lm_ssl_set_cipher_list                 "loudmouth/loudmouth.h" HAVE_LM_SSL_CIPHER_LIST                     )
++check_symbol_exists ( lm_ssl_set_ca                          "loudmouth/loudmouth.h" HAVE_LM_SSL_CA                              )
 +
 +# Libidn
 +if ( WANT_LIBIDN )
@@ -178,7 +180,7 @@
 +
 +## Define targets
 +set ( mcabber_SUBSYSTEMS
-+	caps commands compl events hbuf help histolog hooks
++	caps carbons commands compl events hbuf help histolog hooks
 +	modules nohtml otr pgp roster screen settings utf8 utils
 +	xmpp xmpp_helper xmpp_iq xmpp_iqrequest xmpp_muc xmpp_s10n )
 +if ( NOT MODULES_ENABLE )
@@ -199,7 +201,7 @@
 +if ( MODULES_ENABLE )
 +	add_library ( beep      MODULE modules/beep/beep.c                          )
 +	add_library ( eventcmd  MODULE modules/eventcmd/eventcmd.c mcabber/extcmd.c )
-+	add_library ( fifo      MODULE modules/fifo/fifo_module.c mcabber/fifo.c    )
++	add_library ( fifo      MODULE modules/fifo/fifo.c mcabber/fifo_internal.c  )
 +	add_library ( urlregex  MODULE modules/urlregex/urlregex.c                  )
 +	add_library ( xttitle   MODULE modules/xttitle/xttitle.c                    )
 +endif ()
@@ -228,17 +230,16 @@
 +					    ${PANEL_LIBRARIES}
 +						${GPGME_LIBRARIES}
 +						${LIBOTR_LIBRARIES} )
-+target_link_libraries ( fifo
-+                        ${GLIB_LIBRARIES} )
-+target_link_libraries ( eventcmd
-+                        ${GLIB_LIBRARIES} )
-+target_link_libraries ( xttitle
-+                        ${GLIB_LIBRARIES} )
++if ( MODULES_ENABLE )
++	target_link_libraries ( fifo     ${GLIB_LIBRARIES} )
++	target_link_libraries ( eventcmd ${GLIB_LIBRARIES} )
++	target_link_libraries ( xttitle  ${GLIB_LIBRARIES} )
++endif ()
 +include_directories ( ${mcabber_SOURCE_DIR}
-+                      ${mcabber_BINARY_DIR}/include
++					  ${mcabber_BINARY_DIR}/include
 +					  ${mcabber_BINARY_DIR}/include/mcabber )
 +set_target_properties ( mcabber PROPERTIES
-+					    COMPILE_FLAGS "-Wall ${GPGME_CFLAGS} -D_GNU_SOURCE" )
++						COMPILE_FLAGS "-Wall ${GPGME_CFLAGS} -D_GNU_SOURCE" )
 +
 +## Extra targets
 +if ( HAVE_LATEX )
@@ -318,10 +319,11 @@
 +endif ()
 +
 +## The End ## vim: se ts=4 sw=4: ##
-diff -r 19a36ac5d0b5 mcabber/config.h.in
---- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/mcabber/config.h.in	Sun Jan 13 06:40:40 2013 +0200
-@@ -0,0 +1,51 @@
+diff --git a/mcabber/config.h.in b/mcabber/config.h.in
+new file mode 100644
+--- /dev/null
++++ b/mcabber/config.h.in
+@@ -0,0 +1,53 @@
 +/* help @help.c */
 +#define DATA_DIR                      "@DATA_DIR@"
 +/* conditional @main.c */ /* does it have any effect really? */
@@ -330,6 +332,8 @@
 +#cmakedefine ENABLE_HGCSET            @ENABLE_HGCSET@
 +/* @xmpp.c */
 +#cmakedefine HAVE_ARC4RANDOM          @HAVE_ARC4RANDOM@
++#cmakedefine HAVE_LM_SSL_CIPHER_LIST  @HAVE_LM_SSL_CIPHER_LIST@
++#cmakedefine HAVE_LM_SSL_CA           @HAVE_LM_SSL_CA@
 +/* @screen.c */
 +#cmakedefine HAVE_ESCDELAY            @HAVE_ESCDELAY@
 +/* alot */
@@ -370,13 +374,13 @@
 +/* spelling */
 +#cmakedefine WITH_ASPELL              @WITH_ASPELL@
 +#cmakedefine WITH_ENCHANT             @WITH_ENCHANT@
-+/* option, also XEP0085? */
-+#cmakedefine XEP0022                  @XEP0022@
++/* unused, but helpful for modules */
++/* #cmakedefine HAVE_LM_CONNECTION_UNREGISTER_REPLY_HANDLER @HAVE_LM_CONNECTION_UNREGISTER_REPLY_HANDLER@ */
 +/* end */
-diff -r 19a36ac5d0b5 mcabber/configure.ac
---- a/mcabber/configure.ac	Sun Jan 13 06:17:13 2013 +0200
-+++ b/mcabber/configure.ac	Sun Jan 13 06:40:40 2013 +0200
-@@ -35,9 +35,8 @@
+diff --git a/mcabber/configure.ac b/mcabber/configure.ac
+--- a/mcabber/configure.ac
++++ b/mcabber/configure.ac
+@@ -36,9 +36,8 @@
  
  # Checks for header files.
  AC_HEADER_STDC
@@ -388,7 +392,7 @@
  AC_CHECK_HEADERS([unistd.h], , AC_MSG_ERROR([Missing header file]))
  AC_VAR_TIMEZONE_EXTERNALS
  
-@@ -58,10 +57,8 @@
+@@ -59,10 +58,8 @@
  AC_TYPE_SIGNAL
  AC_FUNC_STRFTIME
  AC_FUNC_VPRINTF
@@ -401,22 +405,25 @@
  
  
  AC_CHECK_DECLS([strptime],,,
-diff -r 19a36ac5d0b5 mcabber/hgcset.h.in
---- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/mcabber/hgcset.h.in	Sun Jan 13 06:40:40 2013 +0200
+diff --git a/mcabber/hgcset.h.in b/mcabber/hgcset.h.in
+new file mode 100644
+--- /dev/null
++++ b/mcabber/hgcset.h.in
 @@ -0,0 +1,3 @@
 +/* this can go to config.h */
 +#define HGCSET "@HGCSET@"
 +/* end */
-diff -r 19a36ac5d0b5 mcabber/mcabber.menu.in
---- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/mcabber/mcabber.menu.in	Sun Jan 13 06:40:40 2013 +0200
+diff --git a/mcabber/mcabber.menu.in b/mcabber/mcabber.menu.in
+new file mode 100644
+--- /dev/null
++++ b/mcabber/mcabber.menu.in
 @@ -0,0 +1,2 @@
 +?package(mcabber):needs="text" section="Applications/Network/Communication"\
 +  title="mcabber" command="@CMAKE_INSTALL_PREFIX@/bin/mcabber"
-diff -r 19a36ac5d0b5 mcabber/mcabber.pc.in.in
---- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/mcabber/mcabber.pc.in.in	Sun Jan 13 06:40:40 2013 +0200
+diff --git a/mcabber/mcabber.pc.in.in b/mcabber/mcabber.pc.in.in
+new file mode 100644
+--- /dev/null
++++ b/mcabber/mcabber.pc.in.in
 @@ -0,0 +1,14 @@
 +prefix=${CMAKE_INSTALL_PREFIX}
 +exec_prefix=$${EMPTY}{prefix}
@@ -432,3 +439,10 @@
 +Version:          @PROJECT_VERSION@
 +Libs: 
 +Cflags:           -I$${EMPTY}{includedir} @LIBOTR_CFLAGS@ @GPGME_CFLAGS@
+diff --git a/mcabber/mcabber/fifo.c b/mcabber/mcabber/fifo.c
+new file mode 120000
+--- /dev/null
++++ b/mcabber/mcabber/fifo.c
+@@ -0,0 +1,1 @@
++fifo_internal.c
+\ No newline at end of file