summaryrefslogtreecommitdiff
blob: 5926139cbbab0eb90baf1c49e99807d9fadf694e (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
71
72
73
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit autotools flag-o-matic toolchain-funcs multilib-minimal

DESCRIPTION="Large collection of LADSPA audio plugins/effects"
HOMEPAGE="http://plugin.org.uk"
SRC_URI="https://github.com/swh/ladspa/archive/v${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ~arm ~arm64 ~ppc ~ppc64 x86"
IUSE="nls cpu_flags_x86_3dnow cpu_flags_x86_sse"

RDEPEND="
	>=media-sound/gsm-1.0.13-r1[${MULTILIB_USEDEP}]
	>=sci-libs/fftw-3.3.3-r2[${MULTILIB_USEDEP}]
"
DEPEND="${RDEPEND}
	media-libs/ladspa-sdk
	sys-devel/gettext
"
BDEPEND="
	dev-perl/XML-Parser
	virtual/pkgconfig
"

DOCS=( AUTHORS ChangeLog README TODO )

S="${WORKDIR}/ladspa-${PV}"

PATCHES=(
	"${FILESDIR}/${P}-system-gsm.patch"
)

src_prepare() {
	default

	append-cflags -fPIC -DPIC

	# Use system libgsm, also patch above, bug #252890
	rm -rf gsm

	eautoreconf

	multilib_copy_sources
}

multilib_src_configure() {
	econf \
		$(use_enable cpu_flags_x86_sse sse) \
		$(use_enable cpu_flags_x86_3dnow 3dnow) \
		$(use_enable nls) \
		--enable-fast-install \
		--disable-dependency-tracking \
		RANLIB="$(tc-getRANLIB)"
}

multilib_src_compile() {
	emake RANLIB="$(tc-getRANLIB)"
}

pkg_postinst() {
	ewarn "WARNING: You have to be careful when using the"
	ewarn "swh plugins. Be sure to lower your sound volume"
	ewarn "and then play around a bit with the plugins so"
	ewarn "you get a feeling for it. Otherwise your speakers"
	ewarn "won't like that."
	einfo "If you use only 64 bit sequencers, you may want to disable 32 bit support via USE flag"
	einfo "example| media-plugins/swh-plugins -abi_x86_32"
}