diff options
-rw-r--r-- | media-libs/openjpeg/Manifest | 2 | ||||
-rw-r--r-- | media-libs/openjpeg/openjpeg-2.1.1_p20160922.ebuild | 135 |
2 files changed, 137 insertions, 0 deletions
diff --git a/media-libs/openjpeg/Manifest b/media-libs/openjpeg/Manifest index 42a49bc709da..2e14ed3f38b6 100644 --- a/media-libs/openjpeg/Manifest +++ b/media-libs/openjpeg/Manifest @@ -1,3 +1,5 @@ DIST openjpeg-1.5.2.tar.gz 1385702 SHA256 15df7b194a5d8dba0052cd21c17a4dc761149a770a907d73fffb972078c28a87 SHA512 b945cf4f8b5e3227a0c07120c94b0ed5bf30c901de73059ee1d47975f46744fb62bbe84cdb2917c6431128f400020874eb07160af870b5448ced897998b08862 WHIRLPOOL 4ca974b411baa1fad7821b3ea88ad5c6a39643098af32bd8e92f66ccaa534d36ef15f55711eba489e91254f667d5f917febdb09539ac9698709c00bf680d45fe DIST openjpeg-2.0.0.tar.gz 1770392 SHA256 334df538051555381ee3bbbe3a804c9c028a021401ba2960d6f35da66bf605d8 SHA512 4ef6b3b6933190c845cc376efbfe8bf655954668eb35c2b878c572107fb5d620fc2fc4df0e7de177c8798bee031f33350715c6da44ef07978df29762d89f29a6 WHIRLPOOL cfcc567a292c0a42d618c9f37b8665f98c580b768a74f63caa9f50b0747fed927c1fafe0b1bb86772ff56768c7a102e645792b960051a44da7a556ba4b41195d DIST openjpeg-2.1.0.tar.gz 1789675 SHA256 1232bb814fd88d8ed314c94f0bfebb03de8559583a33abbe8c64ef3fc0a8ff03 SHA512 3da84d7828a82c738f6ea5fe776c989283ba257cc6884aebfc090cee7e33c88471dee1a93f4a87a300b11f43b98f6624b838171f06227add24afcb1d57208df1 WHIRLPOOL 547dc65906a5dd6d34148675ec2be869ed18b0fef99f7f8632ebca0843e8764e575ca16ea1f7f839576f6de9464d29154171ca2187141e8141239f46468c8c2f +DIST openjpeg-2.1.1_p20160922.tar.gz 2004620 SHA256 85e609feaa1cab7ce4f2dd427b0623a2fcc792c02c575d2d556c173e58ce8f9d SHA512 e4e40297ab36188bf6d375648d4ca1d96946f30fb86bc6a0fc18f7e19c02a08b700007503acef25cdb086562a273c77d94391b715cc364fdba2c8480d3c5fd1d WHIRLPOOL cc229e50a622249b53b03378188a7a6dc441cc940ce7c1864d923465208b3f1806790ec175910ef83b66f409b0a1a24536116cec18b242479134b40e111f234d +DIST openjpeg-data_20160921.tar.gz 401771303 SHA256 a483c0c81e82c9e8d2e41a550b70aa0e016cdfb13571b3caac596c147fa36e0d SHA512 58521c14f49c546b24a0c7b17ebdb3dfecf6ffdcc814b3c59a79a1325e5adf88047b2bd8a4ae608c5d106b584f08efc4e6c66f03254119763e01abee2da7d027 WHIRLPOOL c9a112887bea64b12f9bfdc0feb7d899a87689dcb002defd0582f9a8592e0e012380ec9b808771919147c3f5878425e76c27d2ff96dbbcc3698f6e94fa63f8c4 diff --git a/media-libs/openjpeg/openjpeg-2.1.1_p20160922.ebuild b/media-libs/openjpeg/openjpeg-2.1.1_p20160922.ebuild new file mode 100644 index 000000000000..5fa0dcbab47c --- /dev/null +++ b/media-libs/openjpeg/openjpeg-2.1.1_p20160922.ebuild @@ -0,0 +1,135 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 +inherit multilib cmake-multilib + +# Make sure that test data are not newer than release; +# otherwise we will see "Found-But-No-Test" test failures! +MY_TESTDATA_COMMIT="cc09dc4e43850b725a2aaf6e1d58cbf45bc2322c" + +MY_P_COMMIT="fac916f72a162483a4d6d804fd070fdf32f402ed" + +DESCRIPTION="An open-source JPEG 2000 library" +HOMEPAGE="https://github.com/uclouvain/openjpeg" +SRC_URI="https://github.com/uclouvain/${PN}/archive/${MY_P_COMMIT}.tar.gz -> ${P}.tar.gz + test? ( https://github.com/uclouvain/openjpeg-data/archive/${MY_TESTDATA_COMMIT}.tar.gz -> ${PN}-data_20160921.tar.gz )" + +LICENSE="BSD-2" +SLOT="2/7" # based on SONAME +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris" +IUSE="doc static-libs test" + +RDEPEND="media-libs/lcms:2= + media-libs/libpng:0= + media-libs/tiff:0= + sys-libs/zlib:=" +DEPEND="${RDEPEND} + doc? ( app-doc/doxygen )" + +DOCS=( AUTHORS.md CHANGELOG.md NEWS.md README.md THANKS.md ) + +S="${WORKDIR}/${PN}-${MY_P_COMMIT}" + +src_prepare() { + if use test; then + mv "${WORKDIR}"/openjpeg-data-${MY_TESTDATA_COMMIT} "${WORKDIR}"/data || die "Failed to rename test data" + fi + + default + + # Stop installing LICENSE file, and install CHANGES from DOCS instead: + sed -i -e '/install.*FILES.*DESTINATION.*OPENJPEG_INSTALL_DOC_DIR/d' CMakeLists.txt || die + + # Install doxygen docs to the right directory: + sed -i -e "s:DESTINATION\s*share/doc:\0/${PF}:" doc/CMakeLists.txt || die +} + +multilib_src_configure() { + local mycmakeargs=( + -DOPENJPEG_INSTALL_LIB_DIR="$(get_libdir)" + -DBUILD_TESTING="$(usex test)" + -DBUILD_DOC=$(multilib_native_usex doc ON OFF) + -DBUILD_CODEC=$(multilib_is_native_abi && echo ON || echo OFF) + ) + + cmake-utils_src_configure + + if use static-libs; then + mycmakeargs=( + -DOPENJPEG_INSTALL_LIB_DIR="$(get_libdir)" + $(cmake-utils_use_build test TESTING) + -DBUILD_SHARED_LIBS=OFF + -DBUILD_CODEC=OFF + ) + BUILD_DIR=${BUILD_DIR}_static cmake-utils_src_configure + fi +} + +multilib_src_compile() { + cmake-utils_src_compile + + if use static-libs; then + BUILD_DIR=${BUILD_DIR}_static cmake-utils_src_compile + fi +} + +multilib_src_test() { + local myctestargs= + + pushd "${BUILD_DIR}" > /dev/null || die + [[ -e CTestTestfile.cmake ]] || die "Test suite not available! Check source!" + + [[ -n ${TEST_VERBOSE} ]] && myctestargs+=( --extra-verbose --output-on-failure ) + + echo ctest "${myctestargs[@]}" "$@" + if ctest "${myctestargs[@]}" "$@" ; then + einfo "Tests succeeded." + popd > /dev/null || die + return 0 + else + echo "" + einfo "Note: Upstream is maintaining a list of known test failures." + einfo "We will now compare our test results against this list and sort out any known failure." + + local KNOWN_FAILURES_LIST="${S}/tools/travis-ci/knownfailures-all.txt" + local FAILEDTEST_LOG="${BUILD_DIR}/Testing/Temporary/LastTestsFailed.log" + local FAILURES_LOG="${BUILD_DIR}/Testing/Temporary/failures.txt" + local FAILEDTEST= + local HAS_UNKNOWN_TEST_FAILURES=0 + if [[ -f "${KNOWN_FAILURES_LIST}" && -f "${FAILEDTEST_LOG}" ]]; then + # Logic copied from $S/tools/travis-ci/run.sh + + echo "" + + awk -F: '{ print $2 }' "${FAILEDTEST_LOG}" > "${FAILURES_LOG}" + while read FAILEDTEST; do + # Common errors + if grep -x "${FAILEDTEST}" "${S}/tools/travis-ci/knownfailures-all.txt" > /dev/null; then + ewarn "Test '${FAILEDTEST}' is known to fail, ignoring ..." + continue + fi + eerror "New/unknown test failure found: '${FAILEDTEST}'" + HAS_UNKNOWN_TEST_FAILURES=1 + done < "${FAILURES_LOG}" + + if [[ ${HAS_UNKNOWN_TEST_FAILURES} -ne 0 ]]; then + die "Test suite failed. New/unknown test failure(s) found!" + else + echo "" + einfo "Test suite passed. Now new/unknown test failure found!" + fi + + return 0 + fi + fi +} + +multilib_src_install() { + if use static-libs; then + BUILD_DIR=${BUILD_DIR}_static cmake-utils_src_install + fi + + cmake-utils_src_install +} |