# Copyright 1999-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 inherit cmake DESCRIPTION="Library for playback of various streamed audio formats used in video games" HOMEPAGE="https://vgmstream.org/" if [[ "${PV}" == 9999 ]]; then inherit git-r3 EGIT_REPO_URI="https://github.com/vgmstream/vgmstream.git" else SRC_URI="https://github.com/vgmstream/vgmstream/archive/refs/tags/r${PV}.tar.gz -> vgmstream-r${PV}.tar.gz" KEYWORDS="~amd64" S="${WORKDIR}/${PN}-r${PV}" fi SRC_URI+=" celt? ( https://downloads.xiph.org/releases/celt/celt-0.6.1.tar.gz https://downloads.xiph.org/releases/celt/celt-0.11.0.tar.gz ) " LICENSE="MIT" SLOT="0" IUSE=" +mp3 +vorbis +speex +ffmpeg celt +cli +player audacious " RDEPEND=" mp3? ( media-sound/mpg123-base ) vorbis? ( media-libs/libogg media-libs/libvorbis ) speex? ( media-libs/speex ) player? ( media-libs/libao ) audacious? ( media-sound/audacious ) " DEPEND="${RDEPEND}" BDEPEND=" dev-vcs/git virtual/pkgconfig " src_unpack() { if [[ ${PV} == 9999 ]]; then git-r3_src_unpack fi default } src_configure() { local mycmakeargs=( -DBUILD_AUDACIOUS=$(usex audacious) -DBUILD_CLI=$(usex player) -DBUILD_V123=$(usex player) -DUSE_MPEG=$(usex mp3) -DUSE_VORBIS=$(usex vorbis) -DUSE_FFMPEG=$(usex ffmpeg) -DUSE_G7221=NO -DUSE_G719=NO -DUSE_G7221=NO -DUSE_ATRAC9=NO -DUSE_CELT=$(usex celt) -DCELT_0061_PATH="${WORKDIR}/celt-0.6.1" -DCELT_0110_PATH="${WORKDIR}/celt-0.11.0" -DUSE_SPEEX=$(usex speex) -DBUILD_SHARED_LIBS=ON ) cmake_src_configure }