commit: 8fca8b44f82cedc54cb66491692003a9d05717db Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Sun Jan 14 05:53:30 2024 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sun Jan 14 14:14:10 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8fca8b44
media-libs/jasper: test fixes Some test fixes I noticed when looking at bug #907259 and bug #922074. * Patch out `which` usage (https://github.com/jasper-software/jasper/pull/369). * Depend on openjpeg for tests for the opj2_compress and opj2_decompress binaries. Bug: https://bugs.gentoo.org/907259 Bug: https://bugs.gentoo.org/922074 Closes: https://github.com/gentoo/gentoo/pull/34794 Signed-off-by: Sam James <sam <AT> gentoo.org> .../jasper/files/jasper-4.1.2-which-hunt.patch | 34 ++++++++++++++++++++++ media-libs/jasper/jasper-4.1.2.ebuild | 10 +++++-- media-libs/jasper/jasper-9999.ebuild | 10 +++++-- 3 files changed, 50 insertions(+), 4 deletions(-) diff --git a/media-libs/jasper/files/jasper-4.1.2-which-hunt.patch b/media-libs/jasper/files/jasper-4.1.2-which-hunt.patch new file mode 100644 index 000000000000..e04255a714ee --- /dev/null +++ b/media-libs/jasper/files/jasper-4.1.2-which-hunt.patch @@ -0,0 +1,34 @@ +https://github.com/jasper-software/jasper/pull/369 + +From de3e9d43224977cda178df609d09e222674200e6 Mon Sep 17 00:00:00 2001 +From: Sam James <s...@gentoo.org> +Date: Sun, 14 Jan 2024 05:49:55 +0000 +Subject: [PATCH] test: run_test_3: drop use of `which` + +`which` is non-portable (not part of POSIX) and distributions like Debian and +Gentoo are looking to remove it from their base set of packages. + +Switch to `type -P` instead given `test/bin/run_test_3` already has a Bash +shebang. + +Signed-off-by: Sam James <s...@gentoo.org> +--- + test/bin/run_test_3 | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/test/bin/run_test_3 b/test/bin/run_test_3 +index fad80412..5bc9da93 100755 +--- a/test/bin/run_test_3 ++++ b/test/bin/run_test_3 +@@ -36,8 +36,8 @@ set_source_and_build_dirs || panic "cannot set source and build directories" + + #$CMDDIR/rundectests jasper || exit 1 + +-oj_compress=$(which opj2_compress) || oj_compress="" +-oj_decompress=$(which opj2_decompress) || oj_decompress="" ++oj_compress=$(type -P opj2_compress) || oj_compress="" ++oj_decompress=$(type -P opj2_decompress) || oj_decompress="" + + run_test="$cmd_dir/run_codec_test" + + diff --git a/media-libs/jasper/jasper-4.1.2.ebuild b/media-libs/jasper/jasper-4.1.2.ebuild index 335732079920..6540d3819942 100644 --- a/media-libs/jasper/jasper-4.1.2.ebuild +++ b/media-libs/jasper/jasper-4.1.2.ebuild @@ -19,7 +19,8 @@ fi LICENSE="JasPer2.0" SLOT="0/7" -IUSE="doc heif jpeg opengl" +IUSE="doc heif jpeg opengl test" +RESTRICT="!test? ( test )" RDEPEND=" heif? ( media-libs/libheif:= ) @@ -37,7 +38,12 @@ BDEPEND=" dev-texlive/texlive-latexextra dev-texlive/texlive-plaingeneric virtual/latex-base - )" + ) + test? ( media-libs/openjpeg )" + +PATCHES=( + "${FILESDIR}"/${PN}-4.1.2-which-hunt.patch +) src_configure() { local mycmakeargs=( diff --git a/media-libs/jasper/jasper-9999.ebuild b/media-libs/jasper/jasper-9999.ebuild index 335732079920..6540d3819942 100644 --- a/media-libs/jasper/jasper-9999.ebuild +++ b/media-libs/jasper/jasper-9999.ebuild @@ -19,7 +19,8 @@ fi LICENSE="JasPer2.0" SLOT="0/7" -IUSE="doc heif jpeg opengl" +IUSE="doc heif jpeg opengl test" +RESTRICT="!test? ( test )" RDEPEND=" heif? ( media-libs/libheif:= ) @@ -37,7 +38,12 @@ BDEPEND=" dev-texlive/texlive-latexextra dev-texlive/texlive-plaingeneric virtual/latex-base - )" + ) + test? ( media-libs/openjpeg )" + +PATCHES=( + "${FILESDIR}"/${PN}-4.1.2-which-hunt.patch +) src_configure() { local mycmakeargs=(