diff options
author | Lucio Sauer <watermanpaint@posteo.net> | 2023-12-07 03:37:26 +0100 |
---|---|---|
committer | Lucio Sauer <watermanpaint@posteo.net> | 2023-12-07 03:37:26 +0100 |
commit | b88d3ed0965aeae7ff98e453e6216e92eaea2f3c (patch) | |
tree | 6fcb5bd887ae7481e3ce8b7e1a14a89196adb585 /media-libs | |
parent | media-libs/dr_wav: drop 0.13.12 (diff) | |
download | guru-b88d3ed0965aeae7ff98e453e6216e92eaea2f3c.tar.gz guru-b88d3ed0965aeae7ff98e453e6216e92eaea2f3c.tar.bz2 guru-b88d3ed0965aeae7ff98e453e6216e92eaea2f3c.zip |
media-libs/dr_mp3: add 0.6.38
Signed-off-by: Lucio Sauer <watermanpaint@posteo.net>
Diffstat (limited to 'media-libs')
-rw-r--r-- | media-libs/dr_mp3/Manifest | 1 | ||||
-rw-r--r-- | media-libs/dr_mp3/dr_mp3-0.6.38.ebuild | 59 |
2 files changed, 60 insertions, 0 deletions
diff --git a/media-libs/dr_mp3/Manifest b/media-libs/dr_mp3/Manifest index 9576ba913..ad293d813 100644 --- a/media-libs/dr_mp3/Manifest +++ b/media-libs/dr_mp3/Manifest @@ -1,2 +1,3 @@ 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 +DIST dr_mp3-0.6.38.gh.tar.gz 518478 BLAKE2B 4ef68a7ba24b84d5a3c87271d399b7abe9d367137d34b68f0533414f968315bafa59fc8ae6e9d40b6d82542060420e821c47ee3337fbd1589fceb0d0aded129f SHA512 2aa595a926bf72c56c3012fa7ea13ac7141952d1dc454f7135674286ba0df900554121624e7885fb242104c4bf0598826ed36952f591055033d419199a6b66fc diff --git a/media-libs/dr_mp3/dr_mp3-0.6.38.ebuild b/media-libs/dr_mp3/dr_mp3-0.6.38.ebuild new file mode 100644 index 000000000..2c7f798e0 --- /dev/null +++ b/media-libs/dr_mp3/dr_mp3-0.6.38.ebuild @@ -0,0 +1,59 @@ +# 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="01d23df76776faccee3bc456f685900dcc273b4c" +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 )" + +S="${WORKDIR}/dr_libs-${COMMIT}" + +# Unfortunately, the only other test is interactive. +TESTCASES=( + dr_mp3_test_0.c +) + +src_prepare() { + sed -n "36,83p" dr_mp3.h > README.md || die + sed -n "4496,4776p" dr_mp3.h > CHANGELOG || die + 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 + doheader dr_mp3.h +} |