commit:     ed0146261aded54e6d8dfb5470a492dcb357b659
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Sun Mar  9 22:37:01 2025 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Sun Mar  9 22:43:33 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ed014626

media-libs/zmusic: Version bump to 1.1.14

Closes: https://bugs.gentoo.org/866392
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 media-libs/zmusic/Manifest                         |  1 +
 .../zmusic/files/zmusic-1.1.14-no-sndfile.patch    | 27 ++++++++++++
 media-libs/zmusic/zmusic-1.1.14.ebuild             | 50 ++++++++++++++++++++++
 3 files changed, 78 insertions(+)

diff --git a/media-libs/zmusic/Manifest b/media-libs/zmusic/Manifest
index 74721512a6d5..2961c070d4f3 100644
--- a/media-libs/zmusic/Manifest
+++ b/media-libs/zmusic/Manifest
@@ -1 +1,2 @@
+DIST zmusic-1.1.14.tar.gz 2525238 BLAKE2B 
6e3270f014170a52774ce30ccb19847f44efc7ed36a0a7cba7024dee5e703d9cd7072d03ea9b404ad43df5b88902907a96b7dceb6c914fdc6ae09f7b44e5a20a
 SHA512 
165e227177d5bbbd1226099f0607c2147eacd26e2b619508994efb63d718709838b5df32ac851bb933058351757979d9bc0d477b4efb87a5c8d528d60c0d954f
 DIST zmusic-1.1.4.tar.gz 1809045 BLAKE2B 
aae64fa8b10b44d79ce4738527e613e65c65a8e367dc998f966938ccc10b9689a58decb702c1ca943ed3371092b69ed91dbe4645b707626ac525d29d750334d5
 SHA512 
5188fb095897769514c4a4698fabb5640e7ca86fe0665d4bfe6649a940b00ac02d87decda626be8a848ba6db0a468cc985d74d0fda2d3da8657fee079e0bde73

diff --git a/media-libs/zmusic/files/zmusic-1.1.14-no-sndfile.patch 
b/media-libs/zmusic/files/zmusic-1.1.14-no-sndfile.patch
new file mode 100644
index 000000000000..e0ec215b5a99
--- /dev/null
+++ b/media-libs/zmusic/files/zmusic-1.1.14-no-sndfile.patch
@@ -0,0 +1,27 @@
+From 6928b8609db9b1c104c4cd4f9b163486121fb0f0 Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <[email protected]>
+Date: Sat, 8 Mar 2025 21:53:55 +0000
+Subject: [PATCH] Fix building with no sndfile support at all
+
+The stub functions still reference SNDFILE, so we still need to include
+the bundled header in this case.
+---
+ source/decoder/sndfile_decoder.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/source/decoder/sndfile_decoder.h 
b/source/decoder/sndfile_decoder.h
+index 2645ebd..3bf916a 100644
+--- a/source/decoder/sndfile_decoder.h
++++ b/source/decoder/sndfile_decoder.h
+@@ -43,6 +43,8 @@ private:
+     static sf_count_t file_tell(void *user_data);
+ };
+ 
++#else
++#include "../thirdparty/sndfile.h"
+ #endif
+ 
+ #endif /* SNDFILE_DECODER_H */
+-- 
+2.48.1
+

diff --git a/media-libs/zmusic/zmusic-1.1.14.ebuild 
b/media-libs/zmusic/zmusic-1.1.14.ebuild
new file mode 100644
index 000000000000..531d9ef35621
--- /dev/null
+++ b/media-libs/zmusic/zmusic-1.1.14.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake flag-o-matic
+
+MY_PN="ZMusic"
+DESCRIPTION="GZDoom's music system as a standalone library"
+HOMEPAGE="https://github.com/ZDoom/ZMusic";
+SRC_URI="https://github.com/ZDoom/${MY_PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+LICENSE="BSD DUMB-0.9.3 GPL-3 LGPL-2.1+ LGPL-3 MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
+IUSE="alsa mpg123 +sndfile"
+
+DEPEND="
+       dev-libs/glib:2
+       alsa? ( media-libs/alsa-lib )
+       mpg123? ( media-sound/mpg123 )
+       sndfile? ( media-libs/libsndfile[-minimal] )"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+       "${FILESDIR}"/${P}-no-sndfile.patch
+)
+
+src_prepare() {
+       rm -rf licenses || die
+       cmake_src_prepare
+}
+
+src_configure() {
+       # -Werror=odr
+       # https://bugs.gentoo.org/860117
+       # https://github.com/ZDoom/ZMusic/issues/56
+       filter-lto
+
+       local mycmakeargs=(
+               -DDYN_SNDFILE=OFF
+               -DDYN_MPG123=OFF
+               -DCMAKE_DISABLE_FIND_PACKAGE_ALSA="$(usex !alsa)"
+               -DCMAKE_DISABLE_FIND_PACKAGE_MPG123="$(usex !mpg123)"
+               -DCMAKE_DISABLE_FIND_PACKAGE_SndFile="$(usex !sndfile)"
+               -DBUILD_SHARED_LIBS=ON
+       )
+       cmake_src_configure
+}

Reply via email to