aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLucio Sauer <watermanpaint@posteo.net>2023-09-04 00:23:38 +0200
committerLucio Sauer <watermanpaint@posteo.net>2023-09-04 00:24:37 +0200
commit72b0f9c3ea374dee0a2d665ced0c5c17b3effc04 (patch)
tree9f17eacdf22b801b5510a092ac57510ea6e1bd4a
parentmedia-libs/dr_flac: new package, add 0.12.41 (diff)
downloadguru-72b0f9c3.tar.gz
guru-72b0f9c3.tar.bz2
guru-72b0f9c3.zip
media-libs/dr_mp3: new package, add 0.6.37
Signed-off-by: Lucio Sauer <watermanpaint@posteo.net>
-rw-r--r--media-libs/dr_mp3/Manifest2
-rw-r--r--media-libs/dr_mp3/dr_mp3-0.6.37.ebuild73
-rw-r--r--media-libs/dr_mp3/files/dr_mp3-0.6.37-docs.tar.xzbin0 -> 3600 bytes
-rw-r--r--media-libs/dr_mp3/metadata.xml11
4 files changed, 86 insertions, 0 deletions
diff --git a/media-libs/dr_mp3/Manifest b/media-libs/dr_mp3/Manifest
new file mode 100644
index 000000000..9576ba913
--- /dev/null
+++ b/media-libs/dr_mp3/Manifest
@@ -0,0 +1,2 @@
+DIST dr_mp3-0.6.37.gh.tar.gz 518399 BLAKE2B f2e78096f23332d4ef3ec0336230a9dcf4800356418607dcda5b8025e284feac6532c589ed5a916525396159dac5a79c343f90deec6337376bc9fdfbd93d0675 SHA512 01328904666c11416c361315d693411ea8f53b883f5acb8e6233b121abaab08cc3e4ba2c5d2a3b2a39fbcd0f868647f7f892d8ef6cd7be8ef683bb0497dd7114
+DIST dr_mp3-0.6.37.h 181793 BLAKE2B 982668ac1e9d4dbfd9acea11c8967fd6600cee801457655ccbda1ca8a02393797e777b61f7d1d4d7aae6bf1c19263208c442df7be431f56b9fc509f57fae4845 SHA512 77df59c31aa45ccf62e880b6f4a9daad809f2eae728e1f8754e27639e20b47712a896ec345823b87b95d434eb3670adad1bb22252a85f377f26ffea842d16468
diff --git a/media-libs/dr_mp3/dr_mp3-0.6.37.ebuild b/media-libs/dr_mp3/dr_mp3-0.6.37.ebuild
new file mode 100644
index 000000000..8a8f68e95
--- /dev/null
+++ b/media-libs/dr_mp3/dr_mp3-0.6.37.ebuild
@@ -0,0 +1,73 @@
+# Copyright 2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+DESCRIPTION="Single-header MP3 audio decoder library"
+HOMEPAGE="https://github.com/mackron/dr_libs/"
+COMMIT="1b0bc87c6b9b04052e6ef0117396dab8482c250e"
+SRC_URI="!test? ( https://raw.githubusercontent.com/mackron/dr_libs/${COMMIT}/dr_mp3.h -> ${P}.h )
+ test? ( https://github.com/mackron/dr_libs/archive/${COMMIT}.tar.gz -> ${P}.gh.tar.gz )"
+LICENSE="|| ( MIT-0 public-domain )"
+SLOT="0"
+KEYWORDS="~amd64"
+
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+S="${WORKDIR}/dr_libs-${COMMIT}"
+
+# Unfortunately, the only other test is interactive.
+TESTCASES=(
+ dr_mp3_test_0.c
+)
+
+src_unpack() {
+ default
+ unpack "${FILESDIR}"/${P}-docs.tar.xz
+}
+
+src_prepare() {
+ if use test; then
+ # Remove some unused parts of the source tree that could contribute different
+ # (but acceptable) license terms if they were used—just to prove that we do not
+ # use them.
+ rm -rv old || die
+ fi
+ default
+}
+
+src_compile() {
+ if use test; then
+ local MY_{CC,BUILD}
+ MY_CC=$(tc-getCC)
+
+ pushd tests > /dev/null || die
+ for tcase in ${TESTCASES[@]}; do
+ einfo "Compiling test case ${tcase}."
+ MY_BUILD="${MY_CC} mp3/${tcase} -o bin/${tcase} ${CFLAGS} ${CPPFLAGS}"
+ ${MY_BUILD} || die "Build failed: ${MY_BUILD}"
+ done
+ popd || die
+ fi
+}
+
+src_test() {
+ pushd tests > /dev/null || die
+ for tcase in ${TESTCASES[@]}; do
+ einfo "Running test case ${tcase}."
+ ./bin/${tcase} || die "Test case ${tcase} failed."
+ done
+ popd || die
+}
+
+src_install() {
+ einstalldocs
+ if use test; then
+ doheader dr_mp3.h
+ else
+ newheader "${DISTDIR}"/${P}.h dr_mp3.h
+ fi
+}
diff --git a/media-libs/dr_mp3/files/dr_mp3-0.6.37-docs.tar.xz b/media-libs/dr_mp3/files/dr_mp3-0.6.37-docs.tar.xz
new file mode 100644
index 000000000..e12d9066f
--- /dev/null
+++ b/media-libs/dr_mp3/files/dr_mp3-0.6.37-docs.tar.xz
Binary files differ
diff --git a/media-libs/dr_mp3/metadata.xml b/media-libs/dr_mp3/metadata.xml
new file mode 100644
index 000000000..6b41d45a1
--- /dev/null
+++ b/media-libs/dr_mp3/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>watermanpaint@posteo.net</email>
+ <name>Lucio Sauer</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">mackron/dr_libs</remote-id>
+ </upstream>
+</pkgmetadata>