[arch-commits] CVS update of extra/multimedia/bmpx (3 files)

Eric Belanger eric at archlinux.org
Tue Mar 18 06:42:15 UTC 2008


    Date: Tuesday, March 18, 2008 @ 02:42:15
  Author: eric
    Path: /home/cvs-extra/extra/multimedia/bmpx

   Added: bmpx-gcc34.diff (1.1) bmpx-libsoup24.patch (1.1)
Modified: PKGBUILD (1.21 -> 1.22)

upgpkg: bmpx 0.40.13-2
    rebuilt against libsoup 2.4, patched for libsoup 2.4 and gcc 4.3, updated url, added perlxml makedepends, disabled SMP build


----------------------+
 PKGBUILD             |   19 -
 bmpx-gcc34.diff      |  175 +++++++++++++++
 bmpx-libsoup24.patch |  544 +++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 730 insertions(+), 8 deletions(-)


Index: extra/multimedia/bmpx/PKGBUILD
diff -u extra/multimedia/bmpx/PKGBUILD:1.21 extra/multimedia/bmpx/PKGBUILD:1.22
--- extra/multimedia/bmpx/PKGBUILD:1.21	Sat Oct 20 15:40:54 2007
+++ extra/multimedia/bmpx/PKGBUILD	Tue Mar 18 02:42:14 2008
@@ -1,27 +1,30 @@
-# $Id: PKGBUILD,v 1.21 2007/10/20 19:40:54 kevin Exp $
+# $Id: PKGBUILD,v 1.22 2008/03/18 06:42:14 eric Exp $
 # Maintainer: kevin <kevin at archlinux.org>
 # Contributor: alzen <mynick2(at)gmail(dot)com>
 
 pkgname=bmpx
 pkgver=0.40.13
-pkgrel=1
+pkgrel=2
 pkgdesc="A media player and the successor to BMP"
 arch=(i686 x86_64)
-url="http://beep-media-player.org/"
+url="http://bmpx.backtrace.info/site/BMPx_Homepage"
 depends=('boost' 'fam' 'gstreamer0.10-alsa' 'gstreamer0.10-cdparanoia'
 	'gstreamer0.10-good' 'gstreamer0.10-vorbis' 'hal' 'libglademm' 'libofa'
-	'librsvg' 'libsexymm' 'libsoup' 'sqlite3' 'startup-notification>=0.8'
+	'librsvg' 'libsexymm' 'libsoup>=2.4.0' 'sqlite3' 'startup-notification>=0.8'
 	'taglib')
 # 0.40.0: bmpx provide their own neon and musicbrainz implementation.
-makedepends=('bison' 'flex' 'pkgconfig')
-options=('!libtool')
+makedepends=('bison' 'flex' 'pkgconfig' 'perlxml')
+options=('!libtool' '!makeflags')
 license=('GPL' 'custom')
 install=bmpx.install
-source=(http://files.beep-media-player.org/releases/0.40/${pkgname}-${pkgver}.tar.bz2)
-md5sums=('11da3d4c63e77dc15a53d0c6c25ddadb')
+source=( http://files.backtrace.info/releases/${pkgver%.*}/${pkgname}-${pkgver}.tar.bz2 bmpx-libsoup24.patch bmpx-gcc34.diff)
+md5sums=('11da3d4c63e77dc15a53d0c6c25ddadb' 'ef433f8b306b5d9e7d3f71dade83b751'\
+         'ac2032eef21102d078b4b03f99af17a6')
 
 build() {
   cd ${startdir}/src/${pkgname}-${pkgver}
+  patch -Np1 < ../bmpx-libsoup24.patch || return 1
+  patch -Np1 < ../bmpx-gcc34.diff || return 1
   ./configure --prefix=/usr --enable-amazon --libexecdir=/usr/lib/bmpx
   sed -e '/BUILD_BUILDUSER/ s@".*"@"http://www.archlinux.org"@' -i build.h
   make || return 1
Index: extra/multimedia/bmpx/bmpx-gcc34.diff
diff -u /dev/null extra/multimedia/bmpx/bmpx-gcc34.diff:1.1
--- /dev/null	Tue Mar 18 02:42:15 2008
+++ extra/multimedia/bmpx/bmpx-gcc34.diff	Tue Mar 18 02:42:15 2008
@@ -0,0 +1,175 @@
+diff -Naur bmpx-0.40.13-orig/json/json_reader.cpp bmpx-0.40.13/json/json_reader.cpp
+--- bmpx-0.40.13-orig/json/json_reader.cpp	2007-10-18 13:17:09.000000000 -0400
++++ bmpx-0.40.13/json/json_reader.cpp	2008-03-17 21:34:10.000000000 -0400
+@@ -5,6 +5,7 @@
+ #include <assert.h>
+ #include <iostream>
+ #include <stdexcept>
++#include <cstring>
+ 
+ #if _MSC_VER >= 1400 // VC++ 8.0
+ #pragma warning( disable : 4996 )   // disable warning about strdup being deprecated.
+diff -Naur bmpx-0.40.13-orig/json/json_value.cpp bmpx-0.40.13/json/json_value.cpp
+--- bmpx-0.40.13-orig/json/json_value.cpp	2007-10-18 13:17:09.000000000 -0400
++++ bmpx-0.40.13/json/json_value.cpp	2008-03-17 21:35:23.000000000 -0400
+@@ -3,6 +3,7 @@
+ #include <json/writer.h>
+ #include <utility>
+ #include <stdexcept>
++#include <cstring>
+ #include "assert.h"
+ #ifdef JSON_USE_CPPTL
+ # include <cpptl/conststring.h>
+diff -Naur bmpx-0.40.13-orig/json/json_writer.cpp bmpx-0.40.13/json/json_writer.cpp
+--- bmpx-0.40.13-orig/json/json_writer.cpp	2007-10-18 13:17:09.000000000 -0400
++++ bmpx-0.40.13/json/json_writer.cpp	2008-03-17 21:35:44.000000000 -0400
+@@ -3,6 +3,7 @@
+ #include <assert.h>
+ #include <stdio.h>
+ #include <iostream>
++#include <cstring>
+ 
+ #if _MSC_VER >= 1400 // VC++ 8.0
+ #pragma warning( disable : 4996 )   // disable warning about strdup being deprecated.
+diff -Naur bmpx-0.40.13-orig/libhal++/util.cc bmpx-0.40.13/libhal++/util.cc
+--- bmpx-0.40.13-orig/libhal++/util.cc	2007-10-18 13:17:21.000000000 -0400
++++ bmpx-0.40.13/libhal++/util.cc	2008-03-17 21:37:01.000000000 -0400
+@@ -1,6 +1,6 @@
+ #include <string>
+ #include <cstring>
+-
++#include <cstdlib>
+ #include "types.hh"
+ 
+ namespace Hal
+diff -Naur bmpx-0.40.13-orig/plugins/vfs/container/libcontainer_folder.cc bmpx-0.40.13/plugins/vfs/container/libcontainer_folder.cc
+--- bmpx-0.40.13-orig/plugins/vfs/container/libcontainer_folder.cc	2007-10-18 13:17:14.000000000 -0400
++++ bmpx-0.40.13/plugins/vfs/container/libcontainer_folder.cc	2008-03-17 21:38:50.000000000 -0400
+@@ -23,6 +23,7 @@
+ //  BMPx is covered by.
+ 
+ #include <glibmm.h>
++#include <cstring>
+ 
+ // BMP Audio
+ #include "src/audio/audio.hh"
+diff -Naur bmpx-0.40.13-orig/plugins/vfs/container/libcontainer_m3u.cc bmpx-0.40.13/plugins/vfs/container/libcontainer_m3u.cc
+--- bmpx-0.40.13-orig/plugins/vfs/container/libcontainer_m3u.cc	2007-10-18 13:17:14.000000000 -0400
++++ bmpx-0.40.13/plugins/vfs/container/libcontainer_m3u.cc	2008-03-17 21:39:21.000000000 -0400
+@@ -23,6 +23,7 @@
+ 
+ #include <glibmm.h>
+ #include <glibmm/i18n.h>
++#include <cstring>
+ 
+ #include "src/database.hh"
+ #include "src/uri.hh"
+diff -Naur bmpx-0.40.13-orig/plugins/vfs/container/libcontainer_xspf.cc bmpx-0.40.13/plugins/vfs/container/libcontainer_xspf.cc
+--- bmpx-0.40.13-orig/plugins/vfs/container/libcontainer_xspf.cc	2007-10-18 13:17:14.000000000 -0400
++++ bmpx-0.40.13/plugins/vfs/container/libcontainer_xspf.cc	2008-03-17 21:41:39.000000000 -0400
+@@ -27,6 +27,7 @@
+ 
+ #include <glibmm.h>
+ #include <glibmm/i18n.h>
++#include <cstring>
+ 
+ #include <boost/optional.hpp>
+ #include <boost/format.hpp>
+diff -Naur bmpx-0.40.13-orig/src/hal.hh bmpx-0.40.13/src/hal.hh
+--- bmpx-0.40.13-orig/src/hal.hh	2007-10-18 13:17:08.000000000 -0400
++++ bmpx-0.40.13/src/hal.hh	2008-03-18 00:11:05.000000000 -0400
+@@ -32,6 +32,7 @@
+ #include <string>
+ #include <map>
+ #include <vector>
++#include <ctime>
+ 
+ #include <glib/gtypes.h>
+ #include <glibmm/ustring.h>
+@@ -169,7 +170,7 @@
+ 
+         void  device_condition            (std::string const& udi,
+                                            std::string const& cond_name,
+-                                           std::string const& cond_name );
++                                           std::string const& cond_details );
+         void  device_added                (std::string const& udi );
+         void  device_removed              (std::string const& udi );
+         void  device_property             (std::string const& udi,
+diff -Naur bmpx-0.40.13-orig/src/minisoup.cc bmpx-0.40.13/src/minisoup.cc
+--- bmpx-0.40.13-orig/src/minisoup.cc	2007-10-18 13:17:08.000000000 -0400
++++ bmpx-0.40.13/src/minisoup.cc	2008-03-18 01:18:11.000000000 -0400
+@@ -28,6 +28,7 @@
+ 
+ #include <glib/gstdio.h>
+ #include <glibmm/i18n.h>
++#include <cstring>
+ #include <boost/format.hpp>
+ #include "debug.hh"
+ #include "minisoup.hh"
+diff -Naur bmpx-0.40.13-orig/src/parser/libxml2-sax-base.cc bmpx-0.40.13/src/parser/libxml2-sax-base.cc
+--- bmpx-0.40.13-orig/src/parser/libxml2-sax-base.cc	2007-10-18 13:17:06.000000000 -0400
++++ bmpx-0.40.13/src/parser/libxml2-sax-base.cc	2008-03-17 23:36:34.000000000 -0400
+@@ -28,6 +28,7 @@
+ 
+ #include <libxml/parser.h>
+ #include <glibmm.h>
++#include <cstring>
+ 
+ using namespace Glib;
+ using namespace std;
+diff -Naur bmpx-0.40.13-orig/src/sanity.cc bmpx-0.40.13/src/sanity.cc
+--- bmpx-0.40.13-orig/src/sanity.cc	2007-10-18 13:17:08.000000000 -0400
++++ bmpx-0.40.13/src/sanity.cc	2008-03-17 23:44:47.000000000 -0400
+@@ -69,7 +69,7 @@
+ }
+ 
+ C_FUNCTION
+-gchar *
++const gchar *
+ sanity_check_gtk (void)
+ {
+   return gtk_check_version (GTK_REQUIRED_MAJOR_VER,
+diff -Naur bmpx-0.40.13-orig/src/streams-shoutcast.cc bmpx-0.40.13/src/streams-shoutcast.cc
+--- bmpx-0.40.13-orig/src/streams-shoutcast.cc	2007-10-18 13:17:08.000000000 -0400
++++ bmpx-0.40.13/src/streams-shoutcast.cc	2008-03-18 00:03:38.000000000 -0400
+@@ -27,6 +27,7 @@
+ 
+ #include <iostream>
+ #include <sstream>
++#include <cstring>
+ 
+ #include <glibmm.h>
+ #include <glibmm/markup.h>
+diff -Naur bmpx-0.40.13-orig/src/vfs.hh bmpx-0.40.13/src/vfs.hh
+--- bmpx-0.40.13-orig/src/vfs.hh	2007-10-18 13:17:08.000000000 -0400
++++ bmpx-0.40.13/src/vfs.hh	2008-03-17 23:34:57.000000000 -0400
+@@ -25,6 +25,7 @@
+ #define BMP_VFS_HH
+ 
+ #include <iostream>
++#include <cstring>
+ #include <sstream>
+ #include <glibmm.h>
+ #include <boost/shared_ptr.hpp>
+diff -Naur bmpx-0.40.13-orig/src/video-widget.cc bmpx-0.40.13/src/video-widget.cc
+--- bmpx-0.40.13-orig/src/video-widget.cc	2007-10-18 13:17:08.000000000 -0400
++++ bmpx-0.40.13/src/video-widget.cc	2008-03-18 00:04:38.000000000 -0400
+@@ -23,6 +23,7 @@
+ //  BMPx is covered by.
+ 
+ #include <gtkmm.h>
++#include <cstring>
+ #include "video-widget.hh"
+ #include "audio/play.hh"
+ #include <gst/video/video.h>
+diff -Naur bmpx-0.40.13-orig/src/xds.cc bmpx-0.40.13/src/xds.cc
+--- bmpx-0.40.13-orig/src/xds.cc	2007-10-18 13:17:08.000000000 -0400
++++ bmpx-0.40.13/src/xds.cc	2008-03-17 23:59:04.000000000 -0400
+@@ -23,6 +23,7 @@
+ //  BMPx is covered by.
+ 
+ #include <gtkmm.h>
++#include <cstring>
+ #include "xds.hh"
+ #define MAX_URI_LEN 4096
+ 
Index: extra/multimedia/bmpx/bmpx-libsoup24.patch
diff -u /dev/null extra/multimedia/bmpx/bmpx-libsoup24.patch:1.1
--- /dev/null	Tue Mar 18 02:42:15 2008
+++ extra/multimedia/bmpx/bmpx-libsoup24.patch	Tue Mar 18 02:42:15 2008
@@ -0,0 +1,544 @@
+diff -up bmpx-0.40.13/configure.ac.libsoup24 bmpx-0.40.13/configure.ac
+--- bmpx-0.40.13/configure.ac.libsoup24	2007-10-18 19:17:17.000000000 +0200
++++ bmpx-0.40.13/configure.ac	2008-02-15 20:26:58.000000000 +0100
+@@ -240,8 +240,7 @@ AC_ARG_WITH([pkgconfig-dir],
+ AC_SUBST([pkgconfigdir])
+ 
+ # libsoup
+-PKG_CHECK_MODULES([SOUP], [libsoup-2.2 >= 2.2.100])
+-BMP_CHECK_SOUP_EXTERN_C
++PKG_CHECK_MODULES([SOUP], [libsoup-2.4 >= 2.3.0.1])
+ 
+ # sqlite
+ PKG_CHECK_MODULES([SQLITE], [sqlite3 >= 3.3])
+diff -up bmpx-0.40.13/sentinel/beep-media-player-2-sentinel.cc.libsoup24 bmpx-0.40.13/sentinel/beep-media-player-2-sentinel.cc
+--- bmpx-0.40.13/sentinel/beep-media-player-2-sentinel.cc.libsoup24	2007-10-18 19:17:06.000000000 +0200
++++ bmpx-0.40.13/sentinel/beep-media-player-2-sentinel.cc	2008-02-15 20:26:58.000000000 +0100
+@@ -68,13 +68,7 @@
+ #include <bmp/dbus.hh>
+ #include <src/paths.hh>
+ 
+-#ifndef LIBSOUP_HAS_EXTERN_C
+-G_BEGIN_DECLS
+-#endif
+ #include <libsoup/soup.h>
+-#ifndef LIBSOUP_HAS_EXTERN_C
+-G_END_DECLS
+-#endif
+ 
+ #define SERVER_NAME "beep-media-player.org"
+ 
+diff -up bmpx-0.40.13/src/minisoup.hh.libsoup24 bmpx-0.40.13/src/minisoup.hh
+--- bmpx-0.40.13/src/minisoup.hh.libsoup24	2007-10-18 19:17:08.000000000 +0200
++++ bmpx-0.40.13/src/minisoup.hh	2008-02-15 20:26:58.000000000 +0100
+@@ -33,13 +33,7 @@
+ #include <iostream>
+ #include <fstream>
+ 
+-#ifndef LIBSOUP_HAS_EXTERN_C
+-G_BEGIN_DECLS
+-# include <libsoup/soup.h>
+-G_END_DECLS
+-#else
+-# include <libsoup/soup.h>
+-#endif // !LIBSOUP_HAS_EXTERN_C
++#include <libsoup/soup.h>
+ 
+ namespace Bmp
+ {
+@@ -111,7 +105,7 @@ namespace Bmp
+         restarted (SoupMessage* /*message*/, gpointer /*data*/);
+ 
+         static void
+-        got_chunk (SoupMessage* /*message*/, gpointer /*data*/);
++        got_chunk (SoupMessage* /*message*/, SoupBuffer* /*chunk*/, gpointer /*data*/);
+ 
+         static void
+         got_content_length (SoupMessage* /*message*/, gpointer /*data*/);
+@@ -161,7 +155,7 @@ namespace Bmp
+         restarted (SoupMessage* /*message*/, gpointer /*data*/);
+ 
+         static void
+-        got_answer (SoupMessage* /*message*/, gpointer /*data*/);
++        got_answer (SoupSession* /*session*/, SoupMessage* /*message*/, gpointer /*data*/);
+     };
+ 
+ 
+@@ -224,10 +218,10 @@ namespace Bmp
+         restarted (SoupMessage* /*message*/, gpointer /*data*/);
+ 
+         static void
+-        got_answer (SoupMessage* /*message*/, gpointer /*data*/);
++        got_answer (SoupSession* /*session*/, SoupMessage* /*message*/, gpointer /*data*/);
+                    
+         static void
+-        got_chunk (SoupMessage* /*message*/, gpointer /*data*/);
++        got_chunk (SoupMessage* /*message*/, SoupBuffer* /*chunk*/, gpointer /*data*/);
+ 
+         static void
+         got_content_length (SoupMessage* /*message*/, gpointer /*data*/);
+diff -up bmpx-0.40.13/src/minisoup.cc.libsoup24 bmpx-0.40.13/src/minisoup.cc
+--- bmpx-0.40.13/src/minisoup.cc.libsoup24	2007-10-18 19:17:08.000000000 +0200
++++ bmpx-0.40.13/src/minisoup.cc	2008-02-15 20:26:58.000000000 +0100
+@@ -60,8 +60,8 @@ namespace Bmp
+     {
+       g_signal_connect (G_OBJECT (m_message), "got-chunk", G_CALLBACK (got_chunk), this);
+       g_signal_connect (G_OBJECT (m_message), "restarted", G_CALLBACK (restarted), this);
+-      soup_message_add_header_handler (m_message, "content-length", SOUP_HANDLER_PRE_BODY,
+-                                       SoupMessageCallbackFn (got_content_length), this);
++      soup_message_add_header_handler (m_message, "got-headers", "content-length",
++                                       G_CALLBACK (got_content_length), this);
+       return soup_session_send_message (m_session, m_message);
+     }
+   
+@@ -75,26 +75,26 @@ namespace Bmp
+     RequestSync::get_data ()
+     {
+       std::string buffer;
+-      buffer.append (m_message->response.body, m_message->response.length);
++      buffer.append (m_message->response_body->data, m_message->response_body->length);
+       return buffer;
+     }
+ 
+     void
+     RequestSync::get_data (std::string & buffer)
+     {
+-      buffer.append (m_message->response.body, m_message->response.length);
++      buffer.append (m_message->response_body->data, m_message->response_body->length);
+     }
+ 
+     char const*
+     RequestSync::get_data_raw ()
+     {
+-      return m_message->response.body;
++      return m_message->response_body->data;
+     }
+ 
+     guint
+     RequestSync::get_data_size ()
+     {
+-      return m_message->response.length;
++      return m_message->response_body->length;
+     }
+ 
+ 
+@@ -102,15 +102,15 @@ namespace Bmp
+     RequestSync::add_header (std::string const& name,
+                              std::string const& value) 
+     {
+-      soup_message_add_header (m_message->request_headers, name.c_str(), value.c_str());   
++      soup_message_headers_append (m_message->request_headers, name.c_str(), value.c_str());   
+     }
+ 
+     void
+     RequestSync::add_request (std::string const& type,
+                               std::string const& request)
+     {
+-      soup_message_set_request (m_message, type.c_str(), SOUP_BUFFER_SYSTEM_OWNED /* we can't rely on the std::string not being destroyed */,
+-        g_strdup (const_cast<char*>(request.c_str())), strlen (request.c_str()));
++      soup_message_set_request (m_message, type.c_str(), SOUP_MEMORY_COPY,
++        request.c_str(), strlen (request.c_str()));
+       m_post = true;
+     }
+ 
+@@ -125,11 +125,11 @@ namespace Bmp
+     }
+ 
+     void
+-    RequestSync::got_chunk (SoupMessage* message, gpointer data)
++    RequestSync::got_chunk (SoupMessage* message, SoupBuffer* chunk, gpointer data)
+     {
+       RequestSync & request = (*(reinterpret_cast<RequestSync*>(data)));
+ 
+-      request.m_read += message->response.length;
++      request.m_read += chunk->length;
+       double percent = (double (request.m_read) / double (request.m_size));
+       if(percent >= 0. && percent <= 1.)
+       {
+@@ -141,7 +141,7 @@ namespace Bmp
+     RequestSync::got_content_length (SoupMessage* message, gpointer data)
+     {
+       RequestSync & request = (*(reinterpret_cast<RequestSync*>(data)));
+-      request.m_size = g_ascii_strtoull (soup_message_get_header (message->response_headers, "content-length"), NULL, 10);
++      request.m_size = soup_message_headers_get_content_length (message->response_headers);
+     }
+ 
+ 
+@@ -180,17 +180,17 @@ namespace Bmp
+       return m_message->status_code;
+     }
+ 
+-    guint
+-    Request::message_status ()
+-    {
+-      return m_message->status;
+-    }
++    //guint
++    //Request::message_status ()
++    //{
++    //  return m_message->status;
++    //}
+ 
+     void
+     Request::run ()
+     {
+       g_signal_connect (G_OBJECT (m_message), "restarted", G_CALLBACK (restarted), this);
+-      soup_session_queue_message (m_session, m_message, SoupMessageCallbackFn (got_answer), this);
++      soup_session_queue_message (m_session, m_message, SoupSessionCallback (got_answer), this);
+     }
+ 
+     void
+@@ -199,9 +199,6 @@ namespace Bmp
+       if (G_IS_OBJECT(m_session))
+       {
+             soup_session_abort (m_session);
+-            //soup_message_set_status (m_message, SOUP_STATUS_CANCELLED);
+-            //soup_session_cancel_message (m_session, m_message);
+-            //m_message = 0;
+       }
+     }
+ 
+@@ -210,15 +207,15 @@ namespace Bmp
+     Request::add_header (std::string const& name,
+                          std::string const& value) 
+     {
+-      soup_message_add_header (m_message->request_headers, name.c_str(), value.c_str());   
++      soup_message_headers_append (m_message->request_headers, name.c_str(), value.c_str());   
+     }
+ 
+     void
+     Request::add_request (std::string const& type,
+                           std::string const& request)
+     {
+-      soup_message_set_request (m_message, type.c_str(), SOUP_BUFFER_SYSTEM_OWNED /* we can't rely on the std::string not being destroyed */,
+-        g_strdup (const_cast<char*>(request.c_str())), strlen (request.c_str()));
++      soup_message_set_request (m_message, type.c_str(), SOUP_MEMORY_COPY,
++        request.c_str(), strlen (request.c_str()));
+       m_post = true;
+     }
+ 
+@@ -230,7 +227,7 @@ namespace Bmp
+     }
+ 
+     void
+-    Request::got_answer (SoupMessage* message, gpointer data)
++    Request::got_answer (SoupSession* session, SoupMessage* message, gpointer data)
+     {
+       Request & request = (*(reinterpret_cast<Request*>(data)));
+ 
+@@ -241,15 +238,12 @@ namespace Bmp
+       if( block )
+         return;
+ 
+-      if( request.m_message->status != SOUP_MESSAGE_STATUS_FINISHED )
+-        return;
+-
+       //if( request.m_message->status_code == SOUP_STATUS_CANCELLED )
+         //return;
+ 
+       request.Signals.Callback.emit(
+-                                      request.m_message->response.body, 
+-                                      request.m_message->response.length,
++                                      request.m_message->response_body->data, 
++                                      request.m_message->response_body->length,
+                                       request.m_message->status_code
+                                     );
+     }
+@@ -269,6 +263,7 @@ namespace Bmp
+ 
+       m_session = soup_session_async_new ();
+       m_message = soup_message_new ("GET", m_url.c_str());
++      soup_message_set_flags (m_message, SOUP_MESSAGE_OVERWRITE_CHUNKS);
+     }
+ 
+     Glib::RefPtr<RequestFile>
+@@ -279,9 +274,9 @@ namespace Bmp
+ 
+     RequestFile::~RequestFile ()
+     {
+-      if (G_IS_OBJECT(m_message) && m_message->status == SOUP_MESSAGE_STATUS_RUNNING)
++      if (m_file.is_open())
+       {
+-            cancel ();
++	    cancel ();
+             Signals.Aborted.emit ((boost::format (_("Download of file '%s' was cancelled prematurely!")) % filename_to_utf8 (m_filename).c_str()).str());
+       }
+       g_object_unref (m_session);
+@@ -316,9 +311,9 @@ namespace Bmp
+     {
+       g_signal_connect (G_OBJECT (m_message), "got-chunk", G_CALLBACK (got_chunk), this);
+       g_signal_connect (G_OBJECT (m_message), "restarted", G_CALLBACK (restarted), this);
+-      soup_message_add_header_handler (m_message, "content-length", SOUP_HANDLER_PRE_BODY,
+-                                       SoupMessageCallbackFn (got_content_length), this);
+-      soup_session_queue_message (m_session, m_message, SoupMessageCallbackFn (got_answer), this);
++      soup_message_add_header_handler (m_message, "got-headers", "content-length",
++                                       G_CALLBACK (got_content_length), this);
++      soup_session_queue_message (m_session, m_message, SoupSessionCallback (got_answer), this);
+       fileOpen ();
+     }
+ 
+@@ -327,8 +322,7 @@ namespace Bmp
+     {
+       if (G_IS_OBJECT(m_message))
+       {
+-            soup_message_set_status (m_message, SOUP_STATUS_CANCELLED);
+-            soup_session_cancel_message (m_session, m_message);
++            soup_session_cancel_message (m_session, m_message, SOUP_STATUS_CANCELLED);
+             m_message = 0;
+       }
+       
+@@ -340,7 +334,7 @@ namespace Bmp
+     RequestFile::add_header (std::string const& name,
+                              std::string const& value) 
+     {
+-      soup_message_add_header (m_message->request_headers, name.c_str(), value.c_str());   
++      soup_message_headers_append (m_message->request_headers, name.c_str(), value.c_str());   
+     }
+ 
+ 
+@@ -356,7 +350,7 @@ namespace Bmp
+     }
+ 
+     void
+-    RequestFile::got_answer (SoupMessage* message, gpointer data)
++    RequestFile::got_answer (SoupSession* session, SoupMessage* message, gpointer data)
+     {
+       RequestFile & request = (*(reinterpret_cast<RequestFile*>(data)));
+       
+@@ -368,25 +362,22 @@ namespace Bmp
+         return;
+       }
+ 
+-      if( request.m_message->status != SOUP_MESSAGE_STATUS_FINISHED )
+-        return;
+-
+       if( request.m_message->status_code == SOUP_STATUS_CANCELLED)
+         return;
+ 
+-      debug("soup","%s: status: %d, status_code: %d", G_STRLOC, request.m_message->status, request.m_message->status_code);
++      debug("soup","%s: status_code: %d", G_STRLOC, request.m_message->status_code);
+       
+       request.fileClose ();
+       request.Signals.Done.emit (request.m_filename);
+     }
+ 
+     void
+-    RequestFile::got_chunk (SoupMessage* message, gpointer data)
++    RequestFile::got_chunk (SoupMessage* message, SoupBuffer* chunk, gpointer data)
+     {
+       RequestFile & request = (*(reinterpret_cast<RequestFile*>(data)));
+ 
+-      request.m_file.write (message->response.body, message->response.length);
+-      request.m_read += message->response.length;
++      request.m_file.write (chunk->data, chunk->length);
++      request.m_read += chunk->length;
+ 
+       double percent = (double (request.m_read) / double (request.m_size));
+       if(percent >= 0. && percent <= 1.)
+@@ -399,7 +390,7 @@ namespace Bmp
+     RequestFile::got_content_length (SoupMessage* message, gpointer data)
+     {
+       RequestFile & request = (*(reinterpret_cast<RequestFile*>(data)));
+-      request.m_size = g_ascii_strtoull (soup_message_get_header (message->response_headers, "content-length"), NULL, 10);
++      request.m_size = soup_message_headers_get_content_length (message->response_headers);
+     }
+   }
+ }
+diff -up bmpx-0.40.13/README.libsoup24 bmpx-0.40.13/README
+--- bmpx-0.40.13/README.libsoup24	2007-10-18 19:17:17.000000000 +0200
++++ bmpx-0.40.13/README	2008-02-15 20:26:58.000000000 +0100
+@@ -16,7 +16,7 @@ Requirements:
+   * libglademm-2.4          >= 2.6.2
+   * libsexymm               >= 0.1.9
+   * librsvg                 >= 2.14.0
+-  * libsoup                 >= 2.2.100
++  * libsoup                 >= 2.3.0.1
+   * libofa                  >= 0.9.3
+   * sqlite                  >= 3.3.11
+   * libxml                  >= 2.6.1
+diff -up bmpx-0.40.13/configure.libsoup24 bmpx-0.40.13/configure
+--- bmpx-0.40.13/configure.libsoup24	2008-02-15 20:27:13.000000000 +0100
++++ bmpx-0.40.13/configure	2008-02-15 20:27:26.000000000 +0100
+@@ -31519,12 +31519,12 @@ echo $ECHO_N "checking for SOUP... $ECHO
+ 
+ if test -n "$PKG_CONFIG"; then
+         if test -n "$PKG_CONFIG" && \
+-    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libsoup-2.2 >= 2.2.100\"") >&5
+-  ($PKG_CONFIG --exists --print-errors "libsoup-2.2 >= 2.2.100") 2>&5
++    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libsoup-2.4 >= 2.3.0.1\"") >&5
++  ($PKG_CONFIG --exists --print-errors "libsoup-2.4 >= 2.3.0.1") 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); }; then
+-  pkg_cv_SOUP_CFLAGS=`$PKG_CONFIG --cflags "libsoup-2.2 >= 2.2.100" 2>/dev/null`
++  pkg_cv_SOUP_CFLAGS=`$PKG_CONFIG --cflags "libsoup-2.4 >= 2.3.0.1" 2>/dev/null`
+ else
+   pkg_failed=yes
+ fi
+@@ -31533,12 +31533,12 @@ else
+ fi
+ if test -n "$PKG_CONFIG"; then
+         if test -n "$PKG_CONFIG" && \
+-    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libsoup-2.2 >= 2.2.100\"") >&5
+-  ($PKG_CONFIG --exists --print-errors "libsoup-2.2 >= 2.2.100") 2>&5
++    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libsoup-2.4 >= 2.3.0.1\"") >&5
++  ($PKG_CONFIG --exists --print-errors "libsoup-2.4 >= 2.3.0.1") 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); }; then
+-  pkg_cv_SOUP_LIBS=`$PKG_CONFIG --libs "libsoup-2.2 >= 2.2.100" 2>/dev/null`
++  pkg_cv_SOUP_LIBS=`$PKG_CONFIG --libs "libsoup-2.4 >= 2.3.0.1" 2>/dev/null`
+ else
+   pkg_failed=yes
+ fi
+@@ -31547,18 +31547,18 @@ else
+ fi
+ 
+ if test $pkg_failed = yes; then
+-	SOUP_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libsoup-2.2 >= 2.2.100"`
++	SOUP_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libsoup-2.4 >= 2.3.0.1"`
+ 	# Put the nasty error message in config.log where it belongs
+ 	echo "$SOUP_PKG_ERRORS" 1>&5
+ 
+-	{ { echo "$as_me:$LINENO: error: Package requirements (libsoup-2.2 >= 2.2.100) were not met.
++	{ { echo "$as_me:$LINENO: error: Package requirements (libsoup-2.4 >= 2.3.0.1) were not met.
+ Consider adjusting the PKG_CONFIG_PATH environment variable if you
+ installed software in a non-standard prefix.
+ 
+ Alternatively you may set the SOUP_CFLAGS and SOUP_LIBS environment variables
+ to avoid the need to call pkg-config.  See the pkg-config man page for
+ more details." >&5
+-echo "$as_me: error: Package requirements (libsoup-2.2 >= 2.2.100) were not met.
++echo "$as_me: error: Package requirements (libsoup-2.4 >= 2.3.0.1) were not met.
+ Consider adjusting the PKG_CONFIG_PATH environment variable if you
+ installed software in a non-standard prefix.
+ 
+@@ -31596,90 +31596,6 @@ echo "${ECHO_T}yes" >&6; }
+ 	:
+ fi
+ 
+-	CPPFLAGS_SAVED="$CPPFLAGS"
+-	CPPFLAGS="$CPPFLAGS $SOUP_CFLAGS"
+-	export CPPFLAGS
+-
+-	LDFLAGS_SAVED="$LDFLAGS"
+-	LDFLAGS="$LDFLAGS $SOUP_LDFLAGS"
+-	export LDFLAGS
+-
+-	{ echo "$as_me:$LINENO: checking for extern in libsoup headers" >&5
+-echo $ECHO_N "checking for extern in libsoup headers... $ECHO_C" >&6; }
+-
+-	ac_ext=cpp
+-ac_cpp='$CXXCPP $CPPFLAGS'
+-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+-
+-	cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-
+-	#include <libsoup/soup.h>
+-
+-int
+-main ()
+-{
+-
+-	SoupSession * session = soup_session_sync_new ();
+-
+-  ;
+-  return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext
+-if { (ac_try="$ac_compile"
+-case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_compile") 2>conftest.er1
+-  ac_status=$?
+-  grep -v '^ *+' conftest.er1 >conftest.err
+-  rm -f conftest.er1
+-  cat conftest.err >&5
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } && {
+-	 test -z "$ac_cxx_werror_flag" ||
+-	 test ! -s conftest.err
+-       } && test -s conftest.$ac_objext; then
+-
+-	{ echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6; }
+-
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-
+-	{ echo "$as_me:$LINENO: result: yes" >&5
+-echo "${ECHO_T}yes" >&6; }
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define LIBSOUP_HAS_EXTERN_C
+-_ACEOF
+-
+-
+-fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-	ac_ext=cpp
+-ac_cpp='$CXXCPP $CPPFLAGS'
+-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+-
+-
+-	CPPFLAGS="$CPPFLAGS_SAVED"
+-	LDFLAGS="$LDFLAGS_SAVED"
+-
+-
+ # sqlite
+ 
+ pkg_failed=no
+diff -up bmpx-0.40.13/m4/soup.m4.libsoup24 bmpx-0.40.13/m4/soup.m4
+--- bmpx-0.40.13/m4/soup.m4.libsoup24	2007-10-18 19:17:06.000000000 +0200
++++ bmpx-0.40.13/m4/soup.m4	2008-02-15 20:26:58.000000000 +0100
+@@ -1,4 +1,34 @@
+ dnl -*- Mode: Autoconf; -*-
++dnl -*- Mode: Autoconf; -*-
++
++AC_DEFUN([BMP_CHECK_SOUP_EXTERN_C],
++[
++	CPPFLAGS_SAVED="$CPPFLAGS"
++	CPPFLAGS="$CPPFLAGS $SOUP_CFLAGS"
++	export CPPFLAGS
++
++	LDFLAGS_SAVED="$LDFLAGS"
++	LDFLAGS="$LDFLAGS $SOUP_LDFLAGS"
++	export LDFLAGS
++
++	AC_MSG_CHECKING(for extern in libsoup headers)
++
++	AC_LANG_PUSH(C++)
++	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
++	@%:@include <libsoup/soup.h>
++	]], [[
++	SoupSession * session = soup_session_sync_new ();
++	]])],[
++	AC_MSG_RESULT(no)
++	],[
++	AC_MSG_RESULT(yes)
++	AC_DEFINE(LIBSOUP_HAS_EXTERN_C,,[define if libsoup has extern c])
++	])
++	AC_LANG_POP([C++])
++
++	CPPFLAGS="$CPPFLAGS_SAVED"
++	LDFLAGS="$LDFLAGS_SAVED"
++])
+ 
+ AC_DEFUN([BMP_CHECK_SOUP_EXTERN_C],
+ [




More information about the arch-commits mailing list