1 # Copyright 1999-2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit multilib-minimal
8 MY_P="libopenmpt-${PV}+release.autotools"
9 DESCRIPTION="Library to decode tracked music files (modules)"
10 HOMEPAGE="https://lib.openmpt.org/libopenmpt/"
11 SRC_URI="https://lib.openmpt.org/files/libopenmpt/src/${MY_P}.tar.gz"
12 S="${WORKDIR}/${MY_P}"
15 KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86"
16 IUSE="examples mp3 ogg static-libs test vorbis zlib"
17 RESTRICT="!test? ( test )"
20 mp3? ( media-sound/mpg123[${MULTILIB_USEDEP}] )
21 ogg? ( media-libs/libogg[${MULTILIB_USEDEP}] )
22 vorbis? ( media-libs/libvorbis[${MULTILIB_USEDEP}] )
23 zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )
27 BDEPEND="virtual/pkgconfig"
31 multilib_src_configure() {
32 # A lot of these optional dependencies relate to openmpt123, which
33 # we package separately, so we disable them here.
35 $(use_enable static-libs static) \
36 --disable-openmpt123 \
38 $(use_enable test tests) \
39 --disable-doxygen-doc \
41 $(use_with mp3 mpg123) \
44 $(use_with vorbis vorbisfile) \
45 --without-pulseaudio \
47 --without-portaudiocpp \
53 multilib_src_install_all() {
56 "${ED}"/usr/share/doc/${P}/LICENSE || die
58 if ! use examples; then
59 rm -r "${ED}"/usr/share/doc/${P}/examples || die