gentoo-ebuilds/media-sound/openmpt123/openmpt123-0.8.3.ebuild
James Le Cuirot 9ffbbaa12a
media-sound/openmpt123: Bump to 0.8.3, drop old 0.8.2-r1
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
2025-09-14 21:40:22 +01:00

74 lines
1.7 KiB
Bash

# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit libtool multilib
MY_P="libopenmpt-${PV}+release.autotools"
DESCRIPTION="libopenmpt-based command line player for tracked music files (modules)"
HOMEPAGE="https://lib.openmpt.org/libopenmpt/"
SRC_URI="https://lib.openmpt.org/files/libopenmpt/src/${MY_P}.tar.gz"
S="${WORKDIR}/${MY_P}"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86"
IUSE="flac portaudio pulseaudio sdl sndfile"
RDEPEND="
~media-libs/libopenmpt-${PV}
flac? ( media-libs/flac:= )
portaudio? ( media-libs/portaudio )
pulseaudio? ( media-libs/libpulse )
sdl? ( >=media-libs/libsdl2-2.0.4 )
sndfile? ( media-libs/libsndfile )
"
DEPEND="${RDEPEND}"
BDEPEND="virtual/pkgconfig"
src_prepare() {
default
elibtoolize
# Normally libopenmpt is built alongside openmpt123. Avoid the
# internal dependency and link it externally.
rm -r libopenmpt/ || die
sed -i \
-e "s:libopenmpt/libopenmpt\.pc::g" \
configure || die
sed -i \
-e "/_${PN}_DEPENDENCIES/s:libopenmpt\.la::g" \
-e "/_${PN}_LDADD/s:libopenmpt\.la:-lopenmpt:g" \
Makefile.in || die
}
src_configure() {
# A lot of these optional dependencies relate to libopenmpt, which
# we package separately, so we disable them here.
econf \
--disable-static \
--enable-openmpt123 \
--disable-examples \
--disable-tests \
--disable-doxygen-doc \
--without-zlib \
--without-mpg123 \
--without-ogg \
--without-vorbis \
--without-vorbisfile \
$(use_with pulseaudio) \
$(use_with portaudio) \
--without-portaudiocpp \
$(use_with sdl sdl2) \
$(use_with sndfile) \
$(use_with flac)
}
src_compile() {
emake "bin/${PN}$(get_exeext)"
}
src_install() {
dobin "bin/${PN}$(get_exeext)"
}