summaryrefslogtreecommitdiff
path: root/media-sound/openmpt123/openmpt123-0.6.6.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-09-27 03:09:13 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-09-27 03:09:13 +0100
commit8d3ae5c288a62253ed3bc3d71336bf2061cfdb51 (patch)
treed303ef81057f764dd5468859b1d8af22d21475b9 /media-sound/openmpt123/openmpt123-0.6.6.ebuild
parent90e9e4843d7d63c5e7fa1f5d6d6f4cc7350ce77c (diff)
gentoo auto-resync : 27:09:2022 - 03:09:13
Diffstat (limited to 'media-sound/openmpt123/openmpt123-0.6.6.ebuild')
-rw-r--r--media-sound/openmpt123/openmpt123-0.6.6.ebuild73
1 files changed, 73 insertions, 0 deletions
diff --git a/media-sound/openmpt123/openmpt123-0.6.6.ebuild b/media-sound/openmpt123/openmpt123-0.6.6.ebuild
new file mode 100644
index 000000000000..14e1fd68b4de
--- /dev/null
+++ b/media-sound/openmpt123/openmpt123-0.6.6.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit 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"
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~riscv ~x86"
+IUSE="flac portaudio pulseaudio sdl sndfile"
+
+RDEPEND="
+ ~media-libs/libopenmpt-${PV}
+ flac? ( media-libs/flac:= )
+ pulseaudio? ( media-sound/pulseaudio )
+ sdl? ( >=media-libs/libsdl2-2.0.4 )
+ sndfile? ( media-libs/libsndfile )
+"
+
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ default
+
+ # 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)"
+}