void-packages/srcpkgs/paprefs/patches/do-not-require-recompile.patch

34 lines
1.1 KiB
Diff
Raw Normal View History

2015-11-28 14:16:18 +01:00
From 4fcee37cb92c689b43a0d8fc1d8e6b2764834cbf Mon Sep 17 00:00:00 2001
From: Colin Guthrie <colin@mageia.org>
Date: Sun, 6 Nov 2011 14:31:27 +0000
Subject: [PATCH] Do not require a recompile for each new PA version in order to detect the modules.
---
src/paprefs.cc | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/paprefs.cc b/src/paprefs.cc
index 21fdc95..919b15c 100644
--- src/paprefs.cc
+++ src/paprefs.cc
@@ -637,9 +637,14 @@ void MainWindow::readFromGConf() {
}
gchar * MainWindow::modulePath(const gchar *name) {
- gchar *path, *pulsedir, *c;
+ gchar *path, *pulsedir, *c, **versions;
- pulsedir = g_strdup_printf ("pulse-%d.%d", PA_MAJOR, PA_MINOR);
+ versions = g_strsplit(pa_get_library_version(), ".", 3);
+ if (versions[0] && versions[1])
+ pulsedir = g_strdup_printf ("pulse-%s.%s", versions[0], versions[1]);
+ else
+ pulsedir = g_strdup_printf ("pulse-%d.%d", PA_MAJOR, PA_MINOR);
+ g_strfreev(versions);
path = g_build_filename (MODLIBDIR, pulsedir, "modules", name, NULL);
g_free (pulsedir);
--
1.6.3.3