public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/proj/guru:dev commit in: media-libs/dr_mp3/files/, media-libs/dr_mp3/
@ 2023-09-03 22:24 Lucio Sauer
  0 siblings, 0 replies; only message in thread
From: Lucio Sauer @ 2023-09-03 22:24 UTC (permalink / raw
  To: gentoo-commits

commit:     72b0f9c3ea374dee0a2d665ced0c5c17b3effc04
Author:     Lucio Sauer <watermanpaint <AT> posteo <DOT> net>
AuthorDate: Sun Sep  3 22:23:38 2023 +0000
Commit:     Lucio Sauer <watermanpaint <AT> posteo <DOT> net>
CommitDate: Sun Sep  3 22:24:37 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=72b0f9c3

media-libs/dr_mp3: new package, add 0.6.37

Signed-off-by: Lucio Sauer <watermanpaint <AT> posteo.net>

 media-libs/dr_mp3/Manifest                        |   2 +
 media-libs/dr_mp3/dr_mp3-0.6.37.ebuild            |  73 ++++++++++++++++++++++
 media-libs/dr_mp3/files/dr_mp3-0.6.37-docs.tar.xz | Bin 0 -> 3600 bytes
 media-libs/dr_mp3/metadata.xml                    |  11 ++++
 4 files changed, 86 insertions(+)

diff --git a/media-libs/dr_mp3/Manifest b/media-libs/dr_mp3/Manifest
new file mode 100644
index 0000000000..9576ba913d
--- /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 0000000000..8a8f68e956
--- /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 0000000000..e12d9066fa
Binary files /dev/null and b/media-libs/dr_mp3/files/dr_mp3-0.6.37-docs.tar.xz differ

diff --git a/media-libs/dr_mp3/metadata.xml b/media-libs/dr_mp3/metadata.xml
new file mode 100644
index 0000000000..6b41d45a1f
--- /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>


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2023-09-03 22:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-03 22:24 [gentoo-commits] repo/proj/guru:dev commit in: media-libs/dr_mp3/files/, media-libs/dr_mp3/ Lucio Sauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox