diff options
author | wiz <wiz@pkgsrc.org> | 2008-10-28 22:23:40 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2008-10-28 22:23:40 +0000 |
commit | 3e260840d95a11fa556a6d99ebf137dce62bdfab (patch) | |
tree | 45b63ae0f1b8e1189ea0cbeec92fdefa40f1776c /audio/bmpx | |
parent | 9d24e5e2c07f1b2d37938106c81a6786e8508fb7 (diff) | |
download | pkgsrc-3e260840d95a11fa556a6d99ebf137dce62bdfab.tar.gz |
Update to 0.40.14, integrating a patch from
http://bugs.backtrace.info/view.php?id=505 for libsoup>=2.4 support.
Changes:
* gcc 4.3 support thanks to Siavash and Alexander Kahl
* spectrum analyser fixed (nenolog)
* many bug fixes
Diffstat (limited to 'audio/bmpx')
-rw-r--r-- | audio/bmpx/Makefile | 11 | ||||
-rw-r--r-- | audio/bmpx/PLIST | 4 | ||||
-rw-r--r-- | audio/bmpx/distinfo | 21 | ||||
-rw-r--r-- | audio/bmpx/patches/patch-aa | 147 | ||||
-rw-r--r-- | audio/bmpx/patches/patch-ab | 4 | ||||
-rw-r--r-- | audio/bmpx/patches/patch-ac | 8 | ||||
-rw-r--r-- | audio/bmpx/patches/patch-ad | 24 | ||||
-rw-r--r-- | audio/bmpx/patches/patch-ae | 14 | ||||
-rw-r--r-- | audio/bmpx/patches/patch-af | 39 | ||||
-rw-r--r-- | audio/bmpx/patches/patch-ag | 18 | ||||
-rw-r--r-- | audio/bmpx/patches/patch-ah | 268 | ||||
-rw-r--r-- | audio/bmpx/patches/patch-ai | 50 |
12 files changed, 573 insertions, 35 deletions
diff --git a/audio/bmpx/Makefile b/audio/bmpx/Makefile index 1257a5df176..f41db3c0894 100644 --- a/audio/bmpx/Makefile +++ b/audio/bmpx/Makefile @@ -1,14 +1,13 @@ -# $NetBSD: Makefile,v 1.16 2008/06/12 02:14:14 joerg Exp $ +# $NetBSD: Makefile,v 1.17 2008/10/28 22:23:40 wiz Exp $ # -DISTNAME= bmpx-0.40.13 -PKGREVISION= 4 +DISTNAME= bmpx-0.40.14 CATEGORIES= audio -MASTER_SITES= http://files.beep-media-player.org/releases/0.40/ +MASTER_SITES= http://files.backtrace.info/releases/0.40/ EXTRACT_SUFX= .tar.bz2 MAINTAINER= pkgsrc-users@NetBSD.org -HOMEPAGE= http://beep-media-player.org/site/BMPx_Homepage +HOMEPAGE= http://bmpx.backtrace.info/site/BMPx_Homepage COMMENT= Audio player to be used with a frontend or as a daemon PKG_DESTDIR_SUPPORT= user-destdir @@ -45,7 +44,7 @@ BUILDLINK_API_DEPENDS.librsvg+= librsvg>=2.14.0 .include "../../devel/libsexymm/buildlink3.mk" .include "../../graphics/librsvg/buildlink3.mk" .include "../../graphics/hicolor-icon-theme/buildlink3.mk" -.include "../../net/libsoup-devel/buildlink3.mk" +.include "../../net/libsoup24/buildlink3.mk" BUILDLINK_API_DEPENDS.gtk2+= gtk2+>=2.12.0 .include "../../x11/gtk2/buildlink3.mk" BUILDLINK_API_DEPENDS.gtkmm+= gtkmm>=2.10.0 diff --git a/audio/bmpx/PLIST b/audio/bmpx/PLIST index 1c812ccc49f..42d4a6ecfb9 100644 --- a/audio/bmpx/PLIST +++ b/audio/bmpx/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.4 2007/10/27 00:35:16 wiz Exp $ +@comment $NetBSD: PLIST,v 1.5 2008/10/28 22:23:40 wiz Exp $ bin/beep-media-player-2 bin/bmp-play-files-2.0 bin/bmp-play-uris-2.0 @@ -33,6 +33,7 @@ share/applications/bmp-2.0-offline.desktop share/applications/bmp-2.0.desktop share/applications/bmp-play-2.0.desktop share/bmpx/glade/dialog-add-podcast.glade +share/bmpx/glade/dialog-bounce-adjust.glade share/bmpx/glade/dialog-equalizer.glade share/bmpx/glade/dialog-export.glade share/bmpx/glade/dialog-filebrowser.glade @@ -124,7 +125,6 @@ share/bmpx/icons/tray-icons/tray-icon-playing.png share/bmpx/images/audio-default.png share/bmpx/images/cdda/audiocd-big.png share/bmpx/images/cdda/audiocd-unplayable.png -share/bmpx/images/cover-frame.png share/bmpx/images/lastfm/artist-unknown.png share/bmpx/images/lastfm/audioscrobbler.png share/bmpx/images/lastfm/lastfm-album.png diff --git a/audio/bmpx/distinfo b/audio/bmpx/distinfo index c006f2187cd..7bc52e52465 100644 --- a/audio/bmpx/distinfo +++ b/audio/bmpx/distinfo @@ -1,9 +1,14 @@ -$NetBSD: distinfo,v 1.9 2007/12/08 14:42:51 drochner Exp $ +$NetBSD: distinfo,v 1.10 2008/10/28 22:23:40 wiz Exp $ -SHA1 (bmpx-0.40.13.tar.bz2) = 3327baa8f13f8411a15ebafd0112b9ba8623c0ef -RMD160 (bmpx-0.40.13.tar.bz2) = 6eab5edf1ffce8c7226db59281c79c2165886d05 -Size (bmpx-0.40.13.tar.bz2) = 1820642 bytes -SHA1 (patch-aa) = b2c33a87406afc09e5b2ef01400b2e738b9c9ca4 -SHA1 (patch-ab) = c4b8094e4c542eda3278af9229aa1be58dc36b18 -SHA1 (patch-ac) = 77d88acc2c74259f293dc54699a322962f50ce57 -SHA1 (patch-ad) = 1af37a064235abd5399e70f60451c51d58f91232 +SHA1 (bmpx-0.40.14.tar.bz2) = 3284843c45cab302f414663a5cb31eb4373d07c7 +RMD160 (bmpx-0.40.14.tar.bz2) = 12a9939d53b58a43ee9deefa43188ac6b33dae72 +Size (bmpx-0.40.14.tar.bz2) = 1776299 bytes +SHA1 (patch-aa) = 2d1fb7d2ce431aff6611ecf0aaa24ac0bf928ac1 +SHA1 (patch-ab) = 76a896a88853c4dfaa971b1f7bbf11f3c835e42a +SHA1 (patch-ac) = 06d8c9d8b653f6f9eb089c8f6ba3676e42e74668 +SHA1 (patch-ad) = c4613d7fd02f912ed902346558ea592d64d584bb +SHA1 (patch-ae) = b4bfb4b92735cf4f45579c50a7a71143d3bbb6c7 +SHA1 (patch-af) = 52c93f49490c50af9666032407ca41d944287214 +SHA1 (patch-ag) = fa089ab5d823198527a05bba44b484e07d9067f5 +SHA1 (patch-ah) = d8a7085943f3795fe5fe85fa94f4e93434eca329 +SHA1 (patch-ai) = 0e8a20bb8d18f14da58f2681a2fb6ae141e9d66d diff --git a/audio/bmpx/patches/patch-aa b/audio/bmpx/patches/patch-aa index 98599eabb3a..d6cb105e152 100644 --- a/audio/bmpx/patches/patch-aa +++ b/audio/bmpx/patches/patch-aa @@ -1,4 +1,4 @@ -$NetBSD: patch-aa,v 1.5 2007/11/01 22:49:15 tnn Exp $ +$NetBSD: patch-aa,v 1.6 2008/10/28 22:23:40 wiz Exp $ --- configure.orig 2007-10-18 19:18:23.000000000 +0200 +++ configure @@ -11,3 +11,148 @@ $NetBSD: patch-aa,v 1.5 2007/11/01 22:49:15 tnn Exp $ *GNU* | *'with BFD'*) LDFLAGS="$LDFLAGS -Wl,--as-needed" { echo "$as_me:$LINENO: result: yes" >&5 +@@ -31606,12 +31606,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 +@@ -31620,12 +31620,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 +@@ -31634,18 +31634,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. + +@@ -31683,90 +31683,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 --git a/audio/bmpx/patches/patch-ab b/audio/bmpx/patches/patch-ab index 17c6805e1cf..db35fc41787 100644 --- a/audio/bmpx/patches/patch-ab +++ b/audio/bmpx/patches/patch-ab @@ -1,6 +1,6 @@ -$NetBSD: patch-ab,v 1.5 2007/10/27 00:35:17 wiz Exp $ +$NetBSD: patch-ab,v 1.6 2008/10/28 22:23:40 wiz Exp $ ---- jnetlib/connection.cpp.orig 2007-10-18 17:17:06.000000000 +0000 +--- jnetlib/connection.cpp.orig 2008-03-05 21:31:04.000000000 +0000 +++ jnetlib/connection.cpp @@ -224,8 +224,17 @@ void JNL_Connection::run(int max_send_by diff --git a/audio/bmpx/patches/patch-ac b/audio/bmpx/patches/patch-ac index 7e1447daa91..f32a095555d 100644 --- a/audio/bmpx/patches/patch-ac +++ b/audio/bmpx/patches/patch-ac @@ -1,8 +1,8 @@ -$NetBSD: patch-ac,v 1.3 2007/08/30 15:30:31 joerg Exp $ +$NetBSD: patch-ac,v 1.4 2008/10/28 22:23:40 wiz Exp $ ---- src/audio/audio.hh.orig 2007-08-11 18:41:50.000000000 +0000 +--- src/audio/audio.hh.orig 2008-03-05 21:31:05.000000000 +0000 +++ src/audio/audio.hh -@@ -125,7 +125,30 @@ namespace Bmp +@@ -126,7 +126,30 @@ namespace Bmp */ struct Element { @@ -34,7 +34,7 @@ $NetBSD: patch-ac,v 1.3 2007/08/30 15:30:31 joerg Exp $ /** std::vector typedef of an Attr */ -@@ -164,30 +187,6 @@ namespace Bmp +@@ -165,30 +188,6 @@ namespace Bmp } }; diff --git a/audio/bmpx/patches/patch-ad b/audio/bmpx/patches/patch-ad index 85440d7e758..cafa0420554 100644 --- a/audio/bmpx/patches/patch-ad +++ b/audio/bmpx/patches/patch-ad @@ -1,13 +1,13 @@ -$NetBSD: patch-ad,v 1.5 2007/12/08 14:42:51 drochner Exp $ +$NetBSD: patch-ad,v 1.6 2008/10/28 22:23:40 wiz Exp $ ---- src/sanity.cc.orig 2007-12-08 15:29:18.000000000 +0100 -+++ src/sanity.cc -@@ -69,7 +69,7 @@ sanity_check_glib_msg (void) - } - - C_FUNCTION --gchar * -+const gchar * - sanity_check_gtk (void) - { - return gtk_check_version (GTK_REQUIRED_MAJOR_VER, +--- README.orig 2008-04-06 10:10:55.000000000 +0000 ++++ README +@@ -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 --git a/audio/bmpx/patches/patch-ae b/audio/bmpx/patches/patch-ae new file mode 100644 index 00000000000..516a610b9bf --- /dev/null +++ b/audio/bmpx/patches/patch-ae @@ -0,0 +1,14 @@ +$NetBSD: patch-ae,v 1.3 2008/10/28 22:23:40 wiz Exp $ + +--- configure.ac.orig 2008-04-06 10:10:55.000000000 +0000 ++++ configure.ac +@@ -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.4]) diff --git a/audio/bmpx/patches/patch-af b/audio/bmpx/patches/patch-af new file mode 100644 index 00000000000..8a157beb78c --- /dev/null +++ b/audio/bmpx/patches/patch-af @@ -0,0 +1,39 @@ +$NetBSD: patch-af,v 1.1 2008/10/28 22:23:40 wiz Exp $ + +--- m4/soup.m4.orig 2008-03-05 21:31:03.000000000 +0000 ++++ m4/soup.m4 +@@ -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], + [ diff --git a/audio/bmpx/patches/patch-ag b/audio/bmpx/patches/patch-ag new file mode 100644 index 00000000000..cb60ca12d47 --- /dev/null +++ b/audio/bmpx/patches/patch-ag @@ -0,0 +1,18 @@ +$NetBSD: patch-ag,v 1.1 2008/10/28 22:23:40 wiz Exp $ + +--- sentinel/beep-media-player-2-sentinel.cc.orig 2008-04-05 23:53:08.000000000 +0000 ++++ sentinel/beep-media-player-2-sentinel.cc +@@ -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 "bmpx.backtrace.info" + diff --git a/audio/bmpx/patches/patch-ah b/audio/bmpx/patches/patch-ah new file mode 100644 index 00000000000..0940955f346 --- /dev/null +++ b/audio/bmpx/patches/patch-ah @@ -0,0 +1,268 @@ +$NetBSD: patch-ah,v 1.1 2008/10/28 22:23:40 wiz Exp $ + +--- src/minisoup.cc.orig 2008-03-05 21:31:06.000000000 +0000 ++++ src/minisoup.cc +@@ -61,8 +61,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); + } + +@@ -76,26 +76,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; + } + + +@@ -103,15 +103,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; + } + +@@ -126,11 +126,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.) + { +@@ -142,7 +142,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); + } + + +@@ -181,17 +181,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 +@@ -200,9 +200,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; + } + } + +@@ -211,15 +208,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; + } + +@@ -231,7 +228,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))); + +@@ -242,15 +239,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 + ); + } +@@ -270,6 +264,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> +@@ -280,9 +275,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); +@@ -317,9 +312,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 (); + } + +@@ -328,8 +323,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; + } + +@@ -341,7 +335,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()); + } + + +@@ -357,7 +351,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))); + +@@ -369,25 +363,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.) +@@ -400,7 +391,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 --git a/audio/bmpx/patches/patch-ai b/audio/bmpx/patches/patch-ai new file mode 100644 index 00000000000..ef865549f2b --- /dev/null +++ b/audio/bmpx/patches/patch-ai @@ -0,0 +1,50 @@ +$NetBSD: patch-ai,v 1.1 2008/10/28 22:23:40 wiz Exp $ + +--- src/minisoup.hh.orig 2008-03-05 21:31:06.000000000 +0000 ++++ src/minisoup.hh +@@ -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*/); |