Merge lp:~l3on/ubuntu/oneiric/paprefs/fix-829051 into lp:ubuntu/oneiric/paprefs

Proposed by Leo Iannacone
Status: Merged
Merge reported by: Martin Pitt
Merged at revision: not available
Proposed branch: lp:~l3on/ubuntu/oneiric/paprefs/fix-829051
Merge into: lp:ubuntu/oneiric/paprefs
Diff against target: 144 lines (+124/-0)
3 files modified
debian/changelog (+7/-0)
debian/patches/0005-fix-PA-version.patch (+116/-0)
debian/patches/series (+1/-0)
To merge this branch: bzr merge lp:~l3on/ubuntu/oneiric/paprefs/fix-829051
Reviewer Review Type Date Requested Status
Martin Pitt Approve
Review via email: mp+89540@code.launchpad.net

Description of the change

A new patch based on upstream commit to fix paprefs to load pulseaudio
dynamically.

To post a comment you must log in.
Revision history for this message
Martin Pitt (pitti) wrote :

Looks fine, thanks! I uploaded this, so marking as merged.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2009-11-30 11:21:19 +0000
3+++ debian/changelog 2012-01-21 14:02:24 +0000
4@@ -1,3 +1,10 @@
5+paprefs (0.9.9-2ubuntu1.1) oneiric-proposed; urgency=low
6+
7+ * Fix pulseaudio recognition without requiring a rebuild each
8+ time pulseaudio gets an update (LP: #829051).
9+
10+ -- Leo Iannacone <l3on@ubuntu.com> Sat, 21 Jan 2012 13:00:21 +0100
11+
12 paprefs (0.9.9-2ubuntu1) lucid; urgency=low
13
14 * Sync on Debian unstable.
15
16=== added file 'debian/patches/0005-fix-PA-version.patch'
17--- debian/patches/0005-fix-PA-version.patch 1970-01-01 00:00:00 +0000
18+++ debian/patches/0005-fix-PA-version.patch 2012-01-21 14:02:24 +0000
19@@ -0,0 +1,116 @@
20+Description: Fix pulseaudio recognition without requiring a rebuild each
21+ time pulseaudio gets an update.
22+
23+ Based on: 779c0ca043406c64761557f511d2a805ab5beb9e Mon Sep 17 00:00:00 2001
24+ From: Colin Guthrie <colin@mageia.org>
25+ Date: Fri, 20 Jan 2012 14:20:54 +0000
26+ Subject:
27+ modules: Better code for working out the dynamic module dir.
28+
29+ The current code used libdir from the pkgconfig file, but Debian
30+ and Ubuntu do not put their modules inside this folder and thus it's
31+ a bit flawed.
32+
33+ So take the static module dir and strip of the trailing parts that
34+ might change with a new library version and make that tail end
35+ dynamic. Should work on all platforms.
36+
37+ Version 0.9.10 also affected.
38+
39+Author: Leo Iannacone <l3on@ubuntu.com>
40+Bug-Ubuntu: https://bugs.launchpad.net/bugs/829051
41+Bug-Debian: http://bugs.debian.org/649565
42+Forwarded: YES - no ML found, sent email to Christian Persch and Colin Guthrie
43+ according to the homepage of paprefs
44+
45+---
46+ configure | 2 +-
47+ configure.ac | 2 +-
48+ src/Makefile.am | 2 +-
49+ src/Makefile.in | 2 +-
50+ src/paprefs.cc | 28 +++++++++++++++++-----------
51+ 5 files changed, 21 insertions(+), 15 deletions(-)
52+
53+--- paprefs-oneiric.orig/src/paprefs.cc
54++++ paprefs-oneiric/src/paprefs.cc
55+@@ -659,19 +659,25 @@ void MainWindow::readFromGConf() {
56+ }
57+
58+ gchar * MainWindow::modulePath(const gchar *name) {
59+- gchar *path, *pulsedir, *c;
60++ gchar *path, *c, **versions;
61+
62+- pulsedir = g_strdup_printf ("pulse-%s", pa_get_library_version ());
63++ versions = g_strsplit(pa_get_library_version(), ".", 3);
64++ if (versions[0] && versions[1]) {
65++ gchar *pulsedir, *search;
66+
67+- for (c = pulsedir + strlen ("pulse-"); *c != '\0'; c++) {
68+- if (*c == '-') {
69+- *c = '\0';
70+- break;
71+- }
72+- }
73+-
74+- path = g_build_filename (MODLIBDIR, pulsedir, "modules", name, NULL);
75+- g_free (pulsedir);
76++ /* Remove the "/pulse-x.y/modules" suffix so we can dynamically inject
77++ * it again with runtime library version numbers */
78++ pulsedir = g_strdup_printf ("%s", MODLIBDIR);
79++ if ((search = g_strrstr (pulsedir, G_DIR_SEPARATOR_S))) {
80++ *search = '\0';
81++ if ((search = g_strrstr (pulsedir, G_DIR_SEPARATOR_S)))
82++ *search = '\0';
83++ }
84++ path = g_strdup_printf ("%s" G_DIR_SEPARATOR_S "pulse-%s.%s" G_DIR_SEPARATOR_S "modules" G_DIR_SEPARATOR_S "%s", pulsedir, versions[0], versions[1], name);
85++ g_free (pulsedir);
86++ } else
87++ path = g_build_filename (MODLIBDIR, name, NULL);
88++ g_strfreev(versions);
89+
90+ return path;
91+ }
92+--- paprefs-oneiric.orig/configure.ac
93++++ paprefs-oneiric/configure.ac
94+@@ -43,7 +43,7 @@ AC_SUBST(GUILIBS_CFLAGS)
95+ AC_SUBST(GUILIBS_LIBS)
96+
97+ PKG_CHECK_MODULES(LIBPULSE, libpulse)
98+-LIBPULSE_MODLIBDIR=`pkg-config libpulse --variable libdir`
99++LIBPULSE_MODLIBDIR=`pkg-config libpulse --variable modlibexecdir`
100+ AC_SUBST(LIBPULSE_MODLIBDIR)
101+
102+ # If using GCC specifiy some additional parameters
103+--- paprefs-oneiric.orig/src/Makefile.am
104++++ paprefs-oneiric/src/Makefile.am
105+@@ -31,7 +31,7 @@ paprefs_SOURCES=paprefs.cc
106+
107+ paprefs_LDADD=$(AM_LDADD) $(GUILIBS_LIBS) $(LIBPULSE_LIBS)
108+ paprefs_CXXFLAGS=$(AM_CXXFLAGS) $(GUILIBS_CFLAGS) $(LIBPULSE_CFLAGS)
109+-paprefs_CXXFLAGS+=-DGLADE_FILE=\"$(gladedir)/paprefs.glade\" -DLOCALEDIR=\"$(localedir)\" -DMODLIBDIR=\""$(LIBPULSE_MODLIBDIR)/"\" -DSHREXT=\"$(SHREXT)\"
110++paprefs_CXXFLAGS+=-DGLADE_FILE=\"$(gladedir)/paprefs.glade\" -DLOCALEDIR=\"$(localedir)\" -DMODLIBDIR=\""$(LIBPULSE_MODLIBDIR)"\" -DSHREXT=\"$(SHREXT)\"
111+
112+ EXTRA_DIST = $(glade_DATA) $(desktop_in_files)
113+
114+--- paprefs-oneiric.orig/src/Makefile.in
115++++ paprefs-oneiric/src/Makefile.in
116+@@ -266,7 +266,7 @@ paprefs_LDADD = $(AM_LDADD) $(GUILIBS_LI
117+ paprefs_CXXFLAGS = $(AM_CXXFLAGS) $(GUILIBS_CFLAGS) $(LIBPULSE_CFLAGS) \
118+ -DGLADE_FILE=\"$(gladedir)/paprefs.glade\" \
119+ -DLOCALEDIR=\"$(localedir)\" \
120+- -DMODLIBDIR=\""$(LIBPULSE_MODLIBDIR)/"\" \
121++ -DMODLIBDIR=\""$(LIBPULSE_MODLIBDIR)"\" \
122+ -DSHREXT=\"$(SHREXT)\"
123+ EXTRA_DIST = $(glade_DATA) $(desktop_in_files)
124+ CLEANFILES = $(desktop_DATA)
125+--- paprefs-oneiric.orig/configure
126++++ paprefs-oneiric/configure
127+@@ -4754,7 +4754,7 @@ else
128+ $as_echo "yes" >&6; }
129+ :
130+ fi
131+-LIBPULSE_MODLIBDIR=`pkg-config libpulse --variable libdir`
132++LIBPULSE_MODLIBDIR=`pkg-config libpulse --variable modlibexecdir`
133+
134+
135+ # If using GCC specifiy some additional parameters
136
137=== modified file 'debian/patches/series'
138--- debian/patches/series 2009-11-30 11:21:19 +0000
139+++ debian/patches/series 2012-01-21 14:02:24 +0000
140@@ -2,3 +2,4 @@
141 0002-Dynamically-build-the-paths-to-the-modules.patch
142 0003-rerun-bootstrap-for-the-updated-autotools-file.patch
143 0004-Show-install-only-with-active-packagekit.patch
144+0005-fix-PA-version.patch

Subscribers

People subscribed via source and target branches

to all changes: