[packages/cmus] - updated to 2.5.0, added libcdio and libmodplug input plugins; ffmpeg code is outdated, so disabled
qboosh
qboosh at pld-linux.org
Sun Jul 21 21:31:21 CEST 2024
commit fc082f5bd7ba945c0d2d6d90bedee3f83ecd1326
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Jul 21 21:23:19 2024 +0200
- updated to 2.5.0, added libcdio and libmodplug input plugins; ffmpeg code is outdated, so disabled
cmus-libcdio.patch | 61 +++++++++++++++++++++++++++++
cmus-libmodplug.patch | 11 ++++++
cmus.spec | 105 ++++++++++++++++++++++++++++++++++++++++----------
3 files changed, 156 insertions(+), 21 deletions(-)
---
diff --git a/cmus.spec b/cmus.spec
index ad68210..85dd13b 100644
--- a/cmus.spec
+++ b/cmus.spec
@@ -1,39 +1,52 @@
#
# Conditional build:
%bcond_with arts # aRts support
+%bcond_with ffmpeg # FFmpeg support (outdated)
Summary: cmus - a small and fast text mode music player
Summary(hu.UTF-8): cmus egy kicsi és gyors szöveges zenelejátszó
Summary(pl.UTF-8): cmus - mały i szybki odtwarzacz muzyki w trybie tekstowym
Name: cmus
-Version: 2.4.3
-Release: 0.1
-License: GPL
+Version: 2.5.0
+Release: 1
+License: GPL v2+
Group: Applications/Sound
Source0: https://downloads.sourceforge.net/project/cmus/%{name}-v%{version}.tar.bz2
-# Source0-md5: 75452cf007637214c4ab5444e076114b
+# Source0-md5: 9af16d324060447996ed25e1a9c1c7d8
+Patch0: %{name}-libcdio.patch
+Patch1: %{name}-libmodplug.patch
URL: https://cmus.sourceforge.net/
-BuildRequires: alsa-lib-devel
+BuildRequires: alsa-lib-devel >= 1.0.11
%if %{with arts}
-BuildRequires: arts-devel
+BuildRequires: artsc-devel
%endif
BuildRequires: faad2-devel
-BuildRequires: ffmpeg-devel
+%{?with_ffmpeg:BuildRequires: ffmpeg-devel}
BuildRequires: flac-devel
BuildRequires: libao-devel
+BuildRequires: libcddb-devel
+BuildRequires: libcdio-devel
+BuildRequires: libcue-devel >= 1.3
+BuildRequires: libdiscid-devel
BuildRequires: libmad-devel
+BuildRequires: libmikmod-devel
BuildRequires: libmodplug-devel
BuildRequires: libmpcdec-devel
BuildRequires: libraw1394-devel
BuildRequires: libvorbis-devel
-BuildRequires: mpeg4ip-devel
+BuildRequires: mp4v2-devel
BuildRequires: ncurses-devel
-BuildRequires: pkg-config
-BuildRequires: pulseaudio-devel
+BuildRequires: pkgconfig
+BuildRequires: pulseaudio-devel >= 0.9.19
+# TODO
+#BuildRequires: roaraudio-devel >= 0.4.5
BuildRequires: sed >= 4.0
BuildRequires: wavpack-devel
Suggests: %{name}-input
Suggests: %{name}-output
+%if %{without ffmpeg}
+Obsoletes: cmus-input-ffmpeg < %{version}-%{release}
+%endif
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -65,6 +78,40 @@ aac plugin cmus-hoz.
%description input-aac -l pl.UTF-8
Wtyczka wejściowa aac dla odtwarzacza cmus.
+%package input-cdio
+Summary: cdio input plugin for cmus
+Summary(hu.UTF-8): cdio plugin cmus-hoz
+Summary(pl.UTF-8): Wtyczka wejściowa cdio dla odtwarzacza cmus
+Group: Applications/Sound
+Requires: %{name} = %{version}-%{release}
+Provides: %{name}-input
+
+%description input-cdio
+cdio input plugin for cmus.
+
+%description input-cdio -l hu.UTF-8
+cdio plugin cmus-hoz.
+
+%description input-cdio -l pl.UTF-8
+Wtyczka wejściowa cdio dla odtwarzacza cmus.
+
+%package input-cue
+Summary: cue input plugin for cmus
+Summary(hu.UTF-8): cue plugin cmus-hoz
+Summary(pl.UTF-8): Wtyczka wejściowa cue dla odtwarzacza cmus
+Group: Applications/Sound
+Requires: %{name} = %{version}-%{release}
+Provides: %{name}-input
+
+%description input-cue
+cue input plugin for cmus.
+
+%description input-cue -l hu.UTF-8
+cue plugin cmus-hoz.
+
+%description input-cue -l pl.UTF-8
+Wtyczka wejściowa cue dla odtwarzacza cmus.
+
%package input-ffmpeg
Summary: ffmpeg input plugin for cmus
Summary(hu.UTF-8): ffmpeg plugin cmus-hoz
@@ -304,13 +351,16 @@ Wtyczka wyjściowa pulse dla odtwarzacza cmus.
%prep
%setup -q -n %{name}-v%{version}
+%patch0 -p1
+%patch1 -p1
%{__sed} -i "s|<curses.h>|<ncursesw/ncurses.h>|" command_mode.c keys.c options.c search_mode.c ui_curses.c
-%{__sed} -r -i "s|<ffmpeg/(.*).h|<lib\1/\1.h|" ffmpeg.c
%build
-
./configure \
+ CC="%{__cc}" \
+ CFLAGS="%{rpmcflags}" \
+ LDFLAGS="%{rpmldflags}" \
%if %{without arts}
CONFIG_ARTS=n \
%endif
@@ -319,12 +369,13 @@ Wtyczka wyjściowa pulse dla odtwarzacza cmus.
mandir=%{_mandir} \
bindir=%{_bindir} \
datadir=%{_datadir}/%{name} \
- exampledir=%{_examplesdir}/%{name}
-%{__make}
+ exampledir=%{_examplesdir}/%{name}-%{version}
+
+%{__make} \
+ V=2
%install
rm -rf $RPM_BUILD_ROOT
-#install -d $RPM_BUILD_ROOT
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
@@ -334,25 +385,37 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
+%doc AUTHORS README
+%attr(755,root,root) %{_bindir}/cmus
+%attr(755,root,root) %{_bindir}/cmus-remote
%dir %{_libdir}/cmus
%dir %{_libdir}/cmus/ip
%dir %{_libdir}/cmus/op
-%dir %{_examplesdir}/%{name}
-%doc AUTHORS README
-%attr(755,root,root) %{_bindir}/*
%{_datadir}/%{name}
-%{_mandir}/man1/cmus*
-%{_mandir}/man7/cmus*
-%{_examplesdir}/%{name}/%{name}-status-display
+%{_mandir}/man1/cmus.1*
+%{_mandir}/man1/cmus-remote.1*
+%{_mandir}/man7/cmus-tutorial.7*
+%dir %{_examplesdir}/%{name}-%{version}
+%attr(755,root,root) %{_examplesdir}/%{name}-%{version}/%{name}-status-display
# input plugins
%files input-aac
%defattr(644,root,root,755)
%{_libdir}/cmus/ip/aac.so
+%files input-cdio
+%defattr(644,root,root,755)
+%{_libdir}/cmus/ip/cdio.so
+
+%files input-cue
+%defattr(644,root,root,755)
+%{_libdir}/cmus/ip/cue.so
+
+%if %{with ffmpeg}
%files input-ffmpeg
%defattr(644,root,root,755)
%{_libdir}/cmus/ip/ffmpeg.so
+%endif
%files input-flac
%defattr(644,root,root,755)
diff --git a/cmus-libcdio.patch b/cmus-libcdio.patch
new file mode 100644
index 0000000..1f49455
--- /dev/null
+++ b/cmus-libcdio.patch
@@ -0,0 +1,61 @@
+--- cmus-v2.5.0/cdio.c.orig 2012-11-07 09:46:17.000000000 +0100
++++ cmus-v2.5.0/cdio.c 2024-07-21 19:47:23.823587037 +0200
+@@ -352,36 +352,31 @@ static int libcdio_read_comments(struct
+ GROWING_KEYVALS(c);
+ const char *artist = NULL, *albumartist = NULL, *album = NULL,
+ *title = NULL, *genre = NULL, *comment = NULL;
+- const cdtext_t *cdtext_track, *cdtext_album;
++ cdtext_t *cdtext_buf;
+ #ifdef HAVE_CDDB
+ cddb_conn_t *cddb_conn = NULL;
+ cddb_disc_t *cddb_disc = NULL;
+ #endif
+ char buf[64];
+
+- cdtext_track = cdio_get_cdtext(priv->cdio, priv->track);
+- if (cdtext_track) {
++ cdtext_buf = cdio_get_cdtext(priv->cdio);
++ if (cdtext_buf) {
+- char * const *field = cdtext_track->field;
+- artist = field[CDTEXT_PERFORMER];
+- title = field[CDTEXT_TITLE];
+- genre = field[CDTEXT_GENRE];
+- comment = field[CDTEXT_MESSAGE];
+- }
+- cdtext_album = cdio_get_cdtext(priv->cdio, 0);
+- if (cdtext_album) {
+- char * const *field = cdtext_album->field;
+- album = field[CDTEXT_TITLE];
+- albumartist = field[CDTEXT_PERFORMER];
++ artist = cdtext_get_const(cdtext_buf, CDTEXT_FIELD_PERFORMER, priv->track);
++ title = cdtext_get_const(cdtext_buf, CDTEXT_FIELD_TITLE, priv->track);
++ genre = cdtext_get_const(cdtext_buf, CDTEXT_FIELD_GENRE, priv->track);
++ comment = cdtext_get_const(cdtext_buf, CDTEXT_FIELD_MESSAGE, priv->track);
++ album = cdtext_get_const(cdtext_buf, CDTEXT_FIELD_TITLE, 0);
++ albumartist = cdtext_get_const(cdtext_buf, CDTEXT_FIELD_PERFORMER, 0);
+ if (!artist)
+- artist = field[CDTEXT_PERFORMER];
++ artist = cdtext_get_const(cdtext_buf, CDTEXT_FIELD_PERFORMER, 0);
+ if (!genre)
+- genre = field[CDTEXT_GENRE];
++ genre = cdtext_get_const(cdtext_buf, CDTEXT_FIELD_GENRE, 0);
+ if (!comment)
+- comment = field[CDTEXT_MESSAGE];
++ comment = cdtext_get_const(cdtext_buf, CDTEXT_FIELD_MESSAGE, 0);
+ }
+
+ #ifdef HAVE_CDDB
+- if (!cdtext_track && cddb_url && cddb_url[0]) {
++ if (!cdtext_buf && cddb_url && cddb_url[0]) {
+ cddb_track_t *cddb_track;
+ track_t i_tracks = cdio_get_num_tracks(priv->cdio);
+ track_t i_first_track = cdio_get_first_track_num(priv->cdio);
+@@ -442,6 +438,8 @@ static int libcdio_read_comments(struct
+ if (cddb_conn)
+ cddb_destroy(cddb_conn);
+ #endif
++ if (cdtext_buf != NULL)
++ cdtext_destroy(cdtext_buf);
+
+ keyvals_terminate(&c);
+ *comments = c.keyvals;
diff --git a/cmus-libmodplug.patch b/cmus-libmodplug.patch
new file mode 100644
index 0000000..f0a7ad3
--- /dev/null
+++ b/cmus-libmodplug.patch
@@ -0,0 +1,11 @@
+--- cmus-v2.5.0/modplug.c.orig 2012-11-07 09:46:17.000000000 +0100
++++ cmus-v2.5.0/modplug.c 2024-07-21 19:55:38.450907410 +0200
+@@ -24,7 +24,7 @@
+ #include "config/modplug.h"
+ #endif
+
+-#include <modplug.h>
++#include <libmodplug/modplug.h>
+ #include <sys/types.h>
+ #include <unistd.h>
+ #include <stdlib.h>
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/cmus.git/commitdiff/fc082f5bd7ba945c0d2d6d90bedee3f83ecd1326
More information about the pld-cvs-commit
mailing list