mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-19 20:13:01 -04:00
media-libs/dr_wav: new package, add 0.13.32
Signed-off-by: Lucio Sauer <watermanpaint@posteo.net>
This commit is contained in:
3
media-libs/dr_wav/Manifest
Normal file
3
media-libs/dr_wav/Manifest
Normal file
@@ -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
|
||||
92
media-libs/dr_wav/dr_wav-0.13.32.ebuild
Normal file
92
media-libs/dr_wav/dr_wav-0.13.32.ebuild
Normal file
@@ -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
|
||||
}
|
||||
11
media-libs/dr_wav/metadata.xml
Normal file
11
media-libs/dr_wav/metadata.xml
Normal file
@@ -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>
|
||||
Reference in New Issue
Block a user