[Pkg-voip-commits] r8841 - in /asterisk/trunk/debian: changelog control patches/gmime-2.4 patches/series rules

tzafrir at alioth.debian.org tzafrir at alioth.debian.org
Sat Mar 26 12:58:20 UTC 2011


Author: tzafrir
Date: Sat Mar 26 12:58:19 2011
New Revision: 8841

URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=8841
Log:
* Switching to branch 1.8 (Closes: #610487, #614580, #618790, #618791).
* Patch gmime-2.4: fixes building with gmime 2.4 (Closes: #549054).
  - Requires re-generating configure script.

Added:
    asterisk/trunk/debian/patches/gmime-2.4
Modified:
    asterisk/trunk/debian/changelog
    asterisk/trunk/debian/control
    asterisk/trunk/debian/patches/series
    asterisk/trunk/debian/rules

Modified: asterisk/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk/trunk/debian/changelog?rev=8841&op=diff
==============================================================================
--- asterisk/trunk/debian/changelog (original)
+++ asterisk/trunk/debian/changelog Sat Mar 26 12:58:19 2011
@@ -1,7 +1,7 @@
-asterisk (1:1.8.3-1) unstable; urgency=low
-
-  [ Tzafrir Cohen ]
-  * Switching to branch 1.8.
+asterisk (1:1.8.3.2-1) unstable; urgency=high
+
+  [ Tzafrir Cohen ]
+  * Switching to branch 1.8 (Closes: #610487, #614580, #618790, #618791).
   * Patch parser-mangles-include dropped: merged upstream.
   * Patch dahdi-fxsks-hookstate dropped: merged upstream.
   * Patch dahdi_ptmp_nt dropped: silly hack no longer needed.
@@ -24,12 +24,14 @@
     - Patch enable_addons: do build those modules.
     - Also app_saycountpl, which will go into the mian package.
     - Patch mpglib: mpglib from asterisk-addons, originally.
+  * Patch gmime-2.4: fixes building with gmime 2.4 (Closes: #549054).
+    - Requires re-generating configure script.
 
   [ Paul Belanger ]
   * Depend on libneon27-dev and libical-dev for calendar support.
   * Depend on libsrtp0-dev for SRTP support.
 
- -- Tzafrir Cohen <tzafrir at debian.org>  Mon, 07 Mar 2011 17:34:35 +0200
+ -- Tzafrir Cohen <tzafrir at debian.org>  Sat, 26 Mar 2011 13:41:36 +0200
 
 asterisk (1:1.6.2.9-2) unstable; urgency=high
 

Modified: asterisk/trunk/debian/control
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk/trunk/debian/control?rev=8841&op=diff
==============================================================================
--- asterisk/trunk/debian/control (original)
+++ asterisk/trunk/debian/control Sat Mar 26 12:58:19 2011
@@ -20,6 +20,8 @@
  libvpb-dev,
  dahdi-source,
  autotools-dev,
+ autoconf,
+ automake,
  libnewt-dev,
  libsqlite0-dev | libsqlite-dev,
  libspeex-dev,
@@ -36,7 +38,7 @@
  libvorbis-dev,
  libsnmp-dev,
  libc-client2007e-dev | libc-client2007b-dev,
- libgmime-2.0-2-dev | libgmime2-dev,
+ libgmime-2.4-dev | libgmime2-dev,
  libjack-dev,
  liblua5.1-0-dev,
  libcap-dev (>= 1:2.16-4) | libcap2-dev,

Added: asterisk/trunk/debian/patches/gmime-2.4
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk/trunk/debian/patches/gmime-2.4?rev=8841&op=file
==============================================================================
--- asterisk/trunk/debian/patches/gmime-2.4 (added)
+++ asterisk/trunk/debian/patches/gmime-2.4 Sat Mar 26 12:58:19 2011
@@ -1,0 +1,120 @@
+Author: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
+Bug: https://issues.asterisk.org/view.php?id=18863
+Bug-Debian: http://bugs.debian.org/549054
+Subject: support for gmime 2.4
+
+* Support detecting newer gmime versions (up to 2.4) that use pkg-config.
+* Allow building res_http_post.c with newer versions.
+* Detecting version is done through a specific constant. Can't think of
+  a simpler build-time test.
+
+---
+ configure           |  919 +++++++++++++++++++++++----------------------------
+ configure.ac        |   21 +-
+ res/res_http_post.c |   19 +
+ 3 files changed, 448 insertions(+), 511 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 889586a..892d158 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1995,18 +1995,17 @@ fi
+ AST_EXT_TOOL_CHECK([GMIME], [gmime-config], [], [], [#include <gmime/gmime.h>], [gboolean q = g_mime_check_version(0,0,0);])
+ if test "x${PBX_GMIME}" = "x0"; then
+ 	# Later versions of GMime use pkg-config
+-	if test "x${PKGCONFIG}" = xNo; then :; else
+-		GMIME_INCLUDE=$(${PKGCONFIG} gmime-2.0 --cflags 2>/dev/null)
+-		GMIME_LIB=$(${PKGCONFIG} gmime-2.0 --libs)
+-		if test "x${GMIME_INCLUDE}${GMIME_LIB}" = "x"; then 
+-			GMIME_INCLUDE=$(${PKGCONFIG} gmime-2.2 --cflags 2>/dev/null)
+-			GMIME_LIB=$(${PKGCONFIG} gmime-2.2 --libs)
++	for ver in 2.0 2.2 2.4; do
++		if ! ${PKGCONFIG} --exists gmime-$ver; then
++			continue
+ 		fi
+-		if test "x${GMIME_INCLUDE}${GMIME_LIB}" != "x"; then
+-			PBX_GMIME=1
+-			AC_DEFINE([HAVE_GMIME], 1, [Define if your system has the GMIME libraries.])
+-		fi
+-	fi
++		# If we got here, we have this version:
++		GMIME_INCLUDE=$(${PKGCONFIG} gmime-$ver --cflags 2>/dev/null)
++		GMIME_LIB=$(${PKGCONFIG} gmime-$ver --libs)
++		PBX_GMIME=1
++		AC_DEFINE([HAVE_GMIME], 1, [Define if your system has the GMIME libraries.])
++		break;
++	done
+ fi
+ 
+ AST_EXT_LIB_CHECK([HOARD], [hoard], [malloc], [])
+diff --git a/res/res_http_post.c b/res/res_http_post.c
+index 5fff5d8..268db01 100644
+--- a/res/res_http_post.c
++++ b/res/res_http_post.c
+@@ -52,6 +52,11 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+ 
+ #define MAX_PREFIX 80
+ 
++/* gmime 2.4 provides a newer interface. */
++#ifdef GMIME_TYPE_CONTENT_TYPE
++#define AST_GMIME_VER_24
++#endif
++
+ /* just a little structure to hold callback info for gmime */
+ struct mime_cbinfo {
+ 	int count;
+@@ -84,7 +89,9 @@ static void post_raw(GMimePart *part, const char *post_dir, const char *fn)
+ 	g_mime_data_wrapper_write_to_stream(content, stream);
+ 	g_mime_stream_flush(stream);
+ 
++#ifndef AST_GMIME_VER_24
+ 	g_object_unref(content);
++#endif
+ 	g_object_unref(stream);
+ }
+ 
+@@ -108,7 +115,11 @@ static GMimeMessage *parse_message(FILE *f)
+ 	return message;
+ }
+ 
++#ifdef AST_GMIME_VER_24
++static void process_message_callback(GMimeObject *parent, GMimeObject *part, gpointer user_data)
++#else
+ static void process_message_callback(GMimeObject *part, gpointer user_data)
++#endif
+ {
+ 	struct mime_cbinfo *cbinfo = user_data;
+ 
+@@ -122,6 +133,7 @@ static void process_message_callback(GMimeObject *part, gpointer user_data)
+ 		ast_log(LOG_WARNING, "Got unexpected GMIME_IS_MESSAGE_PARTIAL\n");
+ 		return;
+ 	} else if (GMIME_IS_MULTIPART(part)) {
++#ifndef AST_GMIME_VER_24
+ 		GList *l;
+ 		
+ 		ast_log(LOG_WARNING, "Got unexpected GMIME_IS_MULTIPART, trying to process subparts\n");
+@@ -130,6 +142,9 @@ static void process_message_callback(GMimeObject *part, gpointer user_data)
+ 			process_message_callback(l->data, cbinfo);
+ 			l = l->next;
+ 		}
++#else
++		ast_log(LOG_WARNING, "Got unexpected MIME subpart.\n");
++#endif
+ 	} else if (GMIME_IS_PART(part)) {
+ 		const char *filename;
+ 
+@@ -151,7 +166,11 @@ static int process_message(GMimeMessage *message, const char *post_dir)
+ 		.post_dir = post_dir,
+ 	};
+ 
++#ifdef AST_GMIME_VER_24
++	g_mime_message_foreach(message, process_message_callback, &cbinfo);
++#else
+ 	g_mime_message_foreach_part(message, process_message_callback, &cbinfo);
++#endif
+ 
+ 	return cbinfo.count;
+ }
+-- 
+1.7.4.1
+

Modified: asterisk/trunk/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk/trunk/debian/patches/series?rev=8841&op=diff
==============================================================================
--- asterisk/trunk/debian/patches/series (original)
+++ asterisk/trunk/debian/patches/series Sat Mar 26 12:58:19 2011
@@ -18,3 +18,4 @@
 h323-extra-target
 mpglib
 enable_addons
+gmime-2.4

Modified: asterisk/trunk/debian/rules
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk/trunk/debian/rules?rev=8841&op=diff
==============================================================================
--- asterisk/trunk/debian/rules (original)
+++ asterisk/trunk/debian/rules Sat Mar 26 12:58:19 2011
@@ -48,7 +48,11 @@
 # fetch script that always returns an error.
 FETCH_ENV = PATH=$$PATH:$(CURDIR)/debian/dummyprogs
 
-config.status:
+configure: configure.ac
+	if [ ! -f configure_deborig ]; then mv configure configure_deborig; fi
+	./bootstrap.sh
+
+config.status: configure
 	dh_testdir
 
 	[ -f .version.debian_sav ] || cp -a .version .version.debian_sav
@@ -100,6 +104,7 @@
 	-$(RM) -f config.status menuselect.makeopts
 
 	[ ! -f .version.debian_sav ] || mv .version.debian_sav .version
+	if [ -f configure_deborig ]; then mv configure_deborig configure; fi
 
 	# these were generated while building
 	-$(RM) -f doc/core-en_US.xml utils/poll.c




More information about the Pkg-voip-commits mailing list