* [gentoo-commits] repo/gentoo:master commit in: media-libs/openjpeg/, media-libs/openjpeg/files/
@ 2018-11-03 21:46 Andreas Sturmlechner
0 siblings, 0 replies; 10+ messages in thread
From: Andreas Sturmlechner @ 2018-11-03 21:46 UTC (permalink / raw
To: gentoo-commits
commit: 6c8b95f0ffa4570543e8c10e594584db64e1541a
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 3 21:04:02 2018 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Nov 3 21:30:52 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6c8b95f0
media-libs/openjpeg: Fix USE static-libs
Bug: https://bugs.gentoo.org/634144
Bug: https://bugs.gentoo.org/650322
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11
.../openjpeg-2.3.0-fix-disable-static-libs.patch | 23 ++++
media-libs/openjpeg/openjpeg-2.3.0-r1.ebuild | 117 +++++++++++++++++++++
2 files changed, 140 insertions(+)
diff --git a/media-libs/openjpeg/files/openjpeg-2.3.0-fix-disable-static-libs.patch b/media-libs/openjpeg/files/openjpeg-2.3.0-fix-disable-static-libs.patch
new file mode 100644
index 00000000000..9e30f4694f3
--- /dev/null
+++ b/media-libs/openjpeg/files/openjpeg-2.3.0-fix-disable-static-libs.patch
@@ -0,0 +1,23 @@
+From 66297f07a43d2770a97c8456d20202f3d051d980 Mon Sep 17 00:00:00 2001
+From: Even Rouault <even.rouault@spatialys.com>
+Date: Mon, 9 Oct 2017 11:40:43 +0200
+Subject: [PATCH] Unix build: fix regression of 2.3.0 where a shared-only or
+ static-only build lacks the installation target for the library (#1019, fixes
+ regression introduced by 3dfc6ca2bcf06fd1adb6b6b4cecc6c092f08ba0b)
+
+---
+ src/lib/openjp2/CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/lib/openjp2/CMakeLists.txt b/src/lib/openjp2/CMakeLists.txt
+index 0b4520384..f8990ccf0 100644
+--- a/src/lib/openjp2/CMakeLists.txt
++++ b/src/lib/openjp2/CMakeLists.txt
+@@ -99,6 +99,7 @@ else()
+ set(INSTALL_LIBS ${OPENJPEG_LIBRARY_NAME} openjp2_static)
+ else()
+ add_library(${OPENJPEG_LIBRARY_NAME} ${OPENJPEG_SRCS})
++ set(INSTALL_LIBS ${OPENJPEG_LIBRARY_NAME})
+ endif()
+ endif()
+
diff --git a/media-libs/openjpeg/openjpeg-2.3.0-r1.ebuild b/media-libs/openjpeg/openjpeg-2.3.0-r1.ebuild
new file mode 100644
index 00000000000..d0f7f1e15ff
--- /dev/null
+++ b/media-libs/openjpeg/openjpeg-2.3.0-r1.ebuild
@@ -0,0 +1,117 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit 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="c07f38fae1e67adc288c2d6679df5d3652017fbe"
+
+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_20170814.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 ~x86-fbsd ~amd64-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 )
+
+PATCHES=(
+ "${FILESDIR}/${P}-fix-disable-static-libs.patch" # bug 650322
+)
+
+src_prepare() {
+ if use test; then
+ mv "${WORKDIR}"/openjpeg-data-${MY_TESTDATA_COMMIT} "${WORKDIR}"/data ||
+ die "Failed to rename test data"
+ fi
+
+ cmake-utils_src_prepare
+
+ # 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="$(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=$(usex static-libs)
+ )
+
+ cmake-utils_src_configure
+}
+
+multilib_src_test() {
+ if ! multilib_is_native_abi ; then
+ elog "Cannot run tests for non-multilib abi."
+ return 0
+ fi
+
+ 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. No new/unknown test failure(s) found!"
+ fi
+
+ return 0
+ fi
+ fi
+}
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-libs/openjpeg/, media-libs/openjpeg/files/
@ 2018-11-03 21:46 Andreas Sturmlechner
0 siblings, 0 replies; 10+ messages in thread
From: Andreas Sturmlechner @ 2018-11-03 21:46 UTC (permalink / raw
To: gentoo-commits
commit: d1f0d027ec3be50b66a9ce69aed19cb795c23460
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 3 21:10:38 2018 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Nov 3 21:30:52 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d1f0d027
media-libs/openjpeg: Use GNUInstallDirs
Patches pending upstream: https://github.com/uclouvain/openjpeg/pull/1165
Bug: https://bugs.gentoo.org/667150
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11
.../files/openjpeg-2.3.0-gnuinstalldirs.patch | 501 +++++++++++++++++++++
media-libs/openjpeg/openjpeg-2.3.0-r1.ebuild | 8 +-
2 files changed, 502 insertions(+), 7 deletions(-)
diff --git a/media-libs/openjpeg/files/openjpeg-2.3.0-gnuinstalldirs.patch b/media-libs/openjpeg/files/openjpeg-2.3.0-gnuinstalldirs.patch
new file mode 100644
index 00000000000..41942e45155
--- /dev/null
+++ b/media-libs/openjpeg/files/openjpeg-2.3.0-gnuinstalldirs.patch
@@ -0,0 +1,501 @@
+From: Andreas Sturmlechner <asturm@gentoo.com>
+Date: Fri, 2 Nov 2018 17:23:49 +0100
+Subject: Use GNUInstallDirs for standard installation directories
+
+Raises minimum cmake version by a little.
+
+
+commit 24fd3ce777a64b8b315cfe1ee642ec7b1cc6aa97
+Author: Libor Bukata <libor.bukata@oracle.com>
+Date: Fri Aug 31 12:57:40 2018 +0200
+
+ The change makes a relative path to header files
+ always correct regardless of the number of sub-
+ directories in OPENJPEG_INSTALL_PACKAGE_DIR variable.
+
+diff --git a/cmake/OpenJPEGConfig.cmake.in b/cmake/OpenJPEGConfig.cmake.in
+index b20294ca..2925108a 100644
+--- a/cmake/OpenJPEGConfig.cmake.in
++++ b/cmake/OpenJPEGConfig.cmake.in
+@@ -26,8 +26,13 @@ get_filename_component(SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
+ if(EXISTS ${SELF_DIR}/OpenJPEGTargets.cmake)
+ # This is an install tree
+ include(${SELF_DIR}/OpenJPEGTargets.cmake)
+- get_filename_component(OPENJPEG_INCLUDE_ROOT "${SELF_DIR}/../../@OPENJPEG_INSTALL_INCLUDE_DIR@" ABSOLUTE)
+- set(OPENJPEG_INCLUDE_DIRS ${OPENJPEG_INCLUDE_ROOT})
++
++ # We find a relative path from the PKG directory to header files.
++ set(PKG_DIR "@CMAKE_INSTALL_PREFIX@/@OPENJPEG_INSTALL_PACKAGE_DIR@")
++ set(INC_DIR "@CMAKE_INSTALL_PREFIX@/@OPENJPEG_INSTALL_INCLUDE_DIR@")
++ file(RELATIVE_PATH PKG_TO_INC_RPATH "${PKG_DIR}" "${INC_DIR}")
++
++ get_filename_component(OPENJPEG_INCLUDE_DIRS "${SELF_DIR}/${PKG_TO_INC_RPATH}" ABSOLUTE)
+
+ else()
+ if(EXISTS ${SELF_DIR}/OpenJPEGExports.cmake)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index cb545666..2ff3b00a 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -7,7 +7,7 @@
+ # For this purpose you can define a CMake var: OPENJPEG_NAMESPACE to whatever you like
+ # e.g.:
+ # set(OPENJPEG_NAMESPACE "GDCMOPENJPEG")
+-cmake_minimum_required(VERSION 2.8.2)
++cmake_minimum_required(VERSION 2.8.5)
+
+ if(COMMAND CMAKE_POLICY)
+ cmake_policy(SET CMP0003 NEW)
+@@ -102,59 +102,28 @@ endif()
+
+ # --------------------------------------------------------------------------
+ # Install directories
++include(GNUInstallDirs)
++
+ # Build DOCUMENTATION (not in ALL target and only if Doxygen is found)
+ option(BUILD_DOC "Build the HTML documentation (with doxygen if available)." OFF)
+
+ string(TOLOWER ${PROJECT_NAME} projectname)
+ set(OPENJPEG_INSTALL_SUBDIR "${projectname}-${OPENJPEG_VERSION_MAJOR}.${OPENJPEG_VERSION_MINOR}")
+
+-if(NOT OPENJPEG_INSTALL_BIN_DIR)
+- set(OPENJPEG_INSTALL_BIN_DIR "bin")
+-endif()
+-
+-if(NOT OPENJPEG_INSTALL_LIB_DIR)
+- set(OPENJPEG_INSTALL_LIB_DIR "lib")
+-endif()
+-
+-if(NOT OPENJPEG_INSTALL_SHARE_DIR)
+- set(OPENJPEG_INSTALL_SHARE_DIR "share")
+-endif()
+-
+-if(NOT OPENJPEG_INSTALL_DATA_DIR)
+- set(OPENJPEG_INSTALL_DATA_DIR "${OPENJPEG_INSTALL_SHARE_DIR}/${OPENJPEG_INSTALL_SUBDIR}")
+-endif()
+-
+-if(NOT OPENJPEG_INSTALL_INCLUDE_DIR)
+- set(OPENJPEG_INSTALL_INCLUDE_DIR "include/${OPENJPEG_INSTALL_SUBDIR}")
+-endif()
+-
+-if(BUILD_DOC)
+-if(NOT OPENJPEG_INSTALL_MAN_DIR)
+- set(OPENJPEG_INSTALL_MAN_DIR "share/man/")
+-endif()
+-
+-if(NOT OPENJPEG_INSTALL_DOC_DIR)
+- set(OPENJPEG_INSTALL_DOC_DIR "share/doc/${OPENJPEG_INSTALL_SUBDIR}")
+-endif()
+-endif()
+-
+ if(NOT OPENJPEG_INSTALL_JNI_DIR)
+ if(WIN32)
+- set(OPENJPEG_INSTALL_JNI_DIR ${OPENJPEG_INSTALL_BIN_DIR})
++ set(OPENJPEG_INSTALL_JNI_DIR ${CMAKE_INSTALL_BINDIR})
+ else()
+- set(OPENJPEG_INSTALL_JNI_DIR ${OPENJPEG_INSTALL_LIB_DIR})
++ set(OPENJPEG_INSTALL_JNI_DIR ${CMAKE_INSTALL_LIBDIR})
+ endif()
+ endif()
+
+ if(NOT OPENJPEG_INSTALL_PACKAGE_DIR)
+- # We could install *.cmake files in share/ however those files contains
+- # hardcoded path to libraries on a multi-arch system (fedora/debian) those
+- # path will be different (lib/i386-linux-gnu vs lib/x86_64-linux-gnu)
+- set(OPENJPEG_INSTALL_PACKAGE_DIR "${OPENJPEG_INSTALL_LIB_DIR}/${OPENJPEG_INSTALL_SUBDIR}")
++ set(OPENJPEG_INSTALL_PACKAGE_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/${OPENJPEG_INSTALL_SUBDIR}")
+ endif()
+
+ if (APPLE)
+- list(APPEND OPENJPEG_LIBRARY_PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${OPENJPEG_INSTALL_LIB_DIR}")
++ list(APPEND OPENJPEG_LIBRARY_PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_FULL_LIBDIR}")
+ option(OPJ_USE_DSYMUTIL "Call dsymutil on binaries after build." OFF)
+ endif()
+
+@@ -338,14 +307,6 @@ install( FILES ${OPENJPEG_BINARY_DIR}/OpenJPEGConfig.cmake
+ )
+
+ #-----------------------------------------------------------------------------
+-# install CHANGES and LICENSE
+-if(BUILD_DOC)
+-if(EXISTS ${OPENJPEG_SOURCE_DIR}/CHANGES)
+- install(FILES CHANGES DESTINATION ${OPENJPEG_INSTALL_DOC_DIR})
+-endif()
+-
+-install(FILES LICENSE DESTINATION ${OPENJPEG_INSTALL_DOC_DIR})
+-endif()
+
+ include (cmake/OpenJPEGCPack.cmake)
+
+@@ -362,14 +323,14 @@ if(BUILD_PKGCONFIG_FILES)
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/lib/openjp2/libopenjp2.pc.cmake.in
+ ${CMAKE_CURRENT_BINARY_DIR}/libopenjp2.pc @ONLY)
+ install( FILES ${CMAKE_CURRENT_BINARY_DIR}/libopenjp2.pc DESTINATION
+- ${OPENJPEG_INSTALL_LIB_DIR}/pkgconfig )
++ ${CMAKE_INSTALL_LIBDIR}/pkgconfig )
+ #
+ if(BUILD_JPWL)
+ # install in lib and not share (see multi-arch note above)
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/lib/openjpwl/libopenjpwl.pc.cmake.in
+ ${CMAKE_CURRENT_BINARY_DIR}/libopenjpwl.pc @ONLY)
+ install( FILES ${CMAKE_CURRENT_BINARY_DIR}/libopenjpwl.pc DESTINATION
+- ${OPENJPEG_INSTALL_LIB_DIR}/pkgconfig )
++ ${CMAKE_INSTALL_LIBDIR}/pkgconfig )
+ endif()
+ #
+ if(BUILD_JPIP)
+@@ -377,7 +338,7 @@ if(BUILD_PKGCONFIG_FILES)
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/lib/openjpip/libopenjpip.pc.cmake.in
+ ${CMAKE_CURRENT_BINARY_DIR}/libopenjpip.pc @ONLY)
+ install( FILES ${CMAKE_CURRENT_BINARY_DIR}/libopenjpip.pc DESTINATION
+- ${OPENJPEG_INSTALL_LIB_DIR}/pkgconfig )
++ ${CMAKE_INSTALL_LIBDIR}/pkgconfig )
+ endif()
+ #
+ if(BUILD_JP3D)
+@@ -385,7 +346,7 @@ if(BUILD_PKGCONFIG_FILES)
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/lib/openjp3d/libopenjp3d.pc.cmake.in
+ ${CMAKE_CURRENT_BINARY_DIR}/libopenjp3d.pc @ONLY)
+ install( FILES ${CMAKE_CURRENT_BINARY_DIR}/libopenjp3d.pc DESTINATION
+- ${OPENJPEG_INSTALL_LIB_DIR}/pkgconfig )
++ ${CMAKE_INSTALL_LIBDIR}/pkgconfig )
+ endif()
+ endif()
+
+diff --git a/cmake/OpenJPEGConfig.cmake.in b/cmake/OpenJPEGConfig.cmake.in
+index 2925108a..702e2790 100644
+--- a/cmake/OpenJPEGConfig.cmake.in
++++ b/cmake/OpenJPEGConfig.cmake.in
+@@ -29,7 +29,7 @@ if(EXISTS ${SELF_DIR}/OpenJPEGTargets.cmake)
+
+ # We find a relative path from the PKG directory to header files.
+ set(PKG_DIR "@CMAKE_INSTALL_PREFIX@/@OPENJPEG_INSTALL_PACKAGE_DIR@")
+- set(INC_DIR "@CMAKE_INSTALL_PREFIX@/@OPENJPEG_INSTALL_INCLUDE_DIR@")
++ set(INC_DIR "@CMAKE_INSTALL_FULL_INCLUDEDIR@/@OPENJPEG_INSTALL_SUBDIR@")
+ file(RELATIVE_PATH PKG_TO_INC_RPATH "${PKG_DIR}" "${INC_DIR}")
+
+ get_filename_component(OPENJPEG_INCLUDE_DIRS "${SELF_DIR}/${PKG_TO_INC_RPATH}" ABSOLUTE)
+diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
+index d4f3ddbe..ed5cb44c 100644
+--- a/doc/CMakeLists.txt
++++ b/doc/CMakeLists.txt
+@@ -44,7 +44,7 @@ if(DOXYGEN_FOUND)
+
+ # install HTML documentation (install png files too):
+ install(DIRECTORY ${CMAKE_BINARY_DIR}/doc/html
+- DESTINATION share/doc
++ DESTINATION ${CMAKE_INSTALL_DOCDIR}
+ PATTERN ".svn" EXCLUDE
+ )
+ else()
+diff --git a/src/bin/jp2/CMakeLists.txt b/src/bin/jp2/CMakeLists.txt
+index 4d4bd952..29b4dd20 100644
+--- a/src/bin/jp2/CMakeLists.txt
++++ b/src/bin/jp2/CMakeLists.txt
+@@ -67,7 +67,7 @@ foreach(exe opj_decompress opj_compress opj_dump)
+ # Install exe
+ install(TARGETS ${exe}
+ EXPORT OpenJPEGTargets
+- DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
++ DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
+ )
+ if(OPJ_USE_DSYMUTIL)
+ add_custom_command(TARGET ${exe} POST_BUILD
+@@ -83,6 +83,6 @@ install(
+ FILES ${OPENJPEG_SOURCE_DIR}/doc/man/man1/opj_compress.1
+ ${OPENJPEG_SOURCE_DIR}/doc/man/man1/opj_decompress.1
+ ${OPENJPEG_SOURCE_DIR}/doc/man/man1/opj_dump.1
+- DESTINATION ${OPENJPEG_INSTALL_MAN_DIR}/man1)
++ DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
+ #
+ endif()
+diff --git a/src/bin/jp3d/CMakeLists.txt b/src/bin/jp3d/CMakeLists.txt
+index 3cac1a8f..ed62b4f3 100644
+--- a/src/bin/jp3d/CMakeLists.txt
++++ b/src/bin/jp3d/CMakeLists.txt
+@@ -36,6 +36,6 @@ foreach(exe opj_jp3d_compress opj_jp3d_decompress)
+ # Install exe
+ install(TARGETS ${exe}
+ EXPORT OpenJP3DTargets
+- DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
++ DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
+ )
+ endforeach()
+diff --git a/src/bin/jpip/CMakeLists.txt b/src/bin/jpip/CMakeLists.txt
+index 301d885b..ddd867dc 100644
+--- a/src/bin/jpip/CMakeLists.txt
++++ b/src/bin/jpip/CMakeLists.txt
+@@ -13,7 +13,7 @@ add_executable(opj_jpip_addxml opj_jpip_addxml.c)
+ # Install exe
+ install(TARGETS opj_jpip_addxml
+ EXPORT OpenJPEGTargets
+- DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
++ DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
+ )
+
+ if(BUILD_JPIP_SERVER)
+@@ -38,7 +38,7 @@ if(BUILD_JPIP_SERVER)
+ # Install exe
+ install(TARGETS opj_server
+ EXPORT OpenJPEGTargets
+- DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
++ DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
+ )
+ endif()
+
+@@ -52,7 +52,7 @@ add_executable(${exe} ${exe}.c)
+ target_link_libraries(${exe} openjpip)
+ install(TARGETS ${exe}
+ EXPORT OpenJPEGTargets
+- DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
++ DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
+ )
+ endforeach()
+
+@@ -123,7 +123,7 @@ if(Java_Development_FOUND AND Java_JAVAC_EXECUTABLE)
+ )
+
+ install(FILES ${LIBRARY_OUTPUT_PATH}/opj_jpip_viewer.jar
+- DESTINATION ${OPENJPEG_INSTALL_SHARE_DIR} COMPONENT JavaModule
++ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR} COMPONENT JavaModule
+ )
+ else()
+ # opj_viewer (simple, no xerces)
+@@ -153,7 +153,7 @@ if(Java_Development_FOUND AND Java_JAVAC_EXECUTABLE)
+ )
+
+ install(FILES ${LIBRARY_OUTPUT_PATH}/opj_jpip_viewer.jar
+- DESTINATION ${OPENJPEG_INSTALL_SHARE_DIR} COMPONENT JavaModule
++ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR} COMPONENT JavaModule
+ )
+ endif()
+ else()
+diff --git a/src/bin/jpwl/CMakeLists.txt b/src/bin/jpwl/CMakeLists.txt
+index 5df225de..8a798e61 100644
+--- a/src/bin/jpwl/CMakeLists.txt
++++ b/src/bin/jpwl/CMakeLists.txt
+@@ -57,6 +57,6 @@ foreach(exe decompress compress)
+ endif()
+
+ install(TARGETS ${jpwl_exe}
+- DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
++ DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
+ )
+ endforeach()
+diff --git a/src/bin/mj2/CMakeLists.txt b/src/bin/mj2/CMakeLists.txt
+index 5d3e288b..6669c502 100644
+--- a/src/bin/mj2/CMakeLists.txt
++++ b/src/bin/mj2/CMakeLists.txt
+@@ -43,5 +43,5 @@ foreach(exe
+ endif()
+
+ install(TARGETS ${exe}
+- DESTINATION ${OPENJPEG_INSTALL_BIN_DIR})
++ DESTINATION ${CMAKE_INSTALL_BINDIR})
+ endforeach()
+diff --git a/src/lib/openjp2/CMakeLists.txt b/src/lib/openjp2/CMakeLists.txt
+index b2714858..9cbc4c3f 100644
+--- a/src/lib/openjp2/CMakeLists.txt
++++ b/src/lib/openjp2/CMakeLists.txt
+@@ -2,7 +2,7 @@ include_regular_expression("^.*$")
+
+ #
+ install( FILES ${CMAKE_CURRENT_BINARY_DIR}/opj_config.h
+- DESTINATION ${OPENJPEG_INSTALL_INCLUDE_DIR} COMPONENT Headers)
++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${OPENJPEG_INSTALL_SUBDIR} COMPONENT Headers)
+
+ include_directories(
+ ${${OPENJPEG_NAMESPACE}_BINARY_DIR}/src/lib/openjp2 # opj_config.h and opj_config_private.h
+@@ -114,21 +114,21 @@ endif()
+ # Install library
+ install(TARGETS ${INSTALL_LIBS}
+ EXPORT OpenJPEGTargets
+- RUNTIME DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
+- LIBRARY DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
+- ARCHIVE DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
+ )
+
+ # Install includes files
+ install(FILES openjpeg.h opj_stdint.h
+- DESTINATION ${OPENJPEG_INSTALL_INCLUDE_DIR} COMPONENT Headers
++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${OPENJPEG_INSTALL_SUBDIR} COMPONENT Headers
+ )
+
+ if(BUILD_DOC)
+ # install man page of the library
+ install(
+ FILES ${OPENJPEG_SOURCE_DIR}/doc/man/man3/libopenjp2.3
+- DESTINATION ${OPENJPEG_INSTALL_MAN_DIR}/man3)
++ DESTINATION ${CMAKE_INSTALL_MANDIR}/man3)
+ endif()
+
+ if(BUILD_LUTS_GENERATOR)
+diff --git a/src/lib/openjp2/libopenjp2.pc.cmake.in b/src/lib/openjp2/libopenjp2.pc.cmake.in
+index 62159b00..ebad9578 100644
+--- a/src/lib/openjp2/libopenjp2.pc.cmake.in
++++ b/src/lib/openjp2/libopenjp2.pc.cmake.in
+@@ -1,9 +1,9 @@
+ prefix=@CMAKE_INSTALL_PREFIX@
+-bindir=${prefix}/@OPENJPEG_INSTALL_BIN_DIR@
+-mandir=${prefix}/@OPENJPEG_INSTALL_MAN_DIR@
+-docdir=${prefix}/@OPENJPEG_INSTALL_DOC_DIR@
+-libdir=${prefix}/@OPENJPEG_INSTALL_LIB_DIR@
+-includedir=${prefix}/@OPENJPEG_INSTALL_INCLUDE_DIR@
++bindir=${prefix}/@CMAKE_INSTALL_BINDIR@
++mandir=${prefix}/@CMAKE_INSTALL_MANDIR@
++docdir=${prefix}/@CMAKE_INSTALL_DOCDIR@
++libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
++includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@OPENJPEG_INSTALL_SUBDIR@
+
+ Name: openjp2
+ Description: JPEG2000 library (Part 1 and 2)
+diff --git a/src/lib/openjp3d/CMakeLists.txt b/src/lib/openjp3d/CMakeLists.txt
+index b0469af1..6e251984 100644
+--- a/src/lib/openjp3d/CMakeLists.txt
++++ b/src/lib/openjp3d/CMakeLists.txt
+@@ -34,12 +34,12 @@ endif()
+ # Install library
+ install(TARGETS ${OPENJP3D_LIBRARY_NAME}
+ EXPORT OpenJP3DTargets
+- DESTINATION ${OPENJPEG_INSTALL_LIB_DIR}
++ DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ COMPONENT Libraries
+ )
+
+ # Install includes files
+ install(FILES openjp3d.h
+- DESTINATION ${OPENJPEG_INSTALL_INCLUDE_DIR}
++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${OPENJPEG_INSTALL_SUBDIR}
+ COMPONENT Headers
+ )
+diff --git a/src/lib/openjp3d/libopenjp3d.pc.cmake.in b/src/lib/openjp3d/libopenjp3d.pc.cmake.in
+index e9b6c404..866a0174 100644
+--- a/src/lib/openjp3d/libopenjp3d.pc.cmake.in
++++ b/src/lib/openjp3d/libopenjp3d.pc.cmake.in
+@@ -1,9 +1,9 @@
+ prefix=@CMAKE_INSTALL_PREFIX@
+-bindir=${prefix}/@OPENJPEG_INSTALL_BIN_DIR@
+-mandir=${prefix}/@OPENJPEG_INSTALL_MAN_DIR@
+-docdir=${prefix}/@OPENJPEG_INSTALL_DOC_DIR@
+-libdir=${prefix}/@OPENJPEG_INSTALL_LIB_DIR@
+-includedir=${prefix}/@OPENJPEG_INSTALL_INCLUDE_DIR@
++bindir=${prefix}/@CMAKE_INSTALL_BINDIR@
++mandir=${prefix}/@CMAKE_INSTALL_MANDIR@
++docdir=${prefix}/@CMAKE_INSTALL_DOCDIR@
++libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
++includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@OPENJPEG_INSTALL_SUBDIR@
+
+ Name: openjp3d
+ Description: JPEG2000 Extensions for three-dimensional data (Part 10)
+diff --git a/src/lib/openjpip/CMakeLists.txt b/src/lib/openjpip/CMakeLists.txt
+index b3cb8ce8..aace36d4 100644
+--- a/src/lib/openjpip/CMakeLists.txt
++++ b/src/lib/openjpip/CMakeLists.txt
+@@ -74,9 +74,9 @@ endif()
+ # Install library
+ install(TARGETS openjpip
+ EXPORT OpenJPEGTargets
+- RUNTIME DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
+- LIBRARY DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
+- ARCHIVE DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
+ )
+
+ if(BUILD_JPIP_SERVER)
+@@ -86,6 +86,6 @@ if(BUILD_JPIP_SERVER)
+ PROPERTIES COMPILE_FLAGS "-DSERVER")
+ install(TARGETS openjpip_server
+ EXPORT OpenJPEGTargets
+- DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
++ DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
+ )
+ endif()
+diff --git a/src/lib/openjpip/libopenjpip.pc.cmake.in b/src/lib/openjpip/libopenjpip.pc.cmake.in
+index 7c3f29af..4cfa6fce 100644
+--- a/src/lib/openjpip/libopenjpip.pc.cmake.in
++++ b/src/lib/openjpip/libopenjpip.pc.cmake.in
+@@ -1,9 +1,9 @@
+ prefix=@CMAKE_INSTALL_PREFIX@
+-bindir=${prefix}/@OPENJPEG_INSTALL_BIN_DIR@
+-mandir=${prefix}/@OPENJPEG_INSTALL_MAN_DIR@
+-docdir=${prefix}/@OPENJPEG_INSTALL_DOC_DIR@
+-libdir=${prefix}/@OPENJPEG_INSTALL_LIB_DIR@
+-includedir=${prefix}/@OPENJPEG_INSTALL_INCLUDE_DIR@
++bindir=${prefix}/@CMAKE_INSTALL_BINDIR@
++mandir=${prefix}/@CMAKE_INSTALL_MANDIR@
++docdir=${prefix}/@CMAKE_INSTALL_DOCDIR@
++libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
++includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@OPENJPEG_INSTALL_SUBDIR@
+
+ Name: openjpip
+ Description: JPEG2000 Interactivity tools, APIs and protocols (Part 9)
+diff --git a/src/lib/openjpwl/CMakeLists.txt b/src/lib/openjpwl/CMakeLists.txt
+index 1b33adbe..bb90c87c 100644
+--- a/src/lib/openjpwl/CMakeLists.txt
++++ b/src/lib/openjpwl/CMakeLists.txt
+@@ -58,7 +58,7 @@ endif()
+ # Install library
+ install(TARGETS openjpwl
+ EXPORT OpenJPEGTargets
+- RUNTIME DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
+- LIBRARY DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
+- ARCHIVE DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
+ )
+diff --git a/src/lib/openjpwl/libopenjpwl.pc.cmake.in b/src/lib/openjpwl/libopenjpwl.pc.cmake.in
+index b1244197..8acc1457 100644
+--- a/src/lib/openjpwl/libopenjpwl.pc.cmake.in
++++ b/src/lib/openjpwl/libopenjpwl.pc.cmake.in
+@@ -1,9 +1,9 @@
+ prefix=@CMAKE_INSTALL_PREFIX@
+-bindir=${prefix}/@OPENJPEG_INSTALL_BIN_DIR@
+-mandir=${prefix}/@OPENJPEG_INSTALL_MAN_DIR@
+-docdir=${prefix}/@OPENJPEG_INSTALL_DOC_DIR@
+-libdir=${prefix}/@OPENJPEG_INSTALL_LIB_DIR@
+-includedir=${prefix}/@OPENJPEG_INSTALL_INCLUDE_DIR@
++bindir=${prefix}/@CMAKE_INSTALL_BINDIR@
++mandir=${prefix}/@CMAKE_INSTALL_MANDIR@
++docdir=${prefix}/@CMAKE_INSTALL_DOCDIR@
++libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
++includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@OPENJPEG_INSTALL_SUBDIR@
+
+ Name: openjpwl
+ Description: JPEG2000 Wireless library (Part 11)
+diff --git a/src/lib/openmj2/CMakeLists.txt b/src/lib/openmj2/CMakeLists.txt
+index 25294b20..dced53f6 100644
+--- a/src/lib/openmj2/CMakeLists.txt
++++ b/src/lib/openmj2/CMakeLists.txt
+@@ -53,12 +53,12 @@ endif()
+ # Install library
+ install(TARGETS ${OPENMJ2_LIBRARY_NAME}
+ EXPORT OpenMJ2Targets
+- DESTINATION ${OPENJPEG_INSTALL_LIB_DIR}
++ DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ COMPONENT Libraries
+ )
+
+ # Install includes files
+ #install(FILES mj2.h
+-# DESTINATION ${OPENJPEG_INSTALL_INCLUDE_DIR}/${subdir}
++# DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${OPENJPEG_INSTALL_SUBDIR}
+ # COMPONENT Headers
+ #)
+diff --git a/wrapping/java/openjp2/CMakeLists.txt b/wrapping/java/openjp2/CMakeLists.txt
+index eb3da0ed..4504da5f 100644
+--- a/wrapping/java/openjp2/CMakeLists.txt
++++ b/wrapping/java/openjp2/CMakeLists.txt
+@@ -69,5 +69,5 @@ add_custom_target(OpenJPEGJavaJar ALL
+ )
+
+ install(FILES ${LIBRARY_OUTPUT_PATH}/openjpeg.jar
+- DESTINATION ${OPENJPEG_INSTALL_SHARE_DIR} COMPONENT JavaModule
++ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR} COMPONENT JavaModule
+ )
diff --git a/media-libs/openjpeg/openjpeg-2.3.0-r1.ebuild b/media-libs/openjpeg/openjpeg-2.3.0-r1.ebuild
index 4dd04ca70f2..8d15446c08e 100644
--- a/media-libs/openjpeg/openjpeg-2.3.0-r1.ebuild
+++ b/media-libs/openjpeg/openjpeg-2.3.0-r1.ebuild
@@ -31,6 +31,7 @@ DOCS=( AUTHORS.md CHANGELOG.md NEWS.md README.md THANKS.md )
PATCHES=(
"${FILESDIR}/${P}-fix-disable-static-libs.patch" # bug 650322
+ "${FILESDIR}/${P}-gnuinstalldirs.patch" # bug 667150
)
src_prepare() {
@@ -40,18 +41,11 @@ src_prepare() {
fi
cmake-utils_src_prepare
-
- # 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=(
-DBUILD_PKGCONFIG_FILES=ON # always build pkgconfig files, bug #539834
- -DOPENJPEG_INSTALL_LIB_DIR="$(get_libdir)"
-DBUILD_TESTING="$(multilib_native_usex test)"
-DBUILD_DOC=$(multilib_native_usex doc ON OFF)
-DBUILD_CODEC=$(multilib_is_native_abi && echo ON || echo OFF)
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-libs/openjpeg/, media-libs/openjpeg/files/
@ 2020-03-25 22:42 Thomas Deutschmann
0 siblings, 0 replies; 10+ messages in thread
From: Thomas Deutschmann @ 2020-03-25 22:42 UTC (permalink / raw
To: gentoo-commits
commit: 26f7a380f84826f1b0b5510cd34e4f72894b5e8f
Author: Sam James (sam_c) <sam <AT> cmpct <DOT> info>
AuthorDate: Sun Mar 22 01:56:44 2020 +0000
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Mar 25 22:42:02 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=26f7a380
media-libs/openjpeg: Patch CVEs in SLOT:2
Uses upstream patches to fix CVE-2020-6851, CVE-2020-8112.
Bug: https://bugs.gentoo.org/707926
Signed-off-by: Sam James (sam_c) <sam <AT> cmpct.info>
Closes: https://github.com/gentoo/gentoo/pull/15049
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
.../files/openjpeg-2.3.1-CVE-2020-6851.patch | 29 +++++
.../files/openjpeg-2.3.1-CVE-2020-8112.patch | 43 +++++++
media-libs/openjpeg/openjpeg-2.3.1-r1.ebuild | 135 +++++++++++++++++++++
3 files changed, 207 insertions(+)
diff --git a/media-libs/openjpeg/files/openjpeg-2.3.1-CVE-2020-6851.patch b/media-libs/openjpeg/files/openjpeg-2.3.1-CVE-2020-6851.patch
new file mode 100644
index 00000000000..9a70291f50e
--- /dev/null
+++ b/media-libs/openjpeg/files/openjpeg-2.3.1-CVE-2020-6851.patch
@@ -0,0 +1,29 @@
+From 024b8407392cb0b82b04b58ed256094ed5799e04 Mon Sep 17 00:00:00 2001
+From: Even Rouault <even.rouault@spatialys.com>
+Date: Sat, 11 Jan 2020 01:51:19 +0100
+Subject: [PATCH] opj_j2k_update_image_dimensions(): reject images whose
+ coordinates are beyond INT_MAX (fixes #1228)
+
+---
+ src/lib/openjp2/j2k.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/src/lib/openjp2/j2k.c b/src/lib/openjp2/j2k.c
+index 14f6ff41a..922550eb1 100644
+--- a/src/lib/openjp2/j2k.c
++++ b/src/lib/openjp2/j2k.c
+@@ -9221,6 +9221,14 @@ static OPJ_BOOL opj_j2k_update_image_dimensions(opj_image_t* p_image,
+ l_img_comp = p_image->comps;
+ for (it_comp = 0; it_comp < p_image->numcomps; ++it_comp) {
+ OPJ_INT32 l_h, l_w;
++ if (p_image->x0 > (OPJ_UINT32)INT_MAX ||
++ p_image->y0 > (OPJ_UINT32)INT_MAX ||
++ p_image->x1 > (OPJ_UINT32)INT_MAX ||
++ p_image->y1 > (OPJ_UINT32)INT_MAX) {
++ opj_event_msg(p_manager, EVT_ERROR,
++ "Image coordinates above INT_MAX are not supported\n");
++ return OPJ_FALSE;
++ }
+
+ l_img_comp->x0 = (OPJ_UINT32)opj_int_ceildiv((OPJ_INT32)p_image->x0,
+ (OPJ_INT32)l_img_comp->dx);
diff --git a/media-libs/openjpeg/files/openjpeg-2.3.1-CVE-2020-8112.patch b/media-libs/openjpeg/files/openjpeg-2.3.1-CVE-2020-8112.patch
new file mode 100644
index 00000000000..95cb8095f56
--- /dev/null
+++ b/media-libs/openjpeg/files/openjpeg-2.3.1-CVE-2020-8112.patch
@@ -0,0 +1,43 @@
+From 05f9b91e60debda0e83977e5e63b2e66486f7074 Mon Sep 17 00:00:00 2001
+From: Even Rouault <even.rouault@spatialys.com>
+Date: Thu, 30 Jan 2020 00:59:57 +0100
+Subject: [PATCH] opj_tcd_init_tile(): avoid integer overflow
+
+That could lead to later assertion failures.
+
+Fixes #1231 / CVE-2020-8112
+---
+ src/lib/openjp2/tcd.c | 20 ++++++++++++++++++--
+ 1 file changed, 18 insertions(+), 2 deletions(-)
+
+diff --git a/src/lib/openjp2/tcd.c b/src/lib/openjp2/tcd.c
+index deecc4dff..aa419030a 100644
+--- a/src/lib/openjp2/tcd.c
++++ b/src/lib/openjp2/tcd.c
+@@ -905,8 +905,24 @@ static INLINE OPJ_BOOL opj_tcd_init_tile(opj_tcd_t *p_tcd, OPJ_UINT32 p_tile_no,
+ /* p. 64, B.6, ISO/IEC FDIS15444-1 : 2000 (18 august 2000) */
+ l_tl_prc_x_start = opj_int_floordivpow2(l_res->x0, (OPJ_INT32)l_pdx) << l_pdx;
+ l_tl_prc_y_start = opj_int_floordivpow2(l_res->y0, (OPJ_INT32)l_pdy) << l_pdy;
+- l_br_prc_x_end = opj_int_ceildivpow2(l_res->x1, (OPJ_INT32)l_pdx) << l_pdx;
+- l_br_prc_y_end = opj_int_ceildivpow2(l_res->y1, (OPJ_INT32)l_pdy) << l_pdy;
++ {
++ OPJ_UINT32 tmp = ((OPJ_UINT32)opj_int_ceildivpow2(l_res->x1,
++ (OPJ_INT32)l_pdx)) << l_pdx;
++ if (tmp > (OPJ_UINT32)INT_MAX) {
++ opj_event_msg(manager, EVT_ERROR, "Integer overflow\n");
++ return OPJ_FALSE;
++ }
++ l_br_prc_x_end = (OPJ_INT32)tmp;
++ }
++ {
++ OPJ_UINT32 tmp = ((OPJ_UINT32)opj_int_ceildivpow2(l_res->y1,
++ (OPJ_INT32)l_pdy)) << l_pdy;
++ if (tmp > (OPJ_UINT32)INT_MAX) {
++ opj_event_msg(manager, EVT_ERROR, "Integer overflow\n");
++ return OPJ_FALSE;
++ }
++ l_br_prc_y_end = (OPJ_INT32)tmp;
++ }
+ /*fprintf(stderr, "\t\t\tprc_x_start=%d, prc_y_start=%d, br_prc_x_end=%d, br_prc_y_end=%d \n", l_tl_prc_x_start, l_tl_prc_y_start, l_br_prc_x_end ,l_br_prc_y_end );*/
+
+ l_res->pw = (l_res->x0 == l_res->x1) ? 0U : (OPJ_UINT32)((
diff --git a/media-libs/openjpeg/openjpeg-2.3.1-r1.ebuild b/media-libs/openjpeg/openjpeg-2.3.1-r1.ebuild
new file mode 100644
index 00000000000..7f22db1cc92
--- /dev/null
+++ b/media-libs/openjpeg/openjpeg-2.3.1-r1.ebuild
@@ -0,0 +1,135 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+CMAKE_ECLASS=cmake
+inherit 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="25632d6deca2e567d30ef476b4abe63916c36f6e"
+
+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_20180620.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-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="doc static-libs test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ media-libs/lcms:2
+ media-libs/libpng:0=
+ media-libs/tiff:0
+ sys-libs/zlib:="
+DEPEND="${RDEPEND}"
+BDEPEND="
+ doc? ( app-doc/doxygen )"
+
+DOCS=( AUTHORS.md CHANGELOG.md NEWS.md README.md THANKS.md )
+
+PATCHES=(
+ "${FILESDIR}/${PN}-2.3.1-gnuinstalldirs.patch" # bug 667150
+ "${FILESDIR}/${P}-CVE-2020-6851.patch"
+ "${FILESDIR}/${P}-CVE-2020-8112.patch"
+)
+
+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() {
+ 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=$(usex static-libs)
+ )
+
+ cmake_src_configure
+}
+
+multilib_src_test() {
+ if ! multilib_is_native_abi ; then
+ elog "Cannot run tests for non-multilib abi."
+ return 0
+ fi
+
+ 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
+ local FAILEDTEST_LOG="${BUILD_DIR}/Testing/Temporary/LastTestsFailed.log"
+
+ if [[ ! -f "${FAILEDTEST_LOG}" ]] ; then
+ # Should never happen
+ die "Cannot analyze test failures: LastTestsFailed.log is missing!"
+ fi
+
+ 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="${T}/known_failures_compiled.txt"
+ cat "${S}/tools/travis-ci/knownfailures-all.txt" > "${KNOWN_FAILURES_LIST}" || die
+
+ local ARCH_SPECIFIC_FAILURES=
+ if use amd64 ; then
+ ARCH_SPECIFIC_FAILURES="$(find "${S}/tools/travis-ci/" -name 'knownfailures-*x86_64*.txt' -print0 | sort -z | tail -z -n 1 | tr -d '\0')"
+ elif use x86 || use arm || use arm64; then
+ ARCH_SPECIFIC_FAILURES="$(find "${S}/tools/travis-ci/" -name 'knownfailures-*i386*.txt' -print0 | sort -z | tail -z -n 1 | tr -d '\0')"
+ fi
+
+ if [[ -f "${ARCH_SPECIFIC_FAILURES}" ]] ; then
+ einfo "Adding architecture specific failures (${ARCH_SPECIFIC_FAILURES}) to known failures list ..."
+ cat "${ARCH_SPECIFIC_FAILURES}" >> "${KNOWN_FAILURES_LIST}" || die
+ fi
+
+ # Logic copied from $S/tools/travis-ci/run.sh
+ local FAILEDTEST=
+ local FAILURES_LOG="${BUILD_DIR}/Testing/Temporary/failures.txt"
+ local HAS_UNKNOWN_TEST_FAILURES=0
+
+ echo ""
+
+ awk -F: '{ print $2 }' "${FAILEDTEST_LOG}" > "${FAILURES_LOG}"
+ while read FAILEDTEST; do
+ # is this failure known?
+ if grep -x "${FAILEDTEST}" "${KNOWN_FAILURES_LIST}" > /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. No new/unknown test failure(s) found!"
+ fi
+
+ return 0
+ fi
+}
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-libs/openjpeg/, media-libs/openjpeg/files/
@ 2021-02-11 8:15 Sam James
0 siblings, 0 replies; 10+ messages in thread
From: Sam James @ 2021-02-11 8:15 UTC (permalink / raw
To: gentoo-commits
commit: e31a773aa52771524f781a95e46c6c1904e6a08f
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 11 08:15:38 2021 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Feb 11 08:15:38 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e31a773a
media-libs/openjpeg: security cleanup
Bug: https://bugs.gentoo.org/718918
Package-Manager: Portage-3.0.14, Repoman-3.0.2
Signed-off-by: Sam James <sam <AT> gentoo.org>
media-libs/openjpeg/Manifest | 2 -
.../files/openjpeg-2.3.1-CVE-2020-6851.patch | 29 --
.../files/openjpeg-2.3.1-CVE-2020-8112.patch | 43 --
.../files/openjpeg-2.3.1-gnuinstalldirs.patch | 495 ---------------------
.../files/openjpeg-2.3.1-libtiff-4.1-compat.patch | 210 ---------
media-libs/openjpeg/openjpeg-2.3.1-r1.ebuild | 136 ------
6 files changed, 915 deletions(-)
diff --git a/media-libs/openjpeg/Manifest b/media-libs/openjpeg/Manifest
index 4421745b114..2971ec0815a 100644
--- a/media-libs/openjpeg/Manifest
+++ b/media-libs/openjpeg/Manifest
@@ -1,4 +1,2 @@
-DIST openjpeg-2.3.1.tar.gz 2214401 BLAKE2B ecc7e573592a5302dcdbade791f6aa6e48f6791c7412fdd44976f3619c8fc0cca7d904fa42013f33ab17dd0f569a76d3c49a73eccaf0a749d34f305362367af9 SHA512 339fbc899bddf2393d214df71ed5d6070a3a76b933b1e75576c8a0ae9dfcc4adec40bdc544f599e4b8d0bc173e4e9e7352408497b5b3c9356985605830c26c03
DIST openjpeg-2.4.0.tar.gz 2233229 BLAKE2B ab8907638ac041ce7dcbcbcd9624ea5e4b7542c9ec38a850e363c071c27c4bc8b16e207700b12e67d8d32bdd9b0838735bede27084090ce95105d32c539b09cf SHA512 55daab47d33823af94e32e5d345b52c251a5410f0c8e0a13b693f17899eedc8b2bb107489ddcba9ab78ef17dfd7cd80d3c5ec80c1e429189cb041124b67e07a8
-DIST openjpeg-data_20180620.tar.gz 497894373 BLAKE2B 3a596f8f9ee56037bf567b6f2d3731b97299dba24e0c9d3562d38c15ddf58d352a918edaccb528f054cf288f87d6362d90d3450d4a5b968e9c8dfe05f54d89fe SHA512 32189a10c4d8cf00c23cda455f9e4353deb2175189d85f9b3aab1c4375a02a491ec2de89815725ebbcaea86c2c7ab274b89ee2583ffd8bf0dc32d4fc2d8f7507
DIST openjpeg-data_20201130.tar.gz 497969983 BLAKE2B 35ff1ee234e3bbf47a822151c97cdf2764f864094973fa60adc7962f8065b38318b0cc41338b5ba3fffd9bb00eac3eaf4153ecc398abd49a8047168414c1c85b SHA512 4c367c8262fe894f90a1e63fb59d87e974ae0d750d3cee89adfe4d765040f0a2049b491a17a34a5b3ba79e183a508c9d592376fe3c112df56c311bf3212f0c31
diff --git a/media-libs/openjpeg/files/openjpeg-2.3.1-CVE-2020-6851.patch b/media-libs/openjpeg/files/openjpeg-2.3.1-CVE-2020-6851.patch
deleted file mode 100644
index 9a70291f50e..00000000000
--- a/media-libs/openjpeg/files/openjpeg-2.3.1-CVE-2020-6851.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 024b8407392cb0b82b04b58ed256094ed5799e04 Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Sat, 11 Jan 2020 01:51:19 +0100
-Subject: [PATCH] opj_j2k_update_image_dimensions(): reject images whose
- coordinates are beyond INT_MAX (fixes #1228)
-
----
- src/lib/openjp2/j2k.c | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/src/lib/openjp2/j2k.c b/src/lib/openjp2/j2k.c
-index 14f6ff41a..922550eb1 100644
---- a/src/lib/openjp2/j2k.c
-+++ b/src/lib/openjp2/j2k.c
-@@ -9221,6 +9221,14 @@ static OPJ_BOOL opj_j2k_update_image_dimensions(opj_image_t* p_image,
- l_img_comp = p_image->comps;
- for (it_comp = 0; it_comp < p_image->numcomps; ++it_comp) {
- OPJ_INT32 l_h, l_w;
-+ if (p_image->x0 > (OPJ_UINT32)INT_MAX ||
-+ p_image->y0 > (OPJ_UINT32)INT_MAX ||
-+ p_image->x1 > (OPJ_UINT32)INT_MAX ||
-+ p_image->y1 > (OPJ_UINT32)INT_MAX) {
-+ opj_event_msg(p_manager, EVT_ERROR,
-+ "Image coordinates above INT_MAX are not supported\n");
-+ return OPJ_FALSE;
-+ }
-
- l_img_comp->x0 = (OPJ_UINT32)opj_int_ceildiv((OPJ_INT32)p_image->x0,
- (OPJ_INT32)l_img_comp->dx);
diff --git a/media-libs/openjpeg/files/openjpeg-2.3.1-CVE-2020-8112.patch b/media-libs/openjpeg/files/openjpeg-2.3.1-CVE-2020-8112.patch
deleted file mode 100644
index 95cb8095f56..00000000000
--- a/media-libs/openjpeg/files/openjpeg-2.3.1-CVE-2020-8112.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 05f9b91e60debda0e83977e5e63b2e66486f7074 Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Thu, 30 Jan 2020 00:59:57 +0100
-Subject: [PATCH] opj_tcd_init_tile(): avoid integer overflow
-
-That could lead to later assertion failures.
-
-Fixes #1231 / CVE-2020-8112
----
- src/lib/openjp2/tcd.c | 20 ++++++++++++++++++--
- 1 file changed, 18 insertions(+), 2 deletions(-)
-
-diff --git a/src/lib/openjp2/tcd.c b/src/lib/openjp2/tcd.c
-index deecc4dff..aa419030a 100644
---- a/src/lib/openjp2/tcd.c
-+++ b/src/lib/openjp2/tcd.c
-@@ -905,8 +905,24 @@ static INLINE OPJ_BOOL opj_tcd_init_tile(opj_tcd_t *p_tcd, OPJ_UINT32 p_tile_no,
- /* p. 64, B.6, ISO/IEC FDIS15444-1 : 2000 (18 august 2000) */
- l_tl_prc_x_start = opj_int_floordivpow2(l_res->x0, (OPJ_INT32)l_pdx) << l_pdx;
- l_tl_prc_y_start = opj_int_floordivpow2(l_res->y0, (OPJ_INT32)l_pdy) << l_pdy;
-- l_br_prc_x_end = opj_int_ceildivpow2(l_res->x1, (OPJ_INT32)l_pdx) << l_pdx;
-- l_br_prc_y_end = opj_int_ceildivpow2(l_res->y1, (OPJ_INT32)l_pdy) << l_pdy;
-+ {
-+ OPJ_UINT32 tmp = ((OPJ_UINT32)opj_int_ceildivpow2(l_res->x1,
-+ (OPJ_INT32)l_pdx)) << l_pdx;
-+ if (tmp > (OPJ_UINT32)INT_MAX) {
-+ opj_event_msg(manager, EVT_ERROR, "Integer overflow\n");
-+ return OPJ_FALSE;
-+ }
-+ l_br_prc_x_end = (OPJ_INT32)tmp;
-+ }
-+ {
-+ OPJ_UINT32 tmp = ((OPJ_UINT32)opj_int_ceildivpow2(l_res->y1,
-+ (OPJ_INT32)l_pdy)) << l_pdy;
-+ if (tmp > (OPJ_UINT32)INT_MAX) {
-+ opj_event_msg(manager, EVT_ERROR, "Integer overflow\n");
-+ return OPJ_FALSE;
-+ }
-+ l_br_prc_y_end = (OPJ_INT32)tmp;
-+ }
- /*fprintf(stderr, "\t\t\tprc_x_start=%d, prc_y_start=%d, br_prc_x_end=%d, br_prc_y_end=%d \n", l_tl_prc_x_start, l_tl_prc_y_start, l_br_prc_x_end ,l_br_prc_y_end );*/
-
- l_res->pw = (l_res->x0 == l_res->x1) ? 0U : (OPJ_UINT32)((
diff --git a/media-libs/openjpeg/files/openjpeg-2.3.1-gnuinstalldirs.patch b/media-libs/openjpeg/files/openjpeg-2.3.1-gnuinstalldirs.patch
deleted file mode 100644
index 7eb393b8922..00000000000
--- a/media-libs/openjpeg/files/openjpeg-2.3.1-gnuinstalldirs.patch
+++ /dev/null
@@ -1,495 +0,0 @@
-From fecc8e9e23f78de94c41bc641b3e5b9e9a84560b Mon Sep 17 00:00:00 2001
-From: Andreas Sturmlechner <asturm@gentoo.org>
-Date: Thu, 11 Apr 2019 13:10:57 +0200
-Subject: [PATCH] Use GNUInstallDirs for standard installation directories
-
-Raises minimum cmake version by a little.
----
- CMakeLists.txt | 61 +++++-------------------
- cmake/OpenJPEGConfig.cmake.in | 2 +-
- doc/CMakeLists.txt | 2 +-
- src/bin/jp2/CMakeLists.txt | 4 +-
- src/bin/jp3d/CMakeLists.txt | 2 +-
- src/bin/jpip/CMakeLists.txt | 10 ++--
- src/bin/jpwl/CMakeLists.txt | 2 +-
- src/bin/mj2/CMakeLists.txt | 2 +-
- src/lib/openjp2/CMakeLists.txt | 12 ++---
- src/lib/openjp2/libopenjp2.pc.cmake.in | 10 ++--
- src/lib/openjp3d/CMakeLists.txt | 4 +-
- src/lib/openjp3d/libopenjp3d.pc.cmake.in | 10 ++--
- src/lib/openjpip/CMakeLists.txt | 8 ++--
- src/lib/openjpip/libopenjpip.pc.cmake.in | 10 ++--
- src/lib/openjpwl/CMakeLists.txt | 6 +--
- src/lib/openjpwl/libopenjpwl.pc.cmake.in | 10 ++--
- src/lib/openmj2/CMakeLists.txt | 4 +-
- wrapping/java/openjp2/CMakeLists.txt | 2 +-
- 18 files changed, 61 insertions(+), 100 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 3ea2424a..1f70226a 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -7,7 +7,7 @@
- # For this purpose you can define a CMake var: OPENJPEG_NAMESPACE to whatever you like
- # e.g.:
- # set(OPENJPEG_NAMESPACE "GDCMOPENJPEG")
--cmake_minimum_required(VERSION 2.8.2)
-+cmake_minimum_required(VERSION 2.8.5)
-
- if(COMMAND CMAKE_POLICY)
- cmake_policy(SET CMP0003 NEW)
-@@ -103,59 +103,28 @@ endif()
-
- # --------------------------------------------------------------------------
- # Install directories
-+include(GNUInstallDirs)
-+
- # Build DOCUMENTATION (not in ALL target and only if Doxygen is found)
- option(BUILD_DOC "Build the HTML documentation (with doxygen if available)." OFF)
-
- string(TOLOWER ${PROJECT_NAME} projectname)
- set(OPENJPEG_INSTALL_SUBDIR "${projectname}-${OPENJPEG_VERSION_MAJOR}.${OPENJPEG_VERSION_MINOR}")
-
--if(NOT OPENJPEG_INSTALL_BIN_DIR)
-- set(OPENJPEG_INSTALL_BIN_DIR "bin")
--endif()
--
--if(NOT OPENJPEG_INSTALL_LIB_DIR)
-- set(OPENJPEG_INSTALL_LIB_DIR "lib")
--endif()
--
--if(NOT OPENJPEG_INSTALL_SHARE_DIR)
-- set(OPENJPEG_INSTALL_SHARE_DIR "share")
--endif()
--
--if(NOT OPENJPEG_INSTALL_DATA_DIR)
-- set(OPENJPEG_INSTALL_DATA_DIR "${OPENJPEG_INSTALL_SHARE_DIR}/${OPENJPEG_INSTALL_SUBDIR}")
--endif()
--
--if(NOT OPENJPEG_INSTALL_INCLUDE_DIR)
-- set(OPENJPEG_INSTALL_INCLUDE_DIR "include/${OPENJPEG_INSTALL_SUBDIR}")
--endif()
--
--if(BUILD_DOC)
--if(NOT OPENJPEG_INSTALL_MAN_DIR)
-- set(OPENJPEG_INSTALL_MAN_DIR "share/man/")
--endif()
--
--if(NOT OPENJPEG_INSTALL_DOC_DIR)
-- set(OPENJPEG_INSTALL_DOC_DIR "share/doc/${OPENJPEG_INSTALL_SUBDIR}")
--endif()
--endif()
--
- if(NOT OPENJPEG_INSTALL_JNI_DIR)
- if(WIN32)
-- set(OPENJPEG_INSTALL_JNI_DIR ${OPENJPEG_INSTALL_BIN_DIR})
-+ set(OPENJPEG_INSTALL_JNI_DIR ${CMAKE_INSTALL_BINDIR})
- else()
-- set(OPENJPEG_INSTALL_JNI_DIR ${OPENJPEG_INSTALL_LIB_DIR})
-+ set(OPENJPEG_INSTALL_JNI_DIR ${CMAKE_INSTALL_LIBDIR})
- endif()
- endif()
-
- if(NOT OPENJPEG_INSTALL_PACKAGE_DIR)
-- # We could install *.cmake files in share/ however those files contains
-- # hardcoded path to libraries on a multi-arch system (fedora/debian) those
-- # path will be different (lib/i386-linux-gnu vs lib/x86_64-linux-gnu)
-- set(OPENJPEG_INSTALL_PACKAGE_DIR "${OPENJPEG_INSTALL_LIB_DIR}/${OPENJPEG_INSTALL_SUBDIR}")
-+ set(OPENJPEG_INSTALL_PACKAGE_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/${OPENJPEG_INSTALL_SUBDIR}")
- endif()
-
- if (APPLE)
-- list(APPEND OPENJPEG_LIBRARY_PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${OPENJPEG_INSTALL_LIB_DIR}")
-+ list(APPEND OPENJPEG_LIBRARY_PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_FULL_LIBDIR}")
- option(OPJ_USE_DSYMUTIL "Call dsymutil on binaries after build." OFF)
- endif()
-
-@@ -339,14 +308,6 @@ install( FILES ${OPENJPEG_BINARY_DIR}/OpenJPEGConfig.cmake
- )
-
- #-----------------------------------------------------------------------------
--# install CHANGES and LICENSE
--if(BUILD_DOC)
--if(EXISTS ${OPENJPEG_SOURCE_DIR}/CHANGES)
-- install(FILES CHANGES DESTINATION ${OPENJPEG_INSTALL_DOC_DIR})
--endif()
--
--install(FILES LICENSE DESTINATION ${OPENJPEG_INSTALL_DOC_DIR})
--endif()
-
- include (cmake/OpenJPEGCPack.cmake)
-
-@@ -363,14 +324,14 @@ if(BUILD_PKGCONFIG_FILES)
- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/lib/openjp2/libopenjp2.pc.cmake.in
- ${CMAKE_CURRENT_BINARY_DIR}/libopenjp2.pc @ONLY)
- install( FILES ${CMAKE_CURRENT_BINARY_DIR}/libopenjp2.pc DESTINATION
-- ${OPENJPEG_INSTALL_LIB_DIR}/pkgconfig )
-+ ${CMAKE_INSTALL_LIBDIR}/pkgconfig )
- #
- if(BUILD_JPWL)
- # install in lib and not share (see multi-arch note above)
- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/lib/openjpwl/libopenjpwl.pc.cmake.in
- ${CMAKE_CURRENT_BINARY_DIR}/libopenjpwl.pc @ONLY)
- install( FILES ${CMAKE_CURRENT_BINARY_DIR}/libopenjpwl.pc DESTINATION
-- ${OPENJPEG_INSTALL_LIB_DIR}/pkgconfig )
-+ ${CMAKE_INSTALL_LIBDIR}/pkgconfig )
- endif()
- #
- if(BUILD_JPIP)
-@@ -378,7 +339,7 @@ if(BUILD_PKGCONFIG_FILES)
- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/lib/openjpip/libopenjpip.pc.cmake.in
- ${CMAKE_CURRENT_BINARY_DIR}/libopenjpip.pc @ONLY)
- install( FILES ${CMAKE_CURRENT_BINARY_DIR}/libopenjpip.pc DESTINATION
-- ${OPENJPEG_INSTALL_LIB_DIR}/pkgconfig )
-+ ${CMAKE_INSTALL_LIBDIR}/pkgconfig )
- endif()
- #
- if(BUILD_JP3D)
-@@ -386,7 +347,7 @@ if(BUILD_PKGCONFIG_FILES)
- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/lib/openjp3d/libopenjp3d.pc.cmake.in
- ${CMAKE_CURRENT_BINARY_DIR}/libopenjp3d.pc @ONLY)
- install( FILES ${CMAKE_CURRENT_BINARY_DIR}/libopenjp3d.pc DESTINATION
-- ${OPENJPEG_INSTALL_LIB_DIR}/pkgconfig )
-+ ${CMAKE_INSTALL_LIBDIR}/pkgconfig )
- endif()
- endif()
-
-diff --git a/cmake/OpenJPEGConfig.cmake.in b/cmake/OpenJPEGConfig.cmake.in
-index 2925108a..702e2790 100644
---- a/cmake/OpenJPEGConfig.cmake.in
-+++ b/cmake/OpenJPEGConfig.cmake.in
-@@ -29,7 +29,7 @@ if(EXISTS ${SELF_DIR}/OpenJPEGTargets.cmake)
-
- # We find a relative path from the PKG directory to header files.
- set(PKG_DIR "@CMAKE_INSTALL_PREFIX@/@OPENJPEG_INSTALL_PACKAGE_DIR@")
-- set(INC_DIR "@CMAKE_INSTALL_PREFIX@/@OPENJPEG_INSTALL_INCLUDE_DIR@")
-+ set(INC_DIR "@CMAKE_INSTALL_FULL_INCLUDEDIR@/@OPENJPEG_INSTALL_SUBDIR@")
- file(RELATIVE_PATH PKG_TO_INC_RPATH "${PKG_DIR}" "${INC_DIR}")
-
- get_filename_component(OPENJPEG_INCLUDE_DIRS "${SELF_DIR}/${PKG_TO_INC_RPATH}" ABSOLUTE)
-diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
-index d4f3ddbe..ed5cb44c 100644
---- a/doc/CMakeLists.txt
-+++ b/doc/CMakeLists.txt
-@@ -44,7 +44,7 @@ if(DOXYGEN_FOUND)
-
- # install HTML documentation (install png files too):
- install(DIRECTORY ${CMAKE_BINARY_DIR}/doc/html
-- DESTINATION share/doc
-+ DESTINATION ${CMAKE_INSTALL_DOCDIR}
- PATTERN ".svn" EXCLUDE
- )
- else()
-diff --git a/src/bin/jp2/CMakeLists.txt b/src/bin/jp2/CMakeLists.txt
-index 4d4bd952..29b4dd20 100644
---- a/src/bin/jp2/CMakeLists.txt
-+++ b/src/bin/jp2/CMakeLists.txt
-@@ -67,7 +67,7 @@ foreach(exe opj_decompress opj_compress opj_dump)
- # Install exe
- install(TARGETS ${exe}
- EXPORT OpenJPEGTargets
-- DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
-+ DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
- )
- if(OPJ_USE_DSYMUTIL)
- add_custom_command(TARGET ${exe} POST_BUILD
-@@ -83,6 +83,6 @@ install(
- FILES ${OPENJPEG_SOURCE_DIR}/doc/man/man1/opj_compress.1
- ${OPENJPEG_SOURCE_DIR}/doc/man/man1/opj_decompress.1
- ${OPENJPEG_SOURCE_DIR}/doc/man/man1/opj_dump.1
-- DESTINATION ${OPENJPEG_INSTALL_MAN_DIR}/man1)
-+ DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
- #
- endif()
-diff --git a/src/bin/jp3d/CMakeLists.txt b/src/bin/jp3d/CMakeLists.txt
-index 3cac1a8f..ed62b4f3 100644
---- a/src/bin/jp3d/CMakeLists.txt
-+++ b/src/bin/jp3d/CMakeLists.txt
-@@ -36,6 +36,6 @@ foreach(exe opj_jp3d_compress opj_jp3d_decompress)
- # Install exe
- install(TARGETS ${exe}
- EXPORT OpenJP3DTargets
-- DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
-+ DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
- )
- endforeach()
-diff --git a/src/bin/jpip/CMakeLists.txt b/src/bin/jpip/CMakeLists.txt
-index 301d885b..ddd867dc 100644
---- a/src/bin/jpip/CMakeLists.txt
-+++ b/src/bin/jpip/CMakeLists.txt
-@@ -13,7 +13,7 @@ add_executable(opj_jpip_addxml opj_jpip_addxml.c)
- # Install exe
- install(TARGETS opj_jpip_addxml
- EXPORT OpenJPEGTargets
-- DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
-+ DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
- )
-
- if(BUILD_JPIP_SERVER)
-@@ -38,7 +38,7 @@ if(BUILD_JPIP_SERVER)
- # Install exe
- install(TARGETS opj_server
- EXPORT OpenJPEGTargets
-- DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
-+ DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
- )
- endif()
-
-@@ -52,7 +52,7 @@ add_executable(${exe} ${exe}.c)
- target_link_libraries(${exe} openjpip)
- install(TARGETS ${exe}
- EXPORT OpenJPEGTargets
-- DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
-+ DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
- )
- endforeach()
-
-@@ -123,7 +123,7 @@ if(Java_Development_FOUND AND Java_JAVAC_EXECUTABLE)
- )
-
- install(FILES ${LIBRARY_OUTPUT_PATH}/opj_jpip_viewer.jar
-- DESTINATION ${OPENJPEG_INSTALL_SHARE_DIR} COMPONENT JavaModule
-+ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR} COMPONENT JavaModule
- )
- else()
- # opj_viewer (simple, no xerces)
-@@ -153,7 +153,7 @@ if(Java_Development_FOUND AND Java_JAVAC_EXECUTABLE)
- )
-
- install(FILES ${LIBRARY_OUTPUT_PATH}/opj_jpip_viewer.jar
-- DESTINATION ${OPENJPEG_INSTALL_SHARE_DIR} COMPONENT JavaModule
-+ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR} COMPONENT JavaModule
- )
- endif()
- else()
-diff --git a/src/bin/jpwl/CMakeLists.txt b/src/bin/jpwl/CMakeLists.txt
-index 5df225de..8a798e61 100644
---- a/src/bin/jpwl/CMakeLists.txt
-+++ b/src/bin/jpwl/CMakeLists.txt
-@@ -57,6 +57,6 @@ foreach(exe decompress compress)
- endif()
-
- install(TARGETS ${jpwl_exe}
-- DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
-+ DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
- )
- endforeach()
-diff --git a/src/bin/mj2/CMakeLists.txt b/src/bin/mj2/CMakeLists.txt
-index 5d3e288b..6669c502 100644
---- a/src/bin/mj2/CMakeLists.txt
-+++ b/src/bin/mj2/CMakeLists.txt
-@@ -43,5 +43,5 @@ foreach(exe
- endif()
-
- install(TARGETS ${exe}
-- DESTINATION ${OPENJPEG_INSTALL_BIN_DIR})
-+ DESTINATION ${CMAKE_INSTALL_BINDIR})
- endforeach()
-diff --git a/src/lib/openjp2/CMakeLists.txt b/src/lib/openjp2/CMakeLists.txt
-index b2714858..9cbc4c3f 100644
---- a/src/lib/openjp2/CMakeLists.txt
-+++ b/src/lib/openjp2/CMakeLists.txt
-@@ -2,7 +2,7 @@ include_regular_expression("^.*$")
-
- #
- install( FILES ${CMAKE_CURRENT_BINARY_DIR}/opj_config.h
-- DESTINATION ${OPENJPEG_INSTALL_INCLUDE_DIR} COMPONENT Headers)
-+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${OPENJPEG_INSTALL_SUBDIR} COMPONENT Headers)
-
- include_directories(
- ${${OPENJPEG_NAMESPACE}_BINARY_DIR}/src/lib/openjp2 # opj_config.h and opj_config_private.h
-@@ -114,21 +114,21 @@ endif()
- # Install library
- install(TARGETS ${INSTALL_LIBS}
- EXPORT OpenJPEGTargets
-- RUNTIME DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
-- LIBRARY DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
-- ARCHIVE DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
-+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
-+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
-+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
- )
-
- # Install includes files
- install(FILES openjpeg.h opj_stdint.h
-- DESTINATION ${OPENJPEG_INSTALL_INCLUDE_DIR} COMPONENT Headers
-+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${OPENJPEG_INSTALL_SUBDIR} COMPONENT Headers
- )
-
- if(BUILD_DOC)
- # install man page of the library
- install(
- FILES ${OPENJPEG_SOURCE_DIR}/doc/man/man3/libopenjp2.3
-- DESTINATION ${OPENJPEG_INSTALL_MAN_DIR}/man3)
-+ DESTINATION ${CMAKE_INSTALL_MANDIR}/man3)
- endif()
-
- if(BUILD_LUTS_GENERATOR)
-diff --git a/src/lib/openjp2/libopenjp2.pc.cmake.in b/src/lib/openjp2/libopenjp2.pc.cmake.in
-index 62159b00..ebad9578 100644
---- a/src/lib/openjp2/libopenjp2.pc.cmake.in
-+++ b/src/lib/openjp2/libopenjp2.pc.cmake.in
-@@ -1,9 +1,9 @@
- prefix=@CMAKE_INSTALL_PREFIX@
--bindir=${prefix}/@OPENJPEG_INSTALL_BIN_DIR@
--mandir=${prefix}/@OPENJPEG_INSTALL_MAN_DIR@
--docdir=${prefix}/@OPENJPEG_INSTALL_DOC_DIR@
--libdir=${prefix}/@OPENJPEG_INSTALL_LIB_DIR@
--includedir=${prefix}/@OPENJPEG_INSTALL_INCLUDE_DIR@
-+bindir=${prefix}/@CMAKE_INSTALL_BINDIR@
-+mandir=${prefix}/@CMAKE_INSTALL_MANDIR@
-+docdir=${prefix}/@CMAKE_INSTALL_DOCDIR@
-+libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
-+includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@OPENJPEG_INSTALL_SUBDIR@
-
- Name: openjp2
- Description: JPEG2000 library (Part 1 and 2)
-diff --git a/src/lib/openjp3d/CMakeLists.txt b/src/lib/openjp3d/CMakeLists.txt
-index b0469af1..6e251984 100644
---- a/src/lib/openjp3d/CMakeLists.txt
-+++ b/src/lib/openjp3d/CMakeLists.txt
-@@ -34,12 +34,12 @@ endif()
- # Install library
- install(TARGETS ${OPENJP3D_LIBRARY_NAME}
- EXPORT OpenJP3DTargets
-- DESTINATION ${OPENJPEG_INSTALL_LIB_DIR}
-+ DESTINATION ${CMAKE_INSTALL_LIBDIR}
- COMPONENT Libraries
- )
-
- # Install includes files
- install(FILES openjp3d.h
-- DESTINATION ${OPENJPEG_INSTALL_INCLUDE_DIR}
-+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${OPENJPEG_INSTALL_SUBDIR}
- COMPONENT Headers
- )
-diff --git a/src/lib/openjp3d/libopenjp3d.pc.cmake.in b/src/lib/openjp3d/libopenjp3d.pc.cmake.in
-index e9b6c404..866a0174 100644
---- a/src/lib/openjp3d/libopenjp3d.pc.cmake.in
-+++ b/src/lib/openjp3d/libopenjp3d.pc.cmake.in
-@@ -1,9 +1,9 @@
- prefix=@CMAKE_INSTALL_PREFIX@
--bindir=${prefix}/@OPENJPEG_INSTALL_BIN_DIR@
--mandir=${prefix}/@OPENJPEG_INSTALL_MAN_DIR@
--docdir=${prefix}/@OPENJPEG_INSTALL_DOC_DIR@
--libdir=${prefix}/@OPENJPEG_INSTALL_LIB_DIR@
--includedir=${prefix}/@OPENJPEG_INSTALL_INCLUDE_DIR@
-+bindir=${prefix}/@CMAKE_INSTALL_BINDIR@
-+mandir=${prefix}/@CMAKE_INSTALL_MANDIR@
-+docdir=${prefix}/@CMAKE_INSTALL_DOCDIR@
-+libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
-+includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@OPENJPEG_INSTALL_SUBDIR@
-
- Name: openjp3d
- Description: JPEG2000 Extensions for three-dimensional data (Part 10)
-diff --git a/src/lib/openjpip/CMakeLists.txt b/src/lib/openjpip/CMakeLists.txt
-index b3cb8ce8..aace36d4 100644
---- a/src/lib/openjpip/CMakeLists.txt
-+++ b/src/lib/openjpip/CMakeLists.txt
-@@ -74,9 +74,9 @@ endif()
- # Install library
- install(TARGETS openjpip
- EXPORT OpenJPEGTargets
-- RUNTIME DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
-- LIBRARY DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
-- ARCHIVE DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
-+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
-+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
-+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
- )
-
- if(BUILD_JPIP_SERVER)
-@@ -86,6 +86,6 @@ if(BUILD_JPIP_SERVER)
- PROPERTIES COMPILE_FLAGS "-DSERVER")
- install(TARGETS openjpip_server
- EXPORT OpenJPEGTargets
-- DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
-+ DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
- )
- endif()
-diff --git a/src/lib/openjpip/libopenjpip.pc.cmake.in b/src/lib/openjpip/libopenjpip.pc.cmake.in
-index 7c3f29af..4cfa6fce 100644
---- a/src/lib/openjpip/libopenjpip.pc.cmake.in
-+++ b/src/lib/openjpip/libopenjpip.pc.cmake.in
-@@ -1,9 +1,9 @@
- prefix=@CMAKE_INSTALL_PREFIX@
--bindir=${prefix}/@OPENJPEG_INSTALL_BIN_DIR@
--mandir=${prefix}/@OPENJPEG_INSTALL_MAN_DIR@
--docdir=${prefix}/@OPENJPEG_INSTALL_DOC_DIR@
--libdir=${prefix}/@OPENJPEG_INSTALL_LIB_DIR@
--includedir=${prefix}/@OPENJPEG_INSTALL_INCLUDE_DIR@
-+bindir=${prefix}/@CMAKE_INSTALL_BINDIR@
-+mandir=${prefix}/@CMAKE_INSTALL_MANDIR@
-+docdir=${prefix}/@CMAKE_INSTALL_DOCDIR@
-+libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
-+includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@OPENJPEG_INSTALL_SUBDIR@
-
- Name: openjpip
- Description: JPEG2000 Interactivity tools, APIs and protocols (Part 9)
-diff --git a/src/lib/openjpwl/CMakeLists.txt b/src/lib/openjpwl/CMakeLists.txt
-index 1b33adbe..bb90c87c 100644
---- a/src/lib/openjpwl/CMakeLists.txt
-+++ b/src/lib/openjpwl/CMakeLists.txt
-@@ -58,7 +58,7 @@ endif()
- # Install library
- install(TARGETS openjpwl
- EXPORT OpenJPEGTargets
-- RUNTIME DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
-- LIBRARY DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
-- ARCHIVE DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
-+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
-+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
-+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
- )
-diff --git a/src/lib/openjpwl/libopenjpwl.pc.cmake.in b/src/lib/openjpwl/libopenjpwl.pc.cmake.in
-index b1244197..8acc1457 100644
---- a/src/lib/openjpwl/libopenjpwl.pc.cmake.in
-+++ b/src/lib/openjpwl/libopenjpwl.pc.cmake.in
-@@ -1,9 +1,9 @@
- prefix=@CMAKE_INSTALL_PREFIX@
--bindir=${prefix}/@OPENJPEG_INSTALL_BIN_DIR@
--mandir=${prefix}/@OPENJPEG_INSTALL_MAN_DIR@
--docdir=${prefix}/@OPENJPEG_INSTALL_DOC_DIR@
--libdir=${prefix}/@OPENJPEG_INSTALL_LIB_DIR@
--includedir=${prefix}/@OPENJPEG_INSTALL_INCLUDE_DIR@
-+bindir=${prefix}/@CMAKE_INSTALL_BINDIR@
-+mandir=${prefix}/@CMAKE_INSTALL_MANDIR@
-+docdir=${prefix}/@CMAKE_INSTALL_DOCDIR@
-+libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
-+includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@OPENJPEG_INSTALL_SUBDIR@
-
- Name: openjpwl
- Description: JPEG2000 Wireless library (Part 11)
-diff --git a/src/lib/openmj2/CMakeLists.txt b/src/lib/openmj2/CMakeLists.txt
-index 25294b20..dced53f6 100644
---- a/src/lib/openmj2/CMakeLists.txt
-+++ b/src/lib/openmj2/CMakeLists.txt
-@@ -53,12 +53,12 @@ endif()
- # Install library
- install(TARGETS ${OPENMJ2_LIBRARY_NAME}
- EXPORT OpenMJ2Targets
-- DESTINATION ${OPENJPEG_INSTALL_LIB_DIR}
-+ DESTINATION ${CMAKE_INSTALL_LIBDIR}
- COMPONENT Libraries
- )
-
- # Install includes files
- #install(FILES mj2.h
--# DESTINATION ${OPENJPEG_INSTALL_INCLUDE_DIR}/${subdir}
-+# DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${OPENJPEG_INSTALL_SUBDIR}
- # COMPONENT Headers
- #)
-diff --git a/wrapping/java/openjp2/CMakeLists.txt b/wrapping/java/openjp2/CMakeLists.txt
-index eb3da0ed..4504da5f 100644
---- a/wrapping/java/openjp2/CMakeLists.txt
-+++ b/wrapping/java/openjp2/CMakeLists.txt
-@@ -69,5 +69,5 @@ add_custom_target(OpenJPEGJavaJar ALL
- )
-
- install(FILES ${LIBRARY_OUTPUT_PATH}/openjpeg.jar
-- DESTINATION ${OPENJPEG_INSTALL_SHARE_DIR} COMPONENT JavaModule
-+ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR} COMPONENT JavaModule
- )
---
-2.21.0
-
diff --git a/media-libs/openjpeg/files/openjpeg-2.3.1-libtiff-4.1-compat.patch b/media-libs/openjpeg/files/openjpeg-2.3.1-libtiff-4.1-compat.patch
deleted file mode 100644
index 53985b19093..00000000000
--- a/media-libs/openjpeg/files/openjpeg-2.3.1-libtiff-4.1-compat.patch
+++ /dev/null
@@ -1,210 +0,0 @@
-From b5cb419faff300fdbc0b4e98dab5c9010db6f39d Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Fri, 7 Feb 2020 21:53:10 +0100
-Subject: [PATCH] tests: add alternate checksums for libtiff 4.1
-
-Fixes #1233
-
-libtiff 4.1 slightly modifies the way it generates files. So
-add the new expected md5sum.
-
-Not super elegant solution admitedly.
----
- tests/nonregression/checkmd5refs.cmake | 5 ++
- tests/nonregression/md5refs.txt | 86 +++++++++++++++++++++++--
- tests/nonregression/test_suite.ctest.in | 16 ++---
- 3 files changed, 93 insertions(+), 14 deletions(-)
-
-diff --git a/tests/nonregression/checkmd5refs.cmake b/tests/nonregression/checkmd5refs.cmake
-index 75afbed05..76e2f245f 100644
---- a/tests/nonregression/checkmd5refs.cmake
-+++ b/tests/nonregression/checkmd5refs.cmake
-@@ -46,10 +46,15 @@ foreach(pgxfullpath ${globfiles})
-
- string(REGEX MATCH "[0-9a-f]+ ${pgxfile}" output_var "${variable}")
-
-+ # Search for variant md5sum for libtiff >= 4.1
-+ string(REGEX MATCH "libtiff_4_1:[0-9a-f]+ ${pgxfile}" alternate_output_var "${variable}")
-+
- set(output "${output} ${pgxfile}")
-
- if("${output_var}" STREQUAL "${output}")
- message(STATUS "equal: [${output_var}] vs [${output}]")
-+ elseif("${alternate_output_var}" STREQUAL "libtiff_4_1:${output}")
-+ message(STATUS "equal: [${alternate_output_var}] vs [libtiff_4_1:${output}]")
- else()
- message(SEND_ERROR "not equal: [${output_var}] vs [${output}]")
- endif()
-diff --git a/tests/nonregression/md5refs.txt b/tests/nonregression/md5refs.txt
-index a33e82a12..95d3d74cb 100644
---- a/tests/nonregression/md5refs.txt
-+++ b/tests/nonregression/md5refs.txt
-@@ -180,6 +180,7 @@ dacaf60e4c430916a8c2a9ebec32e71c issue458.jp2_3.pgx
- d33fb5dbddb9b9b4438eb51fa27445a3 issue495.jp2_0.pgx
- 27db8c35e12a5d5eb94d403d2aae2909 issue495.jp2_1.pgx
- 97da625d2f2d0b75bf891d8083ce8bfb issue495.jp2_2.pgx
-+
- 86729c5f2b74b2dfd42cb0d8e47aef79 a1_mono_tif-1.tif
- fa9b7b896536b25a7a1d8eeeacb59141 a1_mono_tif-10.tif
- e1f194f69d1c58ce8bed62cd4f1d5b6a a1_mono_tif-11.tif
-@@ -196,6 +197,24 @@ de53251a33356e206a793fbdbaf90db2 a1_mono_tif-13.tif
- e164a6c0219737ee05a3d55d6e3a3104 a1_mono_tif-7.tif
- c3ebfcf478b1c4fc786748813f2b5d53 a1_mono_tif-8.tif
- 67adb084f1fe234f240a1d0b2698507e a1_mono_tif-9.tif
-+
-+libtiff_4_1:fc19057ff2d65c24daf9c9e25e34a48a a1_mono_tif-1.tif
-+libtiff_4_1:66246b6bbc83c06962f034235acb9924 a1_mono_tif-10.tif
-+libtiff_4_1:ce1e07bdafe83a84a5df87fce2ffde6a a1_mono_tif-11.tif
-+libtiff_4_1:614f1ab59ca8473f5f8b1772b7a19d24 a1_mono_tif-12.tif
-+libtiff_4_1:941bdcdf9103a22f7b6f66aaca3276d1 a1_mono_tif-13.tif
-+libtiff_4_1:38df45296861df2b44879e8a0787d43c a1_mono_tif-14.tif
-+libtiff_4_1:387575ff38bed3d177776891e1b2804e a1_mono_tif-15.tif
-+libtiff_4_1:ee4838fbd88ddcb73ef26df523a3bb5d a1_mono_tif-16.tif
-+libtiff_4_1:6de7e8cbd95e2c465b587f2273daf9dc a1_mono_tif-2.tif
-+libtiff_4_1:e1e026d7ed26e8f3334cf25a8884abbd a1_mono_tif-3.tif
-+libtiff_4_1:c120fac03d1b3756a2deb9b92ba519d4 a1_mono_tif-4.tif
-+libtiff_4_1:3a7b84ed9061e0b13996660fc2910e8a a1_mono_tif-5.tif
-+libtiff_4_1:7ac8316261d54f22e6c847fbac01542b a1_mono_tif-6.tif
-+libtiff_4_1:d714670f6746931c4e7defbfbe38b249 a1_mono_tif-7.tif
-+libtiff_4_1:b28f4b92be5e3481d44f50f2cd7626aa a1_mono_tif-8.tif
-+libtiff_4_1:2a12dcda3e9927384e7344c4ecabdcf1 a1_mono_tif-9.tif
-+
- 31650ec40241737634179fff6ad306f8 basn4a08_tif-1.tif
- abf884080bcfbf58c044a9d86bfa5e5d basn4a08_tif-10.tif
- b0d82c12aa2c9b3ecd96c6a5b5663a8c basn4a08_tif-11.tif
-@@ -212,6 +231,24 @@ fb5cf848d63c61dc485c87c9246ee9c7 basn4a08_tif-16.tif
- 18a59ac6036ee64e92af19b7e3cd3d64 basn4a08_tif-7.tif
- dc40cc1da6de28e7e973c8ba796ca189 basn4a08_tif-8.tif
- 824b776a5aa3459b77894b5f77621311 basn4a08_tif-9.tif
-+
-+libtiff_4_1:4c50df5b25e006041b05e8a6fb77c95e basn4a08_tif-1.tif
-+libtiff_4_1:68cc9a9bc5f95474744d06ea4efb2cf3 basn4a08_tif-10.tif
-+libtiff_4_1:f643c00bd0673c8f6092125e38759a35 basn4a08_tif-11.tif
-+libtiff_4_1:cfcefece2fb08a437876d85941cdaa27 basn4a08_tif-12.tif
-+libtiff_4_1:1c3850831691aa8b565e4cd0d13166f9 basn4a08_tif-13.tif
-+libtiff_4_1:06059e0429956946ecd3b1893ad39d18 basn4a08_tif-14.tif
-+libtiff_4_1:71557ba6728e6641ad289b1d142acade basn4a08_tif-15.tif
-+libtiff_4_1:150c663277b43d0331112f24d47fd34e basn4a08_tif-16.tif
-+libtiff_4_1:9b43011e7a19079c21d65318b4a1139b basn4a08_tif-2.tif
-+libtiff_4_1:125ca7b2e45fafa4e003f5adc9f11da8 basn4a08_tif-3.tif
-+libtiff_4_1:9fbc1a8f4d12c8152cde3e004cebd191 basn4a08_tif-4.tif
-+libtiff_4_1:51c6b54e9d8b53355c3f73ad813bdeef basn4a08_tif-5.tif
-+libtiff_4_1:604ac42b1a9e7a75d63e97ce40e43442 basn4a08_tif-6.tif
-+libtiff_4_1:360d1ce74faffa1a736d5f30c22976ed basn4a08_tif-7.tif
-+libtiff_4_1:2059aaa9e54c09f36d16107870c1546a basn4a08_tif-8.tif
-+libtiff_4_1:07496859507882401d66d70dcf392505 basn4a08_tif-9.tif
-+
- 59e32c45591fd3bb44fe99381a116ba1 basn6a08_tif-1.tif
- 630e6fb6deba0b3efd93b610561d607a basn6a08_tif-10.tif
- 5419fec92f0e0e5907d838dacf9712b4 basn6a08_tif-11.tif
-@@ -228,6 +265,24 @@ d60864a6a5c8a49a202d98ae6f5165c7 basn6a08_tif-6.tif
- 086fd12fec963995fe2e405dcef7e477 basn6a08_tif-7.tif
- c3e93f61125f82a9832d0b9440468034 basn6a08_tif-8.tif
- a9723dcc0732e74c9e8cd2bf93474a7d basn6a08_tif-9.tif
-+
-+libtiff_4_1:98f777ca80a132d8ab820d4533daa5b6 basn6a08_tif-1.tif
-+libtiff_4_1:9c5873a1fa5571aad9e73d36d5a4206a basn6a08_tif-10.tif
-+libtiff_4_1:c05dac7d4c19bc4b78cea426e5e52430 basn6a08_tif-11.tif
-+libtiff_4_1:0223432f61df2508d0195f696988ddeb basn6a08_tif-12.tif
-+libtiff_4_1:ccc64d14279063ed9daf371be62077f7 basn6a08_tif-13.tif
-+libtiff_4_1:ace0bab2c2fbb5f92a8214600df9159f basn6a08_tif-14.tif
-+libtiff_4_1:9b54bda92a09bcac9870fa02b428b7e6 basn6a08_tif-15.tif
-+libtiff_4_1:178665d070f54f2920521c4e1cb9d5d0 basn6a08_tif-16.tif
-+libtiff_4_1:c4b1e96d19429137cd8871833af2ea5a basn6a08_tif-2.tif
-+libtiff_4_1:44e8b5591740289d0ca52a3e19f19c22 basn6a08_tif-3.tif
-+libtiff_4_1:70b4f469dd29c8e99d3f0525301286b8 basn6a08_tif-4.tif
-+libtiff_4_1:bf7c35a2b05eecb406aab7959431a842 basn6a08_tif-5.tif
-+libtiff_4_1:7d2ecb1c35869ddbafd11b4896357b81 basn6a08_tif-6.tif
-+libtiff_4_1:2cd6ec32a0256806f46706c0ca564d9d basn6a08_tif-7.tif
-+libtiff_4_1:116b611b7a358bee2c4f2695732ec357 basn6a08_tif-8.tif
-+libtiff_4_1:ed9ca54d25fb5b0cd5339eedfa16cbea basn6a08_tif-9.tif
-+
- cfe04d15cf9d615fc36357dcb3b3956b p0_14_tif-1.tif
- 9ad87e7fddc77ac85e2e92509bee2365 p0_14_tif-10.tif
- f144e26d6d5aa24d98f0415f10751025 p0_14_tif-11.tif
-@@ -244,6 +299,24 @@ b6f71c941e3a5b8d2547792ccec58d54 p0_14_tif-4.tif
- 951c99efbd922d8f3feb015e9ef8e350 p0_14_tif-7.tif
- 6808377b760b4ef3559ba8b14ed9b91a p0_14_tif-8.tif
- 96aa7dafa873d0ce33f84bb1ff78fa9b p0_14_tif-9.tif
-+
-+libtiff_4_1:5f97d4bbab138f99b6b125e5a5bf96bd p0_14_tif-1.tif
-+libtiff_4_1:686c7a1561d73e53c000800ec0c5fa0a p0_14_tif-10.tif
-+libtiff_4_1:a8585d901cc1b7cbbda6e524ecb5db35 p0_14_tif-11.tif
-+libtiff_4_1:17b5497c9b8a0c68739c0beae90aa432 p0_14_tif-12.tif
-+libtiff_4_1:a024a04b96ccb13c81cd57a5ee6ad07a p0_14_tif-13.tif
-+libtiff_4_1:aabadca3f87437a32878fef7e265b23a p0_14_tif-14.tif
-+libtiff_4_1:5390a77296962268b73a793467092633 p0_14_tif-15.tif
-+libtiff_4_1:47dc7cc71832e5739c32794a713966c3 p0_14_tif-16.tif
-+libtiff_4_1:1a9247cd1fb26f5fffa870e8543f6d30 p0_14_tif-2.tif
-+libtiff_4_1:e4c0c9481d4032ea6b7e6a08a39e9030 p0_14_tif-3.tif
-+libtiff_4_1:c7d6ec9b235aaff146228875e69edbaa p0_14_tif-4.tif
-+libtiff_4_1:d3b8110b2284a09cfb7d5c4ffd451aff p0_14_tif-5.tif
-+libtiff_4_1:6189ee17c4a276f99302ac7e296b3daa p0_14_tif-6.tif
-+libtiff_4_1:b4a3b9b63681448abb7c460702de4df9 p0_14_tif-7.tif
-+libtiff_4_1:04deb4e9679e7971c2cd0449fcd255b7 p0_14_tif-8.tif
-+libtiff_4_1:254443e438ed6a5b0631d6188cc84789 p0_14_tif-9.tif
-+
- dd15b3d487d36a3682be0679300a4319 issue235.jp2_0.pgx
- b9cd6dc76b141fb1fec15f50c1f70e01 issue235.jp2_1.pgx
- 3edef2ae197ef30b08deda1b28825399 issue235.jp2_2.pgx
-@@ -288,6 +361,7 @@ fc2844a9f3c8e924e349180ba9e122dd p0_14_png-2.png
- 8d7685f1569d446787476c0a56c93750 dwt_interleave_h.gsr105.jp2_1.pgx
- ddfff2ce2df4a9102518c92a362e6d25 dwt_interleave_h.gsr105.jp2_2.pgx
- 63bf755af5a1f8a478d65079dc7c8964 issue205-tif.jp2.tif
-+libtiff_4_1:f9678a9e12d540f768ebebaee2af8f14 issue205-tif.jp2.tif
- b01ed87dbac424bc820b2ac590e4884e issue236-ESYCC-CDEF.jp2_0.pgx
- 2635cc00b1e18ef11adcba09e845d459 issue236-ESYCC-CDEF.jp2_1.pgx
- f9c95d0aec2f6e7b814fa1d09edcdbda issue236-ESYCC-CDEF.jp2_2.pgx
-@@ -310,11 +384,11 @@ d1bb7f93f4c0eb984b2e9c54e544b7e9 broken.jpc_1.pgx
- b704ad4c0cfefffd78c20a54f5541265 dwt_interleave_h.gsr105.jp2_d_1_1_33_33_0.pgx
- 9d7fe43cd7a50b7bbaf712926ee11980 dwt_interleave_h.gsr105.jp2_d_1_1_33_33_1.pgx
- 0960b580f991ff10f693b24aa41ad58b dwt_interleave_h.gsr105.jp2_d_1_1_33_33_2.pgx
--fa7382fd8b2e788b28b807e200dd95b9 file1.jp2-c0.tif
--ed79b7fe443955cdefba2b039ddc846a file1.jp2-c0_1_2.tif
--ac8f6ab3acc9c692ed7c41bd62a0e1e8 file1.jp2-c0-r1.tif
--fbfcf662b6f7549574b2885490fbcf12 file1.jp2-c0-d10_20_30_40.tif
--fa7382fd8b2e788b28b807e200dd95b9 file1.jp2-c0-t0.tif
--ac8f6ab3acc9c692ed7c41bd62a0e1e8 file1.jp2-c0-t0-r1.tif
-+6e23ded7d3ca0b1dd8405448e3ff931b file1.jp2-c0.png
-+5acabea0ef6d09d2c1f681773e886935 file1.jp2-c0_1_2.png
-+1150acbee2c1e33c57592c05c76e565a file1.jp2-c0-r1.png
-+1b8ab42d8ee4e28d2868c04a815fb569 file1.jp2-c0-d10_20_30_40.png
-+6e23ded7d3ca0b1dd8405448e3ff931b file1.jp2-c0-t0.png
-+1150acbee2c1e33c57592c05c76e565a file1.jp2-c0-t0-r1.png
- f31bcb01c771f829054cdb013575e86a issue1043.png
- 62bc654c830efddf1b23d6e208447dab tnsot_zero.png
-diff --git a/tests/nonregression/test_suite.ctest.in b/tests/nonregression/test_suite.ctest.in
-index c42bad162..bda0681f7 100644
---- a/tests/nonregression/test_suite.ctest.in
-+++ b/tests/nonregression/test_suite.ctest.in
-@@ -612,22 +612,22 @@ opj_decompress -i @INPUT_NR_PATH@/issue979.j2k -o @TEMP_PATH@/issue979.j2k.pgx
- opj_decompress -i @INPUT_NR_PATH@/dwt_interleave_h.gsr105.jp2 -o @TEMP_PATH@/dwt_interleave_h.gsr105.jp2_d_1_1_33_33.pgx -d 1,1,33,33
-
- # partial component decoding with opj_decode(): one component
--opj_decompress -i @INPUT_CONF_PATH@/file1.jp2 -o @TEMP_PATH@/file1.jp2-c0.tif -c 0
-+opj_decompress -i @INPUT_CONF_PATH@/file1.jp2 -o @TEMP_PATH@/file1.jp2-c0.png -c 0
- # partial component decoding with opj_decode(): 3 components without MCT
--opj_decompress -i @INPUT_CONF_PATH@/file1.jp2 -o @TEMP_PATH@/file1.jp2-c0_1_2.tif -c 0,1,2
-+opj_decompress -i @INPUT_CONF_PATH@/file1.jp2 -o @TEMP_PATH@/file1.jp2-c0_1_2.png -c 0,1,2
- # partial component decoding with opj_decode() and opj_set_decode_area()
--opj_decompress -i @INPUT_CONF_PATH@/file1.jp2 -o @TEMP_PATH@/file1.jp2-c0-d10_20_30_40.tif -c 0 -d 10,20,30,40
-+opj_decompress -i @INPUT_CONF_PATH@/file1.jp2 -o @TEMP_PATH@/file1.jp2-c0-d10_20_30_40.png -c 0 -d 10,20,30,40
- # partial component decoding with opj_decode() and reduced resolution
--opj_decompress -i @INPUT_CONF_PATH@/file1.jp2 -o @TEMP_PATH@/file1.jp2-c0-r1.tif -c 0 -r 1
-+opj_decompress -i @INPUT_CONF_PATH@/file1.jp2 -o @TEMP_PATH@/file1.jp2-c0-r1.png -c 0 -r 1
- # partial component decoding with opj_get_decoded_tile()
--opj_decompress -i @INPUT_CONF_PATH@/file1.jp2 -o @TEMP_PATH@/file1.jp2-c0-t0.tif -c 0 -t 0
-+opj_decompress -i @INPUT_CONF_PATH@/file1.jp2 -o @TEMP_PATH@/file1.jp2-c0-t0.png -c 0 -t 0
- # partial component decoding with opj_get_decoded_tile() and reduced resolution
--opj_decompress -i @INPUT_CONF_PATH@/file1.jp2 -o @TEMP_PATH@/file1.jp2-c0-t0-r1.tif -c 0 -t 0 -r 1
-+opj_decompress -i @INPUT_CONF_PATH@/file1.jp2 -o @TEMP_PATH@/file1.jp2-c0-t0-r1.png -c 0 -t 0 -r 1
-
- # try to map the same component several times
--!opj_decompress -i @INPUT_CONF_PATH@/file1.jp2 -o @TEMP_PATH@/file1.jp2-c0_0.tif -c 0,0
-+!opj_decompress -i @INPUT_CONF_PATH@/file1.jp2 -o @TEMP_PATH@/file1.jp2-c0_0.png -c 0,0
- # try to map an invalid component
--!opj_decompress -i @INPUT_CONF_PATH@/file1.jp2 -o @TEMP_PATH@/file1.jp2-c10.tif -c 10
-+!opj_decompress -i @INPUT_CONF_PATH@/file1.jp2 -o @TEMP_PATH@/file1.jp2-c10.png -c 10
-
- opj_decompress -i @INPUT_NR_PATH@/db11217111510058.jp2 -o @TEMP_PATH@/issue1043.png
-
diff --git a/media-libs/openjpeg/openjpeg-2.3.1-r1.ebuild b/media-libs/openjpeg/openjpeg-2.3.1-r1.ebuild
deleted file mode 100644
index 07ed6a38acd..00000000000
--- a/media-libs/openjpeg/openjpeg-2.3.1-r1.ebuild
+++ /dev/null
@@ -1,136 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_ECLASS=cmake
-inherit 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="25632d6deca2e567d30ef476b4abe63916c36f6e"
-
-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_20180620.tar.gz )"
-
-LICENSE="BSD-2"
-SLOT="2/7" # based on SONAME
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="doc static-libs test"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- media-libs/lcms:2
- media-libs/libpng:0=
- media-libs/tiff:0
- sys-libs/zlib:="
-DEPEND="${RDEPEND}"
-BDEPEND="
- doc? ( app-doc/doxygen )"
-
-DOCS=( AUTHORS.md CHANGELOG.md NEWS.md README.md THANKS.md )
-
-PATCHES=(
- "${FILESDIR}/${PN}-2.3.1-gnuinstalldirs.patch" # bug 667150
- "${FILESDIR}/${P}-CVE-2020-6851.patch"
- "${FILESDIR}/${P}-CVE-2020-8112.patch"
- "${FILESDIR}/${P}-libtiff-4.1-compat.patch"
-)
-
-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() {
- 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=$(usex static-libs)
- )
-
- cmake_src_configure
-}
-
-multilib_src_test() {
- if ! multilib_is_native_abi ; then
- elog "Cannot run tests for non-multilib abi."
- return 0
- fi
-
- 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
- local FAILEDTEST_LOG="${BUILD_DIR}/Testing/Temporary/LastTestsFailed.log"
-
- if [[ ! -f "${FAILEDTEST_LOG}" ]] ; then
- # Should never happen
- die "Cannot analyze test failures: LastTestsFailed.log is missing!"
- fi
-
- 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="${T}/known_failures_compiled.txt"
- cat "${S}/tools/travis-ci/knownfailures-all.txt" > "${KNOWN_FAILURES_LIST}" || die
-
- local ARCH_SPECIFIC_FAILURES=
- if use amd64 ; then
- ARCH_SPECIFIC_FAILURES="$(find "${S}/tools/travis-ci/" -name 'knownfailures-*x86_64*.txt' -print0 | sort -z | tail -z -n 1 | tr -d '\0')"
- elif use x86 || use arm || use arm64; then
- ARCH_SPECIFIC_FAILURES="$(find "${S}/tools/travis-ci/" -name 'knownfailures-*i386*.txt' -print0 | sort -z | tail -z -n 1 | tr -d '\0')"
- fi
-
- if [[ -f "${ARCH_SPECIFIC_FAILURES}" ]] ; then
- einfo "Adding architecture specific failures (${ARCH_SPECIFIC_FAILURES}) to known failures list ..."
- cat "${ARCH_SPECIFIC_FAILURES}" >> "${KNOWN_FAILURES_LIST}" || die
- fi
-
- # Logic copied from $S/tools/travis-ci/run.sh
- local FAILEDTEST=
- local FAILURES_LOG="${BUILD_DIR}/Testing/Temporary/failures.txt"
- local HAS_UNKNOWN_TEST_FAILURES=0
-
- echo ""
-
- awk -F: '{ print $2 }' "${FAILEDTEST_LOG}" > "${FAILURES_LOG}"
- while read FAILEDTEST; do
- # is this failure known?
- if grep -x "${FAILEDTEST}" "${KNOWN_FAILURES_LIST}" > /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. No new/unknown test failure(s) found!"
- fi
-
- return 0
- fi
-}
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-libs/openjpeg/, media-libs/openjpeg/files/
@ 2022-04-07 2:22 Sam James
0 siblings, 0 replies; 10+ messages in thread
From: Sam James @ 2022-04-07 2:22 UTC (permalink / raw
To: gentoo-commits
commit: 65217c376e5339336f01073b3312fed51654cdaf
Author: Thomas Bracht Laumann Jespersen <t <AT> laumann <DOT> xyz>
AuthorDate: Wed Mar 30 20:48:59 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Apr 7 02:21:39 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=65217c37
media-libs/openjpeg: Fix segfault, security bug 832007
See: https://github.com/uclouvain/openjpeg/commit/0afbdcf3e6d0d2bd2e16a0c4d513ee3cf86e460d
Bug: https://bugs.gentoo.org/832007
Signed-off-by: Thomas Bracht Laumann Jespersen <t <AT> laumann.xyz>
Closes: https://github.com/gentoo/gentoo/pull/24822
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/openjpeg-2.4.0-r2-fix-segfault.patch | 17 +++
media-libs/openjpeg/openjpeg-2.4.0-r2.ebuild | 140 +++++++++++++++++++++
2 files changed, 157 insertions(+)
diff --git a/media-libs/openjpeg/files/openjpeg-2.4.0-r2-fix-segfault.patch b/media-libs/openjpeg/files/openjpeg-2.4.0-r2-fix-segfault.patch
new file mode 100644
index 000000000000..86e1c1fe39cc
--- /dev/null
+++ b/media-libs/openjpeg/files/openjpeg-2.4.0-r2-fix-segfault.patch
@@ -0,0 +1,17 @@
+Upstream: https://github.com/uclouvain/openjpeg/commit/0afbdcf3e6d0d2bd2e16a0c4d513ee3cf86e460d
+From: xiaoxiaoafeifei <lliangliang2007@163.com>
+Date: Wed, 14 Jul 2021 09:35:13 +0800
+Subject: [PATCH] Fix segfault in src/bin/jp2/opj_decompress.c due to
+ uninitialized pointer (fixes #1368) (#1369)
+
+--- a/src/bin/jp2/opj_decompress.c
++++ b/src/bin/jp2/opj_decompress.c
+@@ -1356,7 +1356,7 @@ int main(int argc, char **argv)
+ int it_image;
+ num_images = get_num_images(img_fol.imgdirpath);
+
+- dirptr = (dircnt_t*)malloc(sizeof(dircnt_t));
++ dirptr = (dircnt_t*)calloc(1, sizeof(dircnt_t));
+ if (!dirptr) {
+ destroy_parameters(¶meters);
+ return EXIT_FAILURE;
diff --git a/media-libs/openjpeg/openjpeg-2.4.0-r2.ebuild b/media-libs/openjpeg/openjpeg-2.4.0-r2.ebuild
new file mode 100644
index 000000000000..90e97e2e3bce
--- /dev/null
+++ b/media-libs/openjpeg/openjpeg-2.4.0-r2.ebuild
@@ -0,0 +1,140 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+CMAKE_ECLASS=cmake
+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!
+MY_TESTDATA_COMMIT="cd724fb1f93e6af41ebc68c4904f4bf2a4cd1e60"
+
+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_20201130.tar.gz )"
+
+LICENSE="BSD-2"
+SLOT="2/7" # based on SONAME
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="doc static-libs test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ media-libs/lcms:2
+ media-libs/libpng:0=
+ media-libs/tiff:0
+ sys-libs/zlib:="
+DEPEND="${RDEPEND}"
+BDEPEND="
+ doc? ( app-doc/doxygen )"
+
+DOCS=( AUTHORS.md CHANGELOG.md NEWS.md README.md THANKS.md )
+
+PATCHES=(
+ "${FILESDIR}/${PN}-2.4.0-r1-gnuinstalldirs.patch" # bug 667150
+ "${FILESDIR}/${PN}-2.4.0-fix-r2-segfault.patch" # bug 832007
+)
+
+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() {
+ 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=$(usex static-libs)
+ )
+
+ # 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
+ multilib_is_native_abi && use test && append-cflags "-ffp-contract=off"
+
+ cmake_src_configure
+}
+
+multilib_src_test() {
+ if ! multilib_is_native_abi ; then
+ elog "Cannot run tests for non-multilib abi."
+ return 0
+ fi
+
+ 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
+ local FAILEDTEST_LOG="${BUILD_DIR}/Testing/Temporary/LastTestsFailed.log"
+
+ if [[ ! -f "${FAILEDTEST_LOG}" ]] ; then
+ # Should never happen
+ die "Cannot analyze test failures: LastTestsFailed.log is missing!"
+ fi
+
+ 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="${T}/known_failures_compiled.txt"
+ cat "${S}/tools/travis-ci/knownfailures-all.txt" > "${KNOWN_FAILURES_LIST}" || die
+
+ local ARCH_SPECIFIC_FAILURES=
+ if use amd64 ; then
+ ARCH_SPECIFIC_FAILURES="$(find "${S}/tools/travis-ci/" -name 'knownfailures-*x86_64*.txt' -print0 | sort -z | tail -z -n 1 | tr -d '\0')"
+ elif use x86 || use arm || use arm64; then
+ ARCH_SPECIFIC_FAILURES="$(find "${S}/tools/travis-ci/" -name 'knownfailures-*i386*.txt' -print0 | sort -z | tail -z -n 1 | tr -d '\0')"
+ fi
+
+ if [[ -f "${ARCH_SPECIFIC_FAILURES}" ]] ; then
+ einfo "Adding architecture specific failures (${ARCH_SPECIFIC_FAILURES}) to known failures list ..."
+ cat "${ARCH_SPECIFIC_FAILURES}" >> "${KNOWN_FAILURES_LIST}" || die
+ fi
+
+ # Logic copied from $S/tools/travis-ci/run.sh
+ local FAILEDTEST=
+ local FAILURES_LOG="${BUILD_DIR}/Testing/Temporary/failures.txt"
+ local HAS_UNKNOWN_TEST_FAILURES=0
+
+ echo ""
+
+ awk -F: '{ print $2 }' "${FAILEDTEST_LOG}" > "${FAILURES_LOG}"
+ while read FAILEDTEST; do
+ # is this failure known?
+ if grep -x "${FAILEDTEST}" "${KNOWN_FAILURES_LIST}" > /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. No new/unknown test failure(s) found!"
+ fi
+
+ return 0
+ fi
+}
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-libs/openjpeg/, media-libs/openjpeg/files/
@ 2022-04-24 7:24 Joonas Niilola
0 siblings, 0 replies; 10+ messages in thread
From: Joonas Niilola @ 2022-04-24 7:24 UTC (permalink / raw
To: gentoo-commits
commit: 3c5508bd5ecf31191a9f63b6f8db66d1c9880b03
Author: Thomas Bracht Laumann Jespersen <t <AT> laumann <DOT> xyz>
AuthorDate: Thu Apr 21 12:07:59 2022 +0000
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Sun Apr 24 07:24:04 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3c5508bd
media-libs/openjpeg: backport upstream fix for CVE-2021-29338
The fix is split across two commits upstream, considered merging them
but decided against it.
Bug: https://bugs.gentoo.org/783513
Fixes: CVE-2021-29338
Signed-off-by: Thomas Bracht Laumann Jespersen <t <AT> laumann.xyz>
Closes: https://github.com/gentoo/gentoo/pull/25142
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
.../openjpeg-2.4.0-r3-avoid-mult-overflow.patch | 52 ++++++++
.../openjpeg-2.4.0-r3-fix-integer-overflow.patch | 57 +++++++++
media-libs/openjpeg/openjpeg-2.4.0-r3.ebuild | 142 +++++++++++++++++++++
3 files changed, 251 insertions(+)
diff --git a/media-libs/openjpeg/files/openjpeg-2.4.0-r3-avoid-mult-overflow.patch b/media-libs/openjpeg/files/openjpeg-2.4.0-r3-avoid-mult-overflow.patch
new file mode 100644
index 000000000000..3733a1b94545
--- /dev/null
+++ b/media-libs/openjpeg/files/openjpeg-2.4.0-r3-avoid-mult-overflow.patch
@@ -0,0 +1,52 @@
+Upstream: https://github.com/uclouvain/openjpeg/commit/1daaa0b909aebdf71be36238d16dfbec83c494ed
+Bug: https://bugs.gentoo.org/783513
+CVE-2021-29338
+--- a/src/bin/jp2/opj_compress.c
++++ b/src/bin/jp2/opj_compress.c
+@@ -1967,7 +1967,7 @@ int main(int argc, char **argv)
+ goto fin;
+ }
+ for (i = 0; i < num_images; i++) {
+- dirptr->filename[i] = dirptr->filename_buf + i * OPJ_PATH_LEN;
++ dirptr->filename[i] = dirptr->filename_buf + (size_t)i * OPJ_PATH_LEN;
+ }
+ }
+ if (load_images(dirptr, img_fol.imgdirpath) == 1) {
+--- a/src/bin/jp2/opj_decompress.c
++++ b/src/bin/jp2/opj_decompress.c
+@@ -1367,7 +1367,6 @@ int main(int argc, char **argv)
+ if (img_fol.set_imgdir == 1) {
+ int it_image;
+ num_images = get_num_images(img_fol.imgdirpath);
+-
+ dirptr = (dircnt_t*)calloc(1, sizeof(dircnt_t));
+ if (!dirptr) {
+ destroy_parameters(¶meters);
+@@ -1387,7 +1386,8 @@ int main(int argc, char **argv)
+ goto fin;
+ }
+ for (it_image = 0; it_image < num_images; it_image++) {
+- dirptr->filename[it_image] = dirptr->filename_buf + it_image * OPJ_PATH_LEN;
++ dirptr->filename[it_image] = dirptr->filename_buf + (size_t)it_image *
++ OPJ_PATH_LEN;
+ }
+
+ if (load_images(dirptr, img_fol.imgdirpath) == 1) {
+--- a/src/bin/jp2/opj_dump.c
++++ b/src/bin/jp2/opj_dump.c
+@@ -529,13 +529,13 @@ int main(int argc, char *argv[])
+ }
+
+ for (it_image = 0; it_image < num_images; it_image++) {
+- dirptr->filename[it_image] = dirptr->filename_buf + it_image * OPJ_PATH_LEN;
++ dirptr->filename[it_image] = dirptr->filename_buf + (size_t)it_image *
++ OPJ_PATH_LEN;
+ }
+
+ if (load_images(dirptr, img_fol.imgdirpath) == 1) {
+ goto fails;
+ }
+-
+ if (num_images == 0) {
+ fprintf(stdout, "Folder is empty\n");
+ goto fails;
diff --git a/media-libs/openjpeg/files/openjpeg-2.4.0-r3-fix-integer-overflow.patch b/media-libs/openjpeg/files/openjpeg-2.4.0-r3-fix-integer-overflow.patch
new file mode 100644
index 000000000000..6ceb5be8f6d1
--- /dev/null
+++ b/media-libs/openjpeg/files/openjpeg-2.4.0-r3-fix-integer-overflow.patch
@@ -0,0 +1,57 @@
+opj_compress/opj_uncompress: fix integer overflow in num_images
+CVE-2021-29338
+Bug 783513
+Upstream: https://github.com/uclouvain/openjpeg/commit/79c7d7af598b778c3cdcb455df23d50efc95eb3c
+--- a/src/bin/jp2/opj_compress.c
++++ b/src/bin/jp2/opj_compress.c
+@@ -1959,9 +1959,9 @@ int main(int argc, char **argv)
+ num_images = get_num_images(img_fol.imgdirpath);
+ dirptr = (dircnt_t*)malloc(sizeof(dircnt_t));
+ if (dirptr) {
+- dirptr->filename_buf = (char*)malloc(num_images * OPJ_PATH_LEN * sizeof(
++ dirptr->filename_buf = (char*)calloc(num_images, OPJ_PATH_LEN * sizeof(
+ char)); /* Stores at max 10 image file names*/
+- dirptr->filename = (char**) malloc(num_images * sizeof(char*));
++ dirptr->filename = (char**) calloc(num_images, sizeof(char*));
+ if (!dirptr->filename_buf) {
+ ret = 0;
+ goto fin;
+--- a/src/bin/jp2/opj_decompress.c
++++ b/src/bin/jp2/opj_decompress.c
+@@ -1374,14 +1374,13 @@ int main(int argc, char **argv)
+ return EXIT_FAILURE;
+ }
+ /* Stores at max 10 image file names */
+- dirptr->filename_buf = (char*)malloc(sizeof(char) *
+- (size_t)num_images * OPJ_PATH_LEN);
++ dirptr->filename_buf = calloc((size_t) num_images, sizeof(char) * OPJ_PATH_LEN);
+ if (!dirptr->filename_buf) {
+ failed = 1;
+ goto fin;
+ }
+
+- dirptr->filename = (char**) malloc((size_t)num_images * sizeof(char*));
++ dirptr->filename = (char**) calloc((size_t) num_images, sizeof(char*));
+
+ if (!dirptr->filename) {
+ failed = 1;
+--- a/src/bin/jp2/opj_dump.c
++++ b/src/bin/jp2/opj_dump.c
+@@ -515,13 +515,14 @@ int main(int argc, char *argv[])
+ if (!dirptr) {
+ return EXIT_FAILURE;
+ }
+- dirptr->filename_buf = (char*)malloc((size_t)num_images * OPJ_PATH_LEN * sizeof(
+- char)); /* Stores at max 10 image file names*/
++ /* Stores at max 10 image file names*/
++ dirptr->filename_buf = (char*) calloc((size_t) num_images,
++ OPJ_PATH_LEN * sizeof(char));
+ if (!dirptr->filename_buf) {
+ free(dirptr);
+ return EXIT_FAILURE;
+ }
+- dirptr->filename = (char**) malloc((size_t)num_images * sizeof(char*));
++ dirptr->filename = (char**) calloc((size_t) num_images, sizeof(char*));
+
+ if (!dirptr->filename) {
+ goto fails;
diff --git a/media-libs/openjpeg/openjpeg-2.4.0-r3.ebuild b/media-libs/openjpeg/openjpeg-2.4.0-r3.ebuild
new file mode 100644
index 000000000000..7405a4c46f4e
--- /dev/null
+++ b/media-libs/openjpeg/openjpeg-2.4.0-r3.ebuild
@@ -0,0 +1,142 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+CMAKE_ECLASS=cmake
+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!
+MY_TESTDATA_COMMIT="cd724fb1f93e6af41ebc68c4904f4bf2a4cd1e60"
+
+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_20201130.tar.gz )"
+
+LICENSE="BSD-2"
+SLOT="2/7" # based on SONAME
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="doc static-libs test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ media-libs/lcms:2
+ media-libs/libpng:0=
+ media-libs/tiff:0
+ sys-libs/zlib:="
+DEPEND="${RDEPEND}"
+BDEPEND="
+ doc? ( app-doc/doxygen )"
+
+DOCS=( AUTHORS.md CHANGELOG.md NEWS.md README.md THANKS.md )
+
+PATCHES=(
+ "${FILESDIR}/${PN}-2.4.0-r1-gnuinstalldirs.patch" # bug 667150
+ "${FILESDIR}/${PN}-2.4.0-r2-fix-segfault.patch" # bug 832007
+ "${FILESDIR}/${PN}-2.4.0-r3-fix-integer-overflow.patch" # bug 783513
+ "${FILESDIR}/${PN}-2.4.0-r3-avoid-mult-overflow.patch" # bug 783513
+)
+
+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() {
+ 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=$(usex static-libs)
+ )
+
+ # 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
+ multilib_is_native_abi && use test && append-cflags "-ffp-contract=off"
+
+ cmake_src_configure
+}
+
+multilib_src_test() {
+ if ! multilib_is_native_abi ; then
+ elog "Cannot run tests for non-multilib abi."
+ return 0
+ fi
+
+ 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
+ local FAILEDTEST_LOG="${BUILD_DIR}/Testing/Temporary/LastTestsFailed.log"
+
+ if [[ ! -f "${FAILEDTEST_LOG}" ]] ; then
+ # Should never happen
+ die "Cannot analyze test failures: LastTestsFailed.log is missing!"
+ fi
+
+ 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="${T}/known_failures_compiled.txt"
+ cat "${S}/tools/travis-ci/knownfailures-all.txt" > "${KNOWN_FAILURES_LIST}" || die
+
+ local ARCH_SPECIFIC_FAILURES=
+ if use amd64 ; then
+ ARCH_SPECIFIC_FAILURES="$(find "${S}/tools/travis-ci/" -name 'knownfailures-*x86_64*.txt' -print0 | sort -z | tail -z -n 1 | tr -d '\0')"
+ elif use x86 || use arm || use arm64; then
+ ARCH_SPECIFIC_FAILURES="$(find "${S}/tools/travis-ci/" -name 'knownfailures-*i386*.txt' -print0 | sort -z | tail -z -n 1 | tr -d '\0')"
+ fi
+
+ if [[ -f "${ARCH_SPECIFIC_FAILURES}" ]] ; then
+ einfo "Adding architecture specific failures (${ARCH_SPECIFIC_FAILURES}) to known failures list ..."
+ cat "${ARCH_SPECIFIC_FAILURES}" >> "${KNOWN_FAILURES_LIST}" || die
+ fi
+
+ # Logic copied from $S/tools/travis-ci/run.sh
+ local FAILEDTEST=
+ local FAILURES_LOG="${BUILD_DIR}/Testing/Temporary/failures.txt"
+ local HAS_UNKNOWN_TEST_FAILURES=0
+
+ echo ""
+
+ awk -F: '{ print $2 }' "${FAILEDTEST_LOG}" > "${FAILURES_LOG}"
+ while read FAILEDTEST; do
+ # is this failure known?
+ if grep -x "${FAILEDTEST}" "${KNOWN_FAILURES_LIST}" > /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. No new/unknown test failure(s) found!"
+ fi
+
+ return 0
+ fi
+}
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-libs/openjpeg/, media-libs/openjpeg/files/
@ 2022-05-22 20:35 Sam James
0 siblings, 0 replies; 10+ messages in thread
From: Sam James @ 2022-05-22 20:35 UTC (permalink / raw
To: gentoo-commits
commit: f0a1ba2eaccd64377fa90dd289886faaae126df3
Author: Thomas Bracht Laumann Jespersen <t <AT> laumann <DOT> xyz>
AuthorDate: Mon May 16 08:07:39 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun May 22 20:35:39 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f0a1ba2e
media-libs/openjpeg: add 2.5.0
Also update to EAPI 8, and bump the test data to the latest commit
possible. Drop all security patches from v2.4.0 as they are part of the
upstream release.
Closes: https://bugs.gentoo.org/844064
Bug: https://bugs.gentoo.org/783513
Bug: https://bugs.gentoo.org/484802
Signed-off-by: Thomas Bracht Laumann Jespersen <t <AT> laumann.xyz>
Closes: https://github.com/gentoo/gentoo/pull/25523
Signed-off-by: Sam James <sam <AT> gentoo.org>
media-libs/openjpeg/Manifest | 2 +
.../files/openjpeg-2.5.0-gnuinstalldirs.patch | 299 +++++++++++++++++++++
media-libs/openjpeg/openjpeg-2.5.0.ebuild | 140 ++++++++++
3 files changed, 441 insertions(+)
diff --git a/media-libs/openjpeg/Manifest b/media-libs/openjpeg/Manifest
index 2971ec0815a5..67696cbe7745 100644
--- a/media-libs/openjpeg/Manifest
+++ b/media-libs/openjpeg/Manifest
@@ -1,2 +1,4 @@
DIST openjpeg-2.4.0.tar.gz 2233229 BLAKE2B ab8907638ac041ce7dcbcbcd9624ea5e4b7542c9ec38a850e363c071c27c4bc8b16e207700b12e67d8d32bdd9b0838735bede27084090ce95105d32c539b09cf SHA512 55daab47d33823af94e32e5d345b52c251a5410f0c8e0a13b693f17899eedc8b2bb107489ddcba9ab78ef17dfd7cd80d3c5ec80c1e429189cb041124b67e07a8
+DIST openjpeg-2.5.0.tar.gz 1867111 BLAKE2B 472d9998a7407574d3bc059d1c0b662a8a553cfe5cb7806a022cb35e14564417a8e06e9970f06d8e65ef149019bab747caefa8e29bc793d07ad86e076909d306 SHA512 08975a2dd79f1e29fd1824249a5fbe66026640ed787b3a3aa8807c2c69f994240ff33e2132f8bf15bbc2202bef7001f98e42d487231d4eebc8e503538658049a
DIST openjpeg-data_20201130.tar.gz 497969983 BLAKE2B 35ff1ee234e3bbf47a822151c97cdf2764f864094973fa60adc7962f8065b38318b0cc41338b5ba3fffd9bb00eac3eaf4153ecc398abd49a8047168414c1c85b SHA512 4c367c8262fe894f90a1e63fb59d87e974ae0d750d3cee89adfe4d765040f0a2049b491a17a34a5b3ba79e183a508c9d592376fe3c112df56c311bf3212f0c31
+DIST openjpeg-data_20210926.tar.gz 498600110 BLAKE2B 34a1c39379d9f8f4caad6c8263a4bc59e62a6a3b8db744eaeaa7047e58813636341b3fb7ee6a121b7dfcd4bc085f9884c3aef86605633ff0d84a1b77cf003624 SHA512 4444225ddb9c548d7753561188cd2d595ae13d7a45471240fac69c3de786a97fb899cd5bbc67cf1b54bfccff0dcd215ec6e83d1bd66982a44c802d163e365dae
diff --git a/media-libs/openjpeg/files/openjpeg-2.5.0-gnuinstalldirs.patch b/media-libs/openjpeg/files/openjpeg-2.5.0-gnuinstalldirs.patch
new file mode 100644
index 000000000000..1b0a424e3e38
--- /dev/null
+++ b/media-libs/openjpeg/files/openjpeg-2.5.0-gnuinstalldirs.patch
@@ -0,0 +1,299 @@
+From fecc8e9e23f78de94c41bc641b3e5b9e9a84560b Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <asturm@gentoo.org>
+Date: Thu, 11 Apr 2019 13:10:57 +0200
+Subject: [PATCH] Use GNUInstallDirs for standard installation directories
+
+Raises minimum cmake version by a little.
+(Later rebased by sam@gentoo.org for 2.4.0)
+(Again rebased by t@laumann.xyz for 2.5.0)
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -7,7 +7,7 @@
+ # For this purpose you can define a CMake var: OPENJPEG_NAMESPACE to whatever you like
+ # e.g.:
+ # set(OPENJPEG_NAMESPACE "GDCMOPENJPEG")
+-cmake_minimum_required(VERSION 2.8.2)
++cmake_minimum_required(VERSION 2.8.5)
+
+ if(COMMAND CMAKE_POLICY)
+ cmake_policy(SET CMP0003 NEW)
+@@ -106,54 +106,23 @@ endif()
+ # --------------------------------------------------------------------------
+ # Install directories
+ # Build DOCUMENTATION (not in ALL target and only if Doxygen is found)
++include(GNUInstallDirs)
++
+ option(BUILD_DOC "Build the HTML documentation (with doxygen if available)." OFF)
+
+ string(TOLOWER ${PROJECT_NAME} projectname)
+ set(OPENJPEG_INSTALL_SUBDIR "${projectname}-${OPENJPEG_VERSION_MAJOR}.${OPENJPEG_VERSION_MINOR}")
+
+-if(NOT OPENJPEG_INSTALL_BIN_DIR)
+- set(OPENJPEG_INSTALL_BIN_DIR "bin")
+-endif()
+-
+-if(NOT OPENJPEG_INSTALL_LIB_DIR)
+- set(OPENJPEG_INSTALL_LIB_DIR "lib")
+-endif()
+-
+-if(NOT OPENJPEG_INSTALL_SHARE_DIR)
+- set(OPENJPEG_INSTALL_SHARE_DIR "share")
+-endif()
+-
+-if(NOT OPENJPEG_INSTALL_DATA_DIR)
+- set(OPENJPEG_INSTALL_DATA_DIR "${OPENJPEG_INSTALL_SHARE_DIR}/${OPENJPEG_INSTALL_SUBDIR}")
+-endif()
+-
+-if(NOT OPENJPEG_INSTALL_INCLUDE_DIR)
+- set(OPENJPEG_INSTALL_INCLUDE_DIR "include/${OPENJPEG_INSTALL_SUBDIR}")
+-endif()
+-
+-if(BUILD_DOC)
+-if(NOT OPENJPEG_INSTALL_MAN_DIR)
+- set(OPENJPEG_INSTALL_MAN_DIR "share/man/")
+-endif()
+-
+-if(NOT OPENJPEG_INSTALL_DOC_DIR)
+- set(OPENJPEG_INSTALL_DOC_DIR "share/doc/${OPENJPEG_INSTALL_SUBDIR}")
+-endif()
+-endif()
+-
+ if(NOT OPENJPEG_INSTALL_JNI_DIR)
+ if(WIN32)
+- set(OPENJPEG_INSTALL_JNI_DIR ${OPENJPEG_INSTALL_BIN_DIR})
++ set(OPENJPEG_INSTALL_JNI_DIR ${CMAKE_INSTALL_BINDIR})
+ else()
+- set(OPENJPEG_INSTALL_JNI_DIR ${OPENJPEG_INSTALL_LIB_DIR})
++ set(OPENJPEG_INSTALL_JNI_DIR ${CMAKE_INSTALL_LIBDIR})
+ endif()
+ endif()
+
+ if(NOT OPENJPEG_INSTALL_PACKAGE_DIR)
+- # We could install *.cmake files in share/ however those files contains
+- # hardcoded path to libraries on a multi-arch system (fedora/debian) those
+- # path will be different (lib/i386-linux-gnu vs lib/x86_64-linux-gnu)
+- set(OPENJPEG_INSTALL_PACKAGE_DIR "${OPENJPEG_INSTALL_LIB_DIR}/${OPENJPEG_INSTALL_SUBDIR}")
++ set(OPENJPEG_INSTALL_PACKAGE_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/${CMAKE_INSTALL_SUBDIR}")
+ endif()
+
+ if (APPLE)
+@@ -161,7 +130,7 @@ if (APPLE)
+ # For cmake >= 3.0, we turn on CMP0042 and
+ # https://cmake.org/cmake/help/v3.0/policy/CMP0042.html mentions
+ # "Projects wanting @rpath in a target’s install name may remove any setting of the INSTALL_NAME_DIR and CMAKE_INSTALL_NAME_DIR variables"
+- list(APPEND OPENJPEG_LIBRARY_PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${OPENJPEG_INSTALL_LIB_DIR}")
++ list(APPEND OPENJPEG_LIBRARY_PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_FULL_LIBDIR}")
+ endif()
+ option(OPJ_USE_DSYMUTIL "Call dsymutil on binaries after build." OFF)
+ endif()
+@@ -346,14 +315,6 @@ install( FILES ${OPENJPEG_BINARY_DIR}/OpenJPEGConfig.cmake
+ )
+
+ #-----------------------------------------------------------------------------
+-# install CHANGES and LICENSE
+-if(BUILD_DOC)
+-if(EXISTS ${OPENJPEG_SOURCE_DIR}/CHANGES)
+- install(FILES CHANGES DESTINATION ${OPENJPEG_INSTALL_DOC_DIR})
+-endif()
+-
+-install(FILES LICENSE DESTINATION ${OPENJPEG_INSTALL_DOC_DIR})
+-endif()
+
+ include (cmake/OpenJPEGCPack.cmake)
+
+@@ -370,14 +331,14 @@ if(BUILD_PKGCONFIG_FILES)
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/lib/openjp2/libopenjp2.pc.cmake.in
+ ${CMAKE_CURRENT_BINARY_DIR}/libopenjp2.pc @ONLY)
+ install( FILES ${CMAKE_CURRENT_BINARY_DIR}/libopenjp2.pc DESTINATION
+- ${OPENJPEG_INSTALL_LIB_DIR}/pkgconfig )
++ ${CMAKE_INSTALL_LIBDIR}/pkgconfig )
+ #
+ if(BUILD_JPIP)
+ # install in lib and not share (see multi-arch note above)
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/lib/openjpip/libopenjpip.pc.cmake.in
+ ${CMAKE_CURRENT_BINARY_DIR}/libopenjpip.pc @ONLY)
+ install( FILES ${CMAKE_CURRENT_BINARY_DIR}/libopenjpip.pc DESTINATION
+- ${OPENJPEG_INSTALL_LIB_DIR}/pkgconfig )
++ ${CMAKE_INSTALL_LIBDIR}/pkgconfig )
+ endif()
+ endif()
+
+--- a/cmake/OpenJPEGConfig.cmake.in
++++ b/cmake/OpenJPEGConfig.cmake.in
+@@ -28,8 +28,8 @@ if(EXISTS ${SELF_DIR}/OpenJPEGTargets.cmake)
+ include(${SELF_DIR}/OpenJPEGTargets.cmake)
+
+ # We find a relative path from the PKG directory to header files.
+- set(PKG_DIR "@CMAKE_INSTALL_PREFIX@/@OPENJPEG_INSTALL_PACKAGE_DIR@")
+- set(INC_DIR "@CMAKE_INSTALL_PREFIX@/@OPENJPEG_INSTALL_INCLUDE_DIR@")
++ set(PKG_DIR "@CMAKE_INSTALL_FULL_INCLUDEDIR@/@OPENJPEG_INSTALL_PACKAGE_DIR@")
++ set(INC_DIR "@CMAKE_INSTALL_FULL_INCLUDEDIR@/@OPENJPEG_INSTALL_INCLUDE_DIR@")
+ file(RELATIVE_PATH PKG_TO_INC_RPATH "${PKG_DIR}" "${INC_DIR}")
+
+ get_filename_component(OPENJPEG_INCLUDE_DIRS "${SELF_DIR}/${PKG_TO_INC_RPATH}" REALPATH)
+--- a/doc/CMakeLists.txt
++++ b/doc/CMakeLists.txt
+@@ -44,7 +44,7 @@ if(DOXYGEN_FOUND)
+
+ # install HTML documentation (install png files too):
+ install(DIRECTORY ${CMAKE_BINARY_DIR}/doc/html
+- DESTINATION ${OPENJPEG_INSTALL_DOC_DIR}
++ DESTINATION ${CMAKE_INSTALL_DOCDIR}
+ PATTERN ".svn" EXCLUDE
+ )
+ else()
+--- a/src/bin/jp2/CMakeLists.txt
++++ b/src/bin/jp2/CMakeLists.txt
+@@ -67,7 +67,7 @@ foreach(exe opj_decompress opj_compress opj_dump)
+ # Install exe
+ install(TARGETS ${exe}
+ EXPORT OpenJPEGTargets
+- DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
++ DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
+ )
+ if(OPJ_USE_DSYMUTIL)
+ add_custom_command(TARGET ${exe} POST_BUILD
+@@ -83,6 +83,6 @@ install(
+ FILES ${OPENJPEG_SOURCE_DIR}/doc/man/man1/opj_compress.1
+ ${OPENJPEG_SOURCE_DIR}/doc/man/man1/opj_decompress.1
+ ${OPENJPEG_SOURCE_DIR}/doc/man/man1/opj_dump.1
+- DESTINATION ${OPENJPEG_INSTALL_MAN_DIR}/man1)
++ DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
+ #
+ endif()
+--- a/src/bin/jpip/CMakeLists.txt
++++ b/src/bin/jpip/CMakeLists.txt
+@@ -13,7 +13,7 @@ add_executable(opj_jpip_addxml opj_jpip_addxml.c)
+ # Install exe
+ install(TARGETS opj_jpip_addxml
+ EXPORT OpenJPEGTargets
+- DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
++ DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
+ )
+
+ if(BUILD_JPIP_SERVER)
+@@ -38,7 +38,7 @@ if(BUILD_JPIP_SERVER)
+ # Install exe
+ install(TARGETS opj_server
+ EXPORT OpenJPEGTargets
+- DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
++ DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
+ )
+ endif()
+
+@@ -52,7 +52,7 @@ add_executable(${exe} ${exe}.c)
+ target_link_libraries(${exe} openjpip)
+ install(TARGETS ${exe}
+ EXPORT OpenJPEGTargets
+- DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
++ DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
+ )
+ endforeach()
+
+--- a/src/lib/openjp2/CMakeLists.txt
++++ b/src/lib/openjp2/CMakeLists.txt
+@@ -2,7 +2,7 @@ include_regular_expression("^.*$")
+
+ #
+ install( FILES ${CMAKE_CURRENT_BINARY_DIR}/opj_config.h
+- DESTINATION ${OPENJPEG_INSTALL_INCLUDE_DIR} COMPONENT Headers)
++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${OPENJPEG_INSTALL_SUBDIR} COMPONENT Headers)
+
+ include_directories(
+ ${${OPENJPEG_NAMESPACE}_BINARY_DIR}/src/lib/openjp2 # opj_config.h and opj_config_private.h
+@@ -117,21 +117,21 @@ endif()
+ # Install library
+ install(TARGETS ${INSTALL_LIBS}
+ EXPORT OpenJPEGTargets
+- RUNTIME DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
+- LIBRARY DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
+- ARCHIVE DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
+ )
+
+ # Install includes files
+ install(FILES openjpeg.h opj_stdint.h
+- DESTINATION ${OPENJPEG_INSTALL_INCLUDE_DIR} COMPONENT Headers
++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${OPENJPEG_INSTALL_SUBDIR} COMPONENT Headers
+ )
+
+ if(BUILD_DOC)
+ # install man page of the library
+ install(
+ FILES ${OPENJPEG_SOURCE_DIR}/doc/man/man3/libopenjp2.3
+- DESTINATION ${OPENJPEG_INSTALL_MAN_DIR}/man3)
++ DESTINATION ${CMAKE_INSTALL_MANDIR}/man3)
+ endif()
+
+ if(BUILD_LUTS_GENERATOR)
+--- a/src/lib/openjp2/libopenjp2.pc.cmake.in
++++ b/src/lib/openjp2/libopenjp2.pc.cmake.in
+@@ -1,9 +1,9 @@
+ prefix=@CMAKE_INSTALL_PREFIX@
+-bindir=${prefix}/@OPENJPEG_INSTALL_BIN_DIR@
+-mandir=${prefix}/@OPENJPEG_INSTALL_MAN_DIR@
+-docdir=${prefix}/@OPENJPEG_INSTALL_DOC_DIR@
+-libdir=${prefix}/@OPENJPEG_INSTALL_LIB_DIR@
+-includedir=${prefix}/@OPENJPEG_INSTALL_INCLUDE_DIR@
++bindir=${prefix}/@CMAKE_INSTALL_BINDIR@
++mandir=@CMAKE_INSTALL_MANDIR@
++docdir=@CMAKE_INSTALL_DOCDIR@
++libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
++includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
+
+ Name: openjp2
+ Description: JPEG2000 library (Part 1 and 2)
+--- a/src/lib/openjpip/CMakeLists.txt
++++ b/src/lib/openjpip/CMakeLists.txt
+@@ -74,9 +74,9 @@ endif()
+ # Install library
+ install(TARGETS openjpip
+ EXPORT OpenJPEGTargets
+- RUNTIME DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
+- LIBRARY DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
+- ARCHIVE DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
+ )
+
+ if(BUILD_JPIP_SERVER)
+@@ -86,6 +86,6 @@ if(BUILD_JPIP_SERVER)
+ PROPERTIES COMPILE_FLAGS "-DSERVER")
+ install(TARGETS openjpip_server
+ EXPORT OpenJPEGTargets
+- DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
++ DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
+ )
+ endif()
+--- a/src/lib/openjpip/libopenjpip.pc.cmake.in
++++ b/src/lib/openjpip/libopenjpip.pc.cmake.in
+@@ -1,9 +1,9 @@
+ prefix=@CMAKE_INSTALL_PREFIX@
+-bindir=${prefix}/@OPENJPEG_INSTALL_BIN_DIR@
+-mandir=${prefix}/@OPENJPEG_INSTALL_MAN_DIR@
+-docdir=${prefix}/@OPENJPEG_INSTALL_DOC_DIR@
+-libdir=${prefix}/@OPENJPEG_INSTALL_LIB_DIR@
+-includedir=${prefix}/@OPENJPEG_INSTALL_INCLUDE_DIR@
++bindir=${prefix}/@CMAKE_INSTALL_BINDIR@
++mandir=@CMAKE_INSTALL_MANDIR@
++docdir=@CMAKE_INSTALL_DOCDIR@
++libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
++includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
+
+ Name: openjpip
+ Description: JPEG2000 Interactivity tools, APIs and protocols (Part 9)
+--- a/wrapping/java/openjp2/CMakeLists.txt
++++ b/wrapping/java/openjp2/CMakeLists.txt
+@@ -66,5 +66,5 @@ add_custom_target(OpenJPEGJavaJar ALL
+ )
+
+ install(FILES ${LIBRARY_OUTPUT_PATH}/openjpeg.jar
+- DESTINATION ${OPENJPEG_INSTALL_SHARE_DIR} COMPONENT JavaModule
++ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR} COMPONENT JavaModule
+ )
+--
+2.35.1
+
diff --git a/media-libs/openjpeg/openjpeg-2.5.0.ebuild b/media-libs/openjpeg/openjpeg-2.5.0.ebuild
new file mode 100644
index 000000000000..70cd86a4a35c
--- /dev/null
+++ b/media-libs/openjpeg/openjpeg-2.5.0.ebuild
@@ -0,0 +1,140 @@
+# Copyright 1999-2022 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="1f3d093030f9a0b43353ec6b48500f65786ff57a"
+
+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_20210926.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 ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="doc static-libs test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ media-libs/lcms:2
+ media-libs/libpng:0=
+ media-libs/tiff:0
+ sys-libs/zlib:=
+"
+DEPEND="${RDEPEND}"
+BDEPEND="doc? ( app-doc/doxygen )"
+
+DOCS=( AUTHORS.md CHANGELOG.md NEWS.md README.md THANKS.md )
+
+PATCHES=(
+ "${FILESDIR}/${PN}-2.5.0-gnuinstalldirs.patch" # bug #667150
+)
+
+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() {
+ 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=$(usex static-libs)
+ )
+
+ # 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
+
+ local myctestargs=
+
+ pushd "${BUILD_DIR}" > /dev/null || die
+ [[ -e CTestTestfile.cmake ]] || die "Test suite not available! Check source!"
+
+ if [[ -n ${TEST_VERBOSE} ]]; then
+ myctestargs+=( --extra-verbose --output-on-failure )
+ fi
+
+ echo ctest "${myctestargs[@]}"
+ if ctest "${myctestargs[@]}" ; then
+ popd > /dev/null || die
+ einfo "Tests succeeded."
+ return 0
+ fi
+
+ local FAILEDTEST_LOG="${BUILD_DIR}/Testing/Temporary/LastTestsFailed.log"
+
+ # Should never happen
+ [[ -f "${FAILEDTEST_LOG}" ]] || die "Cannot analyze test failures: LastTestsFailed.log is missing!"
+
+ elog
+ elog "Note: Upstream maintains a list of known test failures."
+ elog "We will now compare our test results against this list and remove any known failures."
+ elog
+
+ local KNOWN_FAILURES_LIST="${T}/known_failures_compiled.txt"
+ cp "${S}/tools/travis-ci/knownfailures-all.txt" "${KNOWN_FAILURES_LIST}" || die
+
+ local ARCH_SPECIFIC_FAILURES=
+ if use amd64 ; then
+ ARCH_SPECIFIC_FAILURES="$(find "${S}/tools/travis-ci/" -name 'knownfailures-*x86_64*.txt' -print0 | sort -z | tail -z -n 1 | tr -d '\0')"
+ elif use x86 || use arm || use arm64; then
+ ARCH_SPECIFIC_FAILURES="$(find "${S}/tools/travis-ci/" -name 'knownfailures-*i386*.txt' -print0 | sort -z | tail -z -n 1 | tr -d '\0')"
+ fi
+
+ if [[ -f "${ARCH_SPECIFIC_FAILURES}" ]]; then
+ elog "Adding architecture specific failures (${ARCH_SPECIFIC_FAILURES}) to known failures list ..."
+ elog
+ <"${ARCH_SPECIFIC_FAILURES}" >> "${KNOWN_FAILURES_LIST}" || die
+ fi
+
+ # Logic copied from $S/tools/travis-ci/run.sh
+ local FAILEDTEST=
+ local HAS_UNKNOWN_TEST_FAILURES=0
+
+ awk -F: '{ print $2 }' "${FAILEDTEST_LOG}" | while read FAILEDTEST; do
+ # is this failure known?
+ if grep -xq "${FAILEDTEST}" "${KNOWN_FAILURES_LIST}" ; then
+ elog "Test '${FAILEDTEST}' is known to fail, ignoring ..."
+ else
+ eerror "New/unknown test failure found: '${FAILEDTEST}'"
+ HAS_UNKNOWN_TEST_FAILURES=1
+ fi
+ done
+
+ [[ ${HAS_UNKNOWN_TEST_FAILURES} -eq 0 ]] || die "Test suite failed. New/unknown test failure(s) found!"
+
+ elog
+ elog "Test suite passed. No new/unknown test failure(s) found!"
+
+ popd > /dev/null || die
+ return 0
+}
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-libs/openjpeg/, media-libs/openjpeg/files/
@ 2022-05-23 17:26 Sam James
0 siblings, 0 replies; 10+ messages in thread
From: Sam James @ 2022-05-23 17:26 UTC (permalink / raw
To: gentoo-commits
commit: bf92bccd8ffd7dc4ff4b32b465fa5e34ca04a564
Author: Thomas Bracht Laumann Jespersen <t <AT> laumann <DOT> xyz>
AuthorDate: Mon May 23 11:33:58 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon May 23 17:26:28 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bf92bccd
media-libs/openjpeg: add 2.5.0-r1, fix includedir
Bug: https://bugs.gentoo.org/694776
Closes: https://bugs.gentoo.org/847058
Signed-off-by: Thomas Bracht Laumann Jespersen <t <AT> laumann.xyz>
Closes: https://github.com/gentoo/gentoo/pull/25607
Signed-off-by: Sam James <sam <AT> gentoo.org>
media-libs/openjpeg/files/openjpeg-2.5.0-gnuinstalldirs.patch | 4 ++--
.../openjpeg/{openjpeg-2.5.0.ebuild => openjpeg-2.5.0-r1.ebuild} | 0
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/media-libs/openjpeg/files/openjpeg-2.5.0-gnuinstalldirs.patch b/media-libs/openjpeg/files/openjpeg-2.5.0-gnuinstalldirs.patch
index f82b64485979..f47f062b8939 100644
--- a/media-libs/openjpeg/files/openjpeg-2.5.0-gnuinstalldirs.patch
+++ b/media-libs/openjpeg/files/openjpeg-2.5.0-gnuinstalldirs.patch
@@ -243,7 +243,7 @@ Raises minimum cmake version by a little.
+mandir=@CMAKE_INSTALL_MANDIR@
+docdir=@CMAKE_INSTALL_DOCDIR@
+libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
-+includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
++includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@OPENJPEG_INSTALL_SUBDIR@
Name: openjp2
Description: JPEG2000 library (Part 1 and 2)
@@ -283,7 +283,7 @@ Raises minimum cmake version by a little.
+mandir=@CMAKE_INSTALL_MANDIR@
+docdir=@CMAKE_INSTALL_DOCDIR@
+libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
-+includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
++includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@OPENJPEG_INSTALL_SUBDIR@
Name: openjpip
Description: JPEG2000 Interactivity tools, APIs and protocols (Part 9)
diff --git a/media-libs/openjpeg/openjpeg-2.5.0.ebuild b/media-libs/openjpeg/openjpeg-2.5.0-r1.ebuild
similarity index 100%
rename from media-libs/openjpeg/openjpeg-2.5.0.ebuild
rename to media-libs/openjpeg/openjpeg-2.5.0-r1.ebuild
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-libs/openjpeg/, media-libs/openjpeg/files/
@ 2022-08-15 14:10 Andreas Sturmlechner
0 siblings, 0 replies; 10+ messages in thread
From: Andreas Sturmlechner @ 2022-08-15 14:10 UTC (permalink / raw
To: gentoo-commits
commit: 8908e6d2b56ccc9970895883a7f8b1c821ae9965
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 14 21:27:42 2022 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon Aug 15 14:09:52 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8908e6d2
media-libs/openjpeg: drop 2.4.0, 2.4.0-r1, 2.4.0-r2, 2.4.0-r3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
media-libs/openjpeg/Manifest | 2 -
.../files/openjpeg-2.4.0-gnuinstalldirs.patch | 435 ---------------------
.../files/openjpeg-2.4.0-r1-gnuinstalldirs.patch | 435 ---------------------
.../files/openjpeg-2.4.0-r2-fix-segfault.patch | 17 -
.../openjpeg-2.4.0-r3-avoid-mult-overflow.patch | 52 ---
.../openjpeg-2.4.0-r3-fix-integer-overflow.patch | 57 ---
media-libs/openjpeg/openjpeg-2.4.0-r1.ebuild | 139 -------
media-libs/openjpeg/openjpeg-2.4.0-r2.ebuild | 140 -------
media-libs/openjpeg/openjpeg-2.4.0-r3.ebuild | 142 -------
media-libs/openjpeg/openjpeg-2.4.0.ebuild | 139 -------
10 files changed, 1558 deletions(-)
diff --git a/media-libs/openjpeg/Manifest b/media-libs/openjpeg/Manifest
index 67696cbe7745..30b5bc36a99f 100644
--- a/media-libs/openjpeg/Manifest
+++ b/media-libs/openjpeg/Manifest
@@ -1,4 +1,2 @@
-DIST openjpeg-2.4.0.tar.gz 2233229 BLAKE2B ab8907638ac041ce7dcbcbcd9624ea5e4b7542c9ec38a850e363c071c27c4bc8b16e207700b12e67d8d32bdd9b0838735bede27084090ce95105d32c539b09cf SHA512 55daab47d33823af94e32e5d345b52c251a5410f0c8e0a13b693f17899eedc8b2bb107489ddcba9ab78ef17dfd7cd80d3c5ec80c1e429189cb041124b67e07a8
DIST openjpeg-2.5.0.tar.gz 1867111 BLAKE2B 472d9998a7407574d3bc059d1c0b662a8a553cfe5cb7806a022cb35e14564417a8e06e9970f06d8e65ef149019bab747caefa8e29bc793d07ad86e076909d306 SHA512 08975a2dd79f1e29fd1824249a5fbe66026640ed787b3a3aa8807c2c69f994240ff33e2132f8bf15bbc2202bef7001f98e42d487231d4eebc8e503538658049a
-DIST openjpeg-data_20201130.tar.gz 497969983 BLAKE2B 35ff1ee234e3bbf47a822151c97cdf2764f864094973fa60adc7962f8065b38318b0cc41338b5ba3fffd9bb00eac3eaf4153ecc398abd49a8047168414c1c85b SHA512 4c367c8262fe894f90a1e63fb59d87e974ae0d750d3cee89adfe4d765040f0a2049b491a17a34a5b3ba79e183a508c9d592376fe3c112df56c311bf3212f0c31
DIST openjpeg-data_20210926.tar.gz 498600110 BLAKE2B 34a1c39379d9f8f4caad6c8263a4bc59e62a6a3b8db744eaeaa7047e58813636341b3fb7ee6a121b7dfcd4bc085f9884c3aef86605633ff0d84a1b77cf003624 SHA512 4444225ddb9c548d7753561188cd2d595ae13d7a45471240fac69c3de786a97fb899cd5bbc67cf1b54bfccff0dcd215ec6e83d1bd66982a44c802d163e365dae
diff --git a/media-libs/openjpeg/files/openjpeg-2.4.0-gnuinstalldirs.patch b/media-libs/openjpeg/files/openjpeg-2.4.0-gnuinstalldirs.patch
deleted file mode 100644
index 82ad4075a942..000000000000
--- a/media-libs/openjpeg/files/openjpeg-2.4.0-gnuinstalldirs.patch
+++ /dev/null
@@ -1,435 +0,0 @@
-From fecc8e9e23f78de94c41bc641b3e5b9e9a84560b Mon Sep 17 00:00:00 2001
-From: Andreas Sturmlechner <asturm@gentoo.org>
-Date: Thu, 11 Apr 2019 13:10:57 +0200
-Subject: [PATCH] Use GNUInstallDirs for standard installation directories
-
-Raises minimum cmake version by a little.
-(Later rebased by sam@gentoo.org for 2.4.0)
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -7,7 +7,7 @@
- # For this purpose you can define a CMake var: OPENJPEG_NAMESPACE to whatever you like
- # e.g.:
- # set(OPENJPEG_NAMESPACE "GDCMOPENJPEG")
--cmake_minimum_required(VERSION 2.8.2)
-+cmake_minimum_required(VERSION 2.8.5)
-
- if(COMMAND CMAKE_POLICY)
- cmake_policy(SET CMP0003 NEW)
-@@ -105,58 +105,27 @@ endif()
- # --------------------------------------------------------------------------
- # Install directories
- # Build DOCUMENTATION (not in ALL target and only if Doxygen is found)
-+include(GNUInstallDirs)
-+
- option(BUILD_DOC "Build the HTML documentation (with doxygen if available)." OFF)
-
- string(TOLOWER ${PROJECT_NAME} projectname)
- set(OPENJPEG_INSTALL_SUBDIR "${projectname}-${OPENJPEG_VERSION_MAJOR}.${OPENJPEG_VERSION_MINOR}")
-
--if(NOT OPENJPEG_INSTALL_BIN_DIR)
-- set(OPENJPEG_INSTALL_BIN_DIR "bin")
--endif()
--
--if(NOT OPENJPEG_INSTALL_LIB_DIR)
-- set(OPENJPEG_INSTALL_LIB_DIR "lib")
--endif()
--
--if(NOT OPENJPEG_INSTALL_SHARE_DIR)
-- set(OPENJPEG_INSTALL_SHARE_DIR "share")
--endif()
--
--if(NOT OPENJPEG_INSTALL_DATA_DIR)
-- set(OPENJPEG_INSTALL_DATA_DIR "${OPENJPEG_INSTALL_SHARE_DIR}/${OPENJPEG_INSTALL_SUBDIR}")
--endif()
--
--if(NOT OPENJPEG_INSTALL_INCLUDE_DIR)
-- set(OPENJPEG_INSTALL_INCLUDE_DIR "include/${OPENJPEG_INSTALL_SUBDIR}")
--endif()
--
--if(BUILD_DOC)
--if(NOT OPENJPEG_INSTALL_MAN_DIR)
-- set(OPENJPEG_INSTALL_MAN_DIR "share/man/")
--endif()
--
--if(NOT OPENJPEG_INSTALL_DOC_DIR)
-- set(OPENJPEG_INSTALL_DOC_DIR "share/doc/${OPENJPEG_INSTALL_SUBDIR}")
--endif()
--endif()
--
- if(NOT OPENJPEG_INSTALL_JNI_DIR)
- if(WIN32)
-- set(OPENJPEG_INSTALL_JNI_DIR ${OPENJPEG_INSTALL_BIN_DIR})
-+ set(OPENJPEG_INSTALL_JNI_DIR ${CMAKE_INSTALL_BINDIR})
- else()
-- set(OPENJPEG_INSTALL_JNI_DIR ${OPENJPEG_INSTALL_LIB_DIR})
-+ set(OPENJPEG_INSTALL_JNI_DIR ${CMAKE_INSTALL_LIBDIR})
- endif()
- endif()
-
- if(NOT OPENJPEG_INSTALL_PACKAGE_DIR)
-- # We could install *.cmake files in share/ however those files contains
-- # hardcoded path to libraries on a multi-arch system (fedora/debian) those
-- # path will be different (lib/i386-linux-gnu vs lib/x86_64-linux-gnu)
-- set(OPENJPEG_INSTALL_PACKAGE_DIR "${OPENJPEG_INSTALL_LIB_DIR}/${OPENJPEG_INSTALL_SUBDIR}")
-+ set(OPENJPEG_INSTALL_PACKAGE_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/${OPENJPEG_INSTALL_SUBDIR}")
- endif()
-
- if (APPLE)
-- list(APPEND OPENJPEG_LIBRARY_PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${OPENJPEG_INSTALL_LIB_DIR}")
-+ list(APPEND OPENJPEG_LIBRARY_PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_FULL_LIBDIR}")
- option(OPJ_USE_DSYMUTIL "Call dsymutil on binaries after build." OFF)
- endif()
-
-@@ -342,14 +311,6 @@ install( FILES ${OPENJPEG_BINARY_DIR}/OpenJPEGConfig.cmake
- )
-
- #-----------------------------------------------------------------------------
--# install CHANGES and LICENSE
--if(BUILD_DOC)
--if(EXISTS ${OPENJPEG_SOURCE_DIR}/CHANGES)
-- install(FILES CHANGES DESTINATION ${OPENJPEG_INSTALL_DOC_DIR})
--endif()
--
--install(FILES LICENSE DESTINATION ${OPENJPEG_INSTALL_DOC_DIR})
--endif()
-
- include (cmake/OpenJPEGCPack.cmake)
-
-@@ -366,14 +327,14 @@ if(BUILD_PKGCONFIG_FILES)
- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/lib/openjp2/libopenjp2.pc.cmake.in
- ${CMAKE_CURRENT_BINARY_DIR}/libopenjp2.pc @ONLY)
- install( FILES ${CMAKE_CURRENT_BINARY_DIR}/libopenjp2.pc DESTINATION
-- ${OPENJPEG_INSTALL_LIB_DIR}/pkgconfig )
-+ ${CMAKE_INSTALL_LIBDIR}/pkgconfig )
- #
- if(BUILD_JPWL)
- # install in lib and not share (see multi-arch note above)
- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/lib/openjpwl/libopenjpwl.pc.cmake.in
- ${CMAKE_CURRENT_BINARY_DIR}/libopenjpwl.pc @ONLY)
- install( FILES ${CMAKE_CURRENT_BINARY_DIR}/libopenjpwl.pc DESTINATION
-- ${OPENJPEG_INSTALL_LIB_DIR}/pkgconfig )
-+ ${CMAKE_INSTALL_LIBDIR}/pkgconfig )
- endif()
- #
- if(BUILD_JPIP)
-@@ -381,7 +342,7 @@ if(BUILD_PKGCONFIG_FILES)
- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/lib/openjpip/libopenjpip.pc.cmake.in
- ${CMAKE_CURRENT_BINARY_DIR}/libopenjpip.pc @ONLY)
- install( FILES ${CMAKE_CURRENT_BINARY_DIR}/libopenjpip.pc DESTINATION
-- ${OPENJPEG_INSTALL_LIB_DIR}/pkgconfig )
-+ ${CMAKE_INSTALL_LIBDIR}/pkgconfig )
- endif()
- #
- if(BUILD_JP3D)
-@@ -389,7 +350,7 @@ if(BUILD_PKGCONFIG_FILES)
- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/lib/openjp3d/libopenjp3d.pc.cmake.in
- ${CMAKE_CURRENT_BINARY_DIR}/libopenjp3d.pc @ONLY)
- install( FILES ${CMAKE_CURRENT_BINARY_DIR}/libopenjp3d.pc DESTINATION
-- ${OPENJPEG_INSTALL_LIB_DIR}/pkgconfig )
-+ ${CMAKE_INSTALL_LIBDIR}/pkgconfig )
- endif()
- endif()
-
---- a/cmake/OpenJPEGConfig.cmake.in
-+++ b/cmake/OpenJPEGConfig.cmake.in
-@@ -27,7 +27,7 @@ if(EXISTS ${SELF_DIR}/OpenJPEGTargets.cmake)
- # This is an install tree
- include(${SELF_DIR}/OpenJPEGTargets.cmake)
-
-- set(INC_DIR "@CMAKE_INSTALL_PREFIX@/@OPENJPEG_INSTALL_INCLUDE_DIR@")
-+ set(INC_DIR "@CMAKE_INSTALL_FULL_INCLUDEDIR@/@OPENJPEG_INSTALL_SUBDIR@")
- get_filename_component(OPENJPEG_INCLUDE_DIRS "${INC_DIR}" ABSOLUTE)
-
- else()
---- a/doc/CMakeLists.txt
-+++ b/doc/CMakeLists.txt
-@@ -44,7 +44,7 @@ if(DOXYGEN_FOUND)
-
- # install HTML documentation (install png files too):
- install(DIRECTORY ${CMAKE_BINARY_DIR}/doc/html
-- DESTINATION ${OPENJPEG_INSTALL_DOC_DIR}
-+ DESTINATION ${CMAKE_INSTALL_DOCDIR}
- PATTERN ".svn" EXCLUDE
- )
- else()
---- a/src/bin/jp2/CMakeLists.txt
-+++ b/src/bin/jp2/CMakeLists.txt
-@@ -67,7 +67,7 @@ foreach(exe opj_decompress opj_compress opj_dump)
- # Install exe
- install(TARGETS ${exe}
- EXPORT OpenJPEGTargets
-- DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
-+ DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
- )
- if(OPJ_USE_DSYMUTIL)
- add_custom_command(TARGET ${exe} POST_BUILD
-@@ -83,6 +83,6 @@ install(
- FILES ${OPENJPEG_SOURCE_DIR}/doc/man/man1/opj_compress.1
- ${OPENJPEG_SOURCE_DIR}/doc/man/man1/opj_decompress.1
- ${OPENJPEG_SOURCE_DIR}/doc/man/man1/opj_dump.1
-- DESTINATION ${OPENJPEG_INSTALL_MAN_DIR}/man1)
-+ DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
- #
- endif()
---- a/src/bin/jp3d/CMakeLists.txt
-+++ b/src/bin/jp3d/CMakeLists.txt
-@@ -36,6 +36,6 @@ foreach(exe opj_jp3d_compress opj_jp3d_decompress)
- # Install exe
- install(TARGETS ${exe}
- EXPORT OpenJP3DTargets
-- DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
-+ DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
- )
- endforeach()
---- a/src/bin/jpip/CMakeLists.txt
-+++ b/src/bin/jpip/CMakeLists.txt
-@@ -13,7 +13,7 @@ add_executable(opj_jpip_addxml opj_jpip_addxml.c)
- # Install exe
- install(TARGETS opj_jpip_addxml
- EXPORT OpenJPEGTargets
-- DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
-+ DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
- )
-
- if(BUILD_JPIP_SERVER)
-@@ -38,7 +38,7 @@ if(BUILD_JPIP_SERVER)
- # Install exe
- install(TARGETS opj_server
- EXPORT OpenJPEGTargets
-- DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
-+ DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
- )
- endif()
-
-@@ -52,7 +52,7 @@ add_executable(${exe} ${exe}.c)
- target_link_libraries(${exe} openjpip)
- install(TARGETS ${exe}
- EXPORT OpenJPEGTargets
-- DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
-+ DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
- )
- endforeach()
-
-@@ -123,7 +123,7 @@ if(Java_Development_FOUND AND Java_JAVAC_EXECUTABLE)
- )
-
- install(FILES ${LIBRARY_OUTPUT_PATH}/opj_jpip_viewer.jar
-- DESTINATION ${OPENJPEG_INSTALL_SHARE_DIR} COMPONENT JavaModule
-+ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR} COMPONENT JavaModule
- )
- else()
- # opj_viewer (simple, no xerces)
-@@ -153,7 +153,7 @@ if(Java_Development_FOUND AND Java_JAVAC_EXECUTABLE)
- )
-
- install(FILES ${LIBRARY_OUTPUT_PATH}/opj_jpip_viewer.jar
-- DESTINATION ${OPENJPEG_INSTALL_SHARE_DIR} COMPONENT JavaModule
-+ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR} COMPONENT JavaModule
- )
- endif()
- else()
---- a/src/bin/jpwl/CMakeLists.txt
-+++ b/src/bin/jpwl/CMakeLists.txt
-@@ -57,6 +57,6 @@ foreach(exe decompress compress)
- endif()
-
- install(TARGETS ${jpwl_exe}
-- DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
-+ DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
- )
- endforeach()
---- a/src/bin/mj2/CMakeLists.txt
-+++ b/src/bin/mj2/CMakeLists.txt
-@@ -43,5 +43,5 @@ foreach(exe
- endif()
-
- install(TARGETS ${exe}
-- DESTINATION ${OPENJPEG_INSTALL_BIN_DIR})
-+ DESTINATION ${CMAKE_INSTALL_BINDIR})
- endforeach()
---- a/src/lib/openjp2/CMakeLists.txt
-+++ b/src/lib/openjp2/CMakeLists.txt
-@@ -2,7 +2,7 @@ include_regular_expression("^.*$")
-
- #
- install( FILES ${CMAKE_CURRENT_BINARY_DIR}/opj_config.h
-- DESTINATION ${OPENJPEG_INSTALL_INCLUDE_DIR} COMPONENT Headers)
-+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${OPENJPEG_INSTALL_SUBDIR} COMPONENT Headers)
-
- include_directories(
- ${${OPENJPEG_NAMESPACE}_BINARY_DIR}/src/lib/openjp2 # opj_config.h and opj_config_private.h
-@@ -114,21 +114,21 @@ endif()
- # Install library
- install(TARGETS ${INSTALL_LIBS}
- EXPORT OpenJPEGTargets
-- RUNTIME DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
-- LIBRARY DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
-- ARCHIVE DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
-+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
-+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
-+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
- )
-
- # Install includes files
- install(FILES openjpeg.h opj_stdint.h
-- DESTINATION ${OPENJPEG_INSTALL_INCLUDE_DIR} COMPONENT Headers
-+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${OPENJPEG_INSTALL_SUBDIR} COMPONENT Headers
- )
-
- if(BUILD_DOC)
- # install man page of the library
- install(
- FILES ${OPENJPEG_SOURCE_DIR}/doc/man/man3/libopenjp2.3
-- DESTINATION ${OPENJPEG_INSTALL_MAN_DIR}/man3)
-+ DESTINATION ${CMAKE_INSTALL_MANDIR}/man3)
- endif()
-
- if(BUILD_LUTS_GENERATOR)
---- a/src/lib/openjp2/libopenjp2.pc.cmake.in
-+++ b/src/lib/openjp2/libopenjp2.pc.cmake.in
-@@ -1,9 +1,9 @@
- prefix=@CMAKE_INSTALL_PREFIX@
--bindir=${prefix}/@OPENJPEG_INSTALL_BIN_DIR@
--mandir=${prefix}/@OPENJPEG_INSTALL_MAN_DIR@
--docdir=${prefix}/@OPENJPEG_INSTALL_DOC_DIR@
--libdir=${prefix}/@OPENJPEG_INSTALL_LIB_DIR@
--includedir=${prefix}/@OPENJPEG_INSTALL_INCLUDE_DIR@
-+bindir=${prefix}/@CMAKE_INSTALL_BINDIR@
-+mandir=${prefix}/@CMAKE_INSTALL_MANDIR@
-+docdir=${prefix}/@CMAKE_INSTALL_DOCDIR@
-+libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
-+includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@OPENJPEG_INSTALL_SUBDIR@
-
- Name: openjp2
- Description: JPEG2000 library (Part 1 and 2)
---- a/src/lib/openjp3d/CMakeLists.txt
-+++ b/src/lib/openjp3d/CMakeLists.txt
-@@ -34,12 +34,12 @@ endif()
- # Install library
- install(TARGETS ${OPENJP3D_LIBRARY_NAME}
- EXPORT OpenJP3DTargets
-- DESTINATION ${OPENJPEG_INSTALL_LIB_DIR}
-+ DESTINATION ${CMAKE_INSTALL_LIBDIR}
- COMPONENT Libraries
- )
-
- # Install includes files
- install(FILES openjp3d.h
-- DESTINATION ${OPENJPEG_INSTALL_INCLUDE_DIR}
-+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${OPENJPEG_INSTALL_SUBDIR}
- COMPONENT Headers
- )
---- a/src/lib/openjp3d/libopenjp3d.pc.cmake.in
-+++ b/src/lib/openjp3d/libopenjp3d.pc.cmake.in
-@@ -1,9 +1,9 @@
- prefix=@CMAKE_INSTALL_PREFIX@
--bindir=${prefix}/@OPENJPEG_INSTALL_BIN_DIR@
--mandir=${prefix}/@OPENJPEG_INSTALL_MAN_DIR@
--docdir=${prefix}/@OPENJPEG_INSTALL_DOC_DIR@
--libdir=${prefix}/@OPENJPEG_INSTALL_LIB_DIR@
--includedir=${prefix}/@OPENJPEG_INSTALL_INCLUDE_DIR@
-+bindir=${prefix}/@CMAKE_INSTALL_BINDIR@
-+mandir=${prefix}/@CMAKE_INSTALL_MANDIR@
-+docdir=${prefix}/@CMAKE_INSTALL_DOCDIR@
-+libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
-+includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@OPENJPEG_INSTALL_SUBDIR@
-
- Name: openjp3d
- Description: JPEG2000 Extensions for three-dimensional data (Part 10)
---- a/src/lib/openjpip/CMakeLists.txt
-+++ b/src/lib/openjpip/CMakeLists.txt
-@@ -74,9 +74,9 @@ endif()
- # Install library
- install(TARGETS openjpip
- EXPORT OpenJPEGTargets
-- RUNTIME DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
-- LIBRARY DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
-- ARCHIVE DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
-+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
-+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
-+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
- )
-
- if(BUILD_JPIP_SERVER)
-@@ -86,6 +86,6 @@ if(BUILD_JPIP_SERVER)
- PROPERTIES COMPILE_FLAGS "-DSERVER")
- install(TARGETS openjpip_server
- EXPORT OpenJPEGTargets
-- DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
-+ DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
- )
- endif()
---- a/src/lib/openjpip/libopenjpip.pc.cmake.in
-+++ b/src/lib/openjpip/libopenjpip.pc.cmake.in
-@@ -1,9 +1,9 @@
- prefix=@CMAKE_INSTALL_PREFIX@
--bindir=${prefix}/@OPENJPEG_INSTALL_BIN_DIR@
--mandir=${prefix}/@OPENJPEG_INSTALL_MAN_DIR@
--docdir=${prefix}/@OPENJPEG_INSTALL_DOC_DIR@
--libdir=${prefix}/@OPENJPEG_INSTALL_LIB_DIR@
--includedir=${prefix}/@OPENJPEG_INSTALL_INCLUDE_DIR@
-+bindir=${prefix}/@CMAKE_INSTALL_BINDIR@
-+mandir=${prefix}/@CMAKE_INSTALL_MANDIR@
-+docdir=${prefix}/@CMAKE_INSTALL_DOCDIR@
-+libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
-+includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@OPENJPEG_INSTALL_SUBDIR@
-
- Name: openjpip
- Description: JPEG2000 Interactivity tools, APIs and protocols (Part 9)
---- a/src/lib/openjpwl/CMakeLists.txt
-+++ b/src/lib/openjpwl/CMakeLists.txt
-@@ -58,7 +58,7 @@ endif()
- # Install library
- install(TARGETS openjpwl
- EXPORT OpenJPEGTargets
-- RUNTIME DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
-- LIBRARY DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
-- ARCHIVE DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
-+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
-+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
-+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
- )
---- a/src/lib/openjpwl/libopenjpwl.pc.cmake.in
-+++ b/src/lib/openjpwl/libopenjpwl.pc.cmake.in
-@@ -1,9 +1,9 @@
- prefix=@CMAKE_INSTALL_PREFIX@
--bindir=${prefix}/@OPENJPEG_INSTALL_BIN_DIR@
--mandir=${prefix}/@OPENJPEG_INSTALL_MAN_DIR@
--docdir=${prefix}/@OPENJPEG_INSTALL_DOC_DIR@
--libdir=${prefix}/@OPENJPEG_INSTALL_LIB_DIR@
--includedir=${prefix}/@OPENJPEG_INSTALL_INCLUDE_DIR@
-+bindir=${prefix}/@CMAKE_INSTALL_BINDIR@
-+mandir=${prefix}/@CMAKE_INSTALL_MANDIR@
-+docdir=${prefix}/@CMAKE_INSTALL_DOCDIR@
-+libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
-+includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@OPENJPEG_INSTALL_SUBDIR@
-
- Name: openjpwl
- Description: JPEG2000 Wireless library (Part 11)
---- a/src/lib/openmj2/CMakeLists.txt
-+++ b/src/lib/openmj2/CMakeLists.txt
-@@ -53,12 +53,12 @@ endif()
- # Install library
- install(TARGETS ${OPENMJ2_LIBRARY_NAME}
- EXPORT OpenMJ2Targets
-- DESTINATION ${OPENJPEG_INSTALL_LIB_DIR}
-+ DESTINATION ${CMAKE_INSTALL_LIBDIR}
- COMPONENT Libraries
- )
-
- # Install includes files
- #install(FILES mj2.h
--# DESTINATION ${OPENJPEG_INSTALL_INCLUDE_DIR}/${subdir}
-+# DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${OPENJPEG_INSTALL_SUBDIR}
- # COMPONENT Headers
- #)
---- a/wrapping/java/openjp2/CMakeLists.txt
-+++ b/wrapping/java/openjp2/CMakeLists.txt
-@@ -69,5 +69,5 @@ add_custom_target(OpenJPEGJavaJar ALL
- )
-
- install(FILES ${LIBRARY_OUTPUT_PATH}/openjpeg.jar
-- DESTINATION ${OPENJPEG_INSTALL_SHARE_DIR} COMPONENT JavaModule
-+ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR} COMPONENT JavaModule
- )
diff --git a/media-libs/openjpeg/files/openjpeg-2.4.0-r1-gnuinstalldirs.patch b/media-libs/openjpeg/files/openjpeg-2.4.0-r1-gnuinstalldirs.patch
deleted file mode 100644
index bc6771c0c4be..000000000000
--- a/media-libs/openjpeg/files/openjpeg-2.4.0-r1-gnuinstalldirs.patch
+++ /dev/null
@@ -1,435 +0,0 @@
-From fecc8e9e23f78de94c41bc641b3e5b9e9a84560b Mon Sep 17 00:00:00 2001
-From: Andreas Sturmlechner <asturm@gentoo.org>
-Date: Thu, 11 Apr 2019 13:10:57 +0200
-Subject: [PATCH] Use GNUInstallDirs for standard installation directories
-
-Raises minimum cmake version by a little.
-(Later rebased by sam@gentoo.org for 2.4.0)
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -7,7 +7,7 @@
- # For this purpose you can define a CMake var: OPENJPEG_NAMESPACE to whatever you like
- # e.g.:
- # set(OPENJPEG_NAMESPACE "GDCMOPENJPEG")
--cmake_minimum_required(VERSION 2.8.2)
-+cmake_minimum_required(VERSION 2.8.5)
-
- if(COMMAND CMAKE_POLICY)
- cmake_policy(SET CMP0003 NEW)
-@@ -105,58 +105,27 @@ endif()
- # --------------------------------------------------------------------------
- # Install directories
- # Build DOCUMENTATION (not in ALL target and only if Doxygen is found)
-+include(GNUInstallDirs)
-+
- option(BUILD_DOC "Build the HTML documentation (with doxygen if available)." OFF)
-
- string(TOLOWER ${PROJECT_NAME} projectname)
- set(OPENJPEG_INSTALL_SUBDIR "${projectname}-${OPENJPEG_VERSION_MAJOR}.${OPENJPEG_VERSION_MINOR}")
-
--if(NOT OPENJPEG_INSTALL_BIN_DIR)
-- set(OPENJPEG_INSTALL_BIN_DIR "bin")
--endif()
--
--if(NOT OPENJPEG_INSTALL_LIB_DIR)
-- set(OPENJPEG_INSTALL_LIB_DIR "lib")
--endif()
--
--if(NOT OPENJPEG_INSTALL_SHARE_DIR)
-- set(OPENJPEG_INSTALL_SHARE_DIR "share")
--endif()
--
--if(NOT OPENJPEG_INSTALL_DATA_DIR)
-- set(OPENJPEG_INSTALL_DATA_DIR "${OPENJPEG_INSTALL_SHARE_DIR}/${OPENJPEG_INSTALL_SUBDIR}")
--endif()
--
--if(NOT OPENJPEG_INSTALL_INCLUDE_DIR)
-- set(OPENJPEG_INSTALL_INCLUDE_DIR "include/${OPENJPEG_INSTALL_SUBDIR}")
--endif()
--
--if(BUILD_DOC)
--if(NOT OPENJPEG_INSTALL_MAN_DIR)
-- set(OPENJPEG_INSTALL_MAN_DIR "share/man/")
--endif()
--
--if(NOT OPENJPEG_INSTALL_DOC_DIR)
-- set(OPENJPEG_INSTALL_DOC_DIR "share/doc/${OPENJPEG_INSTALL_SUBDIR}")
--endif()
--endif()
--
- if(NOT OPENJPEG_INSTALL_JNI_DIR)
- if(WIN32)
-- set(OPENJPEG_INSTALL_JNI_DIR ${OPENJPEG_INSTALL_BIN_DIR})
-+ set(OPENJPEG_INSTALL_JNI_DIR ${CMAKE_INSTALL_BINDIR})
- else()
-- set(OPENJPEG_INSTALL_JNI_DIR ${OPENJPEG_INSTALL_LIB_DIR})
-+ set(OPENJPEG_INSTALL_JNI_DIR ${CMAKE_INSTALL_LIBDIR})
- endif()
- endif()
-
- if(NOT OPENJPEG_INSTALL_PACKAGE_DIR)
-- # We could install *.cmake files in share/ however those files contains
-- # hardcoded path to libraries on a multi-arch system (fedora/debian) those
-- # path will be different (lib/i386-linux-gnu vs lib/x86_64-linux-gnu)
-- set(OPENJPEG_INSTALL_PACKAGE_DIR "${OPENJPEG_INSTALL_LIB_DIR}/${OPENJPEG_INSTALL_SUBDIR}")
-+ set(OPENJPEG_INSTALL_PACKAGE_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/${OPENJPEG_INSTALL_SUBDIR}")
- endif()
-
- if (APPLE)
-- list(APPEND OPENJPEG_LIBRARY_PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${OPENJPEG_INSTALL_LIB_DIR}")
-+ list(APPEND OPENJPEG_LIBRARY_PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_FULL_LIBDIR}")
- option(OPJ_USE_DSYMUTIL "Call dsymutil on binaries after build." OFF)
- endif()
-
-@@ -342,14 +311,6 @@ install( FILES ${OPENJPEG_BINARY_DIR}/OpenJPEGConfig.cmake
- )
-
- #-----------------------------------------------------------------------------
--# install CHANGES and LICENSE
--if(BUILD_DOC)
--if(EXISTS ${OPENJPEG_SOURCE_DIR}/CHANGES)
-- install(FILES CHANGES DESTINATION ${OPENJPEG_INSTALL_DOC_DIR})
--endif()
--
--install(FILES LICENSE DESTINATION ${OPENJPEG_INSTALL_DOC_DIR})
--endif()
-
- include (cmake/OpenJPEGCPack.cmake)
-
-@@ -366,14 +327,14 @@ if(BUILD_PKGCONFIG_FILES)
- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/lib/openjp2/libopenjp2.pc.cmake.in
- ${CMAKE_CURRENT_BINARY_DIR}/libopenjp2.pc @ONLY)
- install( FILES ${CMAKE_CURRENT_BINARY_DIR}/libopenjp2.pc DESTINATION
-- ${OPENJPEG_INSTALL_LIB_DIR}/pkgconfig )
-+ ${CMAKE_INSTALL_LIBDIR}/pkgconfig )
- #
- if(BUILD_JPWL)
- # install in lib and not share (see multi-arch note above)
- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/lib/openjpwl/libopenjpwl.pc.cmake.in
- ${CMAKE_CURRENT_BINARY_DIR}/libopenjpwl.pc @ONLY)
- install( FILES ${CMAKE_CURRENT_BINARY_DIR}/libopenjpwl.pc DESTINATION
-- ${OPENJPEG_INSTALL_LIB_DIR}/pkgconfig )
-+ ${CMAKE_INSTALL_LIBDIR}/pkgconfig )
- endif()
- #
- if(BUILD_JPIP)
-@@ -381,7 +342,7 @@ if(BUILD_PKGCONFIG_FILES)
- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/lib/openjpip/libopenjpip.pc.cmake.in
- ${CMAKE_CURRENT_BINARY_DIR}/libopenjpip.pc @ONLY)
- install( FILES ${CMAKE_CURRENT_BINARY_DIR}/libopenjpip.pc DESTINATION
-- ${OPENJPEG_INSTALL_LIB_DIR}/pkgconfig )
-+ ${CMAKE_INSTALL_LIBDIR}/pkgconfig )
- endif()
- #
- if(BUILD_JP3D)
-@@ -389,7 +350,7 @@ if(BUILD_PKGCONFIG_FILES)
- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/lib/openjp3d/libopenjp3d.pc.cmake.in
- ${CMAKE_CURRENT_BINARY_DIR}/libopenjp3d.pc @ONLY)
- install( FILES ${CMAKE_CURRENT_BINARY_DIR}/libopenjp3d.pc DESTINATION
-- ${OPENJPEG_INSTALL_LIB_DIR}/pkgconfig )
-+ ${CMAKE_INSTALL_LIBDIR}/pkgconfig )
- endif()
- endif()
-
---- a/cmake/OpenJPEGConfig.cmake.in
-+++ b/cmake/OpenJPEGConfig.cmake.in
-@@ -27,7 +27,7 @@ if(EXISTS ${SELF_DIR}/OpenJPEGTargets.cmake)
- # This is an install tree
- include(${SELF_DIR}/OpenJPEGTargets.cmake)
-
-- set(INC_DIR "@CMAKE_INSTALL_PREFIX@/@OPENJPEG_INSTALL_INCLUDE_DIR@")
-+ set(INC_DIR "@CMAKE_INSTALL_FULL_INCLUDEDIR@/@OPENJPEG_INSTALL_SUBDIR@")
- get_filename_component(OPENJPEG_INCLUDE_DIRS "${INC_DIR}" ABSOLUTE)
-
- else()
---- a/doc/CMakeLists.txt
-+++ b/doc/CMakeLists.txt
-@@ -44,7 +44,7 @@ if(DOXYGEN_FOUND)
-
- # install HTML documentation (install png files too):
- install(DIRECTORY ${CMAKE_BINARY_DIR}/doc/html
-- DESTINATION ${OPENJPEG_INSTALL_DOC_DIR}
-+ DESTINATION ${CMAKE_INSTALL_DOCDIR}
- PATTERN ".svn" EXCLUDE
- )
- else()
---- a/src/bin/jp2/CMakeLists.txt
-+++ b/src/bin/jp2/CMakeLists.txt
-@@ -67,7 +67,7 @@ foreach(exe opj_decompress opj_compress opj_dump)
- # Install exe
- install(TARGETS ${exe}
- EXPORT OpenJPEGTargets
-- DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
-+ DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
- )
- if(OPJ_USE_DSYMUTIL)
- add_custom_command(TARGET ${exe} POST_BUILD
-@@ -83,6 +83,6 @@ install(
- FILES ${OPENJPEG_SOURCE_DIR}/doc/man/man1/opj_compress.1
- ${OPENJPEG_SOURCE_DIR}/doc/man/man1/opj_decompress.1
- ${OPENJPEG_SOURCE_DIR}/doc/man/man1/opj_dump.1
-- DESTINATION ${OPENJPEG_INSTALL_MAN_DIR}/man1)
-+ DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
- #
- endif()
---- a/src/bin/jp3d/CMakeLists.txt
-+++ b/src/bin/jp3d/CMakeLists.txt
-@@ -36,6 +36,6 @@ foreach(exe opj_jp3d_compress opj_jp3d_decompress)
- # Install exe
- install(TARGETS ${exe}
- EXPORT OpenJP3DTargets
-- DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
-+ DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
- )
- endforeach()
---- a/src/bin/jpip/CMakeLists.txt
-+++ b/src/bin/jpip/CMakeLists.txt
-@@ -13,7 +13,7 @@ add_executable(opj_jpip_addxml opj_jpip_addxml.c)
- # Install exe
- install(TARGETS opj_jpip_addxml
- EXPORT OpenJPEGTargets
-- DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
-+ DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
- )
-
- if(BUILD_JPIP_SERVER)
-@@ -38,7 +38,7 @@ if(BUILD_JPIP_SERVER)
- # Install exe
- install(TARGETS opj_server
- EXPORT OpenJPEGTargets
-- DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
-+ DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
- )
- endif()
-
-@@ -52,7 +52,7 @@ add_executable(${exe} ${exe}.c)
- target_link_libraries(${exe} openjpip)
- install(TARGETS ${exe}
- EXPORT OpenJPEGTargets
-- DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
-+ DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
- )
- endforeach()
-
-@@ -123,7 +123,7 @@ if(Java_Development_FOUND AND Java_JAVAC_EXECUTABLE)
- )
-
- install(FILES ${LIBRARY_OUTPUT_PATH}/opj_jpip_viewer.jar
-- DESTINATION ${OPENJPEG_INSTALL_SHARE_DIR} COMPONENT JavaModule
-+ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR} COMPONENT JavaModule
- )
- else()
- # opj_viewer (simple, no xerces)
-@@ -153,7 +153,7 @@ if(Java_Development_FOUND AND Java_JAVAC_EXECUTABLE)
- )
-
- install(FILES ${LIBRARY_OUTPUT_PATH}/opj_jpip_viewer.jar
-- DESTINATION ${OPENJPEG_INSTALL_SHARE_DIR} COMPONENT JavaModule
-+ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR} COMPONENT JavaModule
- )
- endif()
- else()
---- a/src/bin/jpwl/CMakeLists.txt
-+++ b/src/bin/jpwl/CMakeLists.txt
-@@ -57,6 +57,6 @@ foreach(exe decompress compress)
- endif()
-
- install(TARGETS ${jpwl_exe}
-- DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
-+ DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
- )
- endforeach()
---- a/src/bin/mj2/CMakeLists.txt
-+++ b/src/bin/mj2/CMakeLists.txt
-@@ -43,5 +43,5 @@ foreach(exe
- endif()
-
- install(TARGETS ${exe}
-- DESTINATION ${OPENJPEG_INSTALL_BIN_DIR})
-+ DESTINATION ${CMAKE_INSTALL_BINDIR})
- endforeach()
---- a/src/lib/openjp2/CMakeLists.txt
-+++ b/src/lib/openjp2/CMakeLists.txt
-@@ -2,7 +2,7 @@ include_regular_expression("^.*$")
-
- #
- install( FILES ${CMAKE_CURRENT_BINARY_DIR}/opj_config.h
-- DESTINATION ${OPENJPEG_INSTALL_INCLUDE_DIR} COMPONENT Headers)
-+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${OPENJPEG_INSTALL_SUBDIR} COMPONENT Headers)
-
- include_directories(
- ${${OPENJPEG_NAMESPACE}_BINARY_DIR}/src/lib/openjp2 # opj_config.h and opj_config_private.h
-@@ -114,21 +114,21 @@ endif()
- # Install library
- install(TARGETS ${INSTALL_LIBS}
- EXPORT OpenJPEGTargets
-- RUNTIME DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
-- LIBRARY DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
-- ARCHIVE DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
-+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
-+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
-+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
- )
-
- # Install includes files
- install(FILES openjpeg.h opj_stdint.h
-- DESTINATION ${OPENJPEG_INSTALL_INCLUDE_DIR} COMPONENT Headers
-+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${OPENJPEG_INSTALL_SUBDIR} COMPONENT Headers
- )
-
- if(BUILD_DOC)
- # install man page of the library
- install(
- FILES ${OPENJPEG_SOURCE_DIR}/doc/man/man3/libopenjp2.3
-- DESTINATION ${OPENJPEG_INSTALL_MAN_DIR}/man3)
-+ DESTINATION ${CMAKE_INSTALL_MANDIR}/man3)
- endif()
-
- if(BUILD_LUTS_GENERATOR)
---- a/src/lib/openjp2/libopenjp2.pc.cmake.in
-+++ b/src/lib/openjp2/libopenjp2.pc.cmake.in
-@@ -1,9 +1,9 @@
- prefix=@CMAKE_INSTALL_PREFIX@
--bindir=${prefix}/@OPENJPEG_INSTALL_BIN_DIR@
--mandir=${prefix}/@OPENJPEG_INSTALL_MAN_DIR@
--docdir=${prefix}/@OPENJPEG_INSTALL_DOC_DIR@
--libdir=${prefix}/@OPENJPEG_INSTALL_LIB_DIR@
--includedir=${prefix}/@OPENJPEG_INSTALL_INCLUDE_DIR@
-+bindir=${prefix}/@CMAKE_INSTALL_BINDIR@
-+mandir=@CMAKE_INSTALL_MANDIR@
-+docdir=@CMAKE_INSTALL_DOCDIR@
-+libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
-+includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@OPENJPEG_INSTALL_SUBDIR@
-
- Name: openjp2
- Description: JPEG2000 library (Part 1 and 2)
---- a/src/lib/openjp3d/CMakeLists.txt
-+++ b/src/lib/openjp3d/CMakeLists.txt
-@@ -34,12 +34,12 @@ endif()
- # Install library
- install(TARGETS ${OPENJP3D_LIBRARY_NAME}
- EXPORT OpenJP3DTargets
-- DESTINATION ${OPENJPEG_INSTALL_LIB_DIR}
-+ DESTINATION ${CMAKE_INSTALL_LIBDIR}
- COMPONENT Libraries
- )
-
- # Install includes files
- install(FILES openjp3d.h
-- DESTINATION ${OPENJPEG_INSTALL_INCLUDE_DIR}
-+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${OPENJPEG_INSTALL_SUBDIR}
- COMPONENT Headers
- )
---- a/src/lib/openjp3d/libopenjp3d.pc.cmake.in
-+++ b/src/lib/openjp3d/libopenjp3d.pc.cmake.in
-@@ -1,9 +1,9 @@
- prefix=@CMAKE_INSTALL_PREFIX@
--bindir=${prefix}/@OPENJPEG_INSTALL_BIN_DIR@
--mandir=${prefix}/@OPENJPEG_INSTALL_MAN_DIR@
--docdir=${prefix}/@OPENJPEG_INSTALL_DOC_DIR@
--libdir=${prefix}/@OPENJPEG_INSTALL_LIB_DIR@
--includedir=${prefix}/@OPENJPEG_INSTALL_INCLUDE_DIR@
-+bindir=${prefix}/@CMAKE_INSTALL_BINDIR@
-+mandir=@CMAKE_INSTALL_MANDIR@
-+docdir=@CMAKE_INSTALL_DOCDIR@
-+libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
-+includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@OPENJPEG_INSTALL_SUBDIR@
-
- Name: openjp3d
- Description: JPEG2000 Extensions for three-dimensional data (Part 10)
---- a/src/lib/openjpip/CMakeLists.txt
-+++ b/src/lib/openjpip/CMakeLists.txt
-@@ -74,9 +74,9 @@ endif()
- # Install library
- install(TARGETS openjpip
- EXPORT OpenJPEGTargets
-- RUNTIME DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
-- LIBRARY DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
-- ARCHIVE DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
-+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
-+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
-+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
- )
-
- if(BUILD_JPIP_SERVER)
-@@ -86,6 +86,6 @@ if(BUILD_JPIP_SERVER)
- PROPERTIES COMPILE_FLAGS "-DSERVER")
- install(TARGETS openjpip_server
- EXPORT OpenJPEGTargets
-- DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
-+ DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
- )
- endif()
---- a/src/lib/openjpip/libopenjpip.pc.cmake.in
-+++ b/src/lib/openjpip/libopenjpip.pc.cmake.in
-@@ -1,9 +1,9 @@
- prefix=@CMAKE_INSTALL_PREFIX@
--bindir=${prefix}/@OPENJPEG_INSTALL_BIN_DIR@
--mandir=${prefix}/@OPENJPEG_INSTALL_MAN_DIR@
--docdir=${prefix}/@OPENJPEG_INSTALL_DOC_DIR@
--libdir=${prefix}/@OPENJPEG_INSTALL_LIB_DIR@
--includedir=${prefix}/@OPENJPEG_INSTALL_INCLUDE_DIR@
-+bindir=${prefix}/@CMAKE_INSTALL_BINDIR@
-+mandir=@CMAKE_INSTALL_MANDIR@
-+docdir=@CMAKE_INSTALL_DOCDIR@
-+libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
-+includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@OPENJPEG_INSTALL_SUBDIR@
-
- Name: openjpip
- Description: JPEG2000 Interactivity tools, APIs and protocols (Part 9)
---- a/src/lib/openjpwl/CMakeLists.txt
-+++ b/src/lib/openjpwl/CMakeLists.txt
-@@ -58,7 +58,7 @@ endif()
- # Install library
- install(TARGETS openjpwl
- EXPORT OpenJPEGTargets
-- RUNTIME DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
-- LIBRARY DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
-- ARCHIVE DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
-+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
-+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
-+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
- )
---- a/src/lib/openjpwl/libopenjpwl.pc.cmake.in
-+++ b/src/lib/openjpwl/libopenjpwl.pc.cmake.in
-@@ -1,9 +1,9 @@
- prefix=@CMAKE_INSTALL_PREFIX@
--bindir=${prefix}/@OPENJPEG_INSTALL_BIN_DIR@
--mandir=${prefix}/@OPENJPEG_INSTALL_MAN_DIR@
--docdir=${prefix}/@OPENJPEG_INSTALL_DOC_DIR@
--libdir=${prefix}/@OPENJPEG_INSTALL_LIB_DIR@
--includedir=${prefix}/@OPENJPEG_INSTALL_INCLUDE_DIR@
-+bindir=${prefix}/@CMAKE_INSTALL_BINDIR@
-+mandir=@CMAKE_INSTALL_MANDIR@
-+docdir=@CMAKE_INSTALL_DOCDIR@
-+libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
-+includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@OPENJPEG_INSTALL_SUBDIR@
-
- Name: openjpwl
- Description: JPEG2000 Wireless library (Part 11)
---- a/src/lib/openmj2/CMakeLists.txt
-+++ b/src/lib/openmj2/CMakeLists.txt
-@@ -53,12 +53,12 @@ endif()
- # Install library
- install(TARGETS ${OPENMJ2_LIBRARY_NAME}
- EXPORT OpenMJ2Targets
-- DESTINATION ${OPENJPEG_INSTALL_LIB_DIR}
-+ DESTINATION ${CMAKE_INSTALL_LIBDIR}
- COMPONENT Libraries
- )
-
- # Install includes files
- #install(FILES mj2.h
--# DESTINATION ${OPENJPEG_INSTALL_INCLUDE_DIR}/${subdir}
-+# DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${OPENJPEG_INSTALL_SUBDIR}
- # COMPONENT Headers
- #)
---- a/wrapping/java/openjp2/CMakeLists.txt
-+++ b/wrapping/java/openjp2/CMakeLists.txt
-@@ -69,5 +69,5 @@ add_custom_target(OpenJPEGJavaJar ALL
- )
-
- install(FILES ${LIBRARY_OUTPUT_PATH}/openjpeg.jar
-- DESTINATION ${OPENJPEG_INSTALL_SHARE_DIR} COMPONENT JavaModule
-+ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR} COMPONENT JavaModule
- )
diff --git a/media-libs/openjpeg/files/openjpeg-2.4.0-r2-fix-segfault.patch b/media-libs/openjpeg/files/openjpeg-2.4.0-r2-fix-segfault.patch
deleted file mode 100644
index 86e1c1fe39cc..000000000000
--- a/media-libs/openjpeg/files/openjpeg-2.4.0-r2-fix-segfault.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Upstream: https://github.com/uclouvain/openjpeg/commit/0afbdcf3e6d0d2bd2e16a0c4d513ee3cf86e460d
-From: xiaoxiaoafeifei <lliangliang2007@163.com>
-Date: Wed, 14 Jul 2021 09:35:13 +0800
-Subject: [PATCH] Fix segfault in src/bin/jp2/opj_decompress.c due to
- uninitialized pointer (fixes #1368) (#1369)
-
---- a/src/bin/jp2/opj_decompress.c
-+++ b/src/bin/jp2/opj_decompress.c
-@@ -1356,7 +1356,7 @@ int main(int argc, char **argv)
- int it_image;
- num_images = get_num_images(img_fol.imgdirpath);
-
-- dirptr = (dircnt_t*)malloc(sizeof(dircnt_t));
-+ dirptr = (dircnt_t*)calloc(1, sizeof(dircnt_t));
- if (!dirptr) {
- destroy_parameters(¶meters);
- return EXIT_FAILURE;
diff --git a/media-libs/openjpeg/files/openjpeg-2.4.0-r3-avoid-mult-overflow.patch b/media-libs/openjpeg/files/openjpeg-2.4.0-r3-avoid-mult-overflow.patch
deleted file mode 100644
index 3733a1b94545..000000000000
--- a/media-libs/openjpeg/files/openjpeg-2.4.0-r3-avoid-mult-overflow.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-Upstream: https://github.com/uclouvain/openjpeg/commit/1daaa0b909aebdf71be36238d16dfbec83c494ed
-Bug: https://bugs.gentoo.org/783513
-CVE-2021-29338
---- a/src/bin/jp2/opj_compress.c
-+++ b/src/bin/jp2/opj_compress.c
-@@ -1967,7 +1967,7 @@ int main(int argc, char **argv)
- goto fin;
- }
- for (i = 0; i < num_images; i++) {
-- dirptr->filename[i] = dirptr->filename_buf + i * OPJ_PATH_LEN;
-+ dirptr->filename[i] = dirptr->filename_buf + (size_t)i * OPJ_PATH_LEN;
- }
- }
- if (load_images(dirptr, img_fol.imgdirpath) == 1) {
---- a/src/bin/jp2/opj_decompress.c
-+++ b/src/bin/jp2/opj_decompress.c
-@@ -1367,7 +1367,6 @@ int main(int argc, char **argv)
- if (img_fol.set_imgdir == 1) {
- int it_image;
- num_images = get_num_images(img_fol.imgdirpath);
--
- dirptr = (dircnt_t*)calloc(1, sizeof(dircnt_t));
- if (!dirptr) {
- destroy_parameters(¶meters);
-@@ -1387,7 +1386,8 @@ int main(int argc, char **argv)
- goto fin;
- }
- for (it_image = 0; it_image < num_images; it_image++) {
-- dirptr->filename[it_image] = dirptr->filename_buf + it_image * OPJ_PATH_LEN;
-+ dirptr->filename[it_image] = dirptr->filename_buf + (size_t)it_image *
-+ OPJ_PATH_LEN;
- }
-
- if (load_images(dirptr, img_fol.imgdirpath) == 1) {
---- a/src/bin/jp2/opj_dump.c
-+++ b/src/bin/jp2/opj_dump.c
-@@ -529,13 +529,13 @@ int main(int argc, char *argv[])
- }
-
- for (it_image = 0; it_image < num_images; it_image++) {
-- dirptr->filename[it_image] = dirptr->filename_buf + it_image * OPJ_PATH_LEN;
-+ dirptr->filename[it_image] = dirptr->filename_buf + (size_t)it_image *
-+ OPJ_PATH_LEN;
- }
-
- if (load_images(dirptr, img_fol.imgdirpath) == 1) {
- goto fails;
- }
--
- if (num_images == 0) {
- fprintf(stdout, "Folder is empty\n");
- goto fails;
diff --git a/media-libs/openjpeg/files/openjpeg-2.4.0-r3-fix-integer-overflow.patch b/media-libs/openjpeg/files/openjpeg-2.4.0-r3-fix-integer-overflow.patch
deleted file mode 100644
index 6ceb5be8f6d1..000000000000
--- a/media-libs/openjpeg/files/openjpeg-2.4.0-r3-fix-integer-overflow.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-opj_compress/opj_uncompress: fix integer overflow in num_images
-CVE-2021-29338
-Bug 783513
-Upstream: https://github.com/uclouvain/openjpeg/commit/79c7d7af598b778c3cdcb455df23d50efc95eb3c
---- a/src/bin/jp2/opj_compress.c
-+++ b/src/bin/jp2/opj_compress.c
-@@ -1959,9 +1959,9 @@ int main(int argc, char **argv)
- num_images = get_num_images(img_fol.imgdirpath);
- dirptr = (dircnt_t*)malloc(sizeof(dircnt_t));
- if (dirptr) {
-- dirptr->filename_buf = (char*)malloc(num_images * OPJ_PATH_LEN * sizeof(
-+ dirptr->filename_buf = (char*)calloc(num_images, OPJ_PATH_LEN * sizeof(
- char)); /* Stores at max 10 image file names*/
-- dirptr->filename = (char**) malloc(num_images * sizeof(char*));
-+ dirptr->filename = (char**) calloc(num_images, sizeof(char*));
- if (!dirptr->filename_buf) {
- ret = 0;
- goto fin;
---- a/src/bin/jp2/opj_decompress.c
-+++ b/src/bin/jp2/opj_decompress.c
-@@ -1374,14 +1374,13 @@ int main(int argc, char **argv)
- return EXIT_FAILURE;
- }
- /* Stores at max 10 image file names */
-- dirptr->filename_buf = (char*)malloc(sizeof(char) *
-- (size_t)num_images * OPJ_PATH_LEN);
-+ dirptr->filename_buf = calloc((size_t) num_images, sizeof(char) * OPJ_PATH_LEN);
- if (!dirptr->filename_buf) {
- failed = 1;
- goto fin;
- }
-
-- dirptr->filename = (char**) malloc((size_t)num_images * sizeof(char*));
-+ dirptr->filename = (char**) calloc((size_t) num_images, sizeof(char*));
-
- if (!dirptr->filename) {
- failed = 1;
---- a/src/bin/jp2/opj_dump.c
-+++ b/src/bin/jp2/opj_dump.c
-@@ -515,13 +515,14 @@ int main(int argc, char *argv[])
- if (!dirptr) {
- return EXIT_FAILURE;
- }
-- dirptr->filename_buf = (char*)malloc((size_t)num_images * OPJ_PATH_LEN * sizeof(
-- char)); /* Stores at max 10 image file names*/
-+ /* Stores at max 10 image file names*/
-+ dirptr->filename_buf = (char*) calloc((size_t) num_images,
-+ OPJ_PATH_LEN * sizeof(char));
- if (!dirptr->filename_buf) {
- free(dirptr);
- return EXIT_FAILURE;
- }
-- dirptr->filename = (char**) malloc((size_t)num_images * sizeof(char*));
-+ dirptr->filename = (char**) calloc((size_t) num_images, sizeof(char*));
-
- if (!dirptr->filename) {
- goto fails;
diff --git a/media-libs/openjpeg/openjpeg-2.4.0-r1.ebuild b/media-libs/openjpeg/openjpeg-2.4.0-r1.ebuild
deleted file mode 100644
index 554c61b5304b..000000000000
--- a/media-libs/openjpeg/openjpeg-2.4.0-r1.ebuild
+++ /dev/null
@@ -1,139 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_ECLASS=cmake
-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!
-MY_TESTDATA_COMMIT="cd724fb1f93e6af41ebc68c4904f4bf2a4cd1e60"
-
-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_20201130.tar.gz )"
-
-LICENSE="BSD-2"
-SLOT="2/7" # based on SONAME
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="doc static-libs test"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- media-libs/lcms:2
- media-libs/libpng:0=
- media-libs/tiff:0
- sys-libs/zlib:="
-DEPEND="${RDEPEND}"
-BDEPEND="
- doc? ( app-doc/doxygen )"
-
-DOCS=( AUTHORS.md CHANGELOG.md NEWS.md README.md THANKS.md )
-
-PATCHES=(
- "${FILESDIR}/${PN}-2.4.0-r1-gnuinstalldirs.patch" # bug 667150
-)
-
-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() {
- 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=$(usex static-libs)
- )
-
- # 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
- multilib_is_native_abi && use test && append-cflags "-ffp-contract=off"
-
- cmake_src_configure
-}
-
-multilib_src_test() {
- if ! multilib_is_native_abi ; then
- elog "Cannot run tests for non-multilib abi."
- return 0
- fi
-
- 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
- local FAILEDTEST_LOG="${BUILD_DIR}/Testing/Temporary/LastTestsFailed.log"
-
- if [[ ! -f "${FAILEDTEST_LOG}" ]] ; then
- # Should never happen
- die "Cannot analyze test failures: LastTestsFailed.log is missing!"
- fi
-
- 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="${T}/known_failures_compiled.txt"
- cat "${S}/tools/travis-ci/knownfailures-all.txt" > "${KNOWN_FAILURES_LIST}" || die
-
- local ARCH_SPECIFIC_FAILURES=
- if use amd64 ; then
- ARCH_SPECIFIC_FAILURES="$(find "${S}/tools/travis-ci/" -name 'knownfailures-*x86_64*.txt' -print0 | sort -z | tail -z -n 1 | tr -d '\0')"
- elif use x86 || use arm || use arm64; then
- ARCH_SPECIFIC_FAILURES="$(find "${S}/tools/travis-ci/" -name 'knownfailures-*i386*.txt' -print0 | sort -z | tail -z -n 1 | tr -d '\0')"
- fi
-
- if [[ -f "${ARCH_SPECIFIC_FAILURES}" ]] ; then
- einfo "Adding architecture specific failures (${ARCH_SPECIFIC_FAILURES}) to known failures list ..."
- cat "${ARCH_SPECIFIC_FAILURES}" >> "${KNOWN_FAILURES_LIST}" || die
- fi
-
- # Logic copied from $S/tools/travis-ci/run.sh
- local FAILEDTEST=
- local FAILURES_LOG="${BUILD_DIR}/Testing/Temporary/failures.txt"
- local HAS_UNKNOWN_TEST_FAILURES=0
-
- echo ""
-
- awk -F: '{ print $2 }' "${FAILEDTEST_LOG}" > "${FAILURES_LOG}"
- while read FAILEDTEST; do
- # is this failure known?
- if grep -x "${FAILEDTEST}" "${KNOWN_FAILURES_LIST}" > /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. No new/unknown test failure(s) found!"
- fi
-
- return 0
- fi
-}
diff --git a/media-libs/openjpeg/openjpeg-2.4.0-r2.ebuild b/media-libs/openjpeg/openjpeg-2.4.0-r2.ebuild
deleted file mode 100644
index cecc59d76a7f..000000000000
--- a/media-libs/openjpeg/openjpeg-2.4.0-r2.ebuild
+++ /dev/null
@@ -1,140 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_ECLASS=cmake
-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!
-MY_TESTDATA_COMMIT="cd724fb1f93e6af41ebc68c4904f4bf2a4cd1e60"
-
-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_20201130.tar.gz )"
-
-LICENSE="BSD-2"
-SLOT="2/7" # based on SONAME
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="doc static-libs test"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- media-libs/lcms:2
- media-libs/libpng:0=
- media-libs/tiff:0
- sys-libs/zlib:="
-DEPEND="${RDEPEND}"
-BDEPEND="
- doc? ( app-doc/doxygen )"
-
-DOCS=( AUTHORS.md CHANGELOG.md NEWS.md README.md THANKS.md )
-
-PATCHES=(
- "${FILESDIR}/${PN}-2.4.0-r1-gnuinstalldirs.patch" # bug 667150
- "${FILESDIR}/${PN}-2.4.0-r2-fix-segfault.patch" # bug 832007
-)
-
-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() {
- 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=$(usex static-libs)
- )
-
- # 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
- multilib_is_native_abi && use test && append-cflags "-ffp-contract=off"
-
- cmake_src_configure
-}
-
-multilib_src_test() {
- if ! multilib_is_native_abi ; then
- elog "Cannot run tests for non-multilib abi."
- return 0
- fi
-
- 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
- local FAILEDTEST_LOG="${BUILD_DIR}/Testing/Temporary/LastTestsFailed.log"
-
- if [[ ! -f "${FAILEDTEST_LOG}" ]] ; then
- # Should never happen
- die "Cannot analyze test failures: LastTestsFailed.log is missing!"
- fi
-
- 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="${T}/known_failures_compiled.txt"
- cat "${S}/tools/travis-ci/knownfailures-all.txt" > "${KNOWN_FAILURES_LIST}" || die
-
- local ARCH_SPECIFIC_FAILURES=
- if use amd64 ; then
- ARCH_SPECIFIC_FAILURES="$(find "${S}/tools/travis-ci/" -name 'knownfailures-*x86_64*.txt' -print0 | sort -z | tail -z -n 1 | tr -d '\0')"
- elif use x86 || use arm || use arm64; then
- ARCH_SPECIFIC_FAILURES="$(find "${S}/tools/travis-ci/" -name 'knownfailures-*i386*.txt' -print0 | sort -z | tail -z -n 1 | tr -d '\0')"
- fi
-
- if [[ -f "${ARCH_SPECIFIC_FAILURES}" ]] ; then
- einfo "Adding architecture specific failures (${ARCH_SPECIFIC_FAILURES}) to known failures list ..."
- cat "${ARCH_SPECIFIC_FAILURES}" >> "${KNOWN_FAILURES_LIST}" || die
- fi
-
- # Logic copied from $S/tools/travis-ci/run.sh
- local FAILEDTEST=
- local FAILURES_LOG="${BUILD_DIR}/Testing/Temporary/failures.txt"
- local HAS_UNKNOWN_TEST_FAILURES=0
-
- echo ""
-
- awk -F: '{ print $2 }' "${FAILEDTEST_LOG}" > "${FAILURES_LOG}"
- while read FAILEDTEST; do
- # is this failure known?
- if grep -x "${FAILEDTEST}" "${KNOWN_FAILURES_LIST}" > /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. No new/unknown test failure(s) found!"
- fi
-
- return 0
- fi
-}
diff --git a/media-libs/openjpeg/openjpeg-2.4.0-r3.ebuild b/media-libs/openjpeg/openjpeg-2.4.0-r3.ebuild
deleted file mode 100644
index d2b85a157420..000000000000
--- a/media-libs/openjpeg/openjpeg-2.4.0-r3.ebuild
+++ /dev/null
@@ -1,142 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_ECLASS=cmake
-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!
-MY_TESTDATA_COMMIT="cd724fb1f93e6af41ebc68c4904f4bf2a4cd1e60"
-
-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_20201130.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 ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="doc static-libs test"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- media-libs/lcms:2
- media-libs/libpng:0=
- media-libs/tiff:0
- sys-libs/zlib:="
-DEPEND="${RDEPEND}"
-BDEPEND="
- doc? ( app-doc/doxygen )"
-
-DOCS=( AUTHORS.md CHANGELOG.md NEWS.md README.md THANKS.md )
-
-PATCHES=(
- "${FILESDIR}/${PN}-2.4.0-r1-gnuinstalldirs.patch" # bug 667150
- "${FILESDIR}/${PN}-2.4.0-r2-fix-segfault.patch" # bug 832007
- "${FILESDIR}/${PN}-2.4.0-r3-fix-integer-overflow.patch" # bug 783513
- "${FILESDIR}/${PN}-2.4.0-r3-avoid-mult-overflow.patch" # bug 783513
-)
-
-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() {
- 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=$(usex static-libs)
- )
-
- # 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
- multilib_is_native_abi && use test && append-cflags "-ffp-contract=off"
-
- cmake_src_configure
-}
-
-multilib_src_test() {
- if ! multilib_is_native_abi ; then
- elog "Cannot run tests for non-multilib abi."
- return 0
- fi
-
- 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
- local FAILEDTEST_LOG="${BUILD_DIR}/Testing/Temporary/LastTestsFailed.log"
-
- if [[ ! -f "${FAILEDTEST_LOG}" ]] ; then
- # Should never happen
- die "Cannot analyze test failures: LastTestsFailed.log is missing!"
- fi
-
- 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="${T}/known_failures_compiled.txt"
- cat "${S}/tools/travis-ci/knownfailures-all.txt" > "${KNOWN_FAILURES_LIST}" || die
-
- local ARCH_SPECIFIC_FAILURES=
- if use amd64 ; then
- ARCH_SPECIFIC_FAILURES="$(find "${S}/tools/travis-ci/" -name 'knownfailures-*x86_64*.txt' -print0 | sort -z | tail -z -n 1 | tr -d '\0')"
- elif use x86 || use arm || use arm64; then
- ARCH_SPECIFIC_FAILURES="$(find "${S}/tools/travis-ci/" -name 'knownfailures-*i386*.txt' -print0 | sort -z | tail -z -n 1 | tr -d '\0')"
- fi
-
- if [[ -f "${ARCH_SPECIFIC_FAILURES}" ]] ; then
- einfo "Adding architecture specific failures (${ARCH_SPECIFIC_FAILURES}) to known failures list ..."
- cat "${ARCH_SPECIFIC_FAILURES}" >> "${KNOWN_FAILURES_LIST}" || die
- fi
-
- # Logic copied from $S/tools/travis-ci/run.sh
- local FAILEDTEST=
- local FAILURES_LOG="${BUILD_DIR}/Testing/Temporary/failures.txt"
- local HAS_UNKNOWN_TEST_FAILURES=0
-
- echo ""
-
- awk -F: '{ print $2 }' "${FAILEDTEST_LOG}" > "${FAILURES_LOG}"
- while read FAILEDTEST; do
- # is this failure known?
- if grep -x "${FAILEDTEST}" "${KNOWN_FAILURES_LIST}" > /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. No new/unknown test failure(s) found!"
- fi
-
- return 0
- fi
-}
diff --git a/media-libs/openjpeg/openjpeg-2.4.0.ebuild b/media-libs/openjpeg/openjpeg-2.4.0.ebuild
deleted file mode 100644
index 2541abf1fe5b..000000000000
--- a/media-libs/openjpeg/openjpeg-2.4.0.ebuild
+++ /dev/null
@@ -1,139 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_ECLASS=cmake
-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!
-MY_TESTDATA_COMMIT="cd724fb1f93e6af41ebc68c4904f4bf2a4cd1e60"
-
-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_20201130.tar.gz )"
-
-LICENSE="BSD-2"
-SLOT="2/7" # based on SONAME
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="doc static-libs test"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- media-libs/lcms:2
- media-libs/libpng:0=
- media-libs/tiff:0
- sys-libs/zlib:="
-DEPEND="${RDEPEND}"
-BDEPEND="
- doc? ( app-doc/doxygen )"
-
-DOCS=( AUTHORS.md CHANGELOG.md NEWS.md README.md THANKS.md )
-
-PATCHES=(
- "${FILESDIR}/${PN}-2.4.0-gnuinstalldirs.patch" # bug 667150
-)
-
-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() {
- 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=$(usex static-libs)
- )
-
- # 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
- multilib_is_native_abi && use test && append-cflags "-ffp-contract=off"
-
- cmake_src_configure
-}
-
-multilib_src_test() {
- if ! multilib_is_native_abi ; then
- elog "Cannot run tests for non-multilib abi."
- return 0
- fi
-
- 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
- local FAILEDTEST_LOG="${BUILD_DIR}/Testing/Temporary/LastTestsFailed.log"
-
- if [[ ! -f "${FAILEDTEST_LOG}" ]] ; then
- # Should never happen
- die "Cannot analyze test failures: LastTestsFailed.log is missing!"
- fi
-
- 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="${T}/known_failures_compiled.txt"
- cat "${S}/tools/travis-ci/knownfailures-all.txt" > "${KNOWN_FAILURES_LIST}" || die
-
- local ARCH_SPECIFIC_FAILURES=
- if use amd64 ; then
- ARCH_SPECIFIC_FAILURES="$(find "${S}/tools/travis-ci/" -name 'knownfailures-*x86_64*.txt' -print0 | sort -z | tail -z -n 1 | tr -d '\0')"
- elif use x86 || use arm || use arm64; then
- ARCH_SPECIFIC_FAILURES="$(find "${S}/tools/travis-ci/" -name 'knownfailures-*i386*.txt' -print0 | sort -z | tail -z -n 1 | tr -d '\0')"
- fi
-
- if [[ -f "${ARCH_SPECIFIC_FAILURES}" ]] ; then
- einfo "Adding architecture specific failures (${ARCH_SPECIFIC_FAILURES}) to known failures list ..."
- cat "${ARCH_SPECIFIC_FAILURES}" >> "${KNOWN_FAILURES_LIST}" || die
- fi
-
- # Logic copied from $S/tools/travis-ci/run.sh
- local FAILEDTEST=
- local FAILURES_LOG="${BUILD_DIR}/Testing/Temporary/failures.txt"
- local HAS_UNKNOWN_TEST_FAILURES=0
-
- echo ""
-
- awk -F: '{ print $2 }' "${FAILEDTEST_LOG}" > "${FAILURES_LOG}"
- while read FAILEDTEST; do
- # is this failure known?
- if grep -x "${FAILEDTEST}" "${KNOWN_FAILURES_LIST}" > /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. No new/unknown test failure(s) found!"
- fi
-
- return 0
- fi
-}
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-libs/openjpeg/, media-libs/openjpeg/files/
@ 2023-07-14 17:06 Matt Turner
0 siblings, 0 replies; 10+ messages in thread
From: Matt Turner @ 2023-07-14 17:06 UTC (permalink / raw
To: gentoo-commits
commit: 55b28b4d2dbd4aa82f517c0dd39349f8bf82f6f3
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Fri Jul 14 16:52:47 2023 +0000
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Fri Jul 14 17:05:47 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=55b28b4d
media-libs/openjpeg: Fix cross-compiling support
Without these upstream patches, e.g. poppler fails to cross-compile
against openjpeg.
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
.../files/openjpeg-2.5.0-gnuinstalldirs-r2.patch | 500 +++++++++++++++++++++
media-libs/openjpeg/openjpeg-2.5.0-r6.ebuild | 103 +++++
2 files changed, 603 insertions(+)
diff --git a/media-libs/openjpeg/files/openjpeg-2.5.0-gnuinstalldirs-r2.patch b/media-libs/openjpeg/files/openjpeg-2.5.0-gnuinstalldirs-r2.patch
new file mode 100644
index 000000000000..89b63af5d827
--- /dev/null
+++ b/media-libs/openjpeg/files/openjpeg-2.5.0-gnuinstalldirs-r2.patch
@@ -0,0 +1,500 @@
+From c7bccf0515892617af984328e96cff5b4a6cd6d3 Mon Sep 17 00:00:00 2001
+From: Thomas Bracht Laumann Jespersen <t@laumann.xyz>
+Date: Sun, 7 Aug 2022 16:42:01 +0200
+Subject: [PATCH] CMake: switch to GNUInstallDirs (#1424)
+
+* Add GNUInstallDirs for standard installation directories
+
+Distributions are given standard variables for already existing hooks.
+Multiarch libdirs is taken care of automagically.
+Raises minimum cmake version by a little.
+
+* Handle CMAKE_INSTALL_xxx being absolute paths for .pc file generation
+
+In some cases the CMAKE_INSTAL_{BIN,MAN,DOC,LIB,INCLUDE}DIR variables
+may turn out to be absolute paths in which case prepending ${prefix} in
+the pkg-config .pc files will result in incorrect values.
+
+For .pc file generation, figure out if these variables are absolute and
+omit the prefix in the configured file when so.
+
+See: https://github.com/OSGeo/PROJ/commit/ab25e4b7ed9544e668282dcd293cfaaa2e56dbdf
+---
+ CMakeLists.txt | 77 ++++++++----------------
+ cmake/OpenJPEGConfig.cmake.in | 8 +--
+ doc/CMakeLists.txt | 2 +-
+ src/bin/jp2/CMakeLists.txt | 4 +-
+ src/bin/jpip/CMakeLists.txt | 10 +--
+ src/lib/openjp2/CMakeLists.txt | 12 ++--
+ src/lib/openjp2/libopenjp2.pc.cmake.in | 10 +--
+ src/lib/openjpip/CMakeLists.txt | 8 +--
+ src/lib/openjpip/libopenjpip.pc.cmake.in | 10 +--
+ wrapping/java/openjp2/CMakeLists.txt | 2 +-
+ 10 files changed, 56 insertions(+), 87 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 8f89df72..fcf4709d 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -7,7 +7,7 @@
+ # For this purpose you can define a CMake var: OPENJPEG_NAMESPACE to whatever you like
+ # e.g.:
+ # set(OPENJPEG_NAMESPACE "GDCMOPENJPEG")
+-cmake_minimum_required(VERSION 2.8.2)
++cmake_minimum_required(VERSION 2.8.5)
+
+ if(COMMAND CMAKE_POLICY)
+ cmake_policy(SET CMP0003 NEW)
+@@ -105,55 +105,24 @@ endif()
+
+ # --------------------------------------------------------------------------
+ # Install directories
++string(TOLOWER ${PROJECT_NAME} PROJECT_NAME)
++include(GNUInstallDirs)
++
+ # Build DOCUMENTATION (not in ALL target and only if Doxygen is found)
+ option(BUILD_DOC "Build the HTML documentation (with doxygen if available)." OFF)
+
+-string(TOLOWER ${PROJECT_NAME} projectname)
+-set(OPENJPEG_INSTALL_SUBDIR "${projectname}-${OPENJPEG_VERSION_MAJOR}.${OPENJPEG_VERSION_MINOR}")
+-
+-if(NOT OPENJPEG_INSTALL_BIN_DIR)
+- set(OPENJPEG_INSTALL_BIN_DIR "bin")
+-endif()
+-
+-if(NOT OPENJPEG_INSTALL_LIB_DIR)
+- set(OPENJPEG_INSTALL_LIB_DIR "lib")
+-endif()
+-
+-if(NOT OPENJPEG_INSTALL_SHARE_DIR)
+- set(OPENJPEG_INSTALL_SHARE_DIR "share")
+-endif()
+-
+-if(NOT OPENJPEG_INSTALL_DATA_DIR)
+- set(OPENJPEG_INSTALL_DATA_DIR "${OPENJPEG_INSTALL_SHARE_DIR}/${OPENJPEG_INSTALL_SUBDIR}")
+-endif()
+-
+-if(NOT OPENJPEG_INSTALL_INCLUDE_DIR)
+- set(OPENJPEG_INSTALL_INCLUDE_DIR "include/${OPENJPEG_INSTALL_SUBDIR}")
+-endif()
+-
+-if(BUILD_DOC)
+-if(NOT OPENJPEG_INSTALL_MAN_DIR)
+- set(OPENJPEG_INSTALL_MAN_DIR "share/man/")
+-endif()
+-
+-if(NOT OPENJPEG_INSTALL_DOC_DIR)
+- set(OPENJPEG_INSTALL_DOC_DIR "share/doc/${OPENJPEG_INSTALL_SUBDIR}")
+-endif()
+-endif()
++set(OPENJPEG_INSTALL_SUBDIR "${PROJECT_NAME}-${OPENJPEG_VERSION_MAJOR}.${OPENJPEG_VERSION_MINOR}")
+
+ if(NOT OPENJPEG_INSTALL_JNI_DIR)
+ if(WIN32)
+- set(OPENJPEG_INSTALL_JNI_DIR ${OPENJPEG_INSTALL_BIN_DIR})
++ set(OPENJPEG_INSTALL_JNI_DIR ${CMAKE_INSTALL_BINDIR})
+ else()
+- set(OPENJPEG_INSTALL_JNI_DIR ${OPENJPEG_INSTALL_LIB_DIR})
++ set(OPENJPEG_INSTALL_JNI_DIR ${CMAKE_INSTALL_LIBDIR})
+ endif()
+ endif()
+
+ if(NOT OPENJPEG_INSTALL_PACKAGE_DIR)
+- # We could install *.cmake files in share/ however those files contains
+- # hardcoded path to libraries on a multi-arch system (fedora/debian) those
+- # path will be different (lib/i386-linux-gnu vs lib/x86_64-linux-gnu)
+- set(OPENJPEG_INSTALL_PACKAGE_DIR "${OPENJPEG_INSTALL_LIB_DIR}/${OPENJPEG_INSTALL_SUBDIR}")
++ set(OPENJPEG_INSTALL_PACKAGE_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/${OPENJPEG_INSTALL_SUBDIR}")
+ endif()
+
+ if (APPLE)
+@@ -161,7 +130,7 @@ if (APPLE)
+ # For cmake >= 3.0, we turn on CMP0042 and
+ # https://cmake.org/cmake/help/v3.0/policy/CMP0042.html mentions
+ # "Projects wanting @rpath in a target’s install name may remove any setting of the INSTALL_NAME_DIR and CMAKE_INSTALL_NAME_DIR variables"
+- list(APPEND OPENJPEG_LIBRARY_PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${OPENJPEG_INSTALL_LIB_DIR}")
++ list(APPEND OPENJPEG_LIBRARY_PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_FULL_LIBDIR}")
+ endif()
+ option(OPJ_USE_DSYMUTIL "Call dsymutil on binaries after build." OFF)
+ endif()
+@@ -346,14 +315,6 @@ install( FILES ${OPENJPEG_BINARY_DIR}/OpenJPEGConfig.cmake
+ )
+
+ #-----------------------------------------------------------------------------
+-# install CHANGES and LICENSE
+-if(BUILD_DOC)
+-if(EXISTS ${OPENJPEG_SOURCE_DIR}/CHANGES)
+- install(FILES CHANGES DESTINATION ${OPENJPEG_INSTALL_DOC_DIR})
+-endif()
+-
+-install(FILES LICENSE DESTINATION ${OPENJPEG_INSTALL_DOC_DIR})
+-endif()
+
+ include (cmake/OpenJPEGCPack.cmake)
+
+@@ -366,18 +327,30 @@ else()
+ option(BUILD_PKGCONFIG_FILES "Build and install pkg-config files" OFF)
+ endif()
+ if(BUILD_PKGCONFIG_FILES)
+- # install in lib and not share (see multi-arch note above)
++ macro(set_variable_from_rel_or_absolute_path var root rel_or_abs_path)
++ if(IS_ABSOLUTE "${rel_or_abs_path}")
++ set(${var} "${rel_or_abs_path}")
++ else()
++ set(${var} "${root}/${rel_or_abs_path}")
++ endif()
++ endmacro()
++ set_variable_from_rel_or_absolute_path("bindir" "\\\${prefix}" "${CMAKE_INSTALL_BINDIR}")
++ set_variable_from_rel_or_absolute_path("mandir" "\\\${prefix}" "${CMAKE_INSTALL_MANDIR}")
++ set_variable_from_rel_or_absolute_path("docdir" "\\\${prefix}" "${CMAKE_INSTALL_DOCDIR}")
++ set_variable_from_rel_or_absolute_path("libdir" "\\\${prefix}" "${CMAKE_INSTALL_LIBDIR}")
++ set_variable_from_rel_or_absolute_path("includedir" "\\\${prefix}" "${CMAKE_INSTALL_INCLUDEDIR}/${OPENJPEG_INSTALL_SUBDIR}")
++
++ # install in lib and not share (CMAKE_INSTALL_LIBDIR takes care of it for multi-arch)
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/lib/openjp2/libopenjp2.pc.cmake.in
+ ${CMAKE_CURRENT_BINARY_DIR}/libopenjp2.pc @ONLY)
+ install( FILES ${CMAKE_CURRENT_BINARY_DIR}/libopenjp2.pc DESTINATION
+- ${OPENJPEG_INSTALL_LIB_DIR}/pkgconfig )
++ ${CMAKE_INSTALL_LIBDIR}/pkgconfig )
+ #
+ if(BUILD_JPIP)
+- # install in lib and not share (see multi-arch note above)
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/lib/openjpip/libopenjpip.pc.cmake.in
+ ${CMAKE_CURRENT_BINARY_DIR}/libopenjpip.pc @ONLY)
+ install( FILES ${CMAKE_CURRENT_BINARY_DIR}/libopenjpip.pc DESTINATION
+- ${OPENJPEG_INSTALL_LIB_DIR}/pkgconfig )
++ ${CMAKE_INSTALL_LIBDIR}/pkgconfig )
+ endif()
+ endif()
+
+diff --git a/cmake/OpenJPEGConfig.cmake.in b/cmake/OpenJPEGConfig.cmake.in
+index 6e88036c..fccd0cc6 100644
+--- a/cmake/OpenJPEGConfig.cmake.in
++++ b/cmake/OpenJPEGConfig.cmake.in
+@@ -27,12 +27,8 @@ if(EXISTS ${SELF_DIR}/OpenJPEGTargets.cmake)
+ # This is an install tree
+ include(${SELF_DIR}/OpenJPEGTargets.cmake)
+
+- # We find a relative path from the PKG directory to header files.
+- set(PKG_DIR "@CMAKE_INSTALL_PREFIX@/@OPENJPEG_INSTALL_PACKAGE_DIR@")
+- set(INC_DIR "@CMAKE_INSTALL_PREFIX@/@OPENJPEG_INSTALL_INCLUDE_DIR@")
+- file(RELATIVE_PATH PKG_TO_INC_RPATH "${PKG_DIR}" "${INC_DIR}")
+-
+- get_filename_component(OPENJPEG_INCLUDE_DIRS "${SELF_DIR}/${PKG_TO_INC_RPATH}" REALPATH)
++ set(INC_DIR "@CMAKE_INSTALL_FULL_INCLUDEDIR@/@OPENJPEG_INSTALL_SUBDIR@")
++ get_filename_component(OPENJPEG_INCLUDE_DIRS "${INC_DIR}" ABSOLUTE)
+
+ else()
+ if(EXISTS ${SELF_DIR}/OpenJPEGExports.cmake)
+diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
+index e4f9b37c..ed5cb44c 100644
+--- a/doc/CMakeLists.txt
++++ b/doc/CMakeLists.txt
+@@ -44,7 +44,7 @@ if(DOXYGEN_FOUND)
+
+ # install HTML documentation (install png files too):
+ install(DIRECTORY ${CMAKE_BINARY_DIR}/doc/html
+- DESTINATION ${OPENJPEG_INSTALL_DOC_DIR}
++ DESTINATION ${CMAKE_INSTALL_DOCDIR}
+ PATTERN ".svn" EXCLUDE
+ )
+ else()
+diff --git a/src/bin/jp2/CMakeLists.txt b/src/bin/jp2/CMakeLists.txt
+index 4d4bd952..29b4dd20 100644
+--- a/src/bin/jp2/CMakeLists.txt
++++ b/src/bin/jp2/CMakeLists.txt
+@@ -67,7 +67,7 @@ foreach(exe opj_decompress opj_compress opj_dump)
+ # Install exe
+ install(TARGETS ${exe}
+ EXPORT OpenJPEGTargets
+- DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
++ DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
+ )
+ if(OPJ_USE_DSYMUTIL)
+ add_custom_command(TARGET ${exe} POST_BUILD
+@@ -83,6 +83,6 @@ install(
+ FILES ${OPENJPEG_SOURCE_DIR}/doc/man/man1/opj_compress.1
+ ${OPENJPEG_SOURCE_DIR}/doc/man/man1/opj_decompress.1
+ ${OPENJPEG_SOURCE_DIR}/doc/man/man1/opj_dump.1
+- DESTINATION ${OPENJPEG_INSTALL_MAN_DIR}/man1)
++ DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
+ #
+ endif()
+diff --git a/src/bin/jpip/CMakeLists.txt b/src/bin/jpip/CMakeLists.txt
+index c16e4271..a501cfa5 100644
+--- a/src/bin/jpip/CMakeLists.txt
++++ b/src/bin/jpip/CMakeLists.txt
+@@ -13,7 +13,7 @@ add_executable(opj_jpip_addxml opj_jpip_addxml.c)
+ # Install exe
+ install(TARGETS opj_jpip_addxml
+ EXPORT OpenJPEGTargets
+- DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
++ DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
+ )
+
+ if(BUILD_JPIP_SERVER)
+@@ -38,7 +38,7 @@ if(BUILD_JPIP_SERVER)
+ # Install exe
+ install(TARGETS opj_server
+ EXPORT OpenJPEGTargets
+- DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
++ DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
+ )
+ endif()
+
+@@ -52,7 +52,7 @@ add_executable(${exe} ${exe}.c)
+ target_link_libraries(${exe} openjpip)
+ install(TARGETS ${exe}
+ EXPORT OpenJPEGTargets
+- DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
++ DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
+ )
+ endforeach()
+
+@@ -123,7 +123,7 @@ if(Java_Development_FOUND AND Java_JAVAC_EXECUTABLE)
+ )
+
+ install(FILES ${LIBRARY_OUTPUT_PATH}/opj_jpip_viewer.jar
+- DESTINATION ${OPENJPEG_INSTALL_SHARE_DIR} COMPONENT JavaModule
++ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR} COMPONENT JavaModule
+ )
+ else()
+ # opj_viewer (simple, no xerces)
+@@ -153,7 +153,7 @@ if(Java_Development_FOUND AND Java_JAVAC_EXECUTABLE)
+ )
+
+ install(FILES ${LIBRARY_OUTPUT_PATH}/opj_jpip_viewer.jar
+- DESTINATION ${OPENJPEG_INSTALL_SHARE_DIR} COMPONENT JavaModule
++ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR} COMPONENT JavaModule
+ )
+ endif()
+ else()
+diff --git a/src/lib/openjp2/CMakeLists.txt b/src/lib/openjp2/CMakeLists.txt
+index ea4131a3..e65cb9d1 100644
+--- a/src/lib/openjp2/CMakeLists.txt
++++ b/src/lib/openjp2/CMakeLists.txt
+@@ -2,7 +2,7 @@ include_regular_expression("^.*$")
+
+ #
+ install( FILES ${CMAKE_CURRENT_BINARY_DIR}/opj_config.h
+- DESTINATION ${OPENJPEG_INSTALL_INCLUDE_DIR} COMPONENT Headers)
++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${OPENJPEG_INSTALL_SUBDIR} COMPONENT Headers)
+
+ include_directories(
+ ${${OPENJPEG_NAMESPACE}_BINARY_DIR}/src/lib/openjp2 # opj_config.h and opj_config_private.h
+@@ -117,21 +117,21 @@ endif()
+ # Install library
+ install(TARGETS ${INSTALL_LIBS}
+ EXPORT OpenJPEGTargets
+- RUNTIME DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
+- LIBRARY DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
+- ARCHIVE DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
+ )
+
+ # Install includes files
+ install(FILES openjpeg.h opj_stdint.h
+- DESTINATION ${OPENJPEG_INSTALL_INCLUDE_DIR} COMPONENT Headers
++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${OPENJPEG_INSTALL_SUBDIR} COMPONENT Headers
+ )
+
+ if(BUILD_DOC)
+ # install man page of the library
+ install(
+ FILES ${OPENJPEG_SOURCE_DIR}/doc/man/man3/libopenjp2.3
+- DESTINATION ${OPENJPEG_INSTALL_MAN_DIR}/man3)
++ DESTINATION ${CMAKE_INSTALL_MANDIR}/man3)
+ endif()
+
+ if(BUILD_LUTS_GENERATOR)
+diff --git a/src/lib/openjp2/libopenjp2.pc.cmake.in b/src/lib/openjp2/libopenjp2.pc.cmake.in
+index 00fdacd1..2ade312b 100644
+--- a/src/lib/openjp2/libopenjp2.pc.cmake.in
++++ b/src/lib/openjp2/libopenjp2.pc.cmake.in
+@@ -1,9 +1,9 @@
+ prefix=@CMAKE_INSTALL_PREFIX@
+-bindir=${prefix}/@OPENJPEG_INSTALL_BIN_DIR@
+-mandir=${prefix}/@OPENJPEG_INSTALL_MAN_DIR@
+-docdir=${prefix}/@OPENJPEG_INSTALL_DOC_DIR@
+-libdir=${prefix}/@OPENJPEG_INSTALL_LIB_DIR@
+-includedir=${prefix}/@OPENJPEG_INSTALL_INCLUDE_DIR@
++bindir=@bindir@
++mandir=@mandir@
++docdir=@docdir@
++libdir=@libdir@
++includedir=@includedir@
+
+ Name: openjp2
+ Description: JPEG2000 library (Part 1 and 2)
+diff --git a/src/lib/openjpip/CMakeLists.txt b/src/lib/openjpip/CMakeLists.txt
+index b3cb8ce8..aace36d4 100644
+--- a/src/lib/openjpip/CMakeLists.txt
++++ b/src/lib/openjpip/CMakeLists.txt
+@@ -74,9 +74,9 @@ endif()
+ # Install library
+ install(TARGETS openjpip
+ EXPORT OpenJPEGTargets
+- RUNTIME DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
+- LIBRARY DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
+- ARCHIVE DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
+ )
+
+ if(BUILD_JPIP_SERVER)
+@@ -86,6 +86,6 @@ if(BUILD_JPIP_SERVER)
+ PROPERTIES COMPILE_FLAGS "-DSERVER")
+ install(TARGETS openjpip_server
+ EXPORT OpenJPEGTargets
+- DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
++ DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
+ )
+ endif()
+diff --git a/src/lib/openjpip/libopenjpip.pc.cmake.in b/src/lib/openjpip/libopenjpip.pc.cmake.in
+index 183b68ff..fc97ef04 100644
+--- a/src/lib/openjpip/libopenjpip.pc.cmake.in
++++ b/src/lib/openjpip/libopenjpip.pc.cmake.in
+@@ -1,9 +1,9 @@
+ prefix=@CMAKE_INSTALL_PREFIX@
+-bindir=${prefix}/@OPENJPEG_INSTALL_BIN_DIR@
+-mandir=${prefix}/@OPENJPEG_INSTALL_MAN_DIR@
+-docdir=${prefix}/@OPENJPEG_INSTALL_DOC_DIR@
+-libdir=${prefix}/@OPENJPEG_INSTALL_LIB_DIR@
+-includedir=${prefix}/@OPENJPEG_INSTALL_INCLUDE_DIR@
++bindir=@bindir@
++mandir=@mandir@
++docdir=@docdir@
++libdir=@libdir@
++includedir=@includedir@
+
+ Name: openjpip
+ Description: JPEG2000 Interactivity tools, APIs and protocols (Part 9)
+diff --git a/wrapping/java/openjp2/CMakeLists.txt b/wrapping/java/openjp2/CMakeLists.txt
+index 6a9ebc20..b178d2cf 100644
+--- a/wrapping/java/openjp2/CMakeLists.txt
++++ b/wrapping/java/openjp2/CMakeLists.txt
+@@ -66,5 +66,5 @@ add_custom_target(OpenJPEGJavaJar ALL
+ )
+
+ install(FILES ${LIBRARY_OUTPUT_PATH}/openjpeg.jar
+- DESTINATION ${OPENJPEG_INSTALL_SHARE_DIR} COMPONENT JavaModule
++ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR} COMPONENT JavaModule
+ )
+--
+2.41.0
+
+From c6ceb84c221b5094f1e8a4c0c247dee3fb5074e8 Mon Sep 17 00:00:00 2001
+From: Alex Richardson <arichardson@FreeBSD.org>
+Date: Thu, 11 Aug 2022 12:09:04 +0000
+Subject: [PATCH] Make OpenJPEGConfig.cmake relocatable with CMake > 3.0
+
+Using CMakePackageConfigHelpers, we can generate a relocatable
+OpenJPEGConfig.config, using the PATH_VARS feature to make
+CMAKE_INSTALL_LIBDIR relative to the installed location.
+This change is needed for me when cross-compiling since
+CMAKE_INSTALL_FULL_LIBDIR is a path inside the sysroot rather than
+an absolute path to the actual includes. Without this change poppler
+ends up passing a -I flag that does not exist.
+
+This includes fallback code for CMake 2.8, which adds a bit of complexity,
+since I'm not sure if raising the minimum to 3.0 (now over 8 years old)
+is acceptable.
+---
+ CMakeLists.txt | 21 ++++++++++++++++-----
+ cmake/OpenJPEGConfig.cmake.in | 3 ++-
+ 2 files changed, 18 insertions(+), 6 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index fcf4709d..292b2132 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -304,12 +304,23 @@ if(BUILD_TESTING)
+ endif()
+
+ #-----------------------------------------------------------------------------
+-# install all targets referenced as OPENJPEGTargets
++# install all targets referenced as OPENJPEGTargets (relocatable with CMake 3.0+)
+ install(EXPORT OpenJPEGTargets DESTINATION ${OPENJPEG_INSTALL_PACKAGE_DIR})
+-configure_file( ${${OPENJPEG_NAMESPACE}_SOURCE_DIR}/cmake/OpenJPEGConfig.cmake.in
+- ${${OPENJPEG_NAMESPACE}_BINARY_DIR}/OpenJPEGConfig.cmake
+- @ONLY
+-)
++if (${CMAKE_VERSION} VERSION_LESS 3.0)
++ set(PACKAGE_INIT)
++ set(PACKAGE_CMAKE_INSTALL_INCLUDEDIR ${CMAKE_INSTALL_FULL_INCLUDEDIR})
++ configure_file( ${${OPENJPEG_NAMESPACE}_SOURCE_DIR}/cmake/OpenJPEGConfig.cmake.in
++ ${${OPENJPEG_NAMESPACE}_BINARY_DIR}/OpenJPEGConfig.cmake
++ @ONLY
++ )
++else()
++ include(CMakePackageConfigHelpers)
++ configure_package_config_file(${CMAKE_CURRENT_LIST_DIR}/cmake/OpenJPEGConfig.cmake.in
++ ${OPENJPEG_BINARY_DIR}/OpenJPEGConfig.cmake
++ INSTALL_DESTINATION ${OPENJPEG_INSTALL_PACKAGE_DIR}
++ PATH_VARS CMAKE_INSTALL_INCLUDEDIR)
++endif()
++
+ install( FILES ${OPENJPEG_BINARY_DIR}/OpenJPEGConfig.cmake
+ DESTINATION ${OPENJPEG_INSTALL_PACKAGE_DIR}
+ )
+diff --git a/cmake/OpenJPEGConfig.cmake.in b/cmake/OpenJPEGConfig.cmake.in
+index fccd0cc6..bb7b79c1 100644
+--- a/cmake/OpenJPEGConfig.cmake.in
++++ b/cmake/OpenJPEGConfig.cmake.in
+@@ -5,6 +5,7 @@
+ # This file is configured by OPENJPEG and used by the UseOPENJPEG.cmake
+ # module to load OPENJPEG's settings for an external project.
+ @OPENJPEG_CONFIG_INSTALL_ONLY@
++@PACKAGE_INIT@
+ # The OPENJPEG version number.
+ set(OPENJPEG_MAJOR_VERSION "@OPENJPEG_VERSION_MAJOR@")
+ set(OPENJPEG_MINOR_VERSION "@OPENJPEG_VERSION_MINOR@")
+@@ -27,7 +28,7 @@ if(EXISTS ${SELF_DIR}/OpenJPEGTargets.cmake)
+ # This is an install tree
+ include(${SELF_DIR}/OpenJPEGTargets.cmake)
+
+- set(INC_DIR "@CMAKE_INSTALL_FULL_INCLUDEDIR@/@OPENJPEG_INSTALL_SUBDIR@")
++ set(INC_DIR "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@/@OPENJPEG_INSTALL_SUBDIR@")
+ get_filename_component(OPENJPEG_INCLUDE_DIRS "${INC_DIR}" ABSOLUTE)
+
+ else()
+--
+2.41.0
+
+From ee58d77047867dd422593163e660e66a109ba1c0 Mon Sep 17 00:00:00 2001
+From: autoantwort <41973254+autoantwort@users.noreply.github.com>
+Date: Tue, 7 Feb 2023 01:08:38 +0100
+Subject: [PATCH] CMake: add missing GNUInstallDirs related substitutions
+ (fixes #1424) (#1456)
+
+---
+ src/lib/openjp2/CMakeLists.txt | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/lib/openjp2/CMakeLists.txt b/src/lib/openjp2/CMakeLists.txt
+index e65cb9d1..f92044e8 100644
+--- a/src/lib/openjp2/CMakeLists.txt
++++ b/src/lib/openjp2/CMakeLists.txt
+@@ -98,14 +98,14 @@ else()
+ add_library(openjp2_static STATIC ${OPENJPEG_SRCS})
+ set_target_properties(openjp2_static PROPERTIES OUTPUT_NAME ${OPENJPEG_LIBRARY_NAME})
+ set(INSTALL_LIBS ${OPENJPEG_LIBRARY_NAME} openjp2_static)
+- target_include_directories(openjp2_static PUBLIC $<INSTALL_INTERFACE:${OPENJPEG_INSTALL_INCLUDE_DIR}>)
++ target_include_directories(openjp2_static PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/${OPENJPEG_INSTALL_SUBDIR}>)
+ else()
+ add_library(${OPENJPEG_LIBRARY_NAME} ${OPENJPEG_SRCS})
+ set(INSTALL_LIBS ${OPENJPEG_LIBRARY_NAME})
+ endif()
+ endif()
+
+-target_include_directories(${OPENJPEG_LIBRARY_NAME} PUBLIC $<INSTALL_INTERFACE:${OPENJPEG_INSTALL_INCLUDE_DIR}>)
++target_include_directories(${OPENJPEG_LIBRARY_NAME} PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/${OPENJPEG_INSTALL_SUBDIR}>)
+ if(UNIX)
+ target_link_libraries(${OPENJPEG_LIBRARY_NAME} m)
+ endif()
+--
+2.41.0
+
diff --git a/media-libs/openjpeg/openjpeg-2.5.0-r6.ebuild b/media-libs/openjpeg/openjpeg-2.5.0-r6.ebuild
new file mode 100644
index 000000000000..2979530c455c
--- /dev/null
+++ b/media-libs/openjpeg/openjpeg-2.5.0-r6.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2023 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="1f3d093030f9a0b43353ec6b48500f65786ff57a"
+
+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_20210926.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-doc/doxygen )"
+
+DOCS=( AUTHORS.md CHANGELOG.md NEWS.md README.md THANKS.md )
+
+PATCHES=(
+ "${FILESDIR}/${PN}-2.5.0-gnuinstalldirs-r2.patch" # bug #667150
+)
+
+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
+}
^ permalink raw reply related [flat|nested] 10+ messages in thread
end of thread, other threads:[~2023-07-14 17:06 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-22 20:35 [gentoo-commits] repo/gentoo:master commit in: media-libs/openjpeg/, media-libs/openjpeg/files/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2023-07-14 17:06 Matt Turner
2022-08-15 14:10 Andreas Sturmlechner
2022-05-23 17:26 Sam James
2022-04-24 7:24 Joonas Niilola
2022-04-07 2:22 Sam James
2021-02-11 8:15 Sam James
2020-03-25 22:42 Thomas Deutschmann
2018-11-03 21:46 Andreas Sturmlechner
2018-11-03 21:46 Andreas Sturmlechner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox