[packages/xmms2] - added python3,xmmsc_collection_changed_actions_t-fix patches from Fedora, updated python client li

qboosh qboosh at pld-linux.org
Mon Jun 26 18:01:27 CEST 2023


commit 790b548efb8f8a01bed2685555838cb3403fed91
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Mon Jun 26 18:03:52 2023 +0200

    - added python3,xmmsc_collection_changed_actions_t-fix patches from Fedora, updated python client lib package (based on python3 now)

 xmms2-python3.patch                                | 44 ++++++++++++++++++++++
 xmms2-use-system-waf.patch                         |  3 +-
 xmms2-xmmsc_collection_changed_actions_t-fix.patch | 36 ++++++++++++++++++
 xmms2.spec                                         | 20 +++++++---
 4 files changed, 96 insertions(+), 7 deletions(-)
---
diff --git a/xmms2.spec b/xmms2.spec
index b4dd894..52f570a 100644
--- a/xmms2.spec
+++ b/xmms2.spec
@@ -5,7 +5,7 @@
 %bcond_without	sdl	# SDL clients
 %bcond_with	java	# Java/JNI module (removed in 0.2DrJekyll)
 %bcond_without	perl	# Perl module
-%bcond_with	python	# Python module
+%bcond_without	python	# Python module
 %bcond_without	ruby	# Ruby modules
 %bcond_without	flac	# flac plugin
 
@@ -23,6 +23,8 @@ Patch1:		%{name}-openssl.patch
 Patch2:		%{name}-glib.patch
 Patch3:		%{name}-modplug.patch
 Patch4:		%{name}-ffmpeg.patch
+Patch5:		%{name}-python3.patch
+Patch6:		%{name}-xmmsc_collection_changed_actions_t-fix.patch
 Patch7:		%{name}-waf.patch
 Patch8:		%{name}-version.patch
 Patch10:	%{name}-link.patch
@@ -64,11 +66,11 @@ BuildRequires:	libxml2-devel >= 2.0
 BuildRequires:	openssl-devel
 BuildRequires:	pkgconfig
 BuildRequires:	pulseaudio-devel
+BuildRequires:	python3 >= 1:3.2
 %if %{with python}
-BuildRequires:	python-Cython >= 0.15.1
-BuildRequires:	python-devel >= 1:2.4
+BuildRequires:	python3-Cython >= 0.15.1
+BuildRequires:	python3-devel >= 1:3.2
 %endif
-BuildRequires:	python3 >= 1:3.2
 BuildRequires:	rpmbuild(macros) >= 1.277
 %{?with_ruby:BuildRequires:	ruby-modules >= 1:1.8}
 BuildRequires:	sc68-devel
@@ -201,7 +203,7 @@ Summary:	xmms2 Python bindings
 Summary(pl.UTF-8):	Wiązania Pythona do XMMS2
 Group:		Applications/Sound
 Requires:	%{name} = %{version}-%{release}
-Requires:	python-libs
+Requires:	python3-modules >= 1:3.2
 
 %description client-lib-python
 Python bindings for the xmms2 clientlib.
@@ -647,6 +649,8 @@ xmms2.
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
+%patch5 -p1
+%patch6 -p1
 %patch7 -p1
 %patch8 -p1
 %patch10 -p1
@@ -678,6 +682,7 @@ waf configure -v \
 	--prefix=%{_prefix} \
 	--libdir=%{_libdir} \
 	--mandir=%{_mandir} \
+	--pythondir=%{py3_sitedir} \
 	--with-perl-archdir=%{perl_vendorarch} \
 	--with-ruby-archdir=%{ruby_vendorarchdir} \
 	--with-ruby-libdir=%{ruby_vendorlibdir} \
@@ -816,7 +821,10 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with python}
 %files client-lib-python
 %defattr(644,root,root,755)
