summaryrefslogtreecommitdiff
blob: da05b944e0104dc153a55a46321943dc1e5dee6a (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
53
54
55
56
57
58
59
60
61
62
63
64
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit autotools toolchain-funcs

DESCRIPTION="Cuecue converts .cue + [.ogg|.flac|.wav|.mp3] to .cue + .bin"
HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
SRC_URI="mirror://gentoo/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
# Enable one use flag by default, bug #254745
IUSE="+flac mp3 +vorbis"
REQUIRED_USE="|| ( flac mp3 vorbis )"

DEPEND="
	flac? ( media-libs/flac:= )
	mp3? ( media-libs/libmad )
	vorbis? ( media-libs/libvorbis media-libs/libogg )
"
RDEPEND="
	${DEPEND}
"
# We always need flac for AM_PATH_LIBFLAC if autoreconfing, bug #882447
BDEPEND="media-libs/flac"

PATCHES=(
	"${FILESDIR}"/${P}-flac113.diff # bug 157706
	"${FILESDIR}"/${P}-namespace.patch
	"${FILESDIR}"/${P}-unused.patch
	"${FILESDIR}"/${P}-fno-common.patch
	"${FILESDIR}"/${P}-configure.patch
)

src_prepare() {
	default

	# Clang 16
	eautoreconf
}

src_configure() {
	econf \
		$(use_enable flac) \
		$(use_enable mp3) \
		$(use_enable vorbis ogg) \
		--disable-libFLACtest \
		--disable-oggtest \
		--disable-vorbistest
}

src_compile() {
	emake AR="$(tc-getAR)" CFLAGS="${CFLAGS}"
}

src_install() {
	default

	insinto /usr/include
	doins src/libcuecue/cuecue.h
}