From: "Haelwenn Monnier" <contact@hacktivis.me>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/proj/guru:master commit in: media-libs/dr_wav/
Date: Sun, 3 Sep 2023 12:27:52 +0000 (UTC) [thread overview]
Message-ID: <1693683989.650b661efa85f53fc331a097b2e0c4d4fbc84471.lanodan@gentoo> (raw)
commit: 650b661efa85f53fc331a097b2e0c4d4fbc84471
Author: Lucio Sauer <watermanpaint <AT> posteo <DOT> net>
AuthorDate: Sat Sep 2 15:49:02 2023 +0000
Commit: Haelwenn Monnier <contact <AT> hacktivis <DOT> me>
CommitDate: Sat Sep 2 19:46:29 2023 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=650b661e
media-libs/dr_wav: new package, add 0.13.32
Signed-off-by: Lucio Sauer <watermanpaint <AT> posteo.net>
media-libs/dr_wav/Manifest | 3 ++
media-libs/dr_wav/dr_wav-0.13.32.ebuild | 92 +++++++++++++++++++++++++++++++++
media-libs/dr_wav/metadata.xml | 11 ++++
3 files changed, 106 insertions(+)
diff --git a/media-libs/dr_wav/Manifest b/media-libs/dr_wav/Manifest
new file mode 100644
index 0000000000..4f2756b168
--- /dev/null
+++ b/media-libs/dr_wav/Manifest
@@ -0,0 +1,3 @@
+DIST dr_wav-0.13.32-README.md 1243 BLAKE2B 5b22e00252f4307b5407b2b7cdbc237fa60975f86b9151f5a8eeea8faa1e81d1eec15a22a1952d1440a1f0b76b1e59782a30eb38473cab978a47fcfa391c8a9a SHA512 661529e69639367920276c5f6ff425fdd176ac8a7475212a1c1e1e2ccdbdf076f1a26eae1a1913f98da0d9e1c6ca04a48e0de69f3c681b1a7574674d7015bbb6
+DIST dr_wav-0.13.32.gh.h 351384 BLAKE2B 2bcbeab7e7aa6a7519bea978742494205625a60b8c0a464305c6f6fb7eec33be54640fdb2578437c4143e50e5ad2d18730351ecdd824d25ab6e0f8af3b8d018c SHA512 a4a681546716b1a1a9e55321796828828b1872bf223c7c02529a1553b8beafe2a89ffe72a38e5aa3bf457a8ce4dd2dcf9cba7a9cde28e59586a8388f1439a8a1
+DIST dr_wav-0.13.32.gh.tar.gz 518394 BLAKE2B 49447a2b845f95e9896fb45ac2cd9de8f59d45d3271e30e26c0e519355c3578b96f2c2978677d2774c1bfa4656a8213eafda00207cdd89f72d6823cf0f1b77cf SHA512 34126c8eb65f0735b77f058db9f1618b3c4e820698804b47f7a629c47df571e9cbbeefd4cce193409ebd715d37ed5faf1c3c27a7240e0f5418089cffe853f1ea
diff --git a/media-libs/dr_wav/dr_wav-0.13.32.ebuild b/media-libs/dr_wav/dr_wav-0.13.32.ebuild
new file mode 100644
index 0000000000..b9ed2c4cac
--- /dev/null
+++ b/media-libs/dr_wav/dr_wav-0.13.32.ebuild
@@ -0,0 +1,92 @@
+# Copyright 2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+DESCRIPTION="WAV audio loader and writer"
+HOMEPAGE="https://github.com/mackron/dr_libs/"
+COMMIT="d35a3bc5efd02455d98cbe12b94647136f09b42d"
+SRC_URI="https://raw.githubusercontent.com/mackron/dr_libs/${COMMIT}/dr_wav.h -> ${P}.gh.h
+ https://raw.githubusercontent.com/mackron/dr_libs/${COMMIT}/README.md -> ${P}-README.md
+ 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 )"
+
+BDEPEND="test? ( media-libs/libsndfile )"
+
+S="${DISTDIR}"
+
+src_prepare() {
+ if use test; then
+ pushd "${WORKDIR}/dr_libs-${COMMIT}" > /dev/null || die
+ # 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
+
+ # Unbundle library with incorrect include path.
+ sed -i 's,"../../../miniaudio/miniaudio.h",<miniaudio/miniaudio.h>,' \
+ tests/wav/dr_wav_playback.c || die
+ # Profiling tests aren't implemented.
+ sed -i 's/doProfiling = DRWAV_TRUE/doProfiling = DRWAV_FALSE/' \
+ tests/wav/dr_wav_decoding.c || die
+ popd || die
+ fi
+ default
+}
+
+src_test() {
+ local MY_{C,CC,CXX,BUILD,FLAGS,RUN} TESTCASES
+ TESTCASES=(
+ dr_wav_encoding.c
+ dr_wav_{decoding,test_0}.{c,cpp}
+ )
+ MY_CC=$(tc-getCC)
+ MY_CXX=$(tc-getCXX)
+
+ pushd "${WORKDIR}/dr_libs-${COMMIT}/tests" > /dev/null || die
+ for tcase in ${TESTCASES[@]}; do
+ einfo "Compiling and running test case ${tcase}."
+ case ${tcase} in
+ *.cpp)
+ MY_C=${MY_CXX}
+ MY_FLAGS=${CXXFLAGS}
+ ;;
+ *.c)
+ MY_C=${MY_CC}
+ MY_FLAGS=${CFLAGS}
+ ;;
+ *)
+ die "Unknown test case ${tcase}"
+ ;;
+ esac
+ MY_BUILD="${MY_C} wav/${tcase} -o bin/${tcase} ${MY_FLAGS} ${CPPFLAGS}"
+ MY_RUN="./bin/${tcase}"
+ case ${tcase%.*} in
+ dr_wav_encoding)
+ MY_BUILD="${MY_BUILD} -lm"
+ MY_RUN="${MY_RUN} testvectors/wav/tests/test_encode_gentoo"
+ mkdir testvectors/wav/tests || die
+ ;;
+ *)
+ ;;
+ esac
+ echo "${MY_BUILD}" || die
+ ${MY_BUILD} || die "Build failed: ${MY_BUILD}"
+ echo "${MY_RUN}" || die
+ ${MY_RUN} || die "Test case ${MY_RUN} failed."
+ done
+ popd || die
+}
+
+src_install() {
+ newheader ${P}.gh.h ${PN}.h
+ newdoc ${P}-README.md README.md
+}
diff --git a/media-libs/dr_wav/metadata.xml b/media-libs/dr_wav/metadata.xml
new file mode 100644
index 0000000000..6b41d45a1f
--- /dev/null
+++ b/media-libs/dr_wav/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>
next reply other threads:[~2023-09-03 12:28 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-03 12:27 Haelwenn Monnier [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-01-25 10:49 [gentoo-commits] repo/proj/guru:master commit in: media-libs/dr_wav/ David Roman
2024-01-25 10:49 David Roman
2024-02-25 10:02 Viorel Munteanu
2024-03-02 7:10 Arthur Zamarin
2024-03-02 7:10 Arthur Zamarin
2024-03-03 10:07 Haelwenn Monnier
2024-03-03 10:07 Haelwenn Monnier
2024-03-14 10:19 David Roman
2024-12-24 16:18 Lucio Sauer
2024-12-24 16:18 Lucio Sauer
2025-01-02 19:26 David Roman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1693683989.650b661efa85f53fc331a097b2e0c4d4fbc84471.lanodan@gentoo \
--to=contact@hacktivis.me \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox