summaryrefslogtreecommitdiff
blob: 174d912e442b98df6d81997e18a5ac7da9a2560e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

DESCRIPTION="Simple programming interface to decode and encode audio with vorbis or speex"
HOMEPAGE="https://www.xiph.org/fishsound/"
SRC_URI="https://downloads.xiph.org/releases/libfishsound/${P}.tar.gz"

LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="flac speex"

RDEPEND="
	media-libs/libogg
	media-libs/libvorbis
	flac? ( media-libs/flac:= )
	speex? ( media-libs/speex )
"
DEPEND="${RDEPEND}"
BDEPEND="virtual/pkgconfig"

# bug #395153
RESTRICT="test"

PATCHES=(
	"${FILESDIR}"/${P}-pc.patch
	"${FILESDIR}"/${PN}-1.0.0-c99.patch
)

src_prepare() {
	default
	sed -i \
		-e 's:doxygen:doxygen-dummy:' \
		configure || die
}

src_configure() {
	local myconf="--disable-static"
	use flac || myconf="${myconf} --disable-flac"
	use speex || myconf="${myconf} --disable-speex"

	econf ${myconf}
}

src_install() {
	emake DESTDIR="${D}" \
		docdir="${D}/usr/share/doc/${PF}" install
	dodoc AUTHORS ChangeLog README
	find "${ED}" -name '*.la' -delete || die
}