diff options
author | Thomas Bracht Laumann Jespersen <t@laumann.xyz> | 2024-03-02 07:57:14 +0100 |
---|---|---|
committer | Yixun Lan <dlan@gentoo.org> | 2024-03-09 11:52:21 +0000 |
commit | 82b7796fb25854b8fe6795796a0e4a580540d11a (patch) | |
tree | 94351f8c581680071946a64e0ace57d0fc0fb0a8 /media-libs/openjpeg | |
parent | x11-libs/pango: drop 1.52.0 (diff) | |
download | gentoo-82b7796fb25854b8fe6795796a0e4a580540d11a.tar.gz gentoo-82b7796fb25854b8fe6795796a0e4a580540d11a.tar.bz2 gentoo-82b7796fb25854b8fe6795796a0e4a580540d11a.zip |
media-libs/openjpeg: add 2.5.2
Closes: https://github.com/gentoo/gentoo/pull/35595
Signed-off-by: Thomas Bracht Laumann Jespersen <t@laumann.xyz>
Signed-off-by: Yixun Lan <dlan@gentoo.org>
Diffstat (limited to 'media-libs/openjpeg')
-rw-r--r-- | media-libs/openjpeg/Manifest | 2 | ||||
-rw-r--r-- | media-libs/openjpeg/openjpeg-2.5.2.ebuild | 99 |
2 files changed, 101 insertions, 0 deletions
diff --git a/media-libs/openjpeg/Manifest b/media-libs/openjpeg/Manifest index 30b5bc36a99f..2ba8289613e5 100644 --- a/media-libs/openjpeg/Manifest +++ b/media-libs/openjpeg/Manifest @@ -1,2 +1,4 @@ DIST openjpeg-2.5.0.tar.gz 1867111 BLAKE2B 472d9998a7407574d3bc059d1c0b662a8a553cfe5cb7806a022cb35e14564417a8e06e9970f06d8e65ef149019bab747caefa8e29bc793d07ad86e076909d306 SHA512 08975a2dd79f1e29fd1824249a5fbe66026640ed787b3a3aa8807c2c69f994240ff33e2132f8bf15bbc2202bef7001f98e42d487231d4eebc8e503538658049a +DIST openjpeg-2.5.2.tar.gz 1871948 BLAKE2B 4c23eecd603c620d3555fa02055104d292cdf4bbb88ab3d8d8a8f62e3c21b52d3c6d9211d8dd6f11d76fb1ca6f2333a7305ae07b5883a62eb7fc28ec9dfafc0f SHA512 24c058b3e0710e689ba7fd6bce8a88353ce64e825b2e5bbf6b00ca3f2a2ec1e9c70a72e0252a5c89d10c537cf84d55af54bf2f16c58ca01db98c2018cf132e1a DIST openjpeg-data_20210926.tar.gz 498600110 BLAKE2B 34a1c39379d9f8f4caad6c8263a4bc59e62a6a3b8db744eaeaa7047e58813636341b3fb7ee6a121b7dfcd4bc085f9884c3aef86605633ff0d84a1b77cf003624 SHA512 4444225ddb9c548d7753561188cd2d595ae13d7a45471240fac69c3de786a97fb899cd5bbc67cf1b54bfccff0dcd215ec6e83d1bd66982a44c802d163e365dae +DIST openjpeg-data_202130923.tar.gz 498600318 BLAKE2B cf595b9f8690ad0b9616f080c3bfdaf553802912cd41015f86766085c0bd021cead294372bd9925c2a569fabbd9a0f1684bcf6eb1b5ecdc14d64231a76401a3b SHA512 3e1e3bb489eac6047671395fbf92bbfb2ad7c7c0206c1a233c215ba3d5b5263a6ce65d523f98fdaa4949e28eaa179716264f89eebf73b44c71373a9c86313cc1 diff --git a/media-libs/openjpeg/openjpeg-2.5.2.ebuild b/media-libs/openjpeg/openjpeg-2.5.2.ebuild new file mode 100644 index 000000000000..0e5579c13039 --- /dev/null +++ b/media-libs/openjpeg/openjpeg-2.5.2.ebuild @@ -0,0 +1,99 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake-multilib flag-o-matic + +# Make sure that test data are not newer than release; +# otherwise we will see "Found-But-No-Test" test failures! +# +# To update: Go to https://github.com/uclouvain/openjpeg-data and grab the hash +# of the latest possible commit whose commit date is older than the release +# date. +MY_TESTDATA_COMMIT="f9991d5fa9a4a08fc9c29bae6405d6c67cf2b8eb" + +DESCRIPTION="Open-source JPEG 2000 library" +HOMEPAGE="https://www.openjpeg.org" +SRC_URI="https://github.com/uclouvain/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz + test? ( https://github.com/uclouvain/openjpeg-data/archive/${MY_TESTDATA_COMMIT}.tar.gz -> ${PN}-data_202130923.tar.gz )" + +LICENSE="BSD-2" +SLOT="2/7" # based on SONAME +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +IUSE="doc test" +RESTRICT="!test? ( test )" + +RDEPEND=" + media-libs/lcms:2 + media-libs/libpng:0= + media-libs/tiff:= + sys-libs/zlib:= +" +DEPEND="${RDEPEND}" +BDEPEND="doc? ( app-text/doxygen )" + +DOCS=( AUTHORS.md CHANGELOG.md NEWS.md README.md THANKS.md ) + +src_prepare() { + if use test; then + mv "${WORKDIR}"/openjpeg-data-${MY_TESTDATA_COMMIT} "${WORKDIR}"/data || + die "Failed to rename test data" + fi + + cmake_src_prepare +} + +multilib_src_configure() { + append-lfs-flags + + local mycmakeargs=( + -DBUILD_PKGCONFIG_FILES=ON # always build pkgconfig files, bug #539834 + -DBUILD_TESTING="$(multilib_native_usex test)" + -DBUILD_DOC=$(multilib_native_usex doc ON OFF) + -DBUILD_CODEC=$(multilib_is_native_abi && echo ON || echo OFF) + -DBUILD_STATIC_LIBS=OFF + ) + + # Cheat a little bit and force disabling fixed point magic + # The test suite is extremely fragile to small changes + # bug #715130, bug #715422 + # https://github.com/uclouvain/openjpeg/issues/1017 + if multilib_is_native_abi && use test ; then + append-cflags "-ffp-contract=off" + fi + + cmake_src_configure +} + +multilib_src_test() { + if ! multilib_is_native_abi ; then + elog "Cannot run tests for non-multilib abi." + return 0 + fi + + pushd "${BUILD_DIR}" > /dev/null || die + [[ -e CTestTestfile.cmake ]] || die "Test suite not available! Check source!" + + elog "Note: Upstream maintains a list of known test failures." + elog "We collect all the known failures and skip them." + elog + + local toskip=( "${S}"/tools/travis-ci/knownfailures-all.txt ) + if use amd64 ; then + toskip+=( "${S}"/tools/travis-ci/knownfailures-*x86_64*.txt ) + elif use x86 || use arm || use arm64; then + toskip+=( "${S}"/tools/travis-ci/knownfailures-*i386*.txt ) + fi + + local exp=$(sort "${toskip[@]}" | uniq | tr '\n' '|'; assert) + popd > /dev/null || die + + local myctestargs=() + if [[ -n ${TEST_VERBOSE} ]]; then + myctestargs+=( --extra-verbose --output-on-failure ) + fi + myctestargs+=( -E "(${exp::-1})" ) + + cmake_src_test +} |