[packages/xmms2] - added patches to restore build (using python3/scons 4, current ruby etc.); temporarily disabled fl
qboosh
qboosh at pld-linux.org
Mon May 8 21:30:36 CEST 2023
commit 72df73dca1f7f490ce0c6516dc05d0ba2cff729d
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Mon May 8 21:32:56 2023 +0200
- added patches to restore build (using python3/scons 4, current ruby etc.); temporarily disabled flac
xmms2-format.patch | 11 ++
xmms2-link.patch | 15 ++
xmms2-modplug.patch | 11 ++
xmms2-python3.patch | 391 ++++++++++++++++++++++++++++++++++++++++++++++++++++
xmms2-ruby.patch | 101 ++++++++++++++
xmms2-tabs.patch | 63 +++++++++
xmms2.spec | 104 ++++++++++----
7 files changed, 672 insertions(+), 24 deletions(-)
---
diff --git a/xmms2.spec b/xmms2.spec
index 9005bb3..4eb0185 100644
--- a/xmms2.spec
+++ b/xmms2.spec
@@ -1,4 +1,11 @@
# XXX: what about -devel? shouldn't -static be separated?
+#
+# Conditional build:
+%bcond_with efl # ecore client library
+%bcond_with python # Python module (doesn't build with python3-based scons 4)
+%bcond_without ruby # Ruby modules
+%bcond_with flac # flac plugin (incompatible with 1.1.3+)
+
Summary: Client/server based media player system
Summary(pl.UTF-8): System odtwarzania multimediów oparty na architekturze klient/serwer
%define _dr 2.1
@@ -9,13 +16,19 @@ License: LGPL v2.1
Group: Applications/Sound
Source0: http://downloads.sourceforge.net/xmms2/%{name}-%{version}DR%{_dr}.tar.gz
# Source0-md5: cb12f90b48962109632458df19eab201
+Patch0: %{name}-tabs.patch
+Patch1: %{name}-python3.patch
+Patch2: %{name}-link.patch
+Patch3: %{name}-modplug.patch
+Patch4: %{name}-format.patch
+Patch5: %{name}-ruby.patch
URL: http://xmms2.xmms.se/
BuildRequires: SDL-devel
BuildRequires: SDL_ttf-devel
BuildRequires: alsa-lib-devel
-BuildRequires: curl-devel
-BuildRequires: ecore-devel
-BuildRequires: flac-devel
+BuildRequires: curl-devel >= 7.11.2
+%{?with_efl:BuildRequires: ecore-devel}
+%{?with_flac:BuildRequires: flac-devel < 1.1.3}
BuildRequires: glib2-devel >= 2.2.0
BuildRequires: gnome-vfs2-devel
BuildRequires: jack-audio-connection-kit-devel
@@ -23,13 +36,17 @@ BuildRequires: libmad-devel
BuildRequires: libmodplug-devel
BuildRequires: libsmbclient-devel
BuildRequires: libvorbis-devel
+BuildRequires: pkgconfig
+%if %{with python}
BuildRequires: python-Pyrex >= 0.9.4.2
-BuildRequires: python-devel
+BuildRequires: python-devel >= 2.3
+%endif
+BuildRequires: python3 >= 1:3.2
BuildRequires: rpmbuild(macros) >= 1.277
-BuildRequires: ruby-modules
-BuildRequires: scons >= 0.94
-BuildRequires: speex-devel
-BuildRequires: sqlite3-devel
+%{?with_ruby:BuildRequires: ruby-modules >= 1:1.8}
+BuildRequires: scons >= 4
+#BuildRequires: speex-devel
+BuildRequires: sqlite3-devel >= 3.2
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -323,25 +340,38 @@ xmms2.
%prep
%setup -q -n %{name}-%{version}DR%{_dr}
-sed -i xmmsenv.py \
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
+
+%{__sed} -i xmmsenv.py \
-e '/os\.path\.join(self\.install_prefix.*"lib/s@"lib@"%{_lib}@'
-sed -i src/clients/lib/python/Library \
+%{__sed} -i src/clients/lib/python/Library \
-e 's/get_python_lib()/get_python_lib("false")/'
+iconv -f iso-8859-1 -t utf8 doc/xmms2.1 -o doc/xmms2.1.utf8
+%{__mv} doc/xmms2.1.utf8 doc/xmms2.1
+
%build
+# how to make it called in scons 4 (SourceCode builder has been removed)?
+%{__python} src/xmms/generate-converter.py > src/xmms/converter.c
+
scons \
- CC="%{__cc}" \
- CXX="%{__cxx}" \
- CCFLAGS="%{rpmcflags}" \
- PREFIX=%{_prefix} \
- MANDIR=%{_mandir} \
+ CC="%{__cc}" \
+ CXX="%{__cxx}" \
+ CCFLAGS="%{rpmcflags} %{rpmcppflags} $(pkg-config --cflags smbclient)" \
+ PREFIX=%{_prefix} \
+ MANDIR=%{_mandir} \
PKGCONFIGDIR=%{_pkgconfigdir}
%install
rm -rf $RPM_BUILD_ROOT
scons install \
- INSTALLDIR=$RPM_BUILD_ROOT
+ --install-sandbox $RPM_BUILD_ROOT
%clean
rm -rf $RPM_BUILD_ROOT
@@ -350,7 +380,7 @@ rm -rf $RPM_BUILD_ROOT
%defattr(644,root,root,755)
%doc AUTHORS ChangeLog README TODO
%attr(755,root,root) %{_bindir}/xmms2d
-%attr(755,root,root) %{_libdir}/libxmmsclient.so.*
+%attr(755,root,root) %{_libdir}/libxmmsclient.so.0
%dir %{_libdir}/%{name}
%attr(755,root,root) %{_libdir}/%{name}/libxmms_diskwrite.so
%attr(755,root,root) %{_libdir}/%{name}/libxmms_eq.so
@@ -360,51 +390,67 @@ rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{_libdir}/%{name}/libxmms_pls.so
%attr(755,root,root) %{_libdir}/%{name}/libxmms_replaygain.so
%{_datadir}/%{name}
+%{_mandir}/man8/xmms2d.8*
### clients
%files client-cli
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/xmms2
+%attr(755,root,root) %{_bindir}/xmms2-mlib-updater
+%{_mandir}/man1/xmms2.1*
%files client-sdlvis
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/sdl-vis
+%if %{with efl}
%files client-lib-ecore
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libxmmsclient-ecore.so.*
+%attr(755,root,root) %{_libdir}/libxmmsclient-ecore.so.0
+%if %{with ruby}
%files client-lib-ecore-ruby
%defattr(644,root,root,755)
%attr(755,root,root) %{ruby_sitearchdir}/xmmsclient_ecore.so
+%endif
+%endif
%files client-lib-glib
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libxmmsclient-glib.so.*
+%attr(755,root,root) %{_libdir}/libxmmsclient-glib.so.0
+%if %{with ruby}
%files client-lib-glib-ruby
%defattr(644,root,root,755)
-%attr(755,root,root) %{ruby_sitearchdir}/xmmsclient_glib.so
+%attr(755,root,root) %{ruby_vendorarchdir}/xmmsclient_glib.so
+%endif
+%if %{with python}
%files client-lib-python
%defattr(644,root,root,755)
%attr(755,root,root) %{py_sitedir}/xmmsclient.so
+%endif
+%if %{with ruby}
%files client-lib-ruby
%defattr(644,root,root,755)
-%attr(755,root,root) %{ruby_sitearchdir}/xmmsclient.so
+%attr(755,root,root) %{ruby_vendorarchdir}/xmmsclient.so
+%endif
### input
%if 0
+# no build exists up to DR2.1
%files input-cd
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/%{name}/libxmms_cdtransport.so
%attr(755,root,root) %{_libdir}/%{name}/libxmms_cddecoder.so
%endif
+%if %{with flac}
%files input-flac
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/%{name}/libxmms_flac.so
+%endif
%files input-mad
%defattr(644,root,root,755)
@@ -415,14 +461,18 @@ rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{_libdir}/%{name}/libxmms_modplug.so
%if 0
+# disabled up to DR2.1
%files input-sid
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/%{name}/libxmms_sid.so
%endif
+%if 0
+# disabled in DR2.1
%files input-speex
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/%{name}/libxmms_speex.so
+%endif
%files input-vorbis
%defattr(644,root,root,755)
@@ -459,6 +509,12 @@ rm -rf $RPM_BUILD_ROOT
%files devel
%defattr(644,root,root,755)
-%{_includedir}/%{name}
-%{_libdir}/*.a
-%{_pkgconfigdir}/*
+%attr(755,root,root) %{_libdir}/libxmmsclient.so
+%attr(755,root,root) %{_libdir}/libxmmsclient-glib.so
+%{_includedir}/xmms2
+%{_libdir}/libxmmsclient.a
+%{_libdir}/libxmmsclient-glib.a
+%{_pkgconfigdir}/xmms2-client.pc
+%{_pkgconfigdir}/xmms2-client-ecore.pc
+%{_pkgconfigdir}/xmms2-client-glib.pc
+%{_pkgconfigdir}/xmms2-plugin.pc
diff --git a/xmms2-format.patch b/xmms2-format.patch
new file mode 100644
index 0000000..a1511cf
--- /dev/null
+++ b/xmms2-format.patch
@@ -0,0 +1,11 @@
+--- xmms2-0.1DR2.1/src/xmms/main.c.orig 2005-08-18 20:26:23.000000000 +0200
++++ xmms2-0.1DR2.1/src/xmms/main.c 2023-05-06 22:09:11.418652966 +0200
+@@ -323,7 +323,7 @@ Options:\n\
+ -p <foo> Search for plugins in directory 'foo'\n\
+ -h|--help Print this help\n\
+ -c|--conf=<file> Specify alternate configuration file\n";
+- printf(usageText);
++ fputs(usageText, stdout);
+ }
+
+ /* @endif */
diff --git a/xmms2-link.patch b/xmms2-link.patch
new file mode 100644
index 0000000..b1761e4
--- /dev/null
+++ b/xmms2-link.patch
@@ -0,0 +1,15 @@
+--- xmms2-0.1DR2.1/src/clients/sdl-vis/Program.orig 2005-08-18 20:26:23.000000000 +0200
++++ xmms2-0.1DR2.1/src/clients/sdl-vis/Program 2023-05-06 21:45:00.043182408 +0200
+@@ -9,3 +9,4 @@ def config(env):
+ env.pkgconfig("glib-2.0")
+ env.configcmd("sdl-config --libs --cflags")
+ env.checklib("SDL_ttf", "TTF_Init")
++ env.checklib("m", "log10")
+--- xmms2-0.1DR2.1/src/clients/lib/xmmsclient-glib/Library.orig 2005-08-18 20:26:23.000000000 +0200
++++ xmms2-0.1DR2.1/src/clients/lib/xmmsclient-glib/Library 2023-05-07 22:35:37.261992755 +0200
+@@ -5,3 +5,5 @@ source=["xmmsclient-glib.c"]
+
+ def config(env):
+ env.pkgconfig("glib-2.0")
++ env.Prepend(LIBPATH="src/clients/lib/xmmsclient")
++ env.Append(LIBS=["xmmsclient"])
diff --git a/xmms2-modplug.patch b/xmms2-modplug.patch
new file mode 100644
index 0000000..2349170
--- /dev/null
+++ b/xmms2-modplug.patch
@@ -0,0 +1,11 @@
+--- xmms2-0.1DR2.1/src/plugins/modplug/modplug.c.orig 2005-08-18 20:26:23.000000000 +0200
++++ xmms2-0.1DR2.1/src/plugins/modplug/modplug.c 2023-05-06 21:55:20.206489362 +0200
+@@ -11,7 +11,7 @@
+ #include "xmms/xmms_defs.h"
+ #include "xmms/xmms_decoderplugin.h"
+ #include "xmms/xmms_log.h"
+-#include <modplug.h>
++#include <libmodplug/modplug.h>
+
+ #include <glib.h>
+ #include <string.h>
diff --git a/xmms2-python3.patch b/xmms2-python3.patch
new file mode 100644
index 0000000..682fad2
--- /dev/null
+++ b/xmms2-python3.patch
@@ -0,0 +1,391 @@
+--- xmms2-0.1DR2.1/SConstruct.orig 2023-05-06 16:09:29.235573684 +0200
++++ xmms2-0.1DR2.1/SConstruct 2023-05-06 16:18:35.752612948 +0200
+@@ -5,7 +5,6 @@ import sys
+ import SCons
+ import re
+ import string
+-import new
+ from marshal import dump
+
+ try:
+@@ -21,7 +20,7 @@ EnsurePythonVersion(2, 1)
+ SConsignFile()
+
+ def SimpleListOption(key, help, default=[]):
+- return(key, help, default, None, lambda val: string.split(val))
++ return(key, help, default, None, lambda val: val.split())
+
+
+ if sys.platform == 'win32':
+@@ -40,7 +39,7 @@ else:
+ else:
+ default_cpppath = []
+
+-opts = Options("options.cache")
++opts = Variables("options.cache")
+ opts.Add('CC', 'C compiler to use')
+ opts.Add('CXX', 'C++ compiler to use')
+ opts.Add('LD', 'Linker to use')
+@@ -54,9 +53,9 @@ opts.Add('MANDIR', 'manual directory', '
+ opts.Add('RUBYARCHDIR', 'Path to install Ruby bindings')
+ opts.Add('INSTALLDIR', 'install dir')
+ opts.Add('PKGCONFIGDIR', 'Where should we put our .pc files?', '$PREFIX/lib/pkgconfig')
+-opts.Add(BoolOption('SHOWCACHE', 'show what flags that lives inside cache', 0))
++opts.Add(BoolVariable('SHOWCACHE', 'show what flags that lives inside cache', 0))
+ opts.Add(SimpleListOption('EXCLUDE', 'exclude these modules', []))
+-opts.Add(BoolOption('CONFIG', 'run configuration commands again', 0))
++opts.Add(BoolVariable('CONFIG', 'run configuration commands again', 0))
+
+ # base CCPATH
+ base_env = xmmsenv.XMMSEnvironment(options=opts)
+@@ -74,24 +73,24 @@ def do_subst_in_file(targetfile, sourcef
+ then all instances of %VERSION% in the file will be replaced with 1.2345 etc.
+ """
+ try:
+- f = open(sourcefile, 'rb')
++ f = open(sourcefile, 'r', encoding='iso-8859-1')
+ contents = f.read()
+ f.close()
+ except:
+- raise SCons.Errors.UserError, "Can't read source file %s"%sourcefile
++ raise SCons.Errors.UserError("Can't read source file %s"%sourcefile)
+ for (k,v) in dict.items():
+ contents = re.sub(k, v, contents)
+ try:
+- f = open(targetfile, 'wb')
++ f = open(targetfile, 'w', encoding='iso-8859-1')
+ f.write(contents)
+ f.close()
+ except:
+- raise SCons.Errors.UserError, "Can't write target file %s"%targetfile
++ raise SCons.Errors.UserError("Can't write target file %s"%targetfile)
+ return 0 # success
+
+ def subst_in_file(target, source, env):
+- if not env.has_key('SUBST_DICT'):
+- raise SCons.Errors.UserError, "SubstInFile requires SUBST_DICT to be set."
++ if "SUBST_DICT" not in env:
++ raise SCons.Errors.UserError("SubstInFile requires SUBST_DICT to be set.")
+ d = dict(env['SUBST_DICT']) # copy it
+ for (k,v) in d.items():
+ if callable(v):
+@@ -99,7 +98,7 @@ def subst_in_file(target, source, env):
+ elif SCons.Util.is_String(v):
+ d[k]=env.subst(v)
+ else:
+- raise SCons.Errors.UserError, "SubstInFile: key %s: %s must be a string or callable"%(k, repr(v))
++ raise SCons.Errors.UserError("SubstInFile: key %s: %s must be a string or callable"%(k, repr(v)))
+ for (t,s) in zip(target, source):
+ return do_subst_in_file(str(t), str(s), d)
+
+@@ -128,7 +128,8 @@ python_executable = sys.executable
+ b = Builder(action = python_executable + ' src/xmms/generate-converter.py > src/xmms/converter.c')
+ base_env.Depends('#src/xmms/converter.c', 'src/xmms/generate-converter.py')
+ base_env.Depends('#src/xmms/sample.c', 'src/xmms/converter.c')
+-base_env.SourceCode('src/xmms/converter.c', b)
++base_env['BUILDERS']['GenerateConverter'] = b
++conv = base_env.GenerateConverter()
+
+ subst_dict = {"%VERSION%":XMMS_VERSION, "%PLATFORM%":"XMMS_OS_" + base_env.platform.upper(),
+ "%PKGLIBDIR%":base_env["PREFIX"]+"/lib/xmms2",
+@@ -146,7 +145,7 @@ base_env.handle_targets("Program")
+ try:
+ dump(base_env.config_cache, open("config.cache", "wb+"))
+ except IOError:
+- print "Could not dump config.cache!"
++ print("Could not dump config.cache!")
+
+
+ #### INSTALL HEADERS!
+@@ -181,13 +180,13 @@ for p in pc_files:
+ base_env.Install("$PKGCONFIGDIR", p["name"]+".pc")
+
+
+-print "====================================="
+-print " Configuration printout"
+-print "====================================="
+-print "Enabled plugins:",
++print("=====================================")
++print(" Configuration printout")
++print("=====================================")
++print("Enabled plugins:", end="")
+ foo = []
+ map(lambda x: foo.append(x[x.rindex("/")+1:]), base_env.plugins)
+-print ", ".join(foo)
++print(", ".join(foo))
+
+ base_env.add_shared("dismantled-the_swarm_clip.ogg")
+ base_env.Alias('install', base_env.install_targets)
+--- xmms2-0.1DR2.1/xmmsenv.py.orig 2023-05-06 17:20:47.209064583 +0200
++++ xmms2-0.1DR2.1/xmmsenv.py 2023-05-06 17:24:10.881294529 +0200
+@@ -5,15 +5,12 @@ import shutil
+ import gzip
+ from marshal import load
+ from stat import *
+-import operator
+
+ global_libpaths = ["/lib", "/usr/lib"]
+
+ class ConfigError(Exception):
+ pass
+
+-any = lambda x: reduce(operator.or_, x)
+-
+ def installFunc(dest, source, env):
+ """Copy file, setting sane permissions"""
+
+@@ -35,7 +35,7 @@ class Target:
+ self.globs['platform'] = env.platform
+ self.globs['ConfigError'] = ConfigError
+
+- c = compile(file(target).read(), target, "exec")
++ c = compile(open(target).read(), target, "exec")
+ eval(c, self.globs)
+
+ if not isinstance(self.globs.get("target"), str):
+@@ -78,14 +75,14 @@ class XMMSEnvironment(Environment):
+ def __init__(self, parent=None, options=None, **kw):
+ reconfigure = self.options_changed(options, ['INSTALLPATH'])
+ Environment.__init__(self, options=options, ENV=os.environ)
+- apply(self.Replace, (), kw)
++ self.Replace(**kw)
+ self.conf = SCons.SConf.SConf(self)
+
+ if os.path.isfile("config.cache") and self["CONFIG"] == 0 and not reconfigure:
+ try:
+ self.config_cache=load(open("config.cache", 'rb+'))
+ except:
+- print "Could not load config.cache!"
++ print("Could not load config.cache!")
+ self.config_cache={}
+ else:
+ self.config_cache={}
+@@ -95,7 +92,7 @@ class XMMSEnvironment(Environment):
+ self.programs=[]
+ self.install_targets=[]
+
+- if self.has_key("INSTALLDIR"):
++ if "INSTALLDIR" in self:
+ self.installdir = os.path.normpath(self["INSTALLDIR"] + '/')
+ else:
+ self.installdir = ""
+@@ -135,7 +132,7 @@ class XMMSEnvironment(Environment):
+ self.install_targets.append(target)
+
+ def tryaction(self, cmd):
+- if self.config_cache.has_key(cmd):
++ if cmd in self.config_cache:
+ return self.config_cache[cmd]
+
+ r = False
+@@ -156,7 +153,7 @@ class XMMSEnvironment(Environment):
+ return r
+
+ def run(self, cmd):
+- if self.config_cache.has_key(cmd):
++ if cmd in self.config_cache:
+ return self.config_cache[cmd]
+
+ try:
+@@ -178,7 +175,7 @@ class XMMSEnvironment(Environment):
+
+
+ def configcmd(self, cmd, fail=False):
+- if self.config_cache.has_key(cmd):
++ if cmd in self.config_cache:
+ ret = self.config_cache[cmd]
+ else:
+ ret = os.popen(cmd).read()
+@@ -186,7 +183,7 @@ class XMMSEnvironment(Environment):
+
+ if ret == '':
+ if fail:
+- print "Could not find needed group %s!!! Aborting!" % cmd
++ print("Could not find needed group %s!!! Aborting!" % cmd)
+ sys.exit(-1)
+ raise ConfigError("Command '%s' failed" % cmd)
+ ret = ret.strip()
+@@ -195,18 +192,18 @@ class XMMSEnvironment(Environment):
+
+ def checkheader(self, header, fail=False):
+ key = ("HEADER", header)
+- if not self.config_cache.has_key(key):
++ if key not in self.config_cache:
+ self.config_cache[key] = self.conf.CheckCHeader(header)
+ if not self.config_cache[key]:
+ if fail:
+- print "Aborting!"
++ print("Aborting!")
+ sys.exit(1)
+ raise ConfigError("Headerfile '%s' not found" % header)
+
+ def checklib(self, lib, func, fail=False):
+ key = (lib, func)
+
+- if not self.config_cache.has_key(key):
++ if key not in self.config_cache:
+ #libtool_flags = None
+
+ self.config_cache[key] = ""
+@@ -229,7 +226,7 @@ class XMMSEnvironment(Environment):
+
+ if not self.config_cache[key]:
+ if fail:
+- print "Aborting!"
++ print("Aborting!")
+ sys.exit(1)
+ raise ConfigError("Symbol '%s' in library '%s' not found" % (func, lib))
+
+@@ -345,7 +345,7 @@ class XMMSEnvironment(Environment):
+ self.Install(os.path.join(self.includepath,target), source)
+
+ def add_manpage(self, section, source):
+- gzip.GzipFile(source+".gz", 'wb',9).write(file(source).read())
++ gzip.GzipFile(source+".gz", 'wb',9).write(open(source, "rb").read())
+ self.Install(os.path.join(self.manpath, "man"+str(section)), source+'.gz')
+
+ def options_changed(self, options, exclude=[]):
+@@ -354,7 +354,7 @@ class XMMSEnvironment(Environment):
+ if options.files:
+ for filename in options.files:
+ if os.path.exists(filename):
+- execfile(filename, cached)
++ exec(open(filename).read(), cached)
+ else:
+ return False
+
+@@ -363,8 +360,8 @@ class XMMSEnvironment(Environment):
+
+ for option in options.options:
+ if option.key in exclude: continue
+- if options.args.has_key(option.key):
+- if cached.has_key(option.key):
++ if option.key in options.args:
++ if option.key in cached:
+ if options.args[option.key] != cached[option.key]:
+ # differnt value
+ return True
+@@ -391,7 +391,7 @@ class XMMSEnvironment(Environment):
+ This will open the libtool file and read the lines
+ that we need.
+ """
+- f = file(libtoolfile)
++ f = open(libtoolfile)
+ line = f.readline()
+ ret = {}
+ while line:
+@@ -408,7 +408,7 @@ class XMMSEnvironment(Environment):
+ targets = [cls(a[1], self) for a in self.potential_targets if a[0].startswith(targettype)]
+
+ for t in targets:
+- env = self.Copy()
++ env = self.Clone()
+ env.dir = t.dir
+
+ try:
+@@ -417,6 +414,6 @@ class XMMSEnvironment(Environment):
+ try:
+ t.config(env)
+ t.add(env)
+- except ConfigError, m:
++ except ConfigError as m:
+ self.conf.logstream.write("xmmsscons: File %s reported error '%s' and was disabled.\n" % (t.target, m))
+ continue
+--- xmms2-0.1DR2.1/src/clients/lib/ruby/Library.orig 2005-08-18 20:26:23.000000000 +0200
++++ xmms2-0.1DR2.1/src/clients/lib/ruby/Library 2023-05-07 20:13:51.721404557 +0200
+@@ -7,14 +7,14 @@ static=False
+ def config(env):
+ if env.tryaction ("ruby --version") :
+ # we require ruby 1.8 or greater
+- print "Checking for Ruby 1.8 or greater... ",
++ print("Checking for Ruby 1.8 or greater... ", end="")
+
+ version = env.run("ruby -e 'puts VERSION'").strip()
+ if not version or [int(a) for a in version.split(".")] < [1, 8] :
+- print "no"
++ print("no")
+ raise ConfigError("Need ruby 1.8")
+
+- print version
++ print(version)
+
+ got_ruby_h = env.run("ruby -rrbconfig -e 'puts File.exist?(Config::CONFIG[\"archdir\"] + \"/ruby.h\")'").strip()
+ if got_ruby_h != "true" :
+@@ -22,7 +22,7 @@ def config(env):
+
+ cmd = "ruby -rrbconfig -e 'puts \"-I%s -L%s\" % [].fill(Config::CONFIG[\"archdir\"], 0..1)'"
+ env.configcmd(cmd)
+- if env.has_key("RUBYARCHDIR"):
++ if "RUBYARCHDIR" in env:
+ env.librarypath = env["RUBYARCHDIR"]
+ else:
+ cmd = "ruby -rrbconfig -e 'print Config::CONFIG[\"sitearchdir\"]'"
+--- xmms2-0.1DR2.1/src/clients/lib/ruby/Library.ecore.orig 2005-08-18 20:26:23.000000000 +0200
++++ xmms2-0.1DR2.1/src/clients/lib/ruby/Library.ecore 2023-05-06 20:36:42.295381814 +0200
+@@ -13,14 +13,14 @@ def ecorelib2sed(lib):
+ def config(env):
+ if env.tryaction ("ruby --version") :
+ # we require ruby 1.8 or greater
+- print "Checking for Ruby 1.8 or greater... ",
++ print("Checking for Ruby 1.8 or greater... ", end="")
+
+ version = env.run("ruby -e 'puts VERSION'").strip()
+ if not version or [int(a) for a in version.split(".")] < [1, 8] :
+- print "no"
++ print("no")
+ raise ConfigError("")
+
+- print version
++ print(version)
+
+ got_ruby_h = env.run("ruby -rrbconfig -e 'puts File.exist?(Config::CONFIG[\"archdir\"] + \"/ruby.h\")'").strip()
+ if got_ruby_h != "true" :
+@@ -28,7 +28,7 @@ def config(env):
+
+ cmd = "ruby -rrbconfig -e 'puts \"-I%s -L%s\" % [].fill(Config::CONFIG[\"archdir\"], 0..1)'"
+ env.configcmd(cmd)
+- if env.has_key("RUBYARCHDIR"):
++ if "RUBYARCHDIR" in env:
+ env.librarypath = env["RUBYARCHDIR"]
+ else:
+ cmd = "ruby -rrbconfig -e 'print Config::CONFIG[\"sitearchdir\"]'"
+--- xmms2-0.1DR2.1/src/clients/lib/ruby/Library.glib.orig 2005-08-18 20:26:23.000000000 +0200
++++ xmms2-0.1DR2.1/src/clients/lib/ruby/Library.glib 2023-05-06 20:37:48.775021663 +0200
+@@ -7,14 +7,14 @@ static=False
+ def config(env):
+ if env.tryaction ("ruby --version") :
+ # we require ruby 1.8 or greater
+- print "Checking for Ruby 1.8 or greater... ",
++ print("Checking for Ruby 1.8 or greater... ", end="")
+
+ version = env.run("ruby -e 'puts VERSION'").strip()
+ if not version or [int(a) for a in version.split(".")] < [1, 8] :
+- print "no"
++ print("no")
+ raise ConfigError("bad")
+
+- print version
++ print(version)
+
+ got_ruby_h = env.run("ruby -rrbconfig -e 'puts File.exist?(Config::CONFIG[\"archdir\"] + \"/ruby.h\")'").strip()
+ if got_ruby_h != "true" :
+@@ -22,7 +22,7 @@ def config(env):
+
+ cmd = "ruby -rrbconfig -e 'puts \"-I%s -L%s\" % [].fill(Config::CONFIG[\"archdir\"], 0..1)'"
+ env.configcmd(cmd)
+- if env.has_key("RUBYARCHDIR"):
++ if "RUBYARCHDIR" in env:
+ env.librarypath = env["RUBYARCHDIR"]
+ else:
+ cmd = "ruby -rrbconfig -e 'print Config::CONFIG[\"sitearchdir\"]'"
+--- xmms2-0.1DR2.1/src/xmms/Program.orig 2005-08-18 20:26:23.000000000 +0200
++++ xmms2-0.1DR2.1/src/xmms/Program 2023-05-06 21:27:24.565567088 +0200
+@@ -23,7 +23,7 @@ source = ["main.c",
+ ]
+
+ def config(env):
+- pluginenv = env.Copy()
++ pluginenv = env.Clone()
+ env.Prepend(LIBPATH=["src/lib/xmmsipc"])
+ env.Prepend(LIBPATH=["src/lib/xmmssocket"])
+ env.Append(LIBS=['xmmsipc'])
diff --git a/xmms2-ruby.patch b/xmms2-ruby.patch
new file mode 100644
index 0000000..2509192
--- /dev/null
+++ b/xmms2-ruby.patch
@@ -0,0 +1,101 @@
+--- xmms2-0.1DR2.1/src/clients/lib/ruby/Library.orig 2023-05-07 20:14:21.607909314 +0200
++++ xmms2-0.1DR2.1/src/clients/lib/ruby/Library 2023-05-07 20:14:54.607730539 +0200
+@@ -9,23 +9,23 @@ def config(env):
+ # we require ruby 1.8 or greater
+ print("Checking for Ruby 1.8 or greater... ", end="")
+
+- version = env.run("ruby -e 'puts VERSION'").strip()
++ version = env.run("ruby -e 'puts RUBY_VERSION'").strip()
+ if not version or [int(a) for a in version.split(".")] < [1, 8] :
+ print("no")
+ raise ConfigError("Need ruby 1.8")
+
+ print(version)
+
+- got_ruby_h = env.run("ruby -rrbconfig -e 'puts File.exist?(Config::CONFIG[\"archdir\"] + \"/ruby.h\")'").strip()
++ got_ruby_h = env.run("ruby -rrbconfig -e 'puts File.exist?(RbConfig::CONFIG[\"rubyhdrdir\"] + \"/ruby.h\")'").strip()
+ if got_ruby_h != "true" :
+ raise ConfigError("bad")
+
+- cmd = "ruby -rrbconfig -e 'puts \"-I%s -L%s\" % [].fill(Config::CONFIG[\"archdir\"], 0..1)'"
++ cmd = "ruby -rrbconfig -e 'puts \"-I%s -L%s\" % [].fill(RbConfig::CONFIG[\"rubyhdrdir\"], 0..1)'"
+ env.configcmd(cmd)
+ if "RUBYARCHDIR" in env:
+ env.librarypath = env["RUBYARCHDIR"]
+ else:
+- cmd = "ruby -rrbconfig -e 'print Config::CONFIG[\"sitearchdir\"]'"
++ cmd = "ruby -rrbconfig -e 'print RbConfig::CONFIG[\"vendorarchdir\"]'"
+ env.librarypath = os.popen(cmd).read().strip()
+
+ env.Prepend(LIBPATH="src/clients/lib/xmmsclient")
+--- xmms2-0.1DR2.1/src/clients/lib/ruby/Library.ecore.orig 2023-05-07 20:40:30.769408437 +0200
++++ xmms2-0.1DR2.1/src/clients/lib/ruby/Library.ecore 2023-05-07 20:42:13.692184190 +0200
+@@ -15,23 +15,23 @@ def config(env):
+ # we require ruby 1.8 or greater
+ print("Checking for Ruby 1.8 or greater... ", end="")
+
+- version = env.run("ruby -e 'puts VERSION'").strip()
++ version = env.run("ruby -e 'puts RUBY_VERSION'").strip()
+ if not version or [int(a) for a in version.split(".")] < [1, 8] :
+ print("no")
+ raise ConfigError("")
+
+ print(version)
+
+- got_ruby_h = env.run("ruby -rrbconfig -e 'puts File.exist?(Config::CONFIG[\"archdir\"] + \"/ruby.h\")'").strip()
++ got_ruby_h = env.run("ruby -rrbconfig -e 'puts File.exist?(RbConfig::CONFIG[\"rubyhdrdir\"] + \"/ruby.h\")'").strip()
+ if got_ruby_h != "true" :
+ raise ConfigError("")
+
+- cmd = "ruby -rrbconfig -e 'puts \"-I%s -L%s\" % [].fill(Config::CONFIG[\"archdir\"], 0..1)'"
++ cmd = "ruby -rrbconfig -e 'puts \"-I%s -L%s\" % [].fill(RbConfig::CONFIG[\"rubyhdrdir\"], 0..1)'"
+ env.configcmd(cmd)
+ if "RUBYARCHDIR" in env:
+ env.librarypath = env["RUBYARCHDIR"]
+ else:
+- cmd = "ruby -rrbconfig -e 'print Config::CONFIG[\"sitearchdir\"]'"
++ cmd = "ruby -rrbconfig -e 'print RbConfig::CONFIG[\"vendorarchdir\"]'"
+ env.librarypath = os.popen(cmd).read().strip()
+
+ env.Prepend(LIBPATH="src/clients/lib/xmmsclient")
+--- xmms2-0.1DR2.1/src/clients/lib/ruby/Library.glib.orig 2023-05-07 20:42:40.065374647 +0200
++++ xmms2-0.1DR2.1/src/clients/lib/ruby/Library.glib 2023-05-07 20:43:31.151764555 +0200
+@@ -9,23 +9,23 @@ def config(env):
+ # we require ruby 1.8 or greater
+ print("Checking for Ruby 1.8 or greater... ", end="")
+
+- version = env.run("ruby -e 'puts VERSION'").strip()
++ version = env.run("ruby -e 'puts RUBY_VERSION'").strip()
+ if not version or [int(a) for a in version.split(".")] < [1, 8] :
+ print("no")
+ raise ConfigError("bad")
+
+ print(version)
+
+- got_ruby_h = env.run("ruby -rrbconfig -e 'puts File.exist?(Config::CONFIG[\"archdir\"] + \"/ruby.h\")'").strip()
++ got_ruby_h = env.run("ruby -rrbconfig -e 'puts File.exist?(RbConfig::CONFIG[\"rubyhdrdir\"] + \"/ruby.h\")'").strip()
+ if got_ruby_h != "true" :
+ raise ConfigError("bad")
+
+- cmd = "ruby -rrbconfig -e 'puts \"-I%s -L%s\" % [].fill(Config::CONFIG[\"archdir\"], 0..1)'"
++ cmd = "ruby -rrbconfig -e 'puts \"-I%s -L%s\" % [].fill(RbConfig::CONFIG[\"rubyhdrdir\"], 0..1)'"
+ env.configcmd(cmd)
+ if "RUBYARCHDIR" in env:
+ env.librarypath = env["RUBYARCHDIR"]
+ else:
+- cmd = "ruby -rrbconfig -e 'print Config::CONFIG[\"sitearchdir\"]'"
++ cmd = "ruby -rrbconfig -e 'print RbConfig::CONFIG[\"vendorarchdir\"]'"
+ env.librarypath = os.popen(cmd).read().strip()
+
+ env.pkgconfig("glib-2.0")
+--- xmms2-0.1DR2.1/src/clients/lib/ruby/rb_xmmsclient.c.orig 2023-05-07 21:46:21.478005611 +0200
++++ xmms2-0.1DR2.1/src/clients/lib/ruby/rb_xmmsclient.c 2023-05-07 21:46:25.607983236 +0200
+@@ -523,7 +523,7 @@ static VALUE c_playlist_add (VALUE self,
+
+ if (!NIL_P (rb_check_string_type (arg)))
+ is_str = true;
+- else if (rb_obj_is_kind_of (arg, rb_cFixnum))
++ else if (rb_obj_is_kind_of (arg, rb_cInteger))
+ is_str = false;
+ else {
+ rb_raise (eXmmsClientError, "unsupported argument");
diff --git a/xmms2-tabs.patch b/xmms2-tabs.patch
new file mode 100644
index 0000000..6dff483
--- /dev/null
+++ b/xmms2-tabs.patch
@@ -0,0 +1,63 @@
+--- xmms2-0.1DR2.1/SConstruct.orig 2005-08-18 20:26:23.000000000 +0200
++++ xmms2-0.1DR2.1/SConstruct 2023-05-06 14:46:41.612485598 +0200
+@@ -69,8 +69,8 @@ base_env.Append(CPPPATH=["#src/include"]
+ Help(opts.GenerateHelpText(base_env))
+
+ def do_subst_in_file(targetfile, sourcefile, dict):
+- """Replace all instances of the keys of dict with their values.
+- For example, if dict is {'%VERSION%': '1.2345', '%BASE%': 'MyProg'},
++ """Replace all instances of the keys of dict with their values.
++ For example, if dict is {'%VERSION%': '1.2345', '%BASE%': 'MyProg'},
+ then all instances of %VERSION% in the file will be replaced with 1.2345 etc.
+ """
+ try:
+@@ -132,9 +132,9 @@ base_env.Depends('#src/xmms/sample.c', '
+ base_env.SourceCode('src/xmms/converter.c', b)
+
+ subst_dict = {"%VERSION%":XMMS_VERSION, "%PLATFORM%":"XMMS_OS_" + base_env.platform.upper(),
+- "%PKGLIBDIR%":base_env["PREFIX"]+"/lib/xmms2",
+- "%SHAREDDIR%":base_env.sharepath,
+- "%PREFIX%":base_env.install_prefix}
++ "%PKGLIBDIR%":base_env["PREFIX"]+"/lib/xmms2",
++ "%SHAREDDIR%":base_env.sharepath,
++ "%PREFIX%":base_env.install_prefix}
+
+ config = base_env.SubstInFile("src/include/xmms/xmms_defs.h", "src/include/xmms/xmms_defs.h.in", SUBST_DICT=subst_dict)
+
+@@ -156,7 +156,7 @@ def scan_headers(name):
+ newf = dir+"/"+d
+ if os.path.isfile(newf) and newf.endswith('.h'):
+ base_env.add_header(name, newf)
+-
++
+ scan_headers("xmmsc")
+ scan_headers("xmms")
+ scan_headers("xmmsclient")
+@@ -169,9 +169,9 @@ base_env.add_manpage(8, 'doc/xmms2d.8')
+ #### Generate pc files.
+
+ pc_files = [{"name": "xmms2-plugin", "lib":""},
+- {"name":"xmms2-client", "lib":"-lxmmsclient"},
+- {"name":"xmms2-client-glib", "lib":"-lxmmsclient-glib"},
+- {"name":"xmms2-client-ecore", "lib":"-lxmmsclient-ecore"}]
++ {"name":"xmms2-client", "lib":"-lxmmsclient"},
++ {"name":"xmms2-client-glib", "lib":"-lxmmsclient-glib"},
++ {"name":"xmms2-client-ecore", "lib":"-lxmmsclient-ecore"}]
+
+ for p in pc_files:
+ d = subst_dict.copy()
+--- xmms2-0.1DR2.1/xmmsenv.py.orig 2005-08-18 20:26:23.000000000 +0200
++++ xmms2-0.1DR2.1/xmmsenv.py 2023-05-06 15:04:57.296549768 +0200
+@@ -347,9 +347,9 @@ class XMMSEnvironment(Environment):
+ def add_header(self, target, source):
+ self.Install(os.path.join(self.includepath,target), source)
+
+- def add_manpage(self, section, source):
+- gzip.GzipFile(source+".gz", 'wb',9).write(file(source).read())
+- self.Install(os.path.join(self.manpath, "man"+str(section)), source+'.gz')
++ def add_manpage(self, section, source):
++ gzip.GzipFile(source+".gz", 'wb',9).write(file(source).read())
++ self.Install(os.path.join(self.manpath, "man"+str(section)), source+'.gz')
+
+ def options_changed(self, options, exclude=[]):
+ """NOTE: This method does not catch changed defaults."""
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/xmms2.git/commitdiff/72df73dca1f7f490ce0c6516dc05d0ba2cff729d
More information about the pld-cvs-commit
mailing list