diff options
author | Sam James <sam@gentoo.org> | 2022-10-17 00:03:10 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-10-17 00:04:51 +0100 |
commit | 52767bdc28efb3a4bf10b8489843ae3ff7b40aa7 (patch) | |
tree | d3e6e12888260fa15344da1e2e4c38f87e88641e /media-sound/snd | |
parent | toolchain.eclass: use xz for gcc-build-logs (diff) | |
download | gentoo-52767bdc28efb3a4bf10b8489843ae3ff7b40aa7.tar.gz gentoo-52767bdc28efb3a4bf10b8489843ae3ff7b40aa7.tar.bz2 gentoo-52767bdc28efb3a4bf10b8489843ae3ff7b40aa7.zip |
media-sound/snd: add 22.8
Closes: https://bugs.gentoo.org/616144
Closes: https://bugs.gentoo.org/692984
Closes: https://bugs.gentoo.org/660328
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-sound/snd')
-rw-r--r-- | media-sound/snd/Manifest | 1 | ||||
-rw-r--r-- | media-sound/snd/files/snd-22.8-undefined-oss_sample_types.patch | 42 | ||||
-rw-r--r-- | media-sound/snd/metadata.xml | 15 | ||||
-rw-r--r-- | media-sound/snd/snd-22.8.ebuild | 106 |
4 files changed, 157 insertions, 7 deletions
diff --git a/media-sound/snd/Manifest b/media-sound/snd/Manifest index 2d1639713161..16ecf311c777 100644 --- a/media-sound/snd/Manifest +++ b/media-sound/snd/Manifest @@ -1 +1,2 @@ DIST snd-17.4.tar.gz 15096338 BLAKE2B ca054977caacd2ea4c1b14f50c31d3b4cc6b206a58529ee5537ec80e51acb72c1b8baad6db9729270fe07067c097f16e630e1f7a81521ac0532f5b5689fb963c SHA512 cbbc546fe4a3ef758c5372edbdae4db29457c559eafa08854819917e153ce850f5ab302da68dee826f99c26f10769aae8c6df6ea8434614f084f21d0dbbc5c88 +DIST snd-22.8.tar.gz 14696217 BLAKE2B 6d90e1a51f862d17985831f676a01e61c9cce44f623c8db5d8a0a30cb3909823b5361a20ce5a19bfdb846c0d5237fcd9183be0a9970cfa6e9e02c69911090e6f SHA512 a6c007a1c17973f6bc4badcca72b310b4e53d3a8b1831f026fca230ae9925ab3c53eb6a97015220fd929b7ecb14c7922ba2113d6c7a6626406ec4d361b7b228d diff --git a/media-sound/snd/files/snd-22.8-undefined-oss_sample_types.patch b/media-sound/snd/files/snd-22.8-undefined-oss_sample_types.patch new file mode 100644 index 000000000000..f94e5b64ea53 --- /dev/null +++ b/media-sound/snd/files/snd-22.8-undefined-oss_sample_types.patch @@ -0,0 +1,42 @@ +Always compile the `oss_sample_types` function +Bug: https://bugs.gentoo.org/621758 + +Also, conditionally use pulseaudio_sample_types: +``` +audio.c: In function ‘mus_audio_device_sample_type’: +audio.c:5687:5: error: implicit declaration of function ‘pulseaudio_sample_types’; did you mean ‘alsa_sample_types’? [-Werror=implicit-function-declaration] + 5687 | pulseaudio_sample_types(dev, mixer_vals); + | ^~~~~~~~~~~~~~~~~~~~~~~ + | alsa_sample_types +``` +--- a/audio.c ++++ b/audio.c +@@ -744,7 +744,6 @@ static int oss_mus_audio_open_input(int ur_dev, int srate, int chans, mus_sample + } + + +-#if (!HAVE_ALSA) && (!HAVE_JACK_IN_LINUX) + static int oss_sample_types(int ur_dev, mus_sample_t *val) + { + int fd, samp_types = 0, sys, ind; +@@ -775,7 +774,6 @@ static int oss_sample_types(int ur_dev, mus_sample_t *val) + val[0] = (mus_sample_t)(ind - 1); + return(MUS_NO_ERROR); + } +-#endif + + + +--- a/audio.c ++++ b/audio.c +@@ -5682,7 +5682,7 @@ mus_sample_t mus_audio_device_sample_type(int dev) /* snd-dac */ + #endif + #endif + +-#if defined(MUS_PULSEAUDIO) ++#if defined(MUS_PULSEAUDIO) && (!(defined(AUDIO_OK))) + if (mixer_vals[0] == MUS_UNKNOWN_SAMPLE) + pulseaudio_sample_types(dev, mixer_vals); + #endif +-- +2.38.0 diff --git a/media-sound/snd/metadata.xml b/media-sound/snd/metadata.xml index a9f94b17f953..1007169df4b2 100644 --- a/media-sound/snd/metadata.xml +++ b/media-sound/snd/metadata.xml @@ -1,11 +1,12 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> -<maintainer type="project"> - <email>sound@gentoo.org</email> - <name>Gentoo Sound project</name> -</maintainer> -<use> - <flag name="s7">Enable the s7 extension language (a version of Scheme)</flag> -</use> + <maintainer type="project"> + <email>sound@gentoo.org</email> + <name>Gentoo Sound project</name> + </maintainer> + <use> + <flag name="notcurses">Terminal interface via <pkg>dev-cpp/notcurses</pkg></flag> + <flag name="s7">Enable the s7 extension language (a version of Scheme)</flag> + </use> </pkgmetadata> diff --git a/media-sound/snd/snd-22.8.ebuild b/media-sound/snd/snd-22.8.ebuild new file mode 100644 index 000000000000..04c60c009588 --- /dev/null +++ b/media-sound/snd/snd-22.8.ebuild @@ -0,0 +1,106 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools flag-o-matic + +DESCRIPTION="Snd is a sound editor" +HOMEPAGE="https://ccrma.stanford.edu/software/snd/" +SRC_URI="https://ccrma.stanford.edu/software/${PN}/${P}.tar.gz" + +LICENSE="Snd 0BSD BSD-2 HPND GPL-2+ LGPL-2.1+ LGPL-3+" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux" +IUSE="alsa doc fftw gmp gsl gui jack ladspa notcurses opengl oss portaudio pulseaudio readline ruby +s7" + +RDEPEND=" + alsa? ( media-libs/alsa-lib ) + fftw? ( sci-libs/fftw:3.0= ) + gmp? ( + dev-libs/gmp:= + dev-libs/mpc + dev-libs/mpfr:= + ) + gsl? ( sci-libs/gsl:= ) + gui? ( >=x11-libs/motif-2.3:0 ) + jack? ( virtual/jack ) + ladspa? ( media-libs/ladspa-sdk ) + notcurses? ( dev-cpp/notcurses ) + opengl? ( virtual/opengl ) + portaudio? ( media-libs/portaudio ) + pulseaudio? ( media-sound/pulseaudio ) + readline? ( sys-libs/readline:= ) + ruby? ( dev-lang/ruby:* ) +" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +REQUIRED_USE=" + ?? ( portaudio pulseaudio ) + ?? ( ruby s7 )" + +PATCHES=( + "${FILESDIR}"/${PN}-22.8-undefined-oss_sample_types.patch +) + +src_prepare() { + default + + sed -i -e "s:-O2 ::" configure.ac || die + eautoreconf +} + +src_configure() { + # Workaround executable sections QA warning (bug #348754) + append-ldflags -Wl,-z,noexecstack + + local myeconfargs=( + $(use_with alsa) + $(use_with fftw) + $(use_with gmp) + $(use_with gsl) + $(use_with gui) + $(use_with jack) + $(use_with ladspa) + $(use_with notcurses) + $(use_with oss) + $(use_with portaudio) + $(use_with pulseaudio) + $(use_with ruby) + $(use_with s7) + ) + + if ! use ruby && ! use s7 ; then + myeconfargs+=( --without-extension-language ) + fi + + econf "${myeconfargs[@]}" +} + +src_compile() { + emake snd + + # Do not compile ruby extensions for command line programs since they fail + sed -i -e "s:HAVE_RUBY 1:HAVE_RUBY 0:" mus-config.h || die + + emake sndplay sndinfo +} + +src_install() { + dobin snd sndplay sndinfo + + if use ruby ; then + insinto /usr/share/snd + doins *.rb + fi + + if use s7 ; then + insinto /usr/share/snd + doins *.scm + fi + + use doc && HTML_DOCS=( *.html pix/*.png ) + einstalldocs + dodoc HISTORY.Snd +} |