-%attr(755,root,root) %{py_sitedir}/xmmsclient.so
+%dir %{py3_sitedir}/xmmsclient
+%attr(755,root,root) %{py3_sitedir}/xmmsclient/xmmsapi.cpython-*.so
+%attr(755,root,root) %{py3_sitedir}/xmmsclient/xmmsvalue.cpython-*.so
+%{py3_sitedir}/xmmsclient/*.py
 %endif
 
 %if %{with ruby}
diff --git a/xmms2-python3.patch b/xmms2-python3.patch
new file mode 100644
index 0000000..219340b
--- /dev/null
+++ b/xmms2-python3.patch
@@ -0,0 +1,44 @@
+diff -up xmms2-0.8DrO_o/src/clients/lib/python/cython_include/xmmsapi.pxd.py3 xmms2-0.8DrO_o/src/clients/lib/python/cython_include/xmmsapi.pxd
+--- xmms2-0.8DrO_o/src/clients/lib/python/cython_include/xmmsapi.pxd.py3	2011-10-20 15:26:08.000000000 -0400
++++ xmms2-0.8DrO_o/src/clients/lib/python/cython_include/xmmsapi.pxd	2020-02-28 09:57:34.639494568 -0500
+@@ -1,3 +1,5 @@
++# cython: language_level=3
++
+ from xmmsvalue cimport Collection, XmmsValue
+ from cxmmsvalue cimport *
+ from cxmmsclient cimport *
+diff -up xmms2-0.8DrO_o/src/clients/lib/python/cython_include/xmmsvalue.pxd.py3 xmms2-0.8DrO_o/src/clients/lib/python/cython_include/xmmsvalue.pxd
+--- xmms2-0.8DrO_o/src/clients/lib/python/cython_include/xmmsvalue.pxd.py3	2011-10-20 15:26:08.000000000 -0400
++++ xmms2-0.8DrO_o/src/clients/lib/python/cython_include/xmmsvalue.pxd	2020-02-28 09:57:34.639494568 -0500
+@@ -1,4 +1,5 @@
+ #needs to reimport required symbols from .h files.
++# cython: language_level=3
+ 
+ cdef extern from "xmmsc/xmmsv.h":
+ 	ctypedef struct xmmsv_t
+diff -up xmms2-0.8DrO_o/src/clients/lib/python/xmmsapi.pyx.py3 xmms2-0.8DrO_o/src/clients/lib/python/xmmsapi.pyx
+--- xmms2-0.8DrO_o/src/clients/lib/python/xmmsapi.pyx.py3	2011-10-20 15:26:08.000000000 -0400
++++ xmms2-0.8DrO_o/src/clients/lib/python/xmmsapi.pyx	2020-02-28 09:59:05.686592346 -0500
+@@ -1358,22 +1358,6 @@ cdef class XmmsApi(XmmsCore):
+ 			res = xmmsc_medialib_import_path(self.conn, <char *>p)
+ 		return self.create_result(cb, res)
+ 
+-	@deprecated
+-	def medialib_path_import(self, path, cb = None, encoded=False):
+-		"""
+-		@deprecated
+-		Use medialib_import_path(path, ...) instead
+-		"""
+-		return self.medialib_import_path(self, path, cb=cb, encoded=encoded)
+-
+-	@deprecated
+-	def medialib_path_import_encoded(self, path, cb = None):
+-		"""
+-		@deprecated
+-		Use medialib_import_path(path, ..., encoded=True) instead
+-		"""
+-		return self.medialib_import_path(self, path, cb=cb, encoded=True)
+-
+ 	cpdef XmmsResult medialib_property_set(self, int id, key, value, source=None, cb=None):
+ 		"""
+ 		medialib_property_set(id, key, value, source=None, cb=None) -> XmmsResult
diff --git a/xmms2-use-system-waf.patch b/xmms2-use-system-waf.patch
index 002ab4b..1af3d51 100644
--- a/xmms2-use-system-waf.patch
+++ b/xmms2-use-system-waf.patch
@@ -66,11 +66,12 @@ diff -up xmms2-0.8DrO_o/src/clients/lib/python/wscript.fixme xmms2-0.8DrO_o/src/
      if not conf.env.PYTHON:
          conf.fatal("python not found")
  
-@@ -112,7 +112,7 @@ def configure(conf):
+@@ -112,7 +112,8 @@ def configure(conf):
                    "files, you should consider reconfiguring with --no-cython")
  
  def options(opt):
 -    opt.tool_options('cython', tooldir = os.path.abspath('waftools'))
++    opt.load('python')
 +    opt.load('cython', tooldir = os.path.abspath('waftools'))
      opt.add_option('--no-cython', action="store_true",
              dest="no_cython", default=False,
diff --git a/xmms2-xmmsc_collection_changed_actions_t-fix.patch b/xmms2-xmmsc_collection_changed_actions_t-fix.patch
new file mode 100644
index 0000000..43ba29b
--- /dev/null
+++ b/xmms2-xmmsc_collection_changed_actions_t-fix.patch
@@ -0,0 +1,36 @@
+diff -up xmms2-0.8DrO_o/src/includepriv/xmmspriv/xmms_collection.h.spot xmms2-0.8DrO_o/src/includepriv/xmmspriv/xmms_collection.h
+--- xmms2-0.8DrO_o/src/includepriv/xmmspriv/xmms_collection.h.spot	2020-02-28 10:15:31.578897880 -0500
++++ xmms2-0.8DrO_o/src/includepriv/xmmspriv/xmms_collection.h	2020-02-28 10:15:46.242585829 -0500
+@@ -75,7 +75,7 @@ const gchar *xmms_collection_get_namespa
+ gboolean xmms_collection_get_int_attr (xmmsv_coll_t *coll, const gchar *attrname, gint *val);
+ gboolean xmms_collection_set_int_attr (xmmsv_coll_t *coll, const gchar *attrname, gint newval);
+ 
+-GTree *xmms_collection_changed_msg_new (xmms_collection_changed_actions_t type, const gchar *plname, const gchar *namespace);
++GTree *xmms_collection_changed_msg_new (xmmsc_collection_changed_actions_t type, const gchar *plname, const gchar *namespace);
+ void xmms_collection_changed_msg_send (xmms_coll_dag_t *colldag, GTree *dict);
+ 
+ void bind_all_references (xmms_coll_dag_t *dag, xmmsv_coll_t *coll, xmmsv_coll_t *parent, void *udata);
+diff -up xmms2-0.8DrO_o/src/include/xmmsc/xmmsc_idnumbers.h.spot xmms2-0.8DrO_o/src/include/xmmsc/xmmsc_idnumbers.h
+--- xmms2-0.8DrO_o/src/include/xmmsc/xmmsc_idnumbers.h.spot	2020-02-28 10:15:18.475176735 -0500
++++ xmms2-0.8DrO_o/src/include/xmmsc/xmmsc_idnumbers.h	2020-02-28 10:15:22.698086869 -0500
+@@ -193,7 +193,7 @@ typedef enum {
+ 	XMMS_COLLECTION_CHANGED_UPDATE,
+ 	XMMS_COLLECTION_CHANGED_RENAME,
+ 	XMMS_COLLECTION_CHANGED_REMOVE
+-} xmms_collection_changed_actions_t;
++} xmmsc_collection_changed_actions_t;
+ 
+ typedef enum {
+ 	XMMS_PLAYBACK_STATUS_STOP,
+diff -up xmms2-0.8DrO_o/src/xmms/collection.c.spot xmms2-0.8DrO_o/src/xmms/collection.c
+--- xmms2-0.8DrO_o/src/xmms/collection.c.spot	2020-02-28 10:15:56.804361068 -0500
++++ xmms2-0.8DrO_o/src/xmms/collection.c	2020-02-28 10:16:03.248223939 -0500
+@@ -144,7 +144,7 @@ static void xmms_collection_client_sync
+ #include "collection_ipc.c"
+ 
+ GTree *
+-xmms_collection_changed_msg_new (xmms_collection_changed_actions_t type,
++xmms_collection_changed_msg_new (xmmsc_collection_changed_actions_t type,
+                                  const gchar *plname, const gchar *namespace)
+ {
+ 	GTree *dict;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/xmms2.git/commitdiff/790b548efb8f8a01bed2685555838cb3403fed91



More information about the pld-cvs-commit mailing list