From: "Lucio Sauer" <watermanpaint@posteo.net>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/proj/guru:dev commit in: media-libs/dr_wav/
Date: Thu, 7 Dec 2023 02:30:47 +0000 (UTC) [thread overview]
Message-ID: <1701916031.368e388955c2865fcc2aceb298343f559b9ed4d7.watermanpaint@gentoo> (raw)
commit: 368e388955c2865fcc2aceb298343f559b9ed4d7
Author: Lucio Sauer <watermanpaint <AT> posteo <DOT> net>
AuthorDate: Thu Dec 7 02:27:11 2023 +0000
Commit: Lucio Sauer <watermanpaint <AT> posteo <DOT> net>
CommitDate: Thu Dec 7 02:27:11 2023 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=368e3889
media-libs/dr_wav: add 0.13.13
Signed-off-by: Lucio Sauer <watermanpaint <AT> posteo.net>
media-libs/dr_wav/Manifest | 1 +
media-libs/dr_wav/dr_wav-0.13.13.ebuild | 106 ++++++++++++++++++++++++++++++++
2 files changed, 107 insertions(+)
diff --git a/media-libs/dr_wav/Manifest b/media-libs/dr_wav/Manifest
index f47932ccdc..5403d480fc 100644
--- a/media-libs/dr_wav/Manifest
+++ b/media-libs/dr_wav/Manifest
@@ -1,2 +1,3 @@
DIST dr_wav-0.13.12.gh.tar.gz 518394 BLAKE2B 49447a2b845f95e9896fb45ac2cd9de8f59d45d3271e30e26c0e519355c3578b96f2c2978677d2774c1bfa4656a8213eafda00207cdd89f72d6823cf0f1b77cf SHA512 34126c8eb65f0735b77f058db9f1618b3c4e820698804b47f7a629c47df571e9cbbeefd4cce193409ebd715d37ed5faf1c3c27a7240e0f5418089cffe853f1ea
DIST dr_wav-0.13.12.h 351384 BLAKE2B 2bcbeab7e7aa6a7519bea978742494205625a60b8c0a464305c6f6fb7eec33be54640fdb2578437c4143e50e5ad2d18730351ecdd824d25ab6e0f8af3b8d018c SHA512 a4a681546716b1a1a9e55321796828828b1872bf223c7c02529a1553b8beafe2a89ffe72a38e5aa3bf457a8ce4dd2dcf9cba7a9cde28e59586a8388f1439a8a1
+DIST dr_wav-0.13.13.gh.tar.gz 518461 BLAKE2B 28a606f184edb697cb3683d2bab6efd134eb304948cfea74c7d3ef1f292402c02c617ba5b2c2ed4c6b6af783a75d83b2e77afac63545a5ec4e772c19e92a1426 SHA512 1266af7606a1d08270e4f5aa4b72054c0df3931e04a6a2134ce14a0b137ea77abd8b746a6affb34881571269561e7fdd45ef50072186aa52d1401e490e9c356a
diff --git a/media-libs/dr_wav/dr_wav-0.13.13.ebuild b/media-libs/dr_wav/dr_wav-0.13.13.ebuild
new file mode 100644
index 0000000000..c9d7718d79
--- /dev/null
+++ b/media-libs/dr_wav/dr_wav-0.13.13.ebuild
@@ -0,0 +1,106 @@
+# Copyright 2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+DESCRIPTION="Single-header WAV audio loader and writer library"
+HOMEPAGE="https://github.com/mackron/dr_libs/"
+COMMIT="9eed1be421749ba68a87e5b4c3b10858f8580689"
+SRC_URI="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 )"
+
+TESTCASES=(
+ dr_wav_encoding.c
+ dr_wav_{decoding,test_0}.{c,cpp}
+)
+
+S="${WORKDIR}/dr_libs-${COMMIT}"
+
+src_prepare() {
+ if use test; then
+ # Unbundle library with incorrect include path.
+ sed -i 's,"../../../miniaudio/miniaudio.h",<miniaudio/miniaudio.h>,' \
+ tests/wav/dr_wav_playback.c || die
+ # Disable profiling tests as they are not relevant downstream.
+ sed -i 's/doProfiling = DRWAV_TRUE/doProfiling = DRWAV_FALSE/' \
+ tests/wav/dr_wav_decoding.c || die
+ # Test cases dr_wav_{en,de}coding.{c,cpp} write and read a file from a
+ # missing directory.
+ mkdir tests/testvectors/wav/tests || die
+ fi
+
+ sed -n "11,135p" dr_wav.h > README.md || die
+ sed -n "8348,8752p" dr_wav.h > CHANGELOG || die
+ default
+
+}
+
+src_compile() {
+ if use test; then
+ local MY_{C,CC,CXX,BUILD,FLAGS}
+ MY_CC=$(tc-getCC)
+ MY_CXX=$(tc-getCXX)
+
+ pushd tests > /dev/null || die
+ for tcase in ${TESTCASES[@]}; do
+ einfo "Compiling 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}"
+ case ${tcase%.*} in
+ dr_wav_encoding)
+ MY_BUILD="${MY_BUILD} -lm ${LDFLAGS}"
+ ;;
+ *)
+ ;;
+ esac
+ ${MY_BUILD} || die "Build failed: ${MY_BUILD}"
+ done
+ popd || die
+ fi
+}
+
+src_test() {
+ local MY_RUN
+
+ pushd tests || die
+ for tcase in ${TESTCASES[@]}; do
+ einfo "Running test case ${tcase}."
+ MY_RUN="./bin/${tcase}"
+ case ${tcase%.*} in
+ dr_wav_encoding)
+ MY_RUN="${MY_RUN} testvectors/wav/tests/test_encode_gentoo"
+ ;;
+ *)
+ ;;
+ esac
+ ${MY_RUN} || die "Test case ${tcase} failed."
+ done
+ popd || die
+}
+
+src_install() {
+ einstalldocs
+ doheader dr_wav.h
+}
next reply other threads:[~2023-12-07 2:30 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-07 2:30 Lucio Sauer [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-01-02 12:16 [gentoo-commits] repo/proj/guru:dev commit in: media-libs/dr_wav/ Lucio Sauer
2024-12-24 16:18 [gentoo-commits] repo/proj/guru:master " Lucio Sauer
2024-12-24 16:09 ` [gentoo-commits] repo/proj/guru:dev " Lucio Sauer
2024-12-24 16:18 [gentoo-commits] repo/proj/guru:master " Lucio Sauer
2024-12-24 16:09 ` [gentoo-commits] repo/proj/guru:dev " Lucio Sauer
2024-03-13 23:26 Piotr Kubaj
2024-03-03 9:01 Lucio Sauer
2024-03-03 9:01 Lucio Sauer
2024-03-01 23:20 Lucio Sauer
2024-03-01 23:20 Lucio Sauer
2024-02-25 9:35 Lucio Sauer
2024-01-25 10:18 Lucio Sauer
2024-01-25 10:18 Lucio Sauer
2023-12-07 1:55 Lucio Sauer
2023-09-02 19:46 Lucio Sauer
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=1701916031.368e388955c2865fcc2aceb298343f559b9ed4d7.watermanpaint@gentoo \
--to=watermanpaint@posteo.net \
--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