summaryrefslogtreecommitdiff
path: root/media-sound/aqualung
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-09-30 17:40:25 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-09-30 17:40:25 +0100
commit3c78a1ce7924fbf571e133e697f8a29e18d2bf4b (patch)
tree5bbedb5d3c2716d5b332f7e74f54941c9a2b50b8 /media-sound/aqualung
parentc417025a2ab386cddabb71ad598a9b75b47af313 (diff)
gentoo auto-resync : 30:09:2023 - 17:40:25
Diffstat (limited to 'media-sound/aqualung')
-rw-r--r--media-sound/aqualung/Manifest7
-rw-r--r--media-sound/aqualung/aqualung-1.2-r2.ebuild (renamed from media-sound/aqualung/aqualung-1.2-r1.ebuild)15
-rw-r--r--media-sound/aqualung/aqualung-1.2-r3.ebuild121
-rw-r--r--media-sound/aqualung/files/aqualung-1.2-mac-configure.patch48
-rw-r--r--media-sound/aqualung/files/aqualung-1.2-mac-dec.patch136
-rw-r--r--media-sound/aqualung/files/aqualung-1.2-mac-endianness.patch73
-rw-r--r--media-sound/aqualung/files/aqualung-1.2-mac-glib.patch22
7 files changed, 416 insertions, 6 deletions
diff --git a/media-sound/aqualung/Manifest b/media-sound/aqualung/Manifest
index b74c2d0ff47a..aaef8be6aaf3 100644
--- a/media-sound/aqualung/Manifest
+++ b/media-sound/aqualung/Manifest
@@ -1,4 +1,9 @@
AUX aqualung-1.1-configure-lua-version.patch 1230 BLAKE2B ea7a3f9a5bfaef41e97639e9a417da233cd0b0577abf674ebee2e07141493f6f6207142f9b910e14e765d7fe2c1cdf43ab0b1a68234944f4134b3d8e35a255f1 SHA512 dfdfa42025e7c27cb735129fa0af0c2cd0b29803231bf225daa16c9b46357172eb9a5b6429cffc634dd4c3003de17339df3a4f27fbd0de682291302c63b89b10
+AUX aqualung-1.2-mac-configure.patch 2195 BLAKE2B 2079fa9cdbeaf182cce47622cc721c3ac8c1fda722aea33eacd0933257edcd2e0289e190950dce2680f58b94fe96ae5120a86f013cac3c66b0424b67ff690736 SHA512 8e59956681510d4d78c127a49b5df6a4bfcb076bd0478af91d38183ecb11708399c84662e79eab4d94b79c65ed242cd610f4e24d71cb7c5b197ee469e1b35938
+AUX aqualung-1.2-mac-dec.patch 5038 BLAKE2B 0b27d435d530e3c71bf85350b85073b04cfe9000ac5ac1a099107cedd45e3add0d08152a5c0eff87201aee54b60a25562d244b80f1e93abcc3358c81bc53e761 SHA512 c7074ff3879d2106b7f772882debfa8482f7afb2b1d22ef3d543ee8ed3cc474d1fc3d21faa2680b564415f2974034a0aa3d2927b5ad37d034c2b1f7efd036954
+AUX aqualung-1.2-mac-endianness.patch 2441 BLAKE2B bf2009142e01824e24c819c49a2b32f3dbd96a52268834dabf6ba61ddf97b56f547f3508081cbea96f098fecb41e19f7bb0c543fdadd2208f11a216a00dfe626 SHA512 a664e112e058adbe817aee5f5d376f6720ecc6592d543b4a49634150207e8c3a248b3c9e18cfbc1c313818b6d6c435859aca515f7932379dd178d1fea012181a
+AUX aqualung-1.2-mac-glib.patch 605 BLAKE2B 8b61a45446488a19cef5a721e855935624ece57e8378ff8ea0236f970523a5178123885d4dde35d5a32802395969a4c8d574f9caaacbb5353f9f9f4d1c380207 SHA512 8ce3dfaa6ebbe5254fdb69dfbf81e27d6d91e15c9da22a77e9fcfb00c13cf3d817f6bcf49f976c7a71dbab2ede90772c173334ca5ab8a6ec4d66e6b606dfbe23
DIST aqualung-1.2.tar.gz 1974910 BLAKE2B 4956865a5897cf92d3ebb65cb30f27164e7717fadbbff8e275b25d5fa9c60382846877f644d3a8393935df82f9b92d282fe41befe27cd86accc3f6885650063f SHA512 0e11f307344c8ada7f3869d953e6fb8b088a8af345d51f3e93af18b4b57ea6f35bbc47eefea40956114d56882e4a0d66c1496a7b9a14dfd82e6a95cfc0ef52c5
-EBUILD aqualung-1.2-r1.ebuild 2659 BLAKE2B db05f990cfcdde60aadc7ff9ab06fc978baeac3c427bfd0a0bdef566d1d3612c75d5679aec288b40b0f418b2ca4b19b4a711f8c082d1b1eaf228c5ac430e65c5 SHA512 a27e3a1deb99bf1f28b33453e84ec8d6f6e8c764d364be6c59558c49a652c0fbb76de4d1706086b72bd59703cc83c58708abea018559c86273375ad3a980f6ff
+EBUILD aqualung-1.2-r2.ebuild 2594 BLAKE2B 5fcf720249ef9ea30f41f872e27e1b75d23edb5d3b128c069bcdd9bc996a7404b1e520296b785af4f538787dbe5b86ccf633ae16485600f65b31144d7b3a2b03 SHA512 13e78c07056ec893b7ae80d266d6325675a0b037d0029db5a78c1e77fab0f510a3f41c7cfd36702a7e3bfc01704406c5fefec7cb12e522e2908d78caa02b06e2
+EBUILD aqualung-1.2-r3.ebuild 2798 BLAKE2B 5e5bd87a1d738d7035a0126295376f8d4589f1c2a4019e7527036ca96afc4123e6f2a8ea9280ba668c3cf39ce635260ac80f379ca3ff70b9395d7514ab97afa5 SHA512 08df39f78e4e0eea88c67ff4b9b447b3bfa78a65fef8735e1295a32c1d951c0bdf39d6d44d76ecb52781a14f1183f123b31127ecbf8377d1476f2e2399ce1cd0
MISC metadata.xml 919 BLAKE2B 66ad98450937b883d555b01bb05777de0bd00fba596231586d064bed7502f391b13235cb4a55366fc9146278047b177f895feddf94c59597bca5c5e92001ccd3 SHA512 1ccc8d585cf46e8d7c09f6bd8182e6941442b7045ab5243598b2c18b946c93ee8aa2fd257ba54af6db6af2689e33676967e266149fce2dc79e650afa480f828c
diff --git a/media-sound/aqualung/aqualung-1.2-r1.ebuild b/media-sound/aqualung/aqualung-1.2-r2.ebuild
index 7979234c9fef..a8a06cac3610 100644
--- a/media-sound/aqualung/aqualung-1.2-r1.ebuild
+++ b/media-sound/aqualung/aqualung-1.2-r2.ebuild
@@ -24,8 +24,6 @@ BDEPEND="
virtual/pkgconfig
sys-devel/gettext
"
-# <ffmpeg-5 dep for bug #834391
-# https://github.com/jeremyevans/aqualung/issues/29
RDEPEND="
app-arch/bzip2
dev-libs/libxml2
@@ -42,14 +40,21 @@ RDEPEND="
lame? ( media-sound/lame )
libsamplerate? ( media-libs/libsamplerate )
lua? ( ${LUA_DEPS} )
- mac? ( media-sound/mac )
+ mac? ( <=media-sound/mac-4.12 )
modplug? ( media-libs/libmodplug )
mp3? ( media-libs/libmad )
musepack? ( >=media-sound/musepack-tools-444 )
pulseaudio? ( media-libs/libpulse )
sndfile? ( media-libs/libsndfile )
- speex? ( media-libs/speex media-libs/liboggz media-libs/libogg )
- vorbis? ( media-libs/libvorbis media-libs/libogg )
+ speex? (
+ media-libs/speex
+ media-libs/liboggz
+ media-libs/libogg
+ )
+ vorbis? (
+ media-libs/libvorbis
+ media-libs/libogg
+ )
wavpack? ( media-sound/wavpack )
"
DEPEND="${RDEPEND}"
diff --git a/media-sound/aqualung/aqualung-1.2-r3.ebuild b/media-sound/aqualung/aqualung-1.2-r3.ebuild
new file mode 100644
index 000000000000..dc7c665c8929
--- /dev/null
+++ b/media-sound/aqualung/aqualung-1.2-r3.ebuild
@@ -0,0 +1,121 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LUA_COMPAT=( lua5-{1..4} luajit )
+
+inherit autotools desktop lua-single xdg
+
+DESCRIPTION="Music player for a wide range of formats designed for gapless playback"
+HOMEPAGE="https://aqualung.jeremyevans.net/ https://github.com/jeremyevans/aqualung"
+SRC_URI="https://github.com/jeremyevans/${PN}/releases/download/${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="alsa cdda cddb debug flac ffmpeg ifp jack ladspa lame libsamplerate
+ lua mac modplug mp3 musepack oss podcast pulseaudio sndfile speex systray
+ vorbis wavpack"
+
+REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} )"
+
+BDEPEND="
+ virtual/pkgconfig
+ sys-devel/gettext
+"
+RDEPEND="
+ app-arch/bzip2
+ dev-libs/libxml2
+ sys-libs/zlib
+ x11-libs/gtk+:2
+ alsa? ( media-libs/alsa-lib )
+ cdda? ( dev-libs/libcdio-paranoia )
+ cddb? ( media-libs/libcddb )
+ ffmpeg? ( media-video/ffmpeg:= )
+ flac? ( media-libs/flac:= )
+ ifp? ( media-libs/libifp )
+ jack? ( virtual/jack )
+ ladspa? ( media-libs/liblrdf )
+ lame? ( media-sound/lame )
+ libsamplerate? ( media-libs/libsamplerate )
+ lua? ( ${LUA_DEPS} )
+ mac? ( >=media-sound/mac-10.24:= )
+ modplug? ( media-libs/libmodplug )
+ mp3? ( media-libs/libmad )
+ musepack? ( >=media-sound/musepack-tools-444 )
+ pulseaudio? ( media-libs/libpulse )
+ sndfile? ( media-libs/libsndfile )
+ speex? (
+ media-libs/speex
+ media-libs/liboggz
+ media-libs/libogg
+ )
+ vorbis? (
+ media-libs/libvorbis
+ media-libs/libogg
+ )
+ wavpack? ( media-sound/wavpack )
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.1-configure-lua-version.patch"
+ "${FILESDIR}/${PN}-1.2-mac-configure.patch"
+ "${FILESDIR}/${PN}-1.2-mac-dec.patch"
+ "${FILESDIR}/${PN}-1.2-mac-endianness.patch"
+ "${FILESDIR}/${PN}-1.2-mac-glib.patch"
+)
+
+pkg_setup() {
+ use lua && lua-single_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ xdg_environment_reset
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-rpath \
+ --enable-loop \
+ --enable-nls \
+ --enable-transcoding \
+ $(use_enable debug) \
+ $(use_enable podcast) \
+ $(use_enable systray) \
+ $(use_enable jack jack-mgmt) \
+ $(use_with alsa) \
+ $(use_with cdda) \
+ $(use_with cddb) \
+ $(use_with ffmpeg lavc) \
+ $(use_with flac) \
+ $(use_with ifp) \
+ $(use_with jack) \
+ $(use_with ladspa) \
+ $(use_with lame) \
+ $(use_with libsamplerate src) \
+ $(use_with lua) \
+ $(use_with mac MAC) \
+ $(use_with modplug mod) \
+ $(use_with mp3 mpeg) \
+ $(use_with musepack mpc) \
+ $(use_with oss) \
+ $(use_with pulseaudio pulse) \
+ $(use_with sndfile) \
+ $(use_with speex) \
+ $(use_with vorbis vorbis) \
+ $(use_with vorbis vorbisenc) \
+ $(use_with wavpack)
+}
+
+src_install() {
+ default
+
+ newicon src/img/icon_64.png aqualung.png
+ make_desktop_entry aqualung Aqualung
+}
diff --git a/media-sound/aqualung/files/aqualung-1.2-mac-configure.patch b/media-sound/aqualung/files/aqualung-1.2-mac-configure.patch
new file mode 100644
index 000000000000..6418228158bf
--- /dev/null
+++ b/media-sound/aqualung/files/aqualung-1.2-mac-configure.patch
@@ -0,0 +1,48 @@
+diff -Naur aqualung-1.2_orig/configure.ac aqualung-1.2/configure.ac
+--- aqualung-1.2_orig/configure.ac 2023-08-13 18:12:52.281251038 +0200
++++ aqualung-1.2/configure.ac 2023-08-13 18:13:55.693247259 +0200
+@@ -275,11 +275,11 @@
+ [AQUALUNG_FOUND([lavc])],
+ [AQUALUNG_MISSING([lavc], [$lavc_PKG_ERRORS])])])
+
+-AQUALUNG_DETECT([mac], [Monkey's Audio Codec],
+- [AC_CHECK_LIB([mac], [CreateIAPEDecompress],
+- [AQUALUNG_FOUND([mac], [-lmac -lstdc++])],
+- [AQUALUNG_MISSING([mac],
+- [Monkey's Audio Codec support requires libmac])],
++AQUALUNG_DETECT([MAC], [Monkey's Audio Codec],
++ [AC_CHECK_LIB([MAC], [CreateIAPEDecompress],
++ [AQUALUNG_FOUND([MAC], [-lMAC -lstdc++])],
++ [AQUALUNG_MISSING([MAC],
++ [Monkey's Audio Codec support requires libMAC])],
+ [-lstdc++])])
+
+ AQUALUNG_DETECT([mod], [MOD Audio],
+diff -Naur aqualung-1.2_orig/src/decoder/dec_mac.cpp aqualung-1.2/src/decoder/dec_mac.cpp
+--- aqualung-1.2_orig/src/decoder/dec_mac.cpp 2023-08-13 18:20:40.318223141 +0200
++++ aqualung-1.2/src/decoder/dec_mac.cpp 2023-08-13 18:21:33.661219962 +0200
+@@ -31,9 +31,9 @@
+ #define DLLEXPORT
+
+ #include "../undef_ac_pkg.h"
+-#include <mac/All.h>
+-#include <mac/MACLib.h>
+-#include <mac/CharacterHelper.h>
++#include <MAC/All.h>
++#include <MAC/MACLib.h>
++#include <MAC/CharacterHelper.h>
+ #include "../undef_ac_pkg.h"
+ #include <config.h> /* re-establish undefined autoconf macros */
+
+diff -Naur aqualung-1.2_orig/src/Makefile.am aqualung-1.2/src/Makefile.am
+--- aqualung-1.2_orig/src/Makefile.am 2023-08-14 00:51:00.972827161 +0200
++++ aqualung-1.2/src/Makefile.am 2023-08-14 00:51:10.563826590 +0200
+@@ -25,7 +25,7 @@
+ aqualung_LDADD = $(LDADD) $(xml_LIBS) $(gtk_LIBS) $(glib_LIBS) \
+ $(alsa_LIBS) $(jack_LIBS) $(oss_LIBS) $(pulse_LIBS) \
+ $(sndio_LIBS) $(winmm_LIBS) \
+- $(flac_LIBS) $(lame_LIBS) $(lavc_LIBS) $(mac_LIBS) \
++ $(flac_LIBS) $(lame_LIBS) $(lavc_LIBS) $(MAC_LIBS) \
+ $(mad_LIBS) $(mod_LIBS) $(mpc_LIBS) $(sndfile_LIBS) \
+ $(speex_LIBS) $(vorbis_LIBS) $(vorbisenc_LIBS) \
+ $(wavpack_LIBS) \
diff --git a/media-sound/aqualung/files/aqualung-1.2-mac-dec.patch b/media-sound/aqualung/files/aqualung-1.2-mac-dec.patch
new file mode 100644
index 000000000000..a7fb369cb1c2
--- /dev/null
+++ b/media-sound/aqualung/files/aqualung-1.2-mac-dec.patch
@@ -0,0 +1,136 @@
+--- aqualung-1.2_orig/src/decoder/dec_mac.cpp 2023-08-13 19:40:59.245935911 +0200
++++ aqualung-1.2/src/decoder/dec_mac.cpp 2023-08-13 19:41:33.660933860 +0200
+@@ -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,16 +61,16 @@
+
+ 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;
+
+ switch (pd->bits_per_sample) {
+ case 8:
+- char data8[2 * BLOCKS_PER_READ];
++ unsigned char data8[2 * BLOCKS_PER_READ];
+ pdecompress->GetData(data8, BLOCKS_PER_READ, &act_read);
+ if (!act_read) {
+ return 1;
+@@ -84,7 +85,7 @@
+
+ case 16:
+ short data16[2 * BLOCKS_PER_READ];
+- pdecompress->GetData((char *)data16, BLOCKS_PER_READ, &act_read);
++ pdecompress->GetData((unsigned char *)data16, BLOCKS_PER_READ, &act_read);
+ if (!act_read) {
+ return 1;
+ }
+@@ -100,7 +101,7 @@
+
+ case 32:
+ int data32[2 * BLOCKS_PER_READ];
+- pdecompress->GetData((char *)data32, BLOCKS_PER_READ, &act_read);
++ pdecompress->GetData((unsigned char *)data32, BLOCKS_PER_READ, &act_read);
+ if (!act_read) {
+ return 1;
+ }
+@@ -170,31 +171,33 @@
+ 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, 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::IAPEDecompress::APE_INFO_SAMPLE_RATE);
++ pd->bits_per_sample = pdecompress->GetInfo(APE::IAPEDecompress::APE_INFO_BITS_PER_SAMPLE);
++ pd->bitrate = pdecompress->GetInfo(APE::IAPEDecompress::APE_DECOMPRESS_AVERAGE_BITRATE);
++ pd->channels = pdecompress->GetInfo(APE::IAPEDecompress::APE_INFO_CHANNELS);
++ pd->length_in_ms = pdecompress->GetInfo(APE::IAPEDecompress::APE_DECOMPRESS_LENGTH_MS);
++ pd->block_align = pdecompress->GetInfo(APE::IAPEDecompress::APE_INFO_BLOCK_ALIGN);
++ pd->compression_level = pdecompress->GetInfo(APE::IAPEDecompress::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 @@
+ fdec->file_lib = MAC_LIB;
+
+ switch (pd->compression_level) {
+- case COMPRESSION_LEVEL_FAST:
++ case APE_COMPRESSION_LEVEL_FAST:
+ comp_level = _("Compression: Fast");
+ break;
+- case COMPRESSION_LEVEL_NORMAL:
++ case APE_COMPRESSION_LEVEL_NORMAL:
+ comp_level = _("Compression: Normal");
+ break;
+- case COMPRESSION_LEVEL_HIGH:
++ case APE_COMPRESSION_LEVEL_HIGH:
+ comp_level = _("Compression: High");
+ break;
+- case COMPRESSION_LEVEL_EXTRA_HIGH:
++ case APE_COMPRESSION_LEVEL_EXTRA_HIGH:
+ comp_level = _("Compression: Extra High");
+ break;
+- case COMPRESSION_LEVEL_INSANE:
++ case APE_COMPRESSION_LEVEL_INSANE:
+ comp_level = _("Compression: Insane");
+ break;
+ default:
+@@ -255,7 +258,7 @@
+ 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_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/media-sound/aqualung/files/aqualung-1.2-mac-endianness.patch b/media-sound/aqualung/files/aqualung-1.2-mac-endianness.patch
new file mode 100644
index 000000000000..3296bd67ad7e
--- /dev/null
+++ b/media-sound/aqualung/files/aqualung-1.2-mac-endianness.patch
@@ -0,0 +1,73 @@
+From d2c88317b6042a05c236faf3c09f600337c6379e Mon Sep 17 00:00:00 2001
+From: Jeremy Evans <code@jeremyevans.net>
+Date: Tue, 5 Sep 2023 17:48:00 +0100
+Subject: [PATCH] Fix the Monkey's Audio decoder to work with current Monkey's
+ Audio (Fixes #33)
+
+Using g_utf8_to_utf16 doesn't work because current Monkey's Audio
+expects a different endianness of the multibyte character string.
+Using GetUTF16FromANSI works for compiling only if namedspaced
+correctly, and if namespaced correctly, it cannot link. Use a
+similar approach for building the correct multibyte string.
+
+Remove the DLLEXPORT define, to avoid a warning when including
+the MAC headers.
+
+Tested using the Monkey's Audio 10.20 SDK.
+---
+ src/decoder/dec_mac.cpp | 25 ++++++++++---------------
+ 1 file changed, 10 insertions(+), 15 deletions(-)
+
+diff --git a/src/decoder/dec_mac.cpp b/src/decoder/dec_mac.cpp
+index b007f74..6d4b658 100644
+--- a/src/decoder/dec_mac.cpp
++++ b/src/decoder/dec_mac.cpp
+@@ -27,14 +27,9 @@
+ #include <glib.h>
+
+
+-/* expand this to nothing so there's no error when including MACLib.h */
+-/* -- talkin' about cross-platform libraries? */
+-#define DLLEXPORT
+-
+ #include "../undef_ac_pkg.h"
+ #include <MAC/All.h>
+ #include <MAC/MACLib.h>
+-#include <MAC/CharacterHelper.h>
+ #include "../undef_ac_pkg.h"
+ #include <config.h> /* re-establish undefined autoconf macros */
+
+@@ -48,7 +43,6 @@
+
+ extern size_t sample_size;
+
+-
+ #define BLOCKS_PER_READ 2048
+
+
+@@ -176,15 +170,16 @@ mac_decoder_open(decoder_t * dec, char * filename) {
+
+
+ int ret = 0;
+-#ifdef __OpenBSD__
+- wchar_t * pUTF16 = GetUTF16FromANSI(filename);
+- 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, FALSE);
+- g_free(pUTF16);
+-#endif
++ int filename_len = strlen(filename);
++ int i;
++ APE::str_utfn * filename_utf16 = new APE::str_utfn [static_cast<size_t>(filename_len) + 1];
++
++ for (i = 0; i < filename_len; i++)
++ filename_utf16[i] = (APE::str_utfn)(APE::str_utf8)filename[i];
++ filename_utf16[i] = 0;
++
++ pdecompress = CreateIAPEDecompress(filename_utf16, &ret, FALSE, FALSE, FALSE);
++ delete [] filename_utf16;
+
+ if (!pdecompress || ret != ERROR_SUCCESS) {
+ return DECODER_OPEN_BADLIB;
diff --git a/media-sound/aqualung/files/aqualung-1.2-mac-glib.patch b/media-sound/aqualung/files/aqualung-1.2-mac-glib.patch
new file mode 100644
index 000000000000..59aee6432581
--- /dev/null
+++ b/media-sound/aqualung/files/aqualung-1.2-mac-glib.patch
@@ -0,0 +1,22 @@
+From 1c2a295a72e1e3abc6df40714d9753e311541550 Mon Sep 17 00:00:00 2001
+From: Jeremy Evans <code@jeremyevans.net>
+Date: Wed, 6 Sep 2023 09:02:31 +0100
+Subject: [PATCH] Remove now unnecessary glib include in mac decoder
+
+Pointed out by Daniel Pielmeier.
+---
+ src/decoder/dec_mac.cpp | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/src/decoder/dec_mac.cpp b/src/decoder/dec_mac.cpp
+index 6d4b658..f89450d 100644
+--- a/src/decoder/dec_mac.cpp
++++ b/src/decoder/dec_mac.cpp
+@@ -24,7 +24,6 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+-#include <glib.h>
+
+
+ #include "../undef_ac_pkg.h"