summaryrefslogtreecommitdiff
blob: 0b1b4f04022c75f5153b416510f6d85c1a15bcbe (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
65
66
67
68
69
70
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit autotools flag-o-matic toolchain-funcs

DESCRIPTION="Synthesizer keyboard emulation package: Moog, Hammond and others"
HOMEPAGE="https://sourceforge.net/projects/bristol"
SRC_URI="mirror://sourceforge/bristol/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="alsa oss"
# osc : configure option but no code it seems...
# jack: fails to build if disabled
# pulseaudio: not fully supported

BDEPEND="
	virtual/pkgconfig"
RDEPEND="
	virtual/jack
	x11-libs/libX11
	alsa? ( media-libs/alsa-lib )"
# osc? ( >=media-libs/liblo-0.22 )
DEPEND="${RDEPEND}
	x11-base/xorg-proto"

PATCHES=(
	"${FILESDIR}"/${P}-cflags.patch
	"${FILESDIR}"/${P}-dontcompress.patch
	"${FILESDIR}"/${P}-rm_alsa-iatomic.h.patch
	"${FILESDIR}"/bristol-c99.patch
	"${FILESDIR}"/0001-configure.ac-fix-various-erroneous-bashisms.patch
)

src_prepare() {
	default
	eautoreconf
}

src_configure() {
	# -Werror=lto-type-mismatch
	# https://bugs.gentoo.org/860447
	#
	# Upstream is dead. The last release was in 2013 and the last maintainer
	# comment on discussions was 2020.
	filter-lto

	tc-export PKG_CONFIG

	append-cflags -fcommon
	econf \
		--disable-static \
		--disable-version-check \
		$(use_enable alsa) \
		$(use_enable oss)
}

src_compile() {
	emake LDFLAGS="${LDFLAGS}"
}

src_install() {
	default
	dodoc HOWTO

	find "${ED}" -name '*.la' -delete || die
}