commit:     9450ef61c2b866da5874329ffae3d030f6fb7169
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 13 22:28:19 2022 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Thu Apr 14 06:37:04 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9450ef61

media-libs/sdl_audiolib: Initial commit

Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 media-libs/sdl_audiolib/Manifest                   |  1 +
 media-libs/sdl_audiolib/metadata.xml               | 17 +++++++
 .../sdl_audiolib/sdl_audiolib-0_pre20220410.ebuild | 59 ++++++++++++++++++++++
 media-libs/sdl_audiolib/sdl_audiolib-9999.ebuild   | 59 ++++++++++++++++++++++
 4 files changed, 136 insertions(+)

diff --git a/media-libs/sdl_audiolib/Manifest b/media-libs/sdl_audiolib/Manifest
new file mode 100644
index 000000000000..4dda6082d546
--- /dev/null
+++ b/media-libs/sdl_audiolib/Manifest
@@ -0,0 +1 @@
+DIST sdl_audiolib-0_pre20220410.tar.xz 223932 BLAKE2B 
09f35684b64b2b96fd0230612cc8458a8c7b0b94860c9d616c90141cd6d8088048e783170180191ed9998b2601676892686dc7d8373c8507d71db59b919c178b
 SHA512 
01ef7f4d8987e1e27b4413d21eefbb8a83ab720f64ed76fd6314244d0d53bed5a061f4a22d4967e21cc9f6086532d33fea233f3e72e8a7abc5a80108f74710c1

diff --git a/media-libs/sdl_audiolib/metadata.xml 
b/media-libs/sdl_audiolib/metadata.xml
new file mode 100644
index 000000000000..d76fa399a830
--- /dev/null
+++ b/media-libs/sdl_audiolib/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+  <maintainer type="person">
+    <email>[email protected]</email>
+    <name>Lars Wendler</name>
+  </maintainer>
+  <use>
+    <flag name="fluidsynth">use <pkg>media-sound/fluidsynth</pkg> for 
MIDI</flag>
+    <flag name="mpg123">Enable support for mp3 decoding via 
<pkg>media-sound/mpg123</pkg></flag>
+    <flag name="openmpt">OpenMPT decoder via 
<pkg>media-libs/libopenmpt</pkg></flag>
+    <flag name="soxr">Enable SoX Resampler support via 
<pkg>media-libs/soxr</pkg></flag>
+  </use>
+  <upstream>
+    <remote-id type="github">realnc/SDL_audiolib</remote-id>
+  </upstream>
+</pkgmetadata>

diff --git a/media-libs/sdl_audiolib/sdl_audiolib-0_pre20220410.ebuild 
b/media-libs/sdl_audiolib/sdl_audiolib-0_pre20220410.ebuild
new file mode 100644
index 000000000000..d993c84aa88b
--- /dev/null
+++ b/media-libs/sdl_audiolib/sdl_audiolib-0_pre20220410.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="audio decoding, resampling and mixing library"
+HOMEPAGE="https://github.com/realnc/SDL_audiolib";
+if [[ "${PV}" == *9999 ]] ; then
+       inherit git-r3
+       EGIT_REPO_URI="https://github.com/realnc/SDL_audiolib.git";
+else
+       # No official releases from upstream yet
+       SRC_URI="https://dev.gentoo.org/~polynomial-c/dist/${P}.tar.xz";
+       KEYWORDS="~amd64 ~x86"
+fi
+LICENSE="LGPL-3"
+SLOT="0"
+
+IUSE="fluidsynth libsamplerate modplug mpg123 musepack openmpt opus sndfile 
soxr vorbis"
+
+RDEPEND="
+       media-libs/libsdl2
+       fluidsynth? ( media-sound/fluidsynth )
+       libsamplerate? ( media-libs/libsamplerate )
+       modplug? ( media-libs/libmodplug )
+       mpg123? ( media-sound/mpg123 )
+       musepack? ( media-sound/musepack-tools )
+       openmpt? ( media-libs/libopenmpt )
+       opus? ( media-libs/opusfile )
+       sndfile? ( media-libs/libsndfile )
+       soxr? ( media-libs/soxr )
+       vorbis? ( media-libs/libvorbis )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+       virtual/pkgconfig
+"
+
+src_configure() {
+       local mycmakeargs=(
+               -DUSE_DEC_ADLMIDI=OFF
+               -DUSE_DEC_BASSMIDI=OFF
+               -DUSE_DEC_FLUIDSYNTH="$(usex fluidsynth)"
+               -DUSE_DEC_MODPLUG="$(usex modplug)"
+               -DUSE_DEC_MPG123="$(usex mpg123)"
+               -DUSE_DEC_MUSEPACK="$(usex musepack)"
+               -DUSE_DEC_OPENMPT="$(usex openmpt)"
+               -DUSE_DEC_LIBOPUSFILE="$(usex opus)"
+               -DUSE_DEC_SNDFILE="$(usex sndfile)"
+               -DUSE_DEC_LIBVORBIS="$(usex vorbis)"
+               -DUSE_DEC_WILDMIDI=OFF
+               -DUSE_DEC_XMP=OFF
+               -DUSE_RESAMP_SOXR="$(usex soxr)"
+               -DUSE_RESAMP_SRC="$(usex libsamplerate)"
+       )
+       cmake_src_configure
+}

diff --git a/media-libs/sdl_audiolib/sdl_audiolib-9999.ebuild 
b/media-libs/sdl_audiolib/sdl_audiolib-9999.ebuild
new file mode 100644
index 000000000000..d993c84aa88b
--- /dev/null
+++ b/media-libs/sdl_audiolib/sdl_audiolib-9999.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="audio decoding, resampling and mixing library"
+HOMEPAGE="https://github.com/realnc/SDL_audiolib";
+if [[ "${PV}" == *9999 ]] ; then
+       inherit git-r3
+       EGIT_REPO_URI="https://github.com/realnc/SDL_audiolib.git";
+else
+       # No official releases from upstream yet
+       SRC_URI="https://dev.gentoo.org/~polynomial-c/dist/${P}.tar.xz";
+       KEYWORDS="~amd64 ~x86"
+fi
+LICENSE="LGPL-3"
+SLOT="0"
+
+IUSE="fluidsynth libsamplerate modplug mpg123 musepack openmpt opus sndfile 
soxr vorbis"
+
+RDEPEND="
+       media-libs/libsdl2
+       fluidsynth? ( media-sound/fluidsynth )
+       libsamplerate? ( media-libs/libsamplerate )
+       modplug? ( media-libs/libmodplug )
+       mpg123? ( media-sound/mpg123 )
+       musepack? ( media-sound/musepack-tools )
+       openmpt? ( media-libs/libopenmpt )
+       opus? ( media-libs/opusfile )
+       sndfile? ( media-libs/libsndfile )
+       soxr? ( media-libs/soxr )
+       vorbis? ( media-libs/libvorbis )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+       virtual/pkgconfig
+"
+
+src_configure() {
+       local mycmakeargs=(
+               -DUSE_DEC_ADLMIDI=OFF
+               -DUSE_DEC_BASSMIDI=OFF
+               -DUSE_DEC_FLUIDSYNTH="$(usex fluidsynth)"
+               -DUSE_DEC_MODPLUG="$(usex modplug)"
+               -DUSE_DEC_MPG123="$(usex mpg123)"
+               -DUSE_DEC_MUSEPACK="$(usex musepack)"
+               -DUSE_DEC_OPENMPT="$(usex openmpt)"
+               -DUSE_DEC_LIBOPUSFILE="$(usex opus)"
+               -DUSE_DEC_SNDFILE="$(usex sndfile)"
+               -DUSE_DEC_LIBVORBIS="$(usex vorbis)"
+               -DUSE_DEC_WILDMIDI=OFF
+               -DUSE_DEC_XMP=OFF
+               -DUSE_RESAMP_SOXR="$(usex soxr)"
+               -DUSE_RESAMP_SRC="$(usex libsamplerate)"
+       )
+       cmake_src_configure
+}

Reply via email to