commit 9067f46c6cd68f9b9337e7a7c801ef41aadebb64
Author: Sérgio M. Basto <sergio(a)serjux.com>
Date: Tue Feb 15 23:56:16 2022 +0000
Update aqualung to 1.1, patches copied from altlinux and use compat-ffmpeg4
.gitignore | 1 +
aqualung-1.1-ifp.patch | 41 ++++++++++++++
aqualung-1.1-var-collision.patch | 31 +++++++++++
aqualung-ALT-C11.patch | 16 ++++++
aqualung-ALT-new_mac.patch | 112 +++++++++++++++++++++++++++++++++++++++
aqualung.spec | 26 +++++----
sources | 2 +-
7 files changed, 219 insertions(+), 10 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 1ff5a3f..8af5d54 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
aqualung-export-r1309.tar.bz2
/aqualung-05dfcb7.tar.gz
/aqualung-72c1ab1.tar.gz
+/aqualung-1.1.tar.gz
diff --git a/aqualung-1.1-ifp.patch b/aqualung-1.1-ifp.patch
new file mode 100644
index 0000000..490999b
--- /dev/null
+++ b/aqualung-1.1-ifp.patch
@@ -0,0 +1,41 @@
+From 2a3732f1575d69b64ed5c9b76c6213c7d4fbc20b Mon Sep 17 00:00:00 2001
+From: Adam Sampson <ats(a)offog.org>
+Date: Tue, 8 Sep 2020 15:55:12 +0100
+Subject: [PATCH] Fix arr_strlcpy call in ifp_device.
+
+directory_chooser needs to know the length of the target.
+---
+ src/ifp_device.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/ifp_device.c b/src/ifp_device.c
+index 9ef5741..42236cb 100644
+--- a/src/ifp_device.c
++++ b/src/ifp_device.c
+@@ -824,7 +824,7 @@ gchar *npath;
+
+
+ void
+-directory_chooser(char * title, GtkWidget * parent, char * directory) {
++directory_chooser(char * title, GtkWidget * parent, char * directory, size_t
directory_len) {
+
+ GtkWidget * dialog;
+ const gchar * selected_directory;
+@@ -855,7 +855,7 @@ directory_chooser(char * title, GtkWidget * parent, char * directory)
{
+ gtk_widget_destroy(dialog);
+ }
+
+- arr_strlcpy(directory, selected_directory);
++ g_strlcpy(directory, selected_directory, directory_len);
+ g_free(utf8);
+ }
+
+@@ -865,7 +865,7 @@ directory_chooser(char * title, GtkWidget * parent, char * directory)
{
+
+ void
+ local_path_selected_cb(GtkButton * button, gpointer data) {
+- directory_chooser(_("Please select a local path."), aifp_window, dest_dir);
++ directory_chooser(_("Please select a local path."), aifp_window, dest_dir,
sizeof dest_dir);
+ gtk_entry_set_text(GTK_ENTRY(local_path_entry), dest_dir);
+ }
+
diff --git a/aqualung-1.1-var-collision.patch b/aqualung-1.1-var-collision.patch
new file mode 100644
index 0000000..2606a0b
--- /dev/null
+++ b/aqualung-1.1-var-collision.patch
@@ -0,0 +1,31 @@
+From e49f31ba779c938fa6dd3eaf848c68735e3386f5 Mon Sep 17 00:00:00 2001
+From: Adam Sampson <ats(a)offog.org>
+Date: Sun, 10 Jan 2021 22:32:04 +0000
+Subject: [PATCH] Don't call a variable "bool".
+
+If one of the headers happens to #include <stdbool.h>, this'll clash
+with the C99 type definition.
+---
+ src/build_store.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/build_store.c b/src/build_store.c
+index 56b0eaf..ed4bfca 100644
+--- a/src/build_store.c
++++ b/src/build_store.c
+@@ -382,12 +382,12 @@ data_src_cell_toggled(GtkCellRendererToggle * cell, gchar * path,
gpointer data)
+ data_src_gui_t * gui = (data_src_gui_t *)data;
+
+ if (gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(gui->list), &iter, path))
{
+- gboolean bool;
++ gboolean value;
+ int type;
+
+- gtk_tree_model_get(GTK_TREE_MODEL(gui->list), &iter, 0, &bool, 1,
&type, -1);
++ gtk_tree_model_get(GTK_TREE_MODEL(gui->list), &iter, 0, &value, 1,
&type, -1);
+ gtk_list_store_set(GTK_LIST_STORE(gui->list), &iter,
+- 0, !bool && (type != DATA_SRC_CDDB || gui->model->cddb_mask), -1);
++ 0, !value && (type != DATA_SRC_CDDB || gui->model->cddb_mask),
-1);
+ }
+ }
+
diff --git a/aqualung-ALT-C11.patch b/aqualung-ALT-C11.patch
new file mode 100644
index 0000000..33af31b
--- /dev/null
+++ b/aqualung-ALT-C11.patch
@@ -0,0 +1,16 @@
+diff --git a/src/common.h b/src/common.h
+index ff00b4d..9ab50d0 100644
+--- a/src/common.h
++++ b/src/common.h
+@@ -30,11 +30,7 @@
+
+ /* When built with a C11 compiler, CHAR_ARRAY_SIZE will cause an error if the
+ argument is not actually a char[] array. */
+-#if __STDC_VERSION__ >= 201112L
+-#define CHAR_ARRAY_SIZE(array) _Generic(&(array), char (*)[]: sizeof(array))
+-#else
+ #define CHAR_ARRAY_SIZE(array) sizeof(array)
+-#endif
+
+ /* Since Aqualung uses fixed-size C strings in many places, provide wrappers
+ for bounded string operations that use CHAR_ARRAY_SIZE to ensure it's an
diff --git a/aqualung-ALT-new_mac.patch b/aqualung-ALT-new_mac.patch
new file mode 100644
index 0000000..c7c674c
--- /dev/null
+++ b/aqualung-ALT-new_mac.patch
@@ -0,0 +1,112 @@
+diff --git a/src/decoder/dec_mac.cpp b/src/decoder/dec_mac.cpp
+index c868ee9..d291690 100644
+--- a/src/decoder/dec_mac.cpp
++++ b/src/decoder/dec_mac.cpp
+@@ -24,6 +24,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <glib.h>
+
+
+ /* expand this to nothing so there's no error when including MACLib.h */
+@@ -60,9 +61,9 @@ decode_mac(decoder_t * dec) {
+
+ mac_pdata_t * pd = (mac_pdata_t *)dec->pdata;
+ file_decoder_t * fdec = dec->fdec;
+- IAPEDecompress * pdecompress = (IAPEDecompress *)pd->decompress;
++ APE::IAPEDecompress * pdecompress = (APE::IAPEDecompress *)pd->decompress;
+
+- int act_read = 0;
++ APE::int64 act_read = 0;
+ unsigned long scale = 1 << (pd->bits_per_sample - 1);
+ float fbuf[2 * BLOCKS_PER_READ];
+ int n = 0;
+@@ -170,31 +171,33 @@ mac_decoder_open(decoder_t * dec, char * filename) {
+ mac_pdata_t * pd = (mac_pdata_t *)dec->pdata;
+ file_decoder_t * fdec = dec->fdec;
+ metadata_t * meta;
+- IAPEDecompress * pdecompress = (IAPEDecompress *)pd->decompress;
++ APE::IAPEDecompress * pdecompress = (APE::IAPEDecompress *)pd->decompress;
+ const char * comp_level = NULL;
+
+
+ int ret = 0;
+ #ifdef __OpenBSD__
+ wchar_t * pUTF16 = GetUTF16FromANSI(filename);
+-#else
+- wchar_t * pUTF16 = CAPECharacterHelper::GetUTF16FromANSI(filename);
+-#endif
+ pdecompress = CreateIAPEDecompress(pUTF16, &ret);
+ free(pUTF16);
++#else
++ gunichar2 * pUTF16 = g_utf8_to_utf16(filename, -1, NULL, NULL, NULL);
++ pdecompress = CreateIAPEDecompress((wchar_t *)pUTF16, &ret, FALSE, FALSE);
++ g_free(pUTF16);
++#endif
+
+ if (!pdecompress || ret != ERROR_SUCCESS) {
+ return DECODER_OPEN_BADLIB;
+ }
+
+ pd->decompress = (void *)pdecompress;
+- pd->sample_rate = pdecompress->GetInfo(APE_INFO_SAMPLE_RATE);
+- pd->bits_per_sample = pdecompress->GetInfo(APE_INFO_BITS_PER_SAMPLE);
+- pd->bitrate = pdecompress->GetInfo(APE_DECOMPRESS_AVERAGE_BITRATE);
+- pd->channels = pdecompress->GetInfo(APE_INFO_CHANNELS);
+- pd->length_in_ms = pdecompress->GetInfo(APE_DECOMPRESS_LENGTH_MS);
+- pd->block_align = pdecompress->GetInfo(APE_INFO_BLOCK_ALIGN);
+- pd->compression_level = pdecompress->GetInfo(APE_INFO_COMPRESSION_LEVEL);
++ pd->sample_rate = pdecompress->GetInfo(APE::APE_INFO_SAMPLE_RATE);
++ pd->bits_per_sample =
pdecompress->GetInfo(APE::APE_INFO_BITS_PER_SAMPLE);
++ pd->bitrate = pdecompress->GetInfo(APE::APE_DECOMPRESS_AVERAGE_BITRATE);
++ pd->channels = pdecompress->GetInfo(APE::APE_INFO_CHANNELS);
++ pd->length_in_ms = pdecompress->GetInfo(APE::APE_DECOMPRESS_LENGTH_MS);
++ pd->block_align = pdecompress->GetInfo(APE::APE_INFO_BLOCK_ALIGN);
++ pd->compression_level = pdecompress->GetInfo(APE::APE_INFO_COMPRESSION_LEVEL);
+
+ if ((pd->channels != 1) && (pd->channels != 2)) {
+ printf("Sorry, MAC file with %d channels is not supported.\n",
pd->channels);
+@@ -218,19 +221,19 @@ mac_decoder_open(decoder_t * dec, char * filename) {
+ fdec->file_lib = MAC_LIB;
+
+ switch (pd->compression_level) {
+- case COMPRESSION_LEVEL_FAST:
++ case MAC_COMPRESSION_LEVEL_FAST:
+ comp_level = _("Compression: Fast");
+ break;
+- case COMPRESSION_LEVEL_NORMAL:
++ case MAC_COMPRESSION_LEVEL_NORMAL:
+ comp_level = _("Compression: Normal");
+ break;
+- case COMPRESSION_LEVEL_HIGH:
++ case MAC_COMPRESSION_LEVEL_HIGH:
+ comp_level = _("Compression: High");
+ break;
+- case COMPRESSION_LEVEL_EXTRA_HIGH:
++ case MAC_COMPRESSION_LEVEL_EXTRA_HIGH:
+ comp_level = _("Compression: Extra High");
+ break;
+- case COMPRESSION_LEVEL_INSANE:
++ case MAC_COMPRESSION_LEVEL_INSANE:
+ comp_level = _("Compression: Insane");
+ break;
+ default:
+@@ -255,7 +258,7 @@ void
+ mac_decoder_close(decoder_t * dec) {
+
+ mac_pdata_t * pd = (mac_pdata_t *)dec->pdata;
+- IAPEDecompress * pdecompress = (IAPEDecompress *)pd->decompress;
++ APE::IAPEDecompress * pdecompress = (APE::IAPEDecompress *)pd->decompress;
+
+ delete(pdecompress);
+ rb_free(pd->rb);
+@@ -294,7 +297,7 @@ mac_decoder_seek(decoder_t * dec, unsigned long long seek_to_pos) {
+
+ mac_pdata_t * pd = (mac_pdata_t *)dec->pdata;
+ file_decoder_t * fdec = dec->fdec;
+- IAPEDecompress * pdecompress = (IAPEDecompress *)pd->decompress;
++ APE::IAPEDecompress * pdecompress = (APE::IAPEDecompress *)pd->decompress;
+ char flush_dest;
+
+ pdecompress->Seek(seek_to_pos);
diff --git a/aqualung.spec b/aqualung.spec
index 5f41e2d..5c4a9cb 100644
--- a/aqualung.spec
+++ b/aqualung.spec
@@ -1,7 +1,7 @@
%define _legacy_common_support 1
#https://github.com/jeremyevans/aqualung/commit/72c1ab19fc8cd3294d5d0a7fd676099cd26d72db
-%global commit0 72c1ab19fc8cd3294d5d0a7fd676099cd26d72db
-%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
+#%%global commit0 72c1ab19fc8cd3294d5d0a7fd676099cd26d72db
+#%%global shortcommit0 %%(c=%%{commit0}; echo ${c:0:7})
%global nonfree 0
%global free 1
@@ -18,13 +18,17 @@
%endif
Name: aqualung
-Version: 1.0
-Release: 0.26.rc1git%{shortcommit0}%{?dist}
+Version: 1.1
+Release: 1%{?dist}
Summary: Music Player for GNU/Linux
License: GPLv2+
URL:
http://aqualung.jeremyevans.net/
-Source0:
https://github.com/jeremyevans/aqualung/archive/%{commit0}/%{name}-%{comm...
+Source0:
https://github.com/jeremyevans/aqualung/archive/%{version}/%{name}-%{vers...
Source1: %{name}.desktop
+Patch1: %name-%version-ifp.patch
+Patch2: %name-%version-var-collision.patch
+Patch3: aqualung-ALT-new_mac.patch
+Patch4: aqualung-ALT-C11.patch
# autogen.sh
BuildRequires: autoconf automake pkgconfig gettext-devel
@@ -49,7 +53,7 @@ BuildRequires: pkgconfig(speex)
BuildRequires: pkgconfig(libmodplug)
BuildRequires: libmpcdec-devel
%{?with_mac:BuildRequires: pkgconfig(mac)}
-%{?with_lavc:BuildRequires: ffmpeg-devel}
+%{?with_lavc:BuildRequires: compat-ffmpeg4-devel}
%{?with_lame:BuildRequires: lame-devel}
BuildRequires: pkgconfig(wavpack)
BuildRequires: pkgconfig(lrdf)
@@ -69,9 +73,10 @@ well as sound files in just about any audio format and has the feature
of
inserting no gaps between adjacent tracks.
%prep
-%setup -qn %{name}-%{commit0}
+%autosetup -p1 -n %{name}-%{version}
%build
+export PKG_CONFIG_PATH=/usr/lib64/compat-ffmpeg4/pkgconfig
./autogen.sh
%configure \
--without-sndio \
@@ -101,10 +106,10 @@ inserting no gaps between adjacent tracks.
# Fix lib64 path
sed -i 's@/usr/lib/@%{_libdir}/@g' src/plugin.c
-make %{?_smp_mflags}
+%make_build
%install
-make install DESTDIR=%{buildroot} INSTALL="%{__install} -p -c"
+%make_install
desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE1}
@@ -127,6 +132,9 @@ install -D -m 644 -p src/img/icon_48.png \
%{_docdir}/%{name}
%changelog
+* Tue Feb 15 2022 Sérgio Basto <sergio(a)serjux.com> - 1.1-1
+- Update aqualung to 1.1, patches copied from altlinux and use compat-ffmpeg4
+
* Wed Feb 09 2022 RPM Fusion Release Engineering <sergiomb(a)rpmfusion.org> -
1.0-0.26.rc1git72c1ab1
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
diff --git a/sources b/sources
index e5171a9..ad54bfb 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-40cf40785b9cf4f792fb76c95abca961 aqualung-72c1ab1.tar.gz
+SHA512 (aqualung-1.1.tar.gz) =
6e635e4e2b8ce3aed5446ef03e54c71b415d472fde37bf7572ee7aba72eed67684770497495916cd4bf34c4de4aa63701c2d9cadb2ab0654666a4f9ffa75ba8d