Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=xorgtesting.git;a=commitdiff;h=6f31faf815866e3184c7c77f230c816f07e4bd65
commit 6f31faf815866e3184c7c77f230c816f07e4bd65 Author: bouleetbil <bouleet...@frogdev.info> Date: Fri May 6 13:00:20 2011 +0200 pulseaudio-0.9.22-2-x86_64 *rebuild with xcb-util>=0.3.8 diff --git a/source/multimedia/pulseaudio/FrugalBuild b/source/multimedia/pulseaudio/FrugalBuild index bd12273..8f1638b 100644 --- a/source/multimedia/pulseaudio/FrugalBuild +++ b/source/multimedia/pulseaudio/FrugalBuild @@ -3,22 +3,24 @@ pkgname=pulseaudio pkgver=0.9.22 -pkgrel=1 +pkgrel=2 pkgdesc="PulseAudio is a sound server with an advanced plugin system" url="http://pulseaudio.org/" depends=('speex' 'liboil' 'audiofile' 'libsndfile' 'libtool' 'libatomic_ops' 'libsamplerate' 'flac' 'glib2' \ 'alsa-lib' 'libtool' 'libasyncns' 'libcap>=2.19-2') makedepends=('avahi' 'gnome-audio' 'bluez>=4.61' 'jack>=0.118.0' 'intltool' 'hal' 'gconf' \ - 'libsm' 'libx11' 'libice' 'libxtst' 'xproto' 'kbproto' 'xcb-util') + 'libsm' 'libx11' 'libice' 'libxtst' 'xproto' 'kbproto' 'xcb-util>=0.3.8') groups=('multimedia') archs=('i686' 'x86_64' 'ppc') up2date="Flasttar http://pulseaudio.org/wiki/DownloadPulseAudio#Sourcecode" source=(http://0pointer.de/lennart/projects/$pkgname/$pkgname-$pkgver.tar.gz \ - rc.pulseaudio pulseaudio.sysconfig README.Frugalware) + rc.pulseaudio pulseaudio.sysconfig README.Frugalware xcb1.diff xcb2.diff) sha1sums=('f5fc14d7a62ae9f9ee9745026e3f13f4c130140a' \ '484a26a79dc9c66807fcd3edb91ea98513cc95cb' \ 'e95d0cd97ae6b68029487080ba460c412afa0ca0' \ - 'e05930aab23ef8d615dffa9ec818c84c4ee67edf') + 'e05930aab23ef8d615dffa9ec818c84c4ee67edf' \ + 'c301859ed3c667c7a405604d67fd969c56010552' \ + 'edd1471747c0dae99552a74592e94f6865873aae') subpkgs=("pulseaudio-hal" "pulseaudio-esd" "pulseaudio-bluetooth" "pulseaudio-x11" \ "pulseaudio-avahi" "pulseaudio-jack" "pulseaudio-gconf") diff --git a/source/multimedia/pulseaudio/xcb1.diff b/source/multimedia/pulseaudio/xcb1.diff new file mode 100644 index 0000000..834ea17 --- /dev/null +++ b/source/multimedia/pulseaudio/xcb1.diff @@ -0,0 +1,83 @@ +From 88e6078f3b74002c58b69f8b69f6c043d65ef80b Mon Sep 17 00:00:00 2001 +From: Maciej Grela <maciej.gr...@gmail.com> +Date: Tue, 29 Mar 2011 22:56:28 +0159 +Subject: [PATCH] x11: Fix build errors with newest xcb-util. + +The xcb_atom_get functions were removed from xcb-util. Changed these to +xcb_intern_atom/xcb_intern_atom_reply. Also, STRING is now +XCB_ATOM_STRING. +--- + src/pulsecore/x11prop.c | 26 +++++++++++++++++--------- + 1 files changed, 17 insertions(+), 9 deletions(-) + +diff --git a/src/pulsecore/x11prop.c b/src/pulsecore/x11prop.c +index 8df3278..99ea55d 100644 +--- a/src/pulsecore/x11prop.c ++++ b/src/pulsecore/x11prop.c +@@ -49,28 +49,34 @@ static xcb_screen_t *screen_of_display(xcb_connection_t *xcb, int screen) { + + void pa_x11_set_prop(xcb_connection_t *xcb, int screen, const char *name, const char *data) { + xcb_screen_t *xs; +- xcb_atom_t a; ++ xcb_intern_atom_cookie_t cookie; ++ xcb_intern_atom_reply_t *reply; + + pa_assert(xcb); + pa_assert(name); + pa_assert(data); + + if ((xs = screen_of_display(xcb, screen))) { +- a = xcb_atom_get(xcb, name); +- xcb_change_property(xcb, XCB_PROP_MODE_REPLACE, xs->root, a, STRING, PA_XCB_FORMAT, (int) strlen(data), (const void*) data); ++ cookie = xcb_intern_atom(xcb, 0, strlen(name), name); ++ reply = xcb_intern_atom_reply(xcb, cookie, NULL); ++ ++ xcb_change_property(xcb, XCB_PROP_MODE_REPLACE, xs->root, reply->atom, XCB_ATOM_STRING, PA_XCB_FORMAT, (int) strlen(data), (const void*) data); + } + } + + void pa_x11_del_prop(xcb_connection_t *xcb, int screen, const char *name) { + xcb_screen_t *xs; +- xcb_atom_t a; ++ xcb_intern_atom_cookie_t cookie; ++ xcb_intern_atom_reply_t *reply; + + pa_assert(xcb); + pa_assert(name); + + if ((xs = screen_of_display(xcb, screen))) { +- a = xcb_atom_get(xcb, name); +- xcb_delete_property(xcb, xs->root, a); ++ cookie = xcb_intern_atom(xcb, 0, strlen(name), name); ++ reply = xcb_intern_atom_reply(xcb, cookie, NULL); ++ ++ xcb_delete_property(xcb, xs->root, reply->atom); + } + } + +@@ -80,7 +86,8 @@ char* pa_x11_get_prop(xcb_connection_t *xcb, int screen, const char *name, char + xcb_get_property_cookie_t req; + xcb_get_property_reply_t* prop = NULL; + xcb_screen_t *xs; +- xcb_atom_t a; ++ xcb_intern_atom_cookie_t cookie; ++ xcb_intern_atom_reply_t *reply; + + pa_assert(xcb); + pa_assert(name); +@@ -98,9 +105,10 @@ char* pa_x11_get_prop(xcb_connection_t *xcb, int screen, const char *name, char + xs = screen_of_display(xcb, 0); + + if (xs) { +- a = xcb_atom_get(xcb, name); ++ cookie = xcb_intern_atom(xcb, 0, strlen(name), name); ++ reply = xcb_intern_atom_reply(xcb, cookie, NULL); + +- req = xcb_get_property(xcb, 0, xs->root, a, STRING, 0, (uint32_t)(l-1)); ++ req = xcb_get_property(xcb, 0, xs->root, reply->atom, XCB_ATOM_STRING, 0, (uint32_t)(l-1)); + prop = xcb_get_property_reply(xcb, req, NULL); + + if (!prop) +-- +1.6.3.3 + diff --git a/source/multimedia/pulseaudio/xcb2.diff b/source/multimedia/pulseaudio/xcb2.diff new file mode 100644 index 0000000..11fa86d --- /dev/null +++ b/source/multimedia/pulseaudio/xcb2.diff @@ -0,0 +1,124 @@ +From adb16f9ff42008c5b8f76133d8879fc15a82533f Mon Sep 17 00:00:00 2001 +From: Arnaud Fontaine <ar...@debian.org> +Date: Tue, 29 Mar 2011 22:56:28 +0159 +Subject: [PATCH] x11: More XCB fixes. + +Commit 65ef80b fixed building with xcb-util >= 0.3.8, but the reply is never +checked (possible SIGSEGV if the reply is NULL) nor freed (memory leak at each +call of the functions). + +Also, remove include and dependencies on xcb-atom, as it was only meaningful +for xcb_atom_get() and STRING, and depend instead on xcb >= 1.6 for +XCB_ATOM_STRING. +--- + configure.ac | 2 +- + src/pulsecore/x11prop.c | 38 +++++++++++++++++++++++++------------- + 2 files changed, 26 insertions(+), 14 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 980d148..76cf7e9 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -591,7 +591,7 @@ AC_ARG_ENABLE([x11], + [x11=auto]) + + if test "x${x11}" != xno ; then +- PKG_CHECK_MODULES(X11, [ x11-xcb ice sm xtst xcb-atom ], ++ PKG_CHECK_MODULES(X11, [ x11-xcb xcb >= 1.6 ice sm xtst ], + HAVE_X11=1, + [ + HAVE_X11=0 +diff --git a/src/pulsecore/x11prop.c b/src/pulsecore/x11prop.c +index 99ea55d..baf5b01 100644 +--- a/src/pulsecore/x11prop.c ++++ b/src/pulsecore/x11prop.c +@@ -30,7 +30,6 @@ + #include <pulsecore/macro.h> + + #include <xcb/xproto.h> +-#include <xcb/xcb_atom.h> + + #define PA_XCB_FORMAT 8 + +@@ -49,7 +48,6 @@ static xcb_screen_t *screen_of_display(xcb_connection_t *xcb, int screen) { + + void pa_x11_set_prop(xcb_connection_t *xcb, int screen, const char *name, const char *data) { + xcb_screen_t *xs; +- xcb_intern_atom_cookie_t cookie; + xcb_intern_atom_reply_t *reply; + + pa_assert(xcb); +@@ -57,26 +55,36 @@ void pa_x11_set_prop(xcb_connection_t *xcb, int screen, const char *name, const + pa_assert(data); + + if ((xs = screen_of_display(xcb, screen))) { +- cookie = xcb_intern_atom(xcb, 0, strlen(name), name); +- reply = xcb_intern_atom_reply(xcb, cookie, NULL); ++ reply = xcb_intern_atom_reply(xcb, ++ xcb_intern_atom(xcb, 0, strlen(name), name), ++ NULL); + +- xcb_change_property(xcb, XCB_PROP_MODE_REPLACE, xs->root, reply->atom, XCB_ATOM_STRING, PA_XCB_FORMAT, (int) strlen(data), (const void*) data); ++ if (reply) { ++ xcb_change_property(xcb, XCB_PROP_MODE_REPLACE, xs->root, reply->atom, ++ XCB_ATOM_STRING, PA_XCB_FORMAT, ++ (int) strlen(data), (const void*) data); ++ ++ free(reply); ++ } + } + } + + void pa_x11_del_prop(xcb_connection_t *xcb, int screen, const char *name) { + xcb_screen_t *xs; +- xcb_intern_atom_cookie_t cookie; + xcb_intern_atom_reply_t *reply; + + pa_assert(xcb); + pa_assert(name); + + if ((xs = screen_of_display(xcb, screen))) { +- cookie = xcb_intern_atom(xcb, 0, strlen(name), name); +- reply = xcb_intern_atom_reply(xcb, cookie, NULL); +- +- xcb_delete_property(xcb, xs->root, reply->atom); ++ reply = xcb_intern_atom_reply(xcb, ++ xcb_intern_atom(xcb, 0, strlen(name), name), ++ NULL); ++ ++ if (reply) { ++ xcb_delete_property(xcb, xs->root, reply->atom); ++ free(reply); ++ } + } + } + +@@ -86,7 +94,6 @@ char* pa_x11_get_prop(xcb_connection_t *xcb, int screen, const char *name, char + xcb_get_property_cookie_t req; + xcb_get_property_reply_t* prop = NULL; + xcb_screen_t *xs; +- xcb_intern_atom_cookie_t cookie; + xcb_intern_atom_reply_t *reply; + + pa_assert(xcb); +@@ -105,10 +112,15 @@ char* pa_x11_get_prop(xcb_connection_t *xcb, int screen, const char *name, char + xs = screen_of_display(xcb, 0); + + if (xs) { +- cookie = xcb_intern_atom(xcb, 0, strlen(name), name); +- reply = xcb_intern_atom_reply(xcb, cookie, NULL); ++ reply = xcb_intern_atom_reply(xcb, ++ xcb_intern_atom(xcb, 0, strlen(name), name), ++ NULL); ++ ++ if (!reply) ++ goto finish; + + req = xcb_get_property(xcb, 0, xs->root, reply->atom, XCB_ATOM_STRING, 0, (uint32_t)(l-1)); ++ free(reply); + prop = xcb_get_property_reply(xcb, req, NULL); + + if (!prop) +-- +1.6.3.3 + _______________________________________________ Frugalware-git mailing list Frugalware-git@frugalware.org http://frugalware.org/mailman/listinfo/frugalware-git