[packages/paprefs] - add patches from upstream git

baggins baggins at pld-linux.org
Sat Oct 3 14:30:46 CEST 2015


commit 309239381b1300b1b24e4024486a19aa1d0ca2c2
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sat Oct 3 14:30:23 2015 +0200

    - add patches from upstream git

 doc-drop-0pointer.de-references.patch | 48 ++++++++++++++++++++
 dynamic-module-dir.patch              | 83 +++++++++++++++++++++++++++++++++++
 module-path.patch                     | 31 +++++++++++++
 paprefs.spec                          | 12 +++++
 4 files changed, 174 insertions(+)
---
diff --git a/paprefs.spec b/paprefs.spec
index 7668ba0..7eb0917 100644
--- a/paprefs.spec
+++ b/paprefs.spec
@@ -7,7 +7,12 @@ License:	GPL v2+
 Group:		X11/Applications/Sound
 Source0:	http://freedesktop.org/software/pulseaudio/paprefs/%{name}-%{version}.tar.xz
 # Source0-md5:	e9130fb1ab5211a50b16f6b63bb6fd49
+Patch0:		module-path.patch
+Patch1:		dynamic-module-dir.patch
+Patch2:		doc-drop-0pointer.de-references.patch
 URL:		http://freedesktop.org/software/pulseaudio/paprefs/
+BuildRequires:	autoconf
+BuildRequires:	automake
 BuildRequires:	dbus-glib-devel
 BuildRequires:	gconfmm-devel >= 2.6
 BuildRequires:	gettext-tools
@@ -33,8 +38,15 @@ dialogowe do konfiguracji serwera dźwięku PulseAudio.
 
 %prep
 %setup -q
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
 
 %build
+%{__aclocal}
+%{__autoconf}
+%{__autoheader}
+%{__automake}
 %configure \
 	--disable-lynx
 %{__make}
