[packages/xmms2] - up to 0.2DrJekyll; build system has been changed to waf, java is gone, perl introduced, sdl-vis di
qboosh
qboosh at pld-linux.org
Sat May 20 09:26:44 CEST 2023
commit 0841a5c20d0b4e57f3caadc01524eccbfe254b14
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sat May 20 09:29:16 2023 +0200
- up to 0.2DrJekyll; build system has been changed to waf, java is gone, perl introduced, sdl-vis disabled
xmms2-ffmpeg.patch | 221 +++++++------
xmms2-java.patch | 11 -
xmms2-link.patch | 15 -
xmms2-mdns-launcher-conflict.patch | 17 +-
xmms2-perl.patch | 11 +
xmms2-python3.patch | 618 -------------------------------------
xmms2-ruby.patch | 191 ++++++------
xmms2-tabs.patch | 120 +------
xmms2-waf.patch | 99 ++++++
xmms2.spec | 220 ++++++++-----
10 files changed, 491 insertions(+), 1032 deletions(-)
---
diff --git a/xmms2.spec b/xmms2.spec
index 4d32b98..5e3995b 100644
--- a/xmms2.spec
+++ b/xmms2.spec
@@ -1,32 +1,35 @@
-# XXX: what about -devel? shouldn't -static be separated?
+# XXX: split -devel?
#
# Conditional build:
%bcond_with efl # ecore client library
-%bcond_without java # Java/JNI module
-%bcond_with python # Python module (doesn't build with python3-based scons 4)
+%bcond_with sdl # sdlvis client (no build system since 0.2DrJekyll)
+%bcond_with java # Java/JNI module (removed in 0.2DrJekyll)
+%bcond_without perl # Perl module
+%bcond_with python # Python module (doesn't build with python 2.7)
%bcond_without ruby # Ruby modules
-%bcond_with flac # flac plugin (incompatible with 1.1.3+)
+%bcond_without flac # flac plugin
Summary: Client/server based media player system
Summary(pl.UTF-8): System odtwarzania multimediów oparty na architekturze klient/serwer
Name: xmms2
-Version: 0.2DrHouse
+Version: 0.2DrJekyll
Release: 0.1
License: LGPL v2.1
Group: Applications/Sound
Source0: https://downloads.sourceforge.net/xmms2/%{name}-%{version}.tar.bz2
-# Source0-md5: 8f7293b21bd6cb28e7705559a9deab10
+# Source0-md5: 768de76a98b6a9766cec157ff0a12543
Patch0: %{name}-tabs.patch
-Patch1: %{name}-python3.patch
-Patch2: %{name}-link.patch
+Patch1: %{name}-perl.patch
Patch3: %{name}-modplug.patch
Patch4: %{name}-ffmpeg.patch
Patch5: %{name}-ruby.patch
Patch6: %{name}-mdns-launcher-conflict.patch
-Patch7: %{name}-java.patch
+Patch8: %{name}-waf.patch
URL: http://xmms2.xmms.se/
+%if %{with sdl}
BuildRequires: SDL-devel
BuildRequires: SDL_ttf-devel
+%endif
BuildRequires: alsa-lib-devel
BuildRequires: avahi-devel
BuildRequires: avahi-compat-libdns_sd-devel
@@ -36,17 +39,20 @@ BuildRequires: curl-devel >= 7.11.2
BuildRequires: faad2-devel >= 2
BuildRequires: ffmpeg-devel >= 2
BuildRequires: fftw3-single-devel >= 3
-%{?with_flac:BuildRequires: flac-devel < 1.1.3}
+%{?with_flac:BuildRequires: flac-devel >= 1.1.3}
BuildRequires: gamin-devel
-BuildRequires: glib2-devel >= 2.2.0
+BuildRequires: glib2-devel >= 1:2.6.0
BuildRequires: gnome-vfs2-devel >= 2.0
BuildRequires: jack-audio-connection-kit-devel
%{?with_java:BuildRequires: jdk}
BuildRequires: libao-devel
+BuildRequires: libcdio-paranoia-devel
+BuildRequires: libdiscid-devel
BuildRequires: libmad-devel
BuildRequires: libmodplug-devel
BuildRequires: libmms-devel
BuildRequires: libmpcdec-devel
+BuildRequires: libofa-devel
BuildRequires: libogg-devel
BuildRequires: libsamplerate-devel
BuildRequires: libshout-devel
@@ -54,6 +60,7 @@ BuildRequires: libsidplay2-devel
BuildRequires: libsmbclient-devel
BuildRequires: libstdc++-devel
BuildRequires: libvorbis-devel
+BuildRequires: libxml2-devel >= 2.0
BuildRequires: pkgconfig
%if %{with python}
BuildRequires: python-Pyrex >= 0.9.4.2
@@ -67,7 +74,6 @@ BuildRequires: sed >= 4.0
#BuildRequires: speex-devel
BuildRequires: sqlite3-devel >= 3.2
BuildRequires: swig >= 1.3.25
-Obsoletes: xmms2-input-cd < 0.2DrCox
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -165,6 +171,18 @@ Java bindings for the xmms2 clientlib.
%description client-lib-java -l pl.UTF-8
Wiązania Javy do xmms2.
+%package client-lib-perl
+Summary: Perl client library for XMMS2
+Summary(pl.UTF-8): Biblioteka kliencka Perla do XMMS2
+Group: Applications/Sound
+Requires: %{name} = %{version}-%{release}
+
+%description client-lib-perl
+Perl client library for XMMS2.
+
+%description client-lib-perl -l pl.UTF-8
+Biblioteka kliencka Perla do XMMS2.
+
%package client-lib-python
Summary: xmms2 Python bindings
Summary(pl.UTF-8): Wiązania Pythona do XMMS2
@@ -202,6 +220,18 @@ This package enables phase vocoder effect for xmms2.
%description effect-vocoder -l pl.UTF-8
Ten pakiet obsługuje efekt fazowego vocodera w xmms2.
+%package input-cd
+Summary: CD DA input
+Summary(pl.UTF-8): Wejście CD DA
+Group: Applications/Sound
+Requires: %{name} = %{version}-%{release}
+
+%description input-cd
+This package enables reading of CD DA for xmms2.
+
+%description input-cd -l pl.UTF-8
+Ten pakiet umożliwia odczyt płyt CD DA przez xmms2.
+
%package input-faad
Summary: AAC decorer
Summary(pl.UTF-8): Dekoder AAC
@@ -215,6 +245,19 @@ This package enables AAC decoding using faad2 library for xmms2.
Ten pakiet umożliwia dekodowanie plików AAC przez xmms2 przy użyciu
biblioteki faad2.
+%package input-ffmpeg
+Summary: FFmpeg decoder
+Summary(pl.UTF-8): Dekoder FFmpeg
+Group: X11/Applications/Sound
+Requires: %{name} = %{version}-%{release}
+Obsoletes: xmms2-input-wma < 0.2DrJekyll
+
+%description input-ffmpeg
+This package enables audio decoding via FFmpeg for xmms2.
+
+%description input-ffmpeg -l pl.UTF-8
+Ten pakiet umożliwia dekodowanie dźwięku przez FFmpeg w xmms2.
+
%package input-flac
Summary: FLAC decorer
Summary(pl.UTF-8): Dekoder FLAC
@@ -311,18 +354,6 @@ This package enables WAV decoding for xmms2.
%description input-wav -l pl.UTF-8
Ten pakiet umożliwia dekodowanie WAV przez xmms2.
-%package input-wma
-Summary: WMA decoder
-Summary(pl.UTF-8): Dekoder WMA
-Group: X11/Applications/Sound
-Requires: %{name} = %{version}-%{release}
-
-%description input-wma
-This package enables WMA decoding for xmms2.
-
-%description input-wma -l pl.UTF-8
-Ten pakiet umożliwia dekodowanie WMA przez xmms2.
-
%package output-alsa
Summary: ALSA output
Summary(pl.UTF-8): Wyjście ALSA
@@ -461,67 +492,92 @@ xmms2.
%setup -q
%patch0 -p1
%patch1 -p1
-%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
-%patch7 -p1
-
-%{__sed} -i xmms2.pc.in \
- -e '/^libdir/ s,/lib$,/%{_lib},'
-%{__sed} -i SConstruct \
- -e '/%PKGLIBDIR%/ s,/lib/,/%{_lib}/,'
-%{__sed} -i xmmsenv.py \
- -e '/os\.path\.join(self\.install_prefix.*"lib/s@"lib@"%{_lib}@'
-%{__sed} -i src/clients/lib/python/Library \
- -e 's/get_python_lib()/get_python_lib(plat_specific=True)/'
-
-# avoid invalid version in .pc files
-%{__sed} -i -e '/^XMMS_VERSION/ s/ \(Dr[^ ]*\) (git commit: %s%s)/\1/; s/ % .*//;' SConstruct
-
-iconv -f iso-8859-1 -t utf8 doc/xmms2.1 -o doc/xmms2.1.utf8
-%{__mv} doc/xmms2.1.utf8 doc/xmms2.1
+%patch8 -p1
+
+# sanitize version to avoid invalid format in .pc files
+%{__sed} -i -e '/^VERSION=/ { s/ \(Dr[^ ]*\) (git commit: %s)/\1/; s/ % .*// }' wscript
+
+# recode to UTF-8
+for f in \
+ src/clients/cli/xmms2.1 \
+ src/clients/et/xmms2-et.1 \
+ src/clients/launcher/xmms2-launcher.1 \
+ src/clients/mdns/avahi/xmms2-mdns-avahi.1 \
+ src/xmms/xmms2d.1
+do
+ iconv -f iso-8859-1 -t utf8 "$f" -o "${f}.utf8"
+ %{__mv} "${f}.utf8" "$f"
+done
%build
-scons \
- CC="%{__cc}" \
- CXX="%{__cxx}" \
- CCFLAGS="%{rpmcflags} %{rpmcppflags} $(pkg-config --cflags smbclient)" \
- PREFIX=%{_prefix} \
- LIBDIR=%{_libdir} \
- MANDIR=%{_mandir} \
- PKGCONFIGDIR=%{_pkgconfigdir} \
- SHAREDIR=%{_datadir}/xmms2
+CC="%{__cc}" \
+CXX="%{__cxx}" \
+CCFLAGS="%{rpmcflags} %{rpmcppflags} $(pkg-config --cflags smbclient)" \
+CXXFLAGS="%{rpmcxxflags} %{rpmcppflags} $(pkg-config --cflags smbclient)" \
+LDFLAGS="%{rpmldflags}" \
+./waf configure -v \
+ --prefix=%{_prefix} \
+ --libdir=%{_libdir} \
+ --with-mandir=%{_mandir} \
+ --without-optionals=python
+
+./waf build -v
%install
rm -rf $RPM_BUILD_ROOT
-scons install \
- --install-sandbox $RPM_BUILD_ROOT
+./waf install \
+ --destdir=$RPM_BUILD_ROOT
+
+chmod 755 $RPM_BUILD_ROOT%{_libdir}/lib*.so.*.*
+chmod 755 $RPM_BUILD_ROOT%{_libdir}/xmms2/lib*.so
%clean
rm -rf $RPM_BUILD_ROOT
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
+%post client-lib-ecore -p /sbin/ldconfig
+%postun client-lib-ecore -p /sbin/ldconfig
+
+%post client-lib-glib -p /sbin/ldconfig
+%postun client-lib-glib -p /sbin/ldconfig
+
%files
%defattr(644,root,root,755)
%doc AUTHORS COPYING README TODO
%attr(755,root,root) %{_bindir}/xmms2-launcher
%attr(755,root,root) %{_bindir}/xmms2d
-%attr(755,root,root) %{_libdir}/libxmmsclient.so.0
+%attr(755,root,root) %{_libdir}/libxmmsclient.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libxmmsclient.so.2
%dir %{_libdir}/%{name}
+%attr(755,root,root) %{_libdir}/%{name}/libxmms_asx.so
+%attr(755,root,root) %{_libdir}/%{name}/libxmms_cue.so
%attr(755,root,root) %{_libdir}/%{name}/libxmms_diskwrite.so
%attr(755,root,root) %{_libdir}/%{name}/libxmms_equalizer.so
%attr(755,root,root) %{_libdir}/%{name}/libxmms_file.so
%attr(755,root,root) %{_libdir}/%{name}/libxmms_icymetaint.so
%attr(755,root,root) %{_libdir}/%{name}/libxmms_id3v2.so
+%attr(755,root,root) %{_libdir}/%{name}/libxmms_m3u.so
+%attr(755,root,root) %{_libdir}/%{name}/libxmms_mp4.so
%attr(755,root,root) %{_libdir}/%{name}/libxmms_null.so
%attr(755,root,root) %{_libdir}/%{name}/libxmms_nulstripper.so
+%attr(755,root,root) %{_libdir}/%{name}/libxmms_pls.so
%attr(755,root,root) %{_libdir}/%{name}/libxmms_replaygain.so
-# disabled since 0.2DrEvil
+%attr(755,root,root) %{_libdir}/%{name}/libxmms_xml.so
+# XXX: requires libofa, but which kind of plugin is it? (fingerprint)
+%attr(755,root,root) %{_libdir}/%{name}/libxmms_ofa.so
+# XXX: input-rss? (requires libxml2)
+%attr(755,root,root) %{_libdir}/%{name}/libxmms_rss.so
+# XXX: requires libxml2, playlist reader
+%attr(755,root,root) %{_libdir}/%{name}/libxmms_xspf.so
+# disabled since 0.2DrEvil ("broken=True")
#%attr(755,root,root) %{_libdir}/%{name}/libxmms_html.so
-#%attr(755,root,root) %{_libdir}/%{name}/libxmms_m3u.so
-#%attr(755,root,root) %{_libdir}/%{name}/libxmms_pls.so
%{_datadir}/%{name}
%{_mandir}/man1/xmms2-launcher.1*
%{_mandir}/man1/xmms2d.1*
@@ -539,14 +595,17 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man1/xmms2-et.1*
%{_mandir}/man1/xmms2-mdns-avahi.1*
+%if %{with sdl}
%files client-sdlvis
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/sdl-vis
+%endif
%if %{with efl}
%files client-lib-ecore
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libxmmsclient-ecore.so.0
+%attr(755,root,root) %{_libdir}/libxmmsclient-ecore.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libxmmsclient-ecore.so.1
%if %{with ruby}
%files client-lib-ecore-ruby
@@ -557,8 +616,10 @@ rm -rf $RPM_BUILD_ROOT
%files client-lib-glib
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libxmmsclient-glib.so.0
-%attr(755,root,root) %{_libdir}/libxmmsclient++-glib.so.0
+%attr(755,root,root) %{_libdir}/libxmmsclient-glib.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libxmmsclient-glib.so.1
+%attr(755,root,root) %{_libdir}/libxmmsclient++-glib.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libxmmsclient++-glib.so.1
%if %{with ruby}
%files client-lib-glib-ruby
@@ -573,6 +634,15 @@ rm -rf $RPM_BUILD_ROOT
%{_javadir}/xmms2java.jar
%endif
+%if %{with perl}
+%files client-lib-perl
+%defattr(644,root,root,755)
+%{perl_vendorarch}/Audio/XMMSClient.pm
+%{perl_vendorarch}/Audio/XMMSClient
+%dir %{perl_vendorarch}/auto/Audio/XMMSClient
+%attr(755,root,root) %{perl_vendorarch}/auto/Audio/XMMSClient/XMMSClient.so
+%endif
+
%if %{with python}
%files client-lib-python
%defattr(644,root,root,755)
@@ -582,7 +652,9 @@ rm -rf $RPM_BUILD_ROOT
%if %{with ruby}
%files client-lib-ruby
%defattr(644,root,root,755)
-%attr(755,root,root) %{ruby_vendorarchdir}/xmmsclient.so
+%attr(755,root,root) %{ruby_vendorarchdir}/xmmsclient_ext.so
+%{ruby_vendorlibdir}/xmmsclient.rb
+%{ruby_vendorlibdir}/xmmsclient
%endif
### effect
@@ -591,10 +663,19 @@ rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{_libdir}/%{name}/libxmms_vocoder.so
### input
+%files input-cd
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/%{name}/libxmms_cdda.so
+
%files input-faad
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/%{name}/libxmms_faad.so
+%files input-ffmpeg
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/%{name}/libxmms_avcodec.so
+%attr(755,root,root) %{_libdir}/%{name}/libxmms_avformat.so
+
%if %{with flac}
%files input-flac
%defattr(644,root,root,755)
@@ -626,16 +707,12 @@ rm -rf $RPM_BUILD_ROOT
%files input-vorbis
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/%{name}/libxmms_vorbisfile.so
+%attr(755,root,root) %{_libdir}/%{name}/libxmms_vorbis.so
%files input-wav
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/%{name}/libxmms_wave.so
-%files input-wma
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/%{name}/libxmms_wma.so
-
### output
%files output-alsa
%defattr(644,root,root,755)
@@ -659,7 +736,7 @@ rm -rf $RPM_BUILD_ROOT
%files transport-curl
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/%{name}/libxmms_curl_http.so
+%attr(755,root,root) %{_libdir}/%{name}/libxmms_curl.so
%attr(755,root,root) %{_libdir}/%{name}/libxmms_lastfm.so
%attr(755,root,root) %{_libdir}/%{name}/libxmms_lastfmeta.so
@@ -677,7 +754,7 @@ rm -rf $RPM_BUILD_ROOT
%files transport-samba
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/%{name}/libxmms_smb.so
+%attr(755,root,root) %{_libdir}/%{name}/libxmms_samba.so
%files devel
%defattr(644,root,root,755)
@@ -685,12 +762,11 @@ rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{_libdir}/libxmmsclient-glib.so
%attr(755,root,root) %{_libdir}/libxmmsclient++-glib.so
%{_includedir}/xmms2
-%{_libdir}/libxmmsclient.a
-%{_libdir}/libxmmsclient-glib.a
-%{_libdir}/libxmmsclient++-glib.a
%{_pkgconfigdir}/xmms2-client.pc
-%{_pkgconfigdir}/xmms2-client-cpp.pc
+# requires old boost.signal
+#%{_pkgconfigdir}/xmms2-client-cpp.pc
%{_pkgconfigdir}/xmms2-client-cpp-glib.pc
-%{_pkgconfigdir}/xmms2-client-ecore.pc
+# disabled in 0.2DrJekyll
+#%{_pkgconfigdir}/xmms2-client-ecore.pc
%{_pkgconfigdir}/xmms2-client-glib.pc
%{_pkgconfigdir}/xmms2-plugin.pc
diff --git a/xmms2-ffmpeg.patch b/xmms2-ffmpeg.patch
index 788e720..1abb191 100644
--- a/xmms2-ffmpeg.patch
+++ b/xmms2-ffmpeg.patch
@@ -1,13 +1,13 @@
---- xmms2-0.2DrGonzo/src/plugins/wma/wma.c.orig 2006-09-26 15:50:20.000000000 +0200
-+++ xmms2-0.2DrGonzo/src/plugins/wma/wma.c 2023-05-13 18:39:29.583665211 +0200
+--- xmms2-0.2DrJekyll/src/plugins/avformat/avformat.c.orig 2007-05-20 17:55:40.000000000 +0200
++++ xmms2-0.2DrJekyll/src/plugins/avformat/avformat.c 2023-05-17 17:39:28.342596542 +0200
@@ -24,7 +24,7 @@
- #include <string.h>
#include <glib.h>
+ #undef ABS
-#include "avformat.h"
+#include <libavformat/avformat.h>
- #define WMA_BUFFER_SIZE 4096
+ #define AVFORMAT_BUFFER_SIZE 4096
@@ -33,7 +33,7 @@ typedef struct {
@@ -16,50 +16,50 @@
- offset_t offset;
+ int64_t offset;
- guchar buffer[WMA_BUFFER_SIZE];
+ guchar buffer[AVFORMAT_BUFFER_SIZE];
guint buffer_size;
-@@ -75,7 +75,7 @@ static void xmms_wma_get_mediainfo (xmms
+@@ -72,7 +72,7 @@ static void xmms_asf_metahack (xmms_xfor
- int xmms_wma_read_callback (void *user_data, uint8_t *buffer,
- int length);
--offset_t xmms_wma_seek_callback (void *user_data, offset_t offset, int whence);
-+int64_t xmms_wma_seek_callback (void *user_data, int64_t offset, int whence);
- int xmms_wma_get_track (AVFormatContext *fmtctx);
+ int xmms_avformat_read_callback (void *user_data, uint8_t *buffer,
+ int length);
+-offset_t xmms_avformat_seek_callback (void *user_data, offset_t offset, int whence);
++int64_t xmms_avformat_seek_callback (void *user_data, int64_t offset, int whence);
/*
-@@ -121,7 +121,7 @@ xmms_wma_destroy (xmms_xform_t *xform)
+ * Plugin header
+@@ -124,7 +124,7 @@ xmms_avformat_destroy (xmms_xform_t *xfo
+ data = xmms_xform_private_data_get (xform);
g_return_if_fail (data);
- avcodec_close (data->codecctx);
- av_close_input_file (data->fmtctx);
+ avformat_close_input (&data->fmtctx);
g_string_free (data->outbuf, TRUE);
g_free (data);
-@@ -134,7 +134,7 @@ xmms_wma_init (xmms_xform_t *xform)
- gint temp;
+@@ -135,7 +135,7 @@ xmms_avformat_init (xmms_xform_t *xform)
+ {
+ xmms_avformat_data_t *data;
AVInputFormat *format;
- AVCodec *codec;
- ByteIOContext byteio;
+ AVIOContext *byteio;
-
- g_return_val_if_fail (xform, FALSE);
-
-@@ -155,13 +155,18 @@ xmms_wma_init (xmms_xform_t *xform)
- goto err;
+ AVCodec *codec;
+ const gchar *mimetype;
+ gint temp;
+@@ -172,13 +172,18 @@ xmms_avformat_init (xmms_xform_t *xform)
}
+
format->flags |= AVFMT_NOFILE;
- if ((temp = init_put_byte (&byteio, data->buffer, data->buffer_size, 0,
+ if ((byteio = avio_alloc_context (data->buffer, data->buffer_size, 0,
- xform, xmms_wma_read_callback, NULL,
-- xmms_wma_seek_callback)) < 0) {
+ xform, xmms_avformat_read_callback, NULL,
+- xmms_avformat_seek_callback)) < 0) {
- XMMS_DBG ("Could not initialize ByteIOContext structure: %d", temp);
-+ xmms_wma_seek_callback)) == NULL) {
++ xmms_avformat_seek_callback)) == NULL) {
+ XMMS_DBG ("Could not initialize AVIOContext structure");
goto err;
}
- if ((temp = av_open_input_stream (&data->fmtctx, &byteio, "", format,
-+ if ((data->fmtctx = afformat_alloc_context()) == NULL) {
++ if ((data->fmtctx = avformat_alloc_context()) == NULL) {
+ XMMS_DBG ("Could not initialize AVFormatContext structure");
+ goto err;
+ }
@@ -68,93 +68,27 @@
NULL)) < 0) {
XMMS_DBG ("Could not open input stream for ASF format: %d", temp);
goto err;
-@@ -182,7 +187,7 @@ xmms_wma_init (xmms_xform_t *xform)
- data->samplerate = data->codecctx->sample_rate;
- data->channels = data->codecctx->channels;
-
-- if ((temp = avcodec_open (data->codecctx, codec)) < 0) {
-+ if ((temp = avcodec_open2 (data->codecctx, codec, NULL)) < 0) {
- XMMS_DBG ("Opening WMA decoder failed");
- goto err_close_codec;
- }
-@@ -208,7 +213,7 @@ err_close_codec:
- avcodec_close (data->codecctx);
+@@ -230,7 +235,7 @@ xmms_avformat_init (xmms_xform_t *xform)
+
err:
if (data->fmtctx) {
- av_close_input_file (data->fmtctx);
-+ avformat_close_input (&data->fmtctx);
++ avformat_close_input (data->fmtctx);
}
g_string_free (data->outbuf, TRUE);
g_free (data);
-@@ -222,9 +227,7 @@ xmms_wma_read (xmms_xform_t *xform, xmms
- {
- xmms_wma_data_t *data;
- AVPacket pkt;
-- unsigned char *inbuf;
-- char outbuf[AVCODEC_MAX_AUDIO_FRAME_SIZE];
-- int inbufsize, outbufsize, size;
-+ int size;
-
- data = xmms_xform_private_data_get (xform);
- g_return_val_if_fail (data, -1);
-@@ -236,26 +239,33 @@ xmms_wma_read (xmms_xform_t *xform, xmms
- if (pkt.size == 0)
- return 0;
-
-- inbuf = pkt.data;
-- inbufsize = pkt.size;
--
-- while (inbufsize > 0) {
-+ while (pkt.size > 0) {
- int inlen;
--
-- inlen = avcodec_decode_audio(data->codecctx, (short *) outbuf,
-- &outbufsize, inbuf, inbufsize);
-+ int got_frame = 0;
-+ AVFrame *frame = av_frame_alloc();
-+ gsize outbufsize;
-+
-+ if (frame == NULL)
-+ return -1;
-+ inlen = avcodec_decode_audio4(data->codecctx, frame, &got_frame, &pkt);
- data->codecctx->frame_number++;
-
-- if (inlen < 0)
-+ if (inlen < 0) {
-+ av_frame_free(&frame);
- return -1;
-+ }
-
-- if (outbufsize <= 0)
-+ if (!got_frame) {
-+ av_frame_free(&frame);
- continue;
-+ }
-+ outbufsize = av_samples_get_buffer_size(NULL, data->codecctx->channels, frame->nb_samples, data->codecctx->sample_fmt, 1);
-
-- g_string_append_len (data->outbuf, outbuf, outbufsize);
-+ g_string_append_len (data->outbuf, frame->data[0], outbufsize);
-+ av_frame_free(&frame);
-
-- inbuf += inlen;
-- inbufsize -= inlen;
-+ pkt.data += inlen;
-+ pkt.size -= inlen;
- }
-
- if (pkt.data) {
-@@ -504,8 +514,8 @@ xmms_wma_read_callback (void *user_data,
+@@ -501,8 +506,8 @@ xmms_avformat_read_callback (void *user_
return ret;
}
-offset_t
--xmms_wma_seek_callback (void *user_data, offset_t offset, int whence)
+-xmms_avformat_seek_callback (void *user_data, offset_t offset, int whence)
+int64_t
-+xmms_wma_seek_callback (void *user_data, int64_t offset, int whence)
++xmms_avformat_seek_callback (void *user_data, int64_t offset, int whence)
{
xmms_xform_t *xform;
- xmms_wma_data_t *data;
-@@ -555,7 +565,7 @@ xmms_wma_get_track (AVFormatContext *fmt
+ xmms_avformat_data_t *data;
+@@ -552,7 +557,7 @@ xmms_avformat_get_track (AVFormatContext
for (wma_idx = 0; wma_idx < fmtctx->nb_streams; wma_idx++) {
codec = fmtctx->streams[wma_idx]->codec;
@@ -163,3 +97,92 @@
break;
}
}
+--- xmms2-0.2DrJekyll/src/plugins/avcodec/avcodec.c.orig 2007-05-20 17:55:40.000000000 +0200
++++ xmms2-0.2DrJekyll/src/plugins/avcodec/avcodec.c 2023-05-18 18:38:52.423864232 +0200
+@@ -24,7 +24,7 @@
+ #include <glib.h>
+
+ #undef ABS
+-#include "avcodec.h"
++#include <libavcodec/avcodec.h>
+
+ #define AVCODEC_BUFFER_SIZE 16384
+
+@@ -134,7 +134,7 @@ xmms_avcodec_init (xmms_xform_t *xform)
+ goto err;
+ }
+
+- if (codec->type != CODEC_TYPE_AUDIO) {
++ if (codec->type != AVMEDIA_TYPE_AUDIO) {
+ XMMS_DBG ("Codec '%s' found but its type is not audio", data->codec_id);
+ goto err;
+ }
+@@ -155,9 +155,9 @@ xmms_avcodec_init (xmms_xform_t *xform)
+ data->codecctx->extradata_size = data->extradata_size;
+
+ /* FIXME: this is for ALAC but can be a different value */
+- data->codecctx->bits_per_sample = 16;
++ data->codecctx->bits_per_raw_sample = 16;
+
+- if (avcodec_open (data->codecctx, codec) < 0) {
++ if (avcodec_open2 (data->codecctx, codec, NULL) < 0) {
+ XMMS_DBG ("Opening decoder '%s' failed", codec->name);
+ goto err;
+ } else {
+@@ -206,7 +206,6 @@ xmms_avcodec_read (xmms_xform_t *xform,
+ xmms_error_t *error)
+ {
+ xmms_avcodec_data_t *data;
+- char outbuf[AVCODEC_MAX_AUDIO_FRAME_SIZE];
+ gint outbufsize, bytes_read = 0;
+ guint size;
+
+@@ -215,6 +214,11 @@ xmms_avcodec_read (xmms_xform_t *xform,
+
+ size = MIN (data->outbuf->len, len);
+ while (size == 0) {
++ int got_frame = 0;
++ AVFrame *frame;
++ AVPacket packet;
++ av_init_packet (&packet);
++
+ if (data->buffer_length == 0) {
+ bytes_read = xmms_xform_read (xform,
+ (gchar *) data->buffer,
+@@ -232,11 +236,19 @@ xmms_avcodec_read (xmms_xform_t *xform,
+ data->buffer_length += bytes_read;
+ }
+
+- bytes_read = avcodec_decode_audio (data->codecctx, (short *) outbuf,
+- &outbufsize, data->buffer,
+- data->buffer_length);
++ packet.data = data->buffer;
++ packet.size = data->buffer_length;
++
++ frame = av_frame_alloc();
++ if (frame == NULL) {
++ XMMS_DBG ("AVFrame allocation failed");
++ return -1;
++ }
++
++ bytes_read = avcodec_decode_audio4 (data->codecctx, frame, &got_frame, &packet);
+
+ if (bytes_read < 0) {
++ av_frame_free(&frame);
+ XMMS_DBG ("Error decoding data!");
+ return -1;
+ } else if (bytes_read == 0) {
+@@ -246,9 +258,11 @@ xmms_avcodec_read (xmms_xform_t *xform,
+
+ data->buffer_length -= bytes_read;
+
+- if (outbufsize > 0) {
+- g_string_append_len (data->outbuf, outbuf, outbufsize);
++ if (got_frame) {
++ outbufsize = av_samples_get_buffer_size(NULL, data->codecctx->channels, frame->nb_samples, data->codecctx->sample_fmt, 1);
++ g_string_append_len (data->outbuf, frame->data[0], outbufsize);
+ }
++ av_frame_free(&frame);
+
+ size = MIN (data->outbuf->len, len);
+ }
diff --git a/xmms2-java.patch b/xmms2-java.patch
deleted file mode 100644
index 8da54fc..0000000
--- a/xmms2-java.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- xmms2-0.2DrGonzo/src/clients/lib/java/Library.orig 2023-05-13 18:41:07.899799253 +0200
-+++ xmms2-0.2DrGonzo/src/clients/lib/java/Library 2023-05-13 18:43:31.892352512 +0200
-@@ -125,7 +125,7 @@ def config(env):
-
- env.Java(target = mydir, source = [mydir + '/src'])
- env.Jar(target=mydir + '/xmms2java.jar', source=mydir + '/org')
-- env.Install(env['PREFIX'] + '/share/xmms2/java', mydir + '/xmms2java.jar')
-+ env.Install(env['PREFIX'] + '/share/java', mydir + '/xmms2java.jar')
- def mkdir(target, source, env):
- try:
- os.mkdir(mydir + "/src/org/xmms2/wrapper/xmms2bindings")
diff --git a/xmms2-link.patch b/xmms2-link.patch
deleted file mode 100644
index b1761e4..0000000
--- a/xmms2-link.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- 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-mdns-launcher-conflict.patch b/xmms2-mdns-launcher-conflict.patch
index 5b35d81..2299f47 100644
--- a/xmms2-mdns-launcher-conflict.patch
+++ b/xmms2-mdns-launcher-conflict.patch
@@ -1,7 +1,10 @@
---- xmms2-0.2DrHouse/src/clients/mdns/dns_sd/Program.orig 2006-12-03 00:01:08.000000000 +0100
-+++ xmms2-0.2DrHouse/src/clients/mdns/dns_sd/Program 2023-05-14 07:23:59.735165278 +0200
-@@ -11,4 +11,3 @@ def config(env):
- # on macosx it's in libc?
- if env.platform != "darwin":
- env.checklib("dns_sd", "DNSServiceRegister")
-- env.add_script("startup.d", "src/clients/mdns/dns_sd/xmms2-mdns-launcher.sh.in")
+--- xmms2-0.2DrJekyll/src/clients/mdns/dns_sd/wscript.orig 2007-05-20 17:55:40.000000000 +0200
++++ xmms2-0.2DrJekyll/src/clients/mdns/dns_sd/wscript 2023-05-14 20:16:34.294041077 +0200
+@@ -15,7 +15,6 @@ def build(bld):
+ obj = bld.create_obj('subst')
+ obj.source = 'xmms2-mdns-launcher.sh.in'
+ obj.dict = {'PRG_PATH' : os.path.join(bld.env_of_name('default')['PREFIX'], 'bin')}
+- Common.install_files('SCRIPTDIR', None, 'xmms2-mdns-launcher.sh', chmod=0755)
+
+ def configure(conf):
+ if not conf.check_header('dns_sd.h'):
diff --git a/xmms2-perl.patch b/xmms2-perl.patch
new file mode 100644
index 0000000..3a7bc4a
--- /dev/null
+++ b/xmms2-perl.patch
@@ -0,0 +1,11 @@
+--- xmms2-0.2DrJekyll/src/clients/lib/perl/wscript.orig 2007-05-20 17:55:40.000000000 +0200
++++ xmms2-0.2DrJekyll/src/clients/lib/perl/wscript 2023-05-19 19:41:28.398438169 +0200
+@@ -50,7 +50,7 @@ def configure(conf):
+ conf.env["CCFLAGS_perl"] += ' -DVERSION="0.03"'
+
+ if not Params.g_options.perlarchdir:
+- conf.env["ARCHDIR_perl"] = os.popen(perl + " -MConfig -e'print $Config{sitearch}'").read()
++ conf.env["ARCHDIR_perl"] = os.popen(perl + " -MConfig -e'print $Config{vendorarch}'").read()
+ else:
+ conf.env["ARCHDIR_perl"] = Params.g_options.perlarchdir
+
diff --git a/xmms2-python3.patch b/xmms2-python3.patch
deleted file mode 100644
index 893c974..0000000
--- a/xmms2-python3.patch
+++ /dev/null
@@ -1,618 +0,0 @@
---- xmms2-0.2DrHouse/SConstruct.orig 2023-05-13 22:20:48.565060133 +0200
-+++ xmms2-0.2DrHouse/SConstruct 2023-05-13 22:25:42.430134796 +0200
-@@ -5,7 +5,6 @@ import sys
- import SCons
- import re
- import string
--import new
- import gittools
- from marshal import dump
-
-@@ -24,7 +23,7 @@ EnsurePythonVersion(2, 3)
- 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())
-
-
- default_pyrex = 'pyrexc'
-@@ -36,7 +35,7 @@ if sys.platform == 'darwin':
- 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')
-@@ -56,10 +55,10 @@ opts.Add('INCLUDEDIR', 'specified includ
- 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(BoolOption('STATIC', 'Link everything static', 0))
-+opts.Add(BoolVariable('CONFIG', 'run configuration commands again', 0))
-+opts.Add(BoolVariable('STATIC', 'Link everything static', 0))
-
- # base CCPATH
- base_env = xmmsenv.XMMSEnvironment(options=opts)
-@@ -73,7 +72,7 @@ except xmmsenv.ConfigError:
- os.remove("config.cache")
- except:
- pass
-- print "OPTION CC MUST POINT TO A VALID C COMPILER!"
-+ print("OPTION CC MUST POINT TO A VALID C COMPILER!")
- sys.exit(-1)
-
- base_env.Append(CPPPATH=["#src/include"])
-@@ -86,24 +85,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):
-@@ -111,7 +110,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)
-
-@@ -161,7 +160,7 @@ config = base_env.SubstInFile("src/inclu
- 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!
-@@ -205,14 +204,14 @@ 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(os.sep)+1:]), base_env.plugins)
--print ", ".join(foo)
--print "Default output:", xmmsenv.default_output[1]
-+print(", ".join(foo))
-+print("Default output:", xmmsenv.default_output[1])
-
- base_env.add_shared("mind.in.a.box-lament_snipplet.ogg")
- base_env.Alias('install', base_env.install_targets)
---- xmms2-0.2DrHouse/xmmsenv.py.orig 2023-05-13 22:26:34.319853686 +0200
-+++ xmms2-0.2DrHouse/xmmsenv.py 2023-05-13 22:41:26.755018949 +0200
-@@ -5,8 +5,7 @@ import shutil
- import gzip
- from marshal import load
- from stat import *
--import operator
--from popen2 import popen3
-+from subprocess import PIPE, Popen
-
- global_libpaths = ["/lib", "/usr/lib"]
-
-@@ -15,8 +14,6 @@ default_output = (-1, "unknown")
- class ConfigError(Exception):
- pass
-
--any = lambda x: reduce(operator.or_, x)
--
-
- def find_static_lib(env, lib):
- libname = "lib%s.a" % lib
-@@ -56,9 +53,9 @@ class Target:
- self.globs['platform'] = env.platform
- self.globs['ConfigError'] = ConfigError
-
-- x = file(target).read()
-+ x = open(target).read()
- if x[-1] != '\n':
-- print "Missing linebreak in %s" % target
-+ print("Missing linebreak in %s" % target)
- x += '\n'
-
- c = compile(x, target, "exec")
-@@ -109,14 +106,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={}
-@@ -126,7 +123,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 = ""
-@@ -158,7 +155,7 @@ class XMMSEnvironment(Environment):
- self.platform = sys.platform
-
- # Where to place the xmms2 user config directory
-- if self.has_key("USERCONFDIR"):
-+ if "USERCONFDIR" in self:
- self.userconfpath = self["USERCONFDIR"]
- else:
- if sys.platform == 'darwin':
-@@ -167,7 +164,7 @@ class XMMSEnvironment(Environment):
- self.userconfpath = '.config/xmms2'
-
- def gzipper(target, source, env):
-- gzip.GzipFile(target[0].path, 'wb',9).write(file(source[0].path).read())
-+ gzip.GzipFile(target[0].path, 'wb',9).write(open(source[0].path, "rb").read())
- self['BUILDERS']['GZipper'] = SCons.Builder.Builder(action=SCons.Action.Action(gzipper))
-
- if self.platform == 'darwin':
-@@ -186,7 +183,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
-@@ -207,7 +204,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:
-@@ -225,28 +222,29 @@ class XMMSEnvironment(Environment):
- if libs:
- cmd += " --libs"
- cmd += " \"%s\"" % module
-- if not self.config_cache.has_key(cmd):
-- print "Checking for %s" % module,
-+ if cmd not in self.config_cache:
-+ print("Checking for %s" % module, end="")
- self.configcmd(cmd, fail)
-
-
- 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:
-- r, w, e = popen3(cmd)
-+ p = Popen(cmd, shell=True, stdin=PIPE, stdout=PIPE, stderr=PIPE, text=True)
-+ r, w, e = (p.stdout, p.stdin, p.stderr)
- ret = r.read()
-
- if cmd.startswith("pkg-config"):
- if ret == '':
-- print " ... no"
-+ print(" ... no")
- else:
-- print " ... yes"
-+ print(" ... yes")
- self.config_cache[cmd] = ret
-
- 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()
-@@ -260,33 +258,33 @@ class XMMSEnvironment(Environment):
- else:
- 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 checkcompiler(self):
-- if not self.config_cache.has_key("c"):
-- print "Checking for working C compiler...",
-+ if "c" not in self.config_cache:
-+ print("Checking for working C compiler...", end="")
- self.config_cache["c"] = self.conf.TryCompile("int main() {}",".c")
- if self.config_cache["c"]:
-- print "yes"
-+ print("yes")
- else:
-- print "no"
-+ print("no")
- if not self.config_cache["c"]:
- raise ConfigError("couldn't compile C files")
-
- def checkcpp(self):
-- if not self.config_cache.has_key("cpp"):
-- print "Checking for working C++ compiler...",
-+ if "cpp" not in self.config_cache:
-+ print("Checking for working C++ compiler...", end="")
- self.config_cache["cpp"] = self.conf.TryCompile("using namespace std; int main() {};",".cpp")
- if self.config_cache["cpp"]:
-- print "yes"
-+ print("yes")
- else:
-- print "no"
-+ print("no")
- if not self.config_cache["cpp"]:
- raise ConfigError("couldn't compile CPP files")
-
-@@ -297,11 +295,11 @@ class XMMSEnvironment(Environment):
- else:
- key = ("HEADER", header)
-
-- if not self.config_cache.has_key(key):
-+ if key not in self.config_cache:
- self.config_cache[key] = self.conf.CheckCXXHeader(header)
- if not self.config_cache[key]:
- if fail:
-- print "Aborting!"
-+ print("Aborting!")
- sys.exit(1)
- raise ConfigError("Headerfile '%s' not found" % header)
-
-@@ -309,7 +307,7 @@ class XMMSEnvironment(Environment):
- def checklib(self, lib, func, header=0, lang="c", 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] = ""
-@@ -332,7 +330,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))
-
-@@ -489,14 +487,14 @@ 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
-
- 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
-@@ -526,7 +524,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:
-@@ -543,13 +541,13 @@ 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:
- 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.2DrDolittle/src/clients/lib/ruby/Library.orig 2006-03-27 21:34:45.000000000 +0200
-+++ xmms2-0.2DrDolittle/src/clients/lib/ruby/Library 2023-05-10 22:08:47.519839891 +0200
-@@ -8,14 +8,14 @@ loadable=True
- 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 defined?(VERSION) ? VERSION : RUBY_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" :
-@@ -23,7 +23,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.2DrDolittle/src/clients/lib/ruby/Library.ecore.orig 2006-03-27 21:34:45.000000000 +0200
-+++ xmms2-0.2DrDolittle/src/clients/lib/ruby/Library.ecore 2023-05-10 22:09:41.692879744 +0200
-@@ -14,14 +14,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 defined?(VERSION) ? VERSION : RUBY_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" :
-@@ -29,7 +29,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.2DrDolittle/src/clients/lib/ruby/Library.glib.orig 2006-03-27 21:34:45.000000000 +0200
-+++ xmms2-0.2DrDolittle/src/clients/lib/ruby/Library.glib 2023-05-10 22:10:27.335965807 +0200
-@@ -8,14 +8,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 defined?(VERSION) ? VERSION : RUBY_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" :
-@@ -23,7 +23,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.2DrHouse/src/xmms/Program.orig 2023-05-13 23:04:50.170749327 +0200
-+++ xmms2-0.2DrHouse/src/xmms/Program 2023-05-13 23:10:10.055683028 +0200
-@@ -26,7 +26,7 @@ source = ["main.c",
- "utils.c"]
-
- def config(env):
-- pluginenv = env.Copy()
-+ pluginenv = env.Clone()
- env.pkgconfig("glib-2.0 >= 2.6.0", fail=True)
- env.pkgconfig("gmodule-2.0", fail=True)
- env.pkgconfig("gthread-2.0", fail=True)
---- xmms2-0.2DrCox/gittools.py.orig 2023-05-10 21:38:46.116265598 +0200
-+++ xmms2-0.2DrCox/gittools.py 2023-05-10 21:39:29.229365368 +0200
-@@ -1,9 +1,9 @@
- import os
--import sha
-+import hashlib
-
- def gitsha(path):
-- h = sha.sha()
-- data = file(path).read()
-+ h = hashlib.sha1()
-+ data = open(path).read()
- h.update("blob %d\0" % len(data))
- h.update(data)
- return h.hexdigest()
-@@ -13,12 +13,12 @@ def git_info():
- if os.getuid() == os.stat(".git/index").st_uid:
- os.system('git-update-index --refresh >/dev/null')
- else:
-- print "NOT updating git cache, local changes might not be detected"
-+ print("NOT updating git cache, local changes might not be detected")
- changed = bool(os.popen('git-diff-index -r HEAD').read())
- return commithash, changed
-
- def snapshot_info():
-- info = file('commithash').read().split('\n')
-+ info = open('commithash').read().split('\n')
-
- commithash = info[0]
-
---- xmms2-0.2DrGonzo/src/clients/lib/java/Library.orig 2023-05-13 18:35:17.925028563 +0200
-+++ xmms2-0.2DrGonzo/src/clients/lib/java/Library 2023-05-13 18:37:16.014388818 +0200
-@@ -8,42 +8,38 @@ import sys
-
- def walkDirs(path):
- """helper function to get a list of all subdirectories"""
-- def addDirs(pathlist, dirname, names):
-- """internal function to pass to os.path.walk"""
-- for n in names:
-- f = os.path.join(dirname, n)
-- if os.path.isdir(f):
-- pathlist.append(f)
- pathlist = [path]
-- os.path.walk(path, addDirs, pathlist)
-+ for (dirname, dirnames, _) in os.walk(path):
-+ for n in dirnames:
-+ pathlist.append(os.path.join(dirname, n))
- return pathlist
-
- def config(env):
-- print "Checking for swig >= 1.3.25 ... ",
-+ print("Checking for swig >= 1.3.25 ... ", end="")
-
- if not env.get('SWIG'):
-- print "no"
-+ print("no")
- raise ConfigError("Couldn't find swig")
-
- try:
- version = env.run(env.get('SWIG') + " -version").strip().split("\n")[0].split(' ')[2]
-
- if not version or ([int(a) for a in version.split(".")] < [1,3,25]) :
-- print "no"
-+ print("no")
- raise ConfigError("Need Swig 1.3.25")
-
-- print version
-+ print(version)
- except:
-- print "no"
-+ print("no")
- raise ConfigError("Couldn't check version of swig")
-
-- print "Checking for presence of java ... ",
-+ print("Checking for presence of java ... ", end="")
-
- if not env.get('JAVAC') or not env.get('JAR'):
-- print "not present"
-+ print("not present")
- raise ConfigError("Couldn't find javac")
-
-- print "present"
-+ print("present")
-
- # link with xmmsclient is nice.
- if env.platform == 'win32':
-@@ -65,19 +61,19 @@ def config(env):
- # Apple's OS X has its own special java base directory
- java_base = '/System/Library/Frameworks/JavaVM.framework'
- else:
-- print "Your system is missing JAVA_HOME which is needed for javabindings"
-- print "Please set JAVA_HOME and run scons with CONFIG=1 again"
-+ print("Your system is missing JAVA_HOME which is needed for javabindings")
-+ print("Please set JAVA_HOME and run scons with CONFIG=1 again")
- raise ConfigError("You need to define JAVA_HOME to install the Java bindings.")
- # Search for the java compiler
-- print "JAVA_HOME environment variable is not set. Searching for java... ",
-+ print("JAVA_HOME environment variable is not set. Searching for java... ", end="")
- jcdir = os.path.dirname(env.WhereIs('javac'))
- if not jcdir:
-- print "not found."
-+ print("not found.")
- raise ConfigError("No javac found")
- # assuming the compiler found is in some directory like
- # /usr/jdkX.X/bin/javac, java's home directory is /usr/jdkX.X
- java_base = os.path.realpath(os.path.join(jcdir, ".."))
-- print "found in %s" % java_base
-+ print("found in %s" % java_base)
-
- if sys.platform == 'cygwin':
- # Cygwin and Sun Java have different ideas of how path names
---- xmms2-0.2DrDolittle/src/xmms/generate-converter.py.orig 2023-05-11 17:52:42.631056661 +0200
-+++ xmms2-0.2DrDolittle/src/xmms/generate-converter.py 2023-05-11 18:00:05.225311544 +0200
-@@ -190,7 +190,7 @@ def make_conv(fields, curr):
- # return ""
-
- out=resamplingcode
-- for key,val in curr.iteritems():
-+ for key,val in curr.items():
- out = re.sub(key,str(val),out)
-
- out = re.sub("CONVERTER",
-@@ -236,15 +236,15 @@ def make_switch(fields, curr):
- val += indent + "}\n"
- return val
-
--print readwriters
--print make_conv(data.keys(),{})
-+print(readwriters)
-+print(make_conv(list(data.keys()),{}))
-
--print "static xmms_sample_conv_func_t"
--print "xmms_sample_conv_get (guint inchannels, xmms_sample_format_t intype,"
--print " guint outchannels, xmms_sample_format_t outtype,"
--print " gboolean resample)"
--print "{"
--print make_switch(data.keys(),{})
--print "\treturn NULL;"
--print "}"
-+print("static xmms_sample_conv_func_t")
-+print("xmms_sample_conv_get (guint inchannels, xmms_sample_format_t intype,")
-+print(" guint outchannels, xmms_sample_format_t outtype,")
-+print(" gboolean resample)")
-+print("{")
-+print(make_switch(list(data.keys()),{}))
-+print("\treturn NULL;")
-+print("}")
-
diff --git a/xmms2-ruby.patch b/xmms2-ruby.patch
index 5ee3107..68268ff 100644
--- a/xmms2-ruby.patch
+++ b/xmms2-ruby.patch
@@ -1,72 +1,36 @@
---- xmms2-0.2DrDolittle/src/clients/lib/ruby/Library.orig 2023-05-10 22:10:51.425835301 +0200
-+++ xmms2-0.2DrDolittle/src/clients/lib/ruby/Library 2023-05-10 22:34:00.468310213 +0200
-@@ -17,16 +17,16 @@ def config(env):
-
- 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.2DrDolittle/src/clients/lib/ruby/Library.ecore.orig 2023-05-10 22:10:51.429168616 +0200
-+++ xmms2-0.2DrDolittle/src/clients/lib/ruby/Library.ecore 2023-05-10 22:34:47.804720436 +0200
-@@ -23,16 +23,16 @@ def config(env):
-
- 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.2DrDolittle/src/clients/lib/ruby/Library.glib.orig 2023-05-10 22:10:51.429168616 +0200
-+++ xmms2-0.2DrDolittle/src/clients/lib/ruby/Library.glib 2023-05-10 22:35:11.117927471 +0200
-@@ -17,16 +17,16 @@ def config(env):
-
- 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.2DrGonzo/src/clients/lib/ruby/rb_xmmsclient.c.orig 2006-09-26 15:50:20.000000000 +0200
-+++ xmms2-0.2DrGonzo/src/clients/lib/ruby/rb_xmmsclient.c 2023-05-13 20:16:33.032116884 +0200
-@@ -78,8 +78,8 @@
+--- xmms2-0.2DrJekyll/src/clients/lib/ruby/wscript.orig 2007-05-20 17:55:40.000000000 +0200
++++ xmms2-0.2DrJekyll/src/clients/lib/ruby/wscript 2023-05-14 19:24:00.501126640 +0200
+@@ -53,23 +53,23 @@ def configure(conf):
+ return False
+ conf.check_message('ruby version', '> 1.8', True, version)
+
+- ruby_h = os.popen(ruby + " -rrbconfig -e 'puts File.exist?(Config::CONFIG[\"archdir\"] + \"/ruby.h\")'").read().strip()
++ ruby_h = os.popen(ruby + " -rrbconfig -e 'puts File.exist?(RbConfig::CONFIG[\"rubyhdrdir\"] + \"/ruby.h\")'").read().strip()
+ if ruby_h != 'true':
+ conf.check_message('ruby', 'header file', False)
+ return False
+ conf.check_message('ruby', 'header file', True)
+
+- dir = os.popen(ruby + " -rrbconfig -e 'puts \"%s\" % [].fill(Config::CONFIG[\"archdir\"], 0..1)'").read().strip()
++ dir = os.popen(ruby + " -rrbconfig -e 'puts \"%s\" % [].fill(RbConfig::CONFIG[\"rubyhdrdir\"], 0..1)'").read().strip()
+ conf.env["CCFLAGS_ruby"] = '-I%s' % dir
+ conf.env["LINKFLAGS_ruby"] = '-L%s' % dir
+
+ if not Params.g_options.rubyarchdir:
+- conf.env["ARCHDIR_ruby"] = os.popen(ruby + " -rrbconfig -e 'print Config::CONFIG[\"sitearchdir\"]'").read().strip()
++ conf.env["ARCHDIR_ruby"] = os.popen(ruby + " -rrbconfig -e 'print RbConfig::CONFIG[\"vendorarchdir\"]'").read().strip()
+ else:
+ conf.env["ARCHDIR_ruby"] = Params.g_options.rubyarchdir
+
+ if not Params.g_options.rubylibdir:
+- conf.env["LIBDIR_ruby"] = os.popen(ruby + " -rrbconfig -e 'print Config::CONFIG[\"sitelibdir\"]'").read().strip()
++ conf.env["LIBDIR_ruby"] = os.popen(ruby + " -rrbconfig -e 'print RbConfig::CONFIG[\"vendorlibdir\"]'").read().strip()
+ else:
+ conf.env["LIBDIR_ruby"] = Params.g_options.rubylibdir
+
+--- xmms2-0.2DrJekyll/src/clients/lib/ruby/rb_xmmsclient.c.orig 2023-05-14 19:24:29.670968613 +0200
++++ xmms2-0.2DrJekyll/src/clients/lib/ruby/rb_xmmsclient.c 2023-05-14 19:29:16.606080819 +0200
+@@ -73,8 +73,8 @@
StringValue (arg1); \
\
res = xmmsc_##name (xmms->real, \
@@ -76,34 +40,21 @@
+ RSTRING_LEN (arg1)); \
METHOD_HANDLER_FOOTER
- static VALUE eClientError, eDisconnectedError;
-@@ -784,7 +784,7 @@ c_playlist_add (VALUE self, VALUE arg)
-
- 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)) {
- rb_raise (eClientError, "unsupported argument");
- return Qnil;
- }
-@@ -817,7 +817,7 @@ c_playlist_insert (VALUE self, VALUE pos
-
- 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)) {
- rb_raise (eClientError, "unsupported argument");
- return Qnil;
- }
-@@ -999,7 +999,7 @@ c_medialib_entry_property_set (int argc,
-
- if (!NIL_P (rb_check_string_type (value)))
- is_str = true;
-- else if (!rb_obj_is_kind_of (value, rb_cFixnum)) {
-+ else if (!rb_obj_is_kind_of (value, rb_cInteger)) {
- rb_raise (eClientError, "unsupported argument");
- return Qnil;
- }
+ static VALUE cPlaylist;
+@@ -1371,10 +1371,10 @@ parse_string_array (VALUE value)
+ if (!NIL_P (rb_check_array_type (value))) {
+ struct RArray *ary = RARRAY (value);
+
+- ret = malloc (sizeof (char *) * (ary->len + 1));
++ ret = malloc (sizeof (char *) * (RARRAY_LEN(ary) + 1));
+
+- for (i = 0; i < ary->len; i++)
+- ret[i] = StringValuePtr (ary->ptr[i]);
++ for (i = 0; i < RARRAY_LEN(ary); i++)
++ ret[i] = StringValuePtr (RARRAY_PTR(ary)[i]);
+
+ ret[i] = NULL;
+ } else {
--- xmms2-0.2DrGonzo/src/clients/lib/ruby/rb_result.c.orig 2006-09-26 15:50:20.000000000 +0200
+++ xmms2-0.2DrGonzo/src/clients/lib/ruby/rb_result.c 2023-05-13 18:40:37.719962752 +0200
@@ -417,6 +417,7 @@ c_propdict_init (VALUE self, VALUE resul
@@ -132,3 +83,49 @@
rb_define_method (cPropDict, "[]", c_propdict_aref, 1);
rb_define_method (cPropDict, "has_key?", c_propdict_has_key, 1);
+--- xmms2-0.2DrJekyll/src/clients/lib/ruby/rb_playlist.c.orig 2007-05-20 17:55:40.000000000 +0200
++++ xmms2-0.2DrJekyll/src/clients/lib/ruby/rb_playlist.c 2023-05-18 20:59:44.461066374 +0200
+@@ -301,10 +301,10 @@ c_sort (VALUE self, VALUE props)
+ if (!NIL_P (props = rb_check_array_type (props))) {
+ ary = RARRAY (props);
+
+- cprops = malloc (sizeof (char *) * (ary->len + 1));
++ cprops = malloc (sizeof (char *) * (RARRAY_LEN(ary) + 1));
+
+- for (i = 0; i < ary->len; i++)
+- cprops[i] = StringValuePtr (ary->ptr[i]);
++ for (i = 0; i < RARRAY_LEN(ary); i++)
++ cprops[i] = StringValuePtr (RARRAY_PTR(ary)[i]);
+
+ cprops[i] = NULL;
+ } else if (!NIL_P (rb_check_string_type (props))) {
+--- xmms2-0.2DrJekyll/src/clients/lib/ruby/rb_collection.c.orig 2007-05-20 17:55:40.000000000 +0200
++++ xmms2-0.2DrJekyll/src/clients/lib/ruby/rb_collection.c 2023-05-18 21:13:17.603327871 +0200
+@@ -220,10 +220,10 @@ c_coll_idlist_set (VALUE self, VALUE ids
+ COLL_METHOD_HANDLER_HEADER
+
+ rb_ary = RARRAY (ids);
+- ary = malloc (sizeof (unsigned int *) * (rb_ary->len + 1));
++ ary = malloc (sizeof (unsigned int *) * (RARRAY_LEN(rb_ary) + 1));
+
+- for (i = 0; i < rb_ary->len; i++)
+- ary[i] = NUM2UINT (rb_ary->ptr[i]);
++ for (i = 0; i < RARRAY_LEN(rb_ary); i++)
++ ary[i] = NUM2UINT (RARRAY_PTR(rb_ary)[i]);
+
+ ary[i] = 0;
+
+@@ -263,10 +263,10 @@ attrs_inspect_cb (VALUE args, VALUE s)
+ {
+ VALUE key, value;
+
+- key = RARRAY (args)->ptr[0];
+- value = RARRAY (args)->ptr[1];
++ key = RARRAY_PTR(args)[0];
++ value = RARRAY_PTR(args)[1];
+
+- if (RSTRING (s)->len > 1)
++ if (RSTRING_LEN (s) > 1)
+ rb_str_buf_cat2 (s, ", ");
+
+ rb_str_buf_append (s, rb_inspect (key));
diff --git a/xmms2-tabs.patch b/xmms2-tabs.patch
index dcd1e54..449e4b2 100644
--- a/xmms2-tabs.patch
+++ b/xmms2-tabs.patch
@@ -1,84 +1,6 @@
---- xmms2-0.2DrGonzo/SConstruct.orig 2006-09-26 15:50:20.000000000 +0200
-+++ xmms2-0.2DrGonzo/SConstruct 2023-05-13 18:09:05.863545151 +0200
-@@ -81,8 +81,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:
-@@ -148,12 +148,12 @@ base_env.handle_targets("Library")
- base_env.handle_targets("Program")
-
- subst_dict = {"%VERSION%":XMMS_VERSION, "%PLATFORM%":"XMMS_OS_" + base_env.platform.upper().replace("-", ""),
-- "%PKGLIBDIR%":base_env["PLUGINDIR"],
-- "%BINDIR%":base_env["BINDIR"],
-- "%SHAREDDIR%":base_env.sharepath,
-- "%PREFIX%":base_env.install_prefix,
-- "%DEFAULT_OUTPUT%":xmmsenv.default_output[1],
-- "%USERCONFDIR%":base_env.userconfpath,
-+ "%PKGLIBDIR%":base_env["PLUGINDIR"],
-+ "%BINDIR%":base_env["BINDIR"],
-+ "%SHAREDDIR%":base_env.sharepath,
-+ "%PREFIX%":base_env.install_prefix,
-+ "%DEFAULT_OUTPUT%":xmmsenv.default_output[1],
-+ "%USERCONFDIR%":base_env.userconfpath,
- }
-
- config = base_env.SubstInFile("src/include/xmms/xmms_defs.h", "src/include/xmms/xmms_defs.h.in", SUBST_DICT=subst_dict)
-@@ -171,7 +171,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")
-@@ -188,11 +188,11 @@ base_env.add_manpage(1, 'doc/xmms2-mdns-
- #### 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-cpp", "lib":"-lxmmsclient -lxmmsclient++"},
-- {"name":"xmms2-client-cpp-glib", "lib":"-lxmmsclient-glib -lxmmsclient++-glib"}]
-+ {"name":"xmms2-client", "lib":"-lxmmsclient"},
-+ {"name":"xmms2-client-glib", "lib":"-lxmmsclient-glib"},
-+ {"name":"xmms2-client-ecore", "lib":"-lxmmsclient-ecore"},
-+ {"name":"xmms2-client-cpp", "lib":"-lxmmsclient -lxmmsclient++"},
-+ {"name":"xmms2-client-cpp-glib", "lib":"-lxmmsclient-glib -lxmmsclient++-glib"}]
-
- for p in pc_files:
- d = subst_dict.copy()
---- xmms2-0.2DrGonzo/xmmsenv.py.orig 2006-09-26 15:50:20.000000000 +0200
-+++ xmms2-0.2DrGonzo/xmmsenv.py 2023-05-13 19:07:22.814600542 +0200
-@@ -445,7 +445,7 @@ class XMMSEnvironment(Environment):
- else:
- if self.platform == 'darwin':
- self["SHLINKFLAGS"] += " -dynamiclib"
-- self["SHLINKFLAGS"] += " -single_module"
-+ self["SHLINKFLAGS"] += " -single_module"
- if install:
- self.Install(self.librarypath, os.path.join(self.dir, self.shlibname(target)))
- if self.platform == 'darwin':
-@@ -465,7 +465,7 @@ class XMMSEnvironment(Environment):
- def add_header(self, target, source):
- self.Install(os.path.join(self.includepath,target), source)
-
-- def add_manpage(self, section, source):
-+ def add_manpage(self, section, source):
- self.GZipper(source + '.gz', source)
- self.Install(os.path.join(self.manpath, "man"+str(section)), source+'.gz')
-
---- xmms2-0.2DrDolittle/src/xmms/generate-converter.py.orig 2006-03-27 21:34:45.000000000 +0200
-+++ xmms2-0.2DrDolittle/src/xmms/generate-converter.py 2023-05-11 17:52:42.631056661 +0200
-@@ -150,10 +150,10 @@ def get_channelconv(numin, numout, t):
+--- xmms2-0.2DrJekyll/src/xmms/sample.genpy.orig 2007-05-20 17:55:40.000000000 +0200
++++ xmms2-0.2DrJekyll/src/xmms/sample.genpy 2023-05-14 18:51:40.261637819 +0200
+@@ -152,10 +152,10 @@ def get_channelconv(numin, numout, t):
for a in range(numout):
out += "\t\tout[%d] = WRITE%s(temp[%d]);\n" % (a,t,a)
elif numin == 1 and numout == 2:
@@ -92,7 +14,7 @@
else:
raise RuntimeError("go implement channelconversion from %d to %d channels" % (numin, numout))
return out
-@@ -194,11 +194,11 @@ def make_conv(fields, curr):
+@@ -196,11 +196,11 @@ def make_conv(fields, curr):
out = re.sub(key,str(val),out)
out = re.sub("CONVERTER",
@@ -102,14 +24,14 @@
- out)
-
+ get_channelconv(curr['INCHANNELS'],
-+ curr['OUTCHANNELS'],
-+ curr['OUTTYPE']),
++ curr['OUTCHANNELS'],
++ curr['OUTTYPE']),
+ out)
+
return out
-@@ -232,7 +232,7 @@ def make_switch(fields, curr):
+@@ -234,7 +234,7 @@ def make_switch(fields, curr):
val += indent + "case XMMS_SAMPLE_FORMAT_%s:\n" % a.upper()
else:
val += indent + "case %s:\n" % a
@@ -118,31 +40,3 @@
val += indent + "}\n"
return val
---- xmms2-0.2DrHouse/src/xmms/Program.orig 2006-12-03 00:01:08.000000000 +0100
-+++ xmms2-0.2DrHouse/src/xmms/Program 2023-05-13 22:16:01.913279726 +0200
-@@ -20,10 +20,10 @@ source = ["main.c",
- "converter_plugin.c",
- "ringbuf_xform.c",
- "outputplugin.c",
-- "statfs.c",
-- "strfunc.c",
-- "bindata.c",
-- "utils.c"]
-+ "statfs.c",
-+ "strfunc.c",
-+ "bindata.c",
-+ "utils.c"]
-
- def config(env):
- pluginenv = env.Copy()
-@@ -58,8 +58,8 @@ def config(env):
- except ConfigError:
- pass
-
-- if env.platform == 'darwin':
-- env.Append(LINKFLAGS=['-framework', 'CoreFoundation'])
-+ if env.platform == 'darwin':
-+ env.Append(LINKFLAGS=['-framework', 'CoreFoundation'])
-
- # we have an xmms2d - we might want plugins!
- pluginenv.handle_targets("Plugin")
diff --git a/xmms2-waf.patch b/xmms2-waf.patch
new file mode 100644
index 0000000..eb0b56b
--- /dev/null
+++ b/xmms2-waf.patch
@@ -0,0 +1,99 @@
+--- xmms2-0.2DrJekyll/src/xmms/wscript.orig 2007-05-20 17:55:40.000000000 +0200
++++ xmms2-0.2DrJekyll/src/xmms/wscript 2023-05-15 20:02:20.740596198 +0200
+@@ -70,7 +70,7 @@ def configure(conf):
+
+ # Check for the sin function in the math lib
+ test = conf.create(enumerator='function')
+- test.function = 'sin'
++ test.function = 'sinf'
+ test.headers = ['math.h']
+ test.libs = ['m']
+ test.mandatory = 1
+--- xmms2-0.2DrJekyll/wscript.orig 2007-05-20 17:55:40.000000000 +0200
++++ xmms2-0.2DrJekyll/wscript 2023-05-19 16:34:46.732465581 +0200
+@@ -212,6 +212,11 @@ def configure(conf):
+ conf.env["BUILD_XMMS2D"] = True
+ subdirs.insert(0, "src/xmms")
+
++ if Params.g_options.libdir:
++ conf.env["LIBDIR"] = Params.g_options.libdir
++ else:
++ conf.env["LIBDIR"] = os.path.join(conf.env["PREFIX"], "lib")
++
+ if Params.g_options.manualdir:
+ conf.env["MANDIR"] = Params.g_options.manualdir
+ else:
+@@ -227,8 +232,6 @@ def configure(conf):
+ conf.check_tool('man', tooldir=os.path.abspath('waftools'))
+
+ conf.env["VERSION"] = VERSION
+- conf.env["CCFLAGS"] = Utils.to_list(conf.env["CCFLAGS"]) + ['-g', '-O0']
+- conf.env["CXXFLAGS"] = Utils.to_list(conf.env["CXXFLAGS"]) + ['-g', '-O0']
+ conf.env['XMMS_PKGCONF_FILES'] = []
+ conf.env['XMMS_OUTPUT_PLUGINS'] = [(-1, "NONE")]
+
+@@ -234,11 +239,10 @@ def configure(conf):
+ conf.env['CXXDEFINES'] += ["XMMS_VERSION=\"\\\"%s\\\"\"" % VERSION]
+
+ if Params.g_options.config_prefix:
+- conf.env["LIBPATH"] += [os.path.join(Params.g_options.config_prefix, "lib")]
+ include = [os.path.join(Params.g_options.config_prefix, "include")]
+ conf.env['CPPPATH'] += include
+
+- conf.env["LINKFLAGS_xlibs"] += ['-install_name %s%s%s' % (os.path.join(conf.env["PREFIX"], 'lib', conf.env["shlib_PREFIX"]), '%s', conf.env["shlib_SUFFIX"])]
++ conf.env["LINKFLAGS_xlibs"] += ['-install_name %s%s%s' % (os.path.join(conf.env["LIBDIR"], conf.env["shlib_PREFIX"]), '%s', conf.env["shlib_SUFFIX"])]
+
+ # Our static libraries may link to dynamic libraries
+ conf.env["staticlib_CCFLAGS"] += ['-fPIC', '-DPIC']
+@@ -303,6 +308,7 @@ def set_options(opt):
+ opt.add_option('--conf-prefix', type='string', dest='config_prefix')
+ opt.add_option('--without-xmms2d', type='int', dest='without_xmms2d')
+ opt.add_option('--with-mandir', type='string', dest='manualdir')
++ opt.add_option('--libdir', type='string', dest='libdir')
+
+ for o in optional_subdirs + subdirs:
+ opt.sub_options(o)
+--- xmms2-0.2DrJekyll/wafadmin/Tools/gcc.py.orig 2007-05-20 17:55:40.000000000 +0200
++++ xmms2-0.2DrJekyll/wafadmin/Tools/gcc.py 2023-05-19 16:58:09.314656440 +0200
+@@ -81,7 +81,7 @@ def detect(conf):
+ if not dest: dest=orig
+ try: conf.env[dest] = ron[orig]
+ except KeyError: pass
+- addflags('CCFLAGS', 'CFLAGS')
++ addflags('CCFLAGS')
+ addflags('CPPFLAGS')
+ addflags('LINKFLAGS')
+
+--- xmms2-0.2DrJekyll/waftools/pkgconfig.py.orig 2007-05-20 17:55:40.000000000 +0200
++++ xmms2-0.2DrJekyll/waftools/pkgconfig.py 2023-05-19 17:20:32.982353210 +0200
+@@ -20,7 +20,7 @@ class pkgcobj(copyobj):
+ p = self.env["PREFIX"]
+ val["PREFIX"] = p
+ val["BINDIR"] = os.path.join("${prefix}", "bin")
+- val["LIBDIR"] = os.path.join("${prefix}", "lib")
++ val["LIBDIR"] = self.env["LIBDIR"]
+ val["INCLUDEDIR"] = os.path.join("${prefix}", "include", "xmms2")
+ val["VERSION"] = self.version
+
+--- xmms2-0.2DrJekyll/src/include/xmms/wscript.orig 2007-05-20 17:55:40.000000000 +0200
++++ xmms2-0.2DrJekyll/src/include/xmms/wscript 2023-05-20 07:52:15.284232542 +0200
+@@ -19,8 +19,8 @@ def configure(conf):
+ defs["XMMS_OS_%s" % platform.upper()] = 1
+ break
+
+- defs['PKGLIBDIR'] = os.path.join(conf.env['PREFIX'],
+- 'lib', 'xmms2')
++ defs['PKGLIBDIR'] = os.path.join(conf.env['LIBDIR'],
++ 'xmms2')
+ defs['BINDIR'] = os.path.join(conf.env['PREFIX'],
+ 'bin')
+ defs['SHAREDDIR'] = os.path.join(conf.env['PREFIX'],
+@@ -45,7 +45,7 @@ def configure(conf):
+
+ conf.env['XMMS_DEFS'] = defs
+ conf.env['PLUGINDIR'] = defs['PKGLIBDIR']
+- conf.env['PKGCONFIGDIR'] = os.path.join(conf.env["PREFIX"], "lib", "pkgconfig")
++ conf.env['PKGCONFIGDIR'] = os.path.join(conf.env["LIBDIR"], "pkgconfig")
+
+ for i in defs:
+ conf.add_define(i, defs[i])
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/xmms2.git/commitdiff/0841a5c20d0b4e57f3caadc01524eccbfe254b14
More information about the pld-cvs-commit
mailing list