commit: ae56138e34931feba80e9e771b0c58ab0f7b68fa Author: Nicolas PARLANT <nicolas.parlant <AT> parhuet <DOT> fr> AuthorDate: Mon Mar 9 14:06:57 2026 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Wed Mar 11 13:42:59 2026 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ae56138e
media-sound/shntool: add 3.0.10_p1 various fixes, apply patchset from debian update HOMEPAGE / SRC_URI call eautoreconf to modernize the build system and avoid forcing bash apply patchset from debian to fix various issues fix gcc15 from fedora patch remove deps and useflags, it's only optfeatures remove blocker for media-sound/mac, mac is still called w/ the same args to compress/decompress regardless of version Closes: https://bugs.gentoo.org/599944 Closes: https://bugs.gentoo.org/965875 Signed-off-by: Nicolas PARLANT <nicolas.parlant <AT> parhuet.fr> Part-of: https://codeberg.org/gentoo/gentoo/pulls/272 Merges: https://codeberg.org/gentoo/gentoo/pulls/272 Signed-off-by: Sam James <sam <AT> gentoo.org> media-sound/shntool/Manifest | 1 + .../shntool/files/shntool-3.0.10-fix_24bits.patch | 30 +++++++++ .../shntool/files/shntool-3.0.10-fix_gcc15.patch | 71 ++++++++++++++++++++++ media-sound/shntool/shntool-3.0.10_p1.ebuild | 53 ++++++++++++++++ 4 files changed, 155 insertions(+) diff --git a/media-sound/shntool/Manifest b/media-sound/shntool/Manifest index c896779cc051..6572e64cbdad 100644 --- a/media-sound/shntool/Manifest +++ b/media-sound/shntool/Manifest @@ -1 +1,2 @@ DIST shntool-3.0.10.tar.gz 216061 BLAKE2B b662c64992409c1a12dd3fffab5f39c69b2c1f8fb958cba590009f599e4363403aa1d353efdec8ab7529fc22cfac0b908368a132b60f7e5acd55dcae932909e2 SHA512 2150d7123860abb54a56a1615bda991ed3713d73c338723f28b7d01a63c49a47809be16dc57b5b4edeee1567b003f9a4b54945c1cd08440f9503d22b91eaa06d +DIST shntool_3.0.10+git20130108.4ca41f4-1.debian.tar.xz 4788 BLAKE2B 1d4da40fd62647391837ea40e1444a4c63a0b25775117ef99f26cc6e7e61426ff820e73673ce5f7e36d0bc05309acf5f28c1e6f27470dae49f2974fbbe37ab6d SHA512 2b4587403a7cd6df97647d062a8dc0292f91fc7b9958c5404be38b99974d0ff6d0eff2753b926752835d321605fac51f4972e3b4e82d4d8339def18c3e50797c diff --git a/media-sound/shntool/files/shntool-3.0.10-fix_24bits.patch b/media-sound/shntool/files/shntool-3.0.10-fix_24bits.patch new file mode 100644 index 000000000000..4c3e5a21d7bd --- /dev/null +++ b/media-sound/shntool/files/shntool-3.0.10-fix_24bits.patch @@ -0,0 +1,30 @@ +patch from upstream +https://github.com/bayun/shntool/commit/4ca41f4.patch +Fix for mm:ss:ff on non-CD-quality files +fix also https://bugs.gentoo.org/965875 +--- a/src/core_mode.c ++++ b/src/core_mode.c +@@ -346,7 +346,7 @@ static wlong is_m_ss_ff(unsigned char *buf,wave_info *info) + *dot = 0; + + if (PROB_NOT_CD(info)) +- st_error("m:ss.ff format can only be used with CD-quality files"); ++ st_warning("m:ss.ff format can only be used with CD-quality files"); + + min = atoi((const char *)buf); + sec = atoi((const char *)(colon+1)); +@@ -358,10 +358,10 @@ static wlong is_m_ss_ff(unsigned char *buf,wave_info *info) + if (frames >= 75) + st_error("invalid value for frames: [%d]",frames); + +- bytes = (wlong)(min * CD_RATE * 60) + +- (wlong)(sec * CD_RATE) + +- (wlong)(frames * CD_BLOCK_SIZE); +- ++ int rate = info->bits_per_sample / 8 * info->channels * info->samples_per_sec; ++ bytes = (wlong)(min * rate * 60) + ++ (wlong)(sec * rate) + ++ (wlong)(frames * rate / 75); + return bytes; + } + diff --git a/media-sound/shntool/files/shntool-3.0.10-fix_gcc15.patch b/media-sound/shntool/files/shntool-3.0.10-fix_gcc15.patch new file mode 100644 index 000000000000..4e1f6ee4c767 --- /dev/null +++ b/media-sound/shntool/files/shntool-3.0.10-fix_gcc15.patch @@ -0,0 +1,71 @@ +fix c23 https://bugs.gentoo.org/943815 +apply fix from Fedora https://src.fedoraproject.org/rpms/shntool/raw/fc11294/f/gcc-15-fixes.patch +--- a/include/format.h ++++ b/include/format.h +@@ -35,7 +35,7 @@ void tagcpy(unsigned char *,unsigned char *); + int tagcmp(unsigned char *,unsigned char *); + + /* function to check if a file name is about to be clobbered, and if so, asks whether this is OK */ +-int clobber_check(char *); ++bool clobber_check(char *); + + /* find an output format module with the given name */ + format_module *find_format(char *); +--- a/include/mode.h ++++ b/include/mode.h +@@ -78,7 +78,7 @@ void create_output_filename(char *,char *,char *); + FILE *open_output_stream(char *,proc_info *); + + /* function to determine if two filenames point to the same file */ +-int files_are_identical(char *,char *); ++bool files_are_identical(char *,char *); + + /* function to remove a file if it exists */ + void remove_file(char *); +--- a/include/module-types.h ++++ b/include/module-types.h +@@ -23,6 +23,8 @@ + #ifndef __MODULE_TYPES_H__ + #define __MODULE_TYPES_H__ + ++#include <stdbool.h> ++ + #ifdef HAVE_CONFIG_H + #include "config.h" + #endif +@@ -44,9 +46,6 @@ + #define PATHSEPCHAR '/' + #endif + +-/* boolean type */ +-typedef int bool; +- + /* wtypes */ + typedef unsigned long wlong; + typedef unsigned short wshort; +--- a/src/core_mode.c ++++ b/src/core_mode.c +@@ -564,18 +564,12 @@ static int compare_ascii(const wave_info **w1,const wave_info **w2) + + static void ascii_sort_files(wave_info **filenames, int numfiles) + { +- int (*cmpfunc) (); +- +- cmpfunc = compare_ascii; +- qsort(filenames,numfiles,sizeof(wave_info *),cmpfunc); ++ qsort(filenames,numfiles,sizeof(wave_info *),(int (*)(const void*, const void*))compare_ascii); + } + + static void version_sort_files(wave_info **filenames,int numfiles) + { +- int (*cmpfunc) (); +- +- cmpfunc = compare_version; +- qsort(filenames,numfiles,sizeof(wave_info *),cmpfunc); ++ qsort(filenames,numfiles,sizeof(wave_info *),(int (*)(const void*, const void*))compare_version); + } + + /* public functions */ +-- +2.48.1 + diff --git a/media-sound/shntool/shntool-3.0.10_p1.ebuild b/media-sound/shntool/shntool-3.0.10_p1.ebuild new file mode 100644 index 000000000000..932c4b83b3ae --- /dev/null +++ b/media-sound/shntool/shntool-3.0.10_p1.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools optfeature + +MY_PV="${PV%_p*}" +MY_P="${PN}-${MY_PV}" +PATCH_LEVEL="${PV#*_p}" +DEBIAN_VER="git20130108.4ca41f4" +DESCRIPTION="Multi-purpose WAVE data processing and reporting utility" +HOMEPAGE="http://shnutils.freeshell.org/shntool/" +SRC_URI="http://shnutils.freeshell.org/shntool/dist/src/${MY_P}.tar.gz" +SRC_URI+=" mirror://debian/pool/main/s/shntool/${MY_P/-/_}+${DEBIAN_VER}-${PATCH_LEVEL}.debian.tar.xz" +S="${WORKDIR}/${MY_P}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" + +PATCHES=( + "${FILESDIR}"/${PN}-3.0.10-fix_24bits.patch + "${FILESDIR}"/${PN}-3.0.10-fix_gcc15.patch +) + +src_prepare() { + # Debian patchset + PATCHES+=( + $(awk '{print $1}' "${WORKDIR}"/debian/patches/series | sed -e '/^#/d' -e "s:^:${WORKDIR}/debian/patches/:") + ) + + default + + # bug #527310 + eautoreconf +} + +src_install() { + default + dodoc -r doc/. +} + +pkg_postinst() { + optfeature_header "Several packages to support many audio formats:" + optfeature "Apple Lossless Audio Codec (.alac)" media-sound/alac_decoder + optfeature "Free Lossless Audio Codec (.flac)" media-libs/flac + optfeature "Monkey's Audio Compressor (.ape)" media-sound/mac + optfeature "Shorten (.shn)" media-sound/shorten + optfeature "Audio Interchange File Format (.aiff)" media-sound/sox + optfeature "TTA Lossless Audio Codec (.tta)" media-sound/ttaenc + optfeature "WavPack Hybrid Lossless Audio Compression (.wv)" media-sound/wavpack +}