diff --git a/doc-drop-0pointer.de-references.patch b/doc-drop-0pointer.de-references.patch
new file mode 100644
index 0000000..faa3a2b
--- /dev/null
+++ b/doc-drop-0pointer.de-references.patch
@@ -0,0 +1,48 @@
+From 6b50202f3f11bc5c016e41b8f0c529860a6baabb Mon Sep 17 00:00:00 2001
+From: Arun Raghavan <arun.raghavan at collabora.co.uk>
+Date: Tue, 15 May 2012 14:13:08 +0530
+Subject: doc: Drop 0pointer.de references
+
+
+diff --git a/configure.ac b/configure.ac
+index 69eea2f..3df69d1 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -19,7 +19,7 @@
+ # along with paprefs. If not, see <http://www.gnu.org/licenses/>.
+ 
+ AC_PREREQ(2.57)
+-AC_INIT([paprefs],[0.9.10],[mzcncersf (at) 0pointer (dot) de])
++AC_INIT([paprefs],[0.9.10],[pulseaudio-discuss (at) lists (dot) freedesktop (dot) org])
+ AC_CONFIG_SRCDIR([src/paprefs.cc])
+ AC_CONFIG_HEADERS([config.h])
+ AM_INIT_AUTOMAKE([foreign 1.11 -Wall dist-xz tar-ustar])
+diff --git a/doc/README.html.in b/doc/README.html.in
+index 50d8676..9bc800f 100644
+--- a/doc/README.html.in
++++ b/doc/README.html.in
+@@ -60,8 +60,7 @@ href="@PACKAGE_URL at paprefs-0.9.5.tar.gz">Version 0.9.5</a> released; initial rel
+ 
+ <p>PulseAudio Preferences (<tt>paprefs</tt>) is a simple GTK
+ based configuration dialog for the <a
+-href="http://0pointer.de/lennart/projects/pulseaudio/">PulseAudio
+-sound server</a>.</p>
++href="http://pulseaudio.org/">PulseAudio sound server</a>.</p>
+ 
+ <p>Please note that this program can only configure local servers, and
+ requires that a special module <tt>module-gconf</tt> is loaded in the
+@@ -114,9 +113,9 @@ compilation and <tt>make install</tt> (as root) for installation of
+ 
+ <p>The current release is <a href="@PACKAGE_URL at paprefs-@PACKAGE_VERSION at .tar.gz">@PACKAGE_VERSION@</a></p>
+ 
+-<p>Get <tt>paprefs</tt>'s development sources from the <a href="http://git-scm.org/">GIT</a> <a href="git://git.0pointer.de/paprefs">repository</a> (<a href="http://git.0pointer.de/?p=paprefs.git">gitweb</a>): </p>
++<p>Get <tt>paprefs</tt>'s development sources from the <a href="http://git-scm.org/">GIT</a> <a href="git://anongit.freedesktop.org/pulseaudio/paprefs">repository</a> (<a href="http://cgit.freedesktop.org/pulseaudio/paprefs">web interface</a>): </p>
+ 
+-<pre>git clone git://git.0pointer.de/paprefs</pre>
++<pre>git clone git://anongit.freedesktop.org/pulseaudio/paprefs</pre>
+ 
+ <hr/>
+ <address class="grey">Lennart Poettering <@PACKAGE_BUGREPORT@>, September 2009</address>
+-- 
+cgit v0.10.2
+
diff --git a/dynamic-module-dir.patch b/dynamic-module-dir.patch
new file mode 100644
index 0000000..1c0b982
--- /dev/null
+++ b/dynamic-module-dir.patch
@@ -0,0 +1,83 @@
+From 779c0ca043406c64761557f511d2a805ab5beb9e Mon Sep 17 00:00:00 2001
+From: Colin Guthrie <colin at mageia.org>
+Date: Fri, 20 Jan 2012 14:20:54 +0000
+Subject: modules: Better code for working out the dynamic module dir.
+
+The current code used libdir from the pkgconfig file, but Debian
+and Ubuntu do not put their modules inside this folder and thus it's
+a bit flawed.
+
+So take the static module dir and strip of the trailing parts that
+might change with a new library version and make that tail end
+dynamic. Should work on all platforms.
+
+diff --git a/configure.ac b/configure.ac
+index 9f4543b..69eea2f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -43,8 +43,8 @@ AC_SUBST(GUILIBS_CFLAGS)
+ AC_SUBST(GUILIBS_LIBS)
+ 
+ PKG_CHECK_MODULES(LIBPULSE, libpulse)
+-LIBPULSE_MODLIBDIR=`pkg-config libpulse --variable libdir`
+-AC_SUBST(LIBPULSE_MODLIBDIR)
++LIBPULSE_MODLIBEXECDIR=`pkg-config libpulse --variable modlibexecdir`
++AC_SUBST(LIBPULSE_MODLIBEXECDIR)
+ 
+ # If using GCC specifiy some additional parameters
+ if test "x$GCC" = "xyes" ; then
+diff --git a/src/Makefile.am b/src/Makefile.am
+index bacfb1a..34f454f 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -31,7 +31,7 @@ paprefs_SOURCES=paprefs.cc
+ 
+ paprefs_LDADD=$(AM_LDADD) $(GUILIBS_LIBS) $(LIBPULSE_LIBS)
+ paprefs_CXXFLAGS=$(AM_CXXFLAGS) $(GUILIBS_CFLAGS) $(LIBPULSE_CFLAGS)
+-paprefs_CXXFLAGS+=-DGLADE_FILE=\"$(gladedir)/paprefs.glade\" -DLOCALEDIR=\"$(localedir)\" -DMODLIBDIR=\""$(LIBPULSE_MODLIBDIR)/"\" -DSHREXT=\"$(SHREXT)\"
++paprefs_CXXFLAGS+=-DGLADE_FILE=\"$(gladedir)/paprefs.glade\" -DLOCALEDIR=\"$(localedir)\" -DMODDIR=\""$(LIBPULSE_MODLIBEXECDIR)"\" -DSHREXT=\"$(SHREXT)\"
+ 
+ EXTRA_DIST = $(glade_DATA) $(desktop_in_files)
+ 
+diff --git a/src/paprefs.cc b/src/paprefs.cc
+index 919b15c..9f3ad31 100644
+--- a/src/paprefs.cc
++++ b/src/paprefs.cc
+@@ -637,18 +637,26 @@ void MainWindow::readFromGConf() {
+ }
+ 
+ gchar * MainWindow::modulePath(const gchar *name) {
+-  gchar *path, *pulsedir, *c, **versions;
++  gchar *path, *c, **versions;
+ 
+   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);
++  if (versions[0] && versions[1]) {
++      gchar *pulsedir, *search;
++
++      /* Remove the "/pulse-x.y/modules" suffix so we can dynamically inject
++       * it again with runtime library version numbers */
++      pulsedir = g_strdup_printf ("%s", MODDIR);
++      if ((search = g_strrstr (pulsedir, G_DIR_SEPARATOR_S))) {
++          *search = '\0';
++          if ((search = g_strrstr (pulsedir, G_DIR_SEPARATOR_S)))
++              *search = '\0';
++      }
++      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);
++      g_free (pulsedir);
++  } else
++      path = g_build_filename (MODDIR, name, NULL);
+   g_strfreev(versions);
+ 
+-  path = g_build_filename (MODLIBDIR, pulsedir, "modules", name, NULL);
+-  g_free (pulsedir);
+-
+   return path;
+ }
+ 
+-- 
+cgit v0.10.2
+
diff --git a/module-path.patch b/module-path.patch
new file mode 100644
index 0000000..53ef1df
--- /dev/null
+++ b/module-path.patch
@@ -0,0 +1,31 @@
+From 4fcee37cb92c689b43a0d8fc1d8e6b2764834cbf Mon Sep 17 00:00:00 2001
+From: Colin Guthrie <colin at mageia.org>
+Date: Sun, 6 Nov 2011 14:31:27 +0000
+Subject: Do not require a recompile for each new PA version in order to detect
+ the modules.
+
+
+diff --git a/src/paprefs.cc b/src/paprefs.cc
+index 21fdc95..919b15c 100644
+--- a/src/paprefs.cc
++++ b/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);
+-- 
+cgit v0.10.2
+
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/paprefs.git/commitdiff/309239381b1300b1b24e4024486a19aa1d0ca2c2



More information about the pld-cvs-commit mailing list