aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLucio Sauer <watermanpaint@posteo.net>2023-12-07 03:47:49 +0100
committerLucio Sauer <watermanpaint@posteo.net>2023-12-07 03:47:49 +0100
commit0331215578dd4eb2c588748922d4fe4f50b0616a (patch)
tree8a7f17397e1c89ecbdd7625ea227e47edda6d101 /media-libs/dr_flac
parentmedia-libs/dr_mp3: drop 0.6.37 (diff)
downloadguru-0331215578dd4eb2c588748922d4fe4f50b0616a.tar.gz
guru-0331215578dd4eb2c588748922d4fe4f50b0616a.tar.bz2
guru-0331215578dd4eb2c588748922d4fe4f50b0616a.zip
media-libs/dr_flac: add 0.12.42
Signed-off-by: Lucio Sauer <watermanpaint@posteo.net>
Diffstat (limited to 'media-libs/dr_flac')
-rw-r--r--media-libs/dr_flac/Manifest2
-rw-r--r--media-libs/dr_flac/dr_flac-0.12.42.ebuild105
2 files changed, 107 insertions, 0 deletions
diff --git a/media-libs/dr_flac/Manifest b/media-libs/dr_flac/Manifest
index f603b6ed0..55aaf87fd 100644
--- a/media-libs/dr_flac/Manifest
+++ b/media-libs/dr_flac/Manifest
@@ -1,3 +1,5 @@
DIST dr_flac-0.12.41-testbench.gh.tar.gz 209727087 BLAKE2B 72547637782c4af9eb914e417896d1c6c0b403ac9996dbcea4de7d3343e7d39072a8df2af397ef5ace81a85b0214015d4b73d40b06b072df9d60ea5dcb0bbe8a SHA512 990aed238e5158b1a1e03d67316416fc1b33cd9e1653bef3295ae6abd016f09060f87627904424afd2855886d1f43fc475259f4ec4d71e9e7e4f0f4158a819ac
DIST dr_flac-0.12.41.gh.tar.gz 518329 BLAKE2B c01d2dd3a7397251589e2e2d0be14b6005e21f77b7453990bb340dd3c87808a8b64e033073380b832a377c614775cf7f8666df56b74b4fb1b1fd115add43b296 SHA512 9f0d2a162358b949bf9b35d92dc2f5845830c31014f2bc66c197240db5d840fcf85e9feec86b4678d05948e41e94ca1b9e909edc648e82ab7ba9ade195cc3a40
DIST dr_flac-0.12.41.h 525519 BLAKE2B 4433e0406e8f4f7d301ebd7336d76b72c7b27767b570ab3807eeafab231274269709105bb0eb9995a6a205e94b0e38691208136ca71703a9273882b4a8313f36 SHA512 1cf8d2acc80ce2d4f417b7f34b5fc92b9c88678a4b44c6b4a0f8a22c7497ddc8bb9ba79aa860932d436ae60253455391cf6f843713fa0a8d9fb36d29602a4e3a
+DIST dr_flac-0.12.42-testbench.gh.tar.gz 209728991 BLAKE2B 7e25dd97bfb0099fa6f76c6b3de65ce6ce951c9b88e0f963319d8a7981237c2b1b6510706c8c4c6cd38e0672b6c0e7213baf8d9448d96b74e495625f0c61a0ea SHA512 4aa8b0061d5b5691dfac49490309020918253965ec05353ef8d12b660bc9d484e500859c0f733ce51630867bf5469893417367d04ce098a60c18a47831384dee
+DIST dr_flac-0.12.42.gh.tar.gz 518465 BLAKE2B 2f25cf2806e443eac7cc1de9f8cc59c7cee2a8be9910195c39e0665a938368a92d66e9630281b666068bbb587f0c35d7f1bf4ce2ee6540c6dccddf5984466fe1 SHA512 aaae58f27d1b215a7d3be3fcd26ab9b3c3f59e44c027bd6406c4ad47acadfca276326d6a179ca08c87ba9ba21b0de26bf600a5fd75dc54af90cac72b8db92139
diff --git a/media-libs/dr_flac/dr_flac-0.12.42.ebuild b/media-libs/dr_flac/dr_flac-0.12.42.ebuild
new file mode 100644
index 000000000..b69060087
--- /dev/null
+++ b/media-libs/dr_flac/dr_flac-0.12.42.ebuild
@@ -0,0 +1,105 @@
+# Copyright 2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+DESCRIPTION="Single-header FLAC audio decoder library"
+HOMEPAGE="https://github.com/mackron/dr_libs/"
+declare -A COMMITS=(
+ [dr_flac]="39ce69188eab79a913aa23423eef9da5f3dcd142"
+ [testbench]="aa7b0c6cf32994c106ae517a08134c28a96ff5b2"
+)
+SRC_URI="https://github.com/mackron/dr_libs/archive/${COMMITS[dr_flac]}.tar.gz -> ${P}.gh.tar.gz
+test? ( https://github.com/ietf-wg-cellar/flac-test-files/archive/${COMMITS[testbench]}.tar.gz
+ -> ${P}-testbench.gh.tar.gz )"
+
+LICENSE="|| ( MIT-0 public-domain )"
+SLOT="0"
+KEYWORDS="~amd64"
+
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+BDEPEND="test? ( media-libs/flac )"
+
+TESTCASES=(
+ dr_flac_seeking.c
+ dr_flac_{decoding,test_0}.{c,cpp}
+)
+
+S="${WORKDIR}/dr_libs-${COMMITS[dr_flac]}"
+
+src_prepare() {
+ if use test; then
+ # Sanitize testbench and move to expected location
+ find "${WORKDIR}"/flac-test-files-${COMMITS[testbench]}/subset -type f \
+ \! -name "*.flac" -delete || die
+ mv -T "${WORKDIR}"/flac-test-files-${COMMITS[testbench]}/subset \
+ tests/testvectors/flac/testbench || die
+
+ # Disable profiling tests as they are not relevant downstream.
+ for tcase in ${TESTCASES[@]}; do
+ sed -i "s/doProfiling = DRFLAC_TRUE/doProfiling = DRFLAC_FALSE/" \
+ tests/flac/$tcase || die "sed failed on tests/flac/$tcase"
+ done
+
+ fi
+
+ sed -n "120,223p" dr_flac.h > README.md || die
+ sed -n "12078,12485p" dr_flac.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} flac/${tcase} -o bin/${tcase} ${MY_FLAGS} ${CPPFLAGS}"
+ case ${tcase%.*} in
+ dr_flac_seeking)
+ ;&
+ dr_flac_decoding)
+ MY_BUILD="${MY_BUILD} -lFLAC ${LDFLAGS}"
+ ;;
+ *)
+ ;;
+ esac
+ ${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_flac.h
+}