forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
media-libs/ctl: restrict dependency on media-libs/openexr
Package currently doesn't build with OpenEXR-3/Imath. This revision adds an upstream patch to disable certain tests if no OpenEXR-2 is available and thus needs to depend on IlmBase only. Bug: ampas/CTL#100 Closes: https://bugs.gentoo.org/878247 Signed-off-by: Bernd Waibel <[email protected]>
- Loading branch information
Showing
2 changed files
with
104 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Copyright 1999-2022 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=7 | ||
|
||
inherit cmake | ||
|
||
DESCRIPTION="AMPAS' Color Transformation Language" | ||
HOMEPAGE="https://github.com/ampas/CTL" | ||
SRC_URI="https://github.com/ampas/CTL/archive/${P}.tar.gz" | ||
S="${WORKDIR}/CTL-ctl-${PV}" | ||
|
||
LICENSE="AMPAS" | ||
SLOT="0" | ||
KEYWORDS="~amd64 ~ia64 ~ppc64 ~x86" | ||
IUSE="test" | ||
|
||
RESTRICT="!test? ( test )" | ||
|
||
RDEPEND="media-libs/ilmbase:= | ||
media-libs/tiff:= | ||
!media-libs/openexr_ctl" | ||
DEPEND="${RDEPEND}" | ||
BDEPEND="virtual/pkgconfig" | ||
|
||
PATCHES=( | ||
"${FILESDIR}/${P}-Use-GNUInstallDirs-and-fix-PkgConfig-files-1.patch" | ||
"${FILESDIR}/${P}-openexr-2.3.patch" | ||
"${FILESDIR}/${P}-fix-to-build-with-gcc-11.patch" | ||
"${FILESDIR}/${P}-install-dpx-library.patch" | ||
"${FILESDIR}/${P}-fix-unit-tests.patch" | ||
"${FILESDIR}/${P}-Issues-0101-ctlrender-does-not-compile-without-openexr.patch" | ||
) | ||
|
||
mycmakeargs=( -DCMAKE_INSTALL_DOCDIR="share/doc/${PF}" ) | ||
|
||
src_test() { | ||
pushd "${BUILD_DIR}" >/dev/null || die | ||
eninja check | ||
popd >/dev/null || die | ||
} |
63 changes: 63 additions & 0 deletions
63
media-libs/ctl/files/ctl-1.5.2-Issues-0101-ctlrender-does-not-compile-without-openexr.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
From https://github.com/ampas/CTL/commit/370a12c39061da9141bcc538d59df36f6f48031b | ||
From 370a12c39061da9141bcc538d59df36f6f48031b Mon Sep 17 00:00:00 2001 | ||
From: michaeldsmith <[email protected]> | ||
Date: Mon, 14 Nov 2022 07:23:21 -0800 | ||
Subject: [PATCH 1/2] Issues/0101 ctlrender does not compile without openexr | ||
(#103) | ||
|
||
* add no openexr workflow | ||
|
||
* update unittest cmakelists for openexr not found | ||
|
||
* correct the exr_write() stub function prototype | ||
|
||
* fixes #101 | ||
|
||
Changes to github workflow removed from patch for Gentoo | ||
|
||
--- a/ctlrender/exr_file.cc | ||
+++ b/ctlrender/exr_file.cc | ||
@@ -258,12 +258,17 @@ void exr_write(const char *name, float scale, const ctl::dpx::fb<float> &pixels, | ||
bool exr_read(const char *name, float scale, | ||
ctl::dpx::fb<float> *pixels, | ||
format_t *bpp) { | ||
+// fprintf(stderr, "WARNING on line %d of file %s in function %s(): exr_read() function was called but OpenEXR library was not found\n", | ||
+// __LINE__, __FILE__, __FUNCTION__); | ||
return FALSE; | ||
} | ||
|
||
void exr_write(const char *name, float scale, | ||
const ctl::dpx::fb<float> &pixels, | ||
- format_t *format) { | ||
+ format_t *format, | ||
+ Compression *compression) { | ||
+// fprintf(stderr, "WARNING on line %d of file %s in function %s(): exr_write() function was called but OpenEXR library was not found\n", | ||
+// __LINE__, __FILE__, __FUNCTION__); | ||
} | ||
|
||
#endif | ||
--- a/unittest/IlmCtlMath/CMakeLists.txt | ||
+++ b/unittest/IlmCtlMath/CMakeLists.txt | ||
@@ -5,9 +5,6 @@ add_executable(IlmCtlMathTest | ||
testGaussRec.cpp | ||
) | ||
|
||
-include_directories( ${OpenEXR_INCLUDE_DIRS} ) | ||
-link_directories( ${OpenEXR_LIBRARY_DIRS} ) | ||
- | ||
include_directories( "${CMAKE_CURRENT_SOURCE_DIR}" | ||
"${PROJECT_SOURCE_DIR}/lib/IlmCtlMath" ) | ||
|
||
--- a/unittest/IlmImfCtl/CMakeLists.txt | ||
+++ b/unittest/IlmImfCtl/CMakeLists.txt | ||
@@ -1,3 +1,7 @@ | ||
+if ( NOT OpenEXR_FOUND ) | ||
+ message(WARNING "OpenEXR not found, skipping IlmImfCtl unit test") | ||
+ return() | ||
+endif() | ||
|
||
include_directories( ${OpenEXR_INCLUDE_DIRS} ) | ||
link_directories( ${OpenEXR_LIBRARY_DIRS} ) | ||
-- | ||
2.38.1 | ||
|