From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id DDDA215808B for ; Sat, 12 Feb 2022 03:55:55 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6EFA1E086C; Sat, 12 Feb 2022 03:55:54 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 16F9FE0845 for ; Sat, 12 Feb 2022 03:55:54 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id DC01D342FB1 for ; Sat, 12 Feb 2022 03:55:52 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 38A991BD for ; Sat, 12 Feb 2022 03:55:51 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1644638131.42905a79164d67fea0dcc8f5138a78b8553d5996.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/openimageio/, media-libs/openimageio/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-libs/openimageio/files/openimageio-2.3.11.0-imath-openexr-3.patch media-libs/openimageio/openimageio-2.3.11.0-r1.ebuild X-VCS-Directories: media-libs/openimageio/ media-libs/openimageio/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 42905a79164d67fea0dcc8f5138a78b8553d5996 X-VCS-Branch: master Date: Sat, 12 Feb 2022 03:55:51 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 77b151be-f68e-498a-b7bb-77d434414a60 X-Archives-Hash: f4e3adb633a2fe97f7e50821fae5316a commit: 42905a79164d67fea0dcc8f5138a78b8553d5996 Author: Sam James gentoo org> AuthorDate: Sat Feb 12 02:01:26 2022 +0000 Commit: Sam James gentoo org> CommitDate: Sat Feb 12 03:55:31 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=42905a79 media-libs/openimageio: flip over to OpenEXR 3 Things are getting complicated with trying to keep Blender on OpenEXR 2. Blender needs to switch as a result, but so do its dependencies. Bug: https://bugs.gentoo.org/831357 Bug: https://bugs.gentoo.org/832862 Bug: https://bugs.gentoo.org/821193 Signed-off-by: Sam James gentoo.org> .../openimageio-2.3.11.0-imath-openexr-3.patch | 302 +++++++++++++++++++++ .../openimageio/openimageio-2.3.11.0-r1.ebuild | 190 +++++++++++++ 2 files changed, 492 insertions(+) diff --git a/media-libs/openimageio/files/openimageio-2.3.11.0-imath-openexr-3.patch b/media-libs/openimageio/files/openimageio-2.3.11.0-imath-openexr-3.patch new file mode 100644 index 000000000000..ad6ee04c16e6 --- /dev/null +++ b/media-libs/openimageio/files/openimageio-2.3.11.0-imath-openexr-3.patch @@ -0,0 +1,302 @@ +diff --git a/src/dpx.imageio/dpxinput.cpp b/src/dpx.imageio/dpxinput.cpp +index edfeb02..7890b46 100644 +--- a/src/dpx.imageio/dpxinput.cpp ++++ b/src/dpx.imageio/dpxinput.cpp +@@ -6,7 +6,7 @@ + #include + #include + +-#include //For TimeCode support ++#include //For TimeCode support + + // Note: libdpx originally from: https://github.com/PatrickPalmer/dpx + // But that seems not to be actively maintained. +diff --git a/src/field3d.imageio/field3d_pvt.h b/src/field3d.imageio/field3d_pvt.h +index 066574f..19b4ac9 100644 +--- a/src/field3d.imageio/field3d_pvt.h ++++ b/src/field3d.imageio/field3d_pvt.h +@@ -8,7 +8,7 @@ + #include + + #if OIIO_USING_IMATH >= 3 +-# include ++# include + #else + # include + #endif +diff --git a/src/include/OpenImageIO/Imath.h.in b/src/include/OpenImageIO/Imath.h.in +index 7f13fae..23afffc 100644 +--- a/src/include/OpenImageIO/Imath.h.in ++++ b/src/include/OpenImageIO/Imath.h.in +@@ -13,10 +13,10 @@ + #define OIIO_USING_IMATH @OIIO_USING_IMATH@ + + #if OIIO_USING_IMATH >= 3 +-# include +-# include +-# include +-# include ++# include ++# include ++# include ++# include + #else + # include + # include +diff --git a/src/libOpenImageIO/imagebufalgo_xform.cpp b/src/libOpenImageIO/imagebufalgo_xform.cpp +index 496a055..6484ccc 100644 +--- a/src/libOpenImageIO/imagebufalgo_xform.cpp ++++ b/src/libOpenImageIO/imagebufalgo_xform.cpp +@@ -18,7 +18,7 @@ + #include + + #if OIIO_USING_IMATH >= 3 +-# include ++# include + #else + # include + #endif +diff --git a/src/libutil/fmath_test.cpp b/src/libutil/fmath_test.cpp +index ea4e708..ed7e1ff 100644 +--- a/src/libutil/fmath_test.cpp ++++ b/src/libutil/fmath_test.cpp +@@ -18,7 +18,7 @@ + #include + + #if OIIO_USING_IMATH >= 3 +-# include ++# include + #else + # include + #endif +diff --git a/src/libutil/typedesc_test.cpp b/src/libutil/typedesc_test.cpp +index 6840738..58f6a64 100644 +--- a/src/libutil/typedesc_test.cpp ++++ b/src/libutil/typedesc_test.cpp +@@ -9,12 +9,14 @@ + #include + + #if OIIO_USING_IMATH >= 3 +-# include ++# include ++# include ++# include + #else + # include ++# include ++# include + #endif +-#include +-#include + + #include + #include +diff --git a/src/oiiotool/oiiotool.cpp b/src/oiiotool/oiiotool.cpp +index 0f5e739..4292b50 100644 +--- a/src/oiiotool/oiiotool.cpp ++++ b/src/oiiotool/oiiotool.cpp +@@ -17,7 +17,7 @@ + #include + #include + +-#include ++#include + + #include + #include +diff --git a/src/openexr.imageio/exrinput.cpp b/src/openexr.imageio/exrinput.cpp +index d9c51ab..8b86ad8 100644 +--- a/src/openexr.imageio/exrinput.cpp ++++ b/src/openexr.imageio/exrinput.cpp +@@ -25,11 +25,11 @@ using boost::integer::gcd; + using boost::math::gcd; + #endif + +-#include +-#include +-#include +-#include +-#include ++#include ++#include ++#include ++#include ++#include + + #ifdef OPENEXR_VERSION_MAJOR + # define OPENEXR_CODED_VERSION \ +@@ -40,7 +40,7 @@ using boost::math::gcd; + #endif + + #if OPENEXR_CODED_VERSION >= 20400 \ +- || __has_include() ++ || __has_include() + # define OPENEXR_HAS_FLOATVECTOR 1 + #else + # define OPENEXR_HAS_FLOATVECTOR 0 +@@ -51,37 +51,37 @@ using boost::math::gcd; + OIIO_PRAGMA_VISIBILITY_PUSH + OIIO_PRAGMA_WARNING_PUSH + OIIO_GCC_PRAGMA(GCC diagnostic ignored "-Wunused-parameter") +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include + #if OPENEXR_HAS_FLOATVECTOR +-# include ++# include + #endif +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include + OIIO_PRAGMA_WARNING_POP + OIIO_PRAGMA_VISIBILITY_POP + +-#include ++#include + + #if OPENEXR_CODED_VERSION >= 30100 && defined(OIIO_USE_EXR_C_API) + # define USE_OPENEXR_CORE +diff --git a/src/openexr.imageio/exrinput_c.cpp b/src/openexr.imageio/exrinput_c.cpp +index 4376333..1c566da 100644 +--- a/src/openexr.imageio/exrinput_c.cpp ++++ b/src/openexr.imageio/exrinput_c.cpp +@@ -25,7 +25,7 @@ using boost::integer::gcd; + using boost::math::gcd; + #endif + +-#include ++#include + + #ifdef OPENEXR_VERSION_MAJOR + # define OPENEXR_CODED_VERSION \ +diff --git a/src/openexr.imageio/exroutput.cpp b/src/openexr.imageio/exroutput.cpp +index e11cf0c..0fd2295 100644 +--- a/src/openexr.imageio/exroutput.cpp ++++ b/src/openexr.imageio/exroutput.cpp +@@ -13,10 +13,10 @@ + + #include + +-#include +-#include +-#include +-#include ++#include ++#include ++#include ++#include + + #ifdef OPENEXR_VERSION_MAJOR + # define OPENEXR_CODED_VERSION \ +@@ -27,7 +27,7 @@ + #endif + + #if OPENEXR_CODED_VERSION >= 20400 \ +- || __has_include() ++ || __has_include() + # define OPENEXR_HAS_FLOATVECTOR 1 + #else + # define OPENEXR_HAS_FLOATVECTOR 0 +@@ -38,34 +38,34 @@ + OIIO_PRAGMA_VISIBILITY_PUSH + OIIO_PRAGMA_WARNING_PUSH + OIIO_GCC_PRAGMA(GCC diagnostic ignored "-Wunused-parameter") +-#include +-#include +-#include // JUST to get symbols to figure out version! +-#include +-#include +-#include +-#include ++#include ++#include ++#include // JUST to get symbols to figure out version! ++#include ++#include ++#include ++#include + #if OPENEXR_HAS_FLOATVECTOR +-# include ++# include + #endif +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +- +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include + OIIO_PRAGMA_WARNING_POP + OIIO_PRAGMA_VISIBILITY_POP + diff --git a/media-libs/openimageio/openimageio-2.3.11.0-r1.ebuild b/media-libs/openimageio/openimageio-2.3.11.0-r1.ebuild new file mode 100644 index 000000000000..445eb5f23ac9 --- /dev/null +++ b/media-libs/openimageio/openimageio-2.3.11.0-r1.ebuild @@ -0,0 +1,190 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +FONT_PN=OpenImageIO +PYTHON_COMPAT=( python3_{8..10} ) + +TEST_OIIO_IMAGE_COMMIT="b85d7a3a10a3256b50325ad310c33e7f7cf2c6cb" +TEST_OEXR_IMAGE_COMMIT="f17e353fbfcde3406fe02675f4d92aeae422a560" +inherit cmake font python-single-r1 flag-o-matic + +DESCRIPTION="A library for reading and writing images" +HOMEPAGE="https://sites.google.com/site/openimageio/ https://github.com/OpenImageIO" +SRC_URI="https://github.com/OpenImageIO/oiio/archive/v${PV}.tar.gz -> ${P}.tar.gz" +SRC_URI+=" test? ( + https://github.com/OpenImageIO/oiio-images/archive/${TEST_OIIO_IMAGE_COMMIT}.tar.gz -> ${PN}-oiio-test-image-${TEST_OIIO_IMAGE_COMMIT}.tar.gz + https://github.com/AcademySoftwareFoundation/openexr-images/archive/${TEST_OEXR_IMAGE_COMMIT}.tar.gz -> ${PN}-oexr-test-image-${TEST_OEXR_IMAGE_COMMIT}.tar.gz + )" +S="${WORKDIR}/oiio-${PV}" + +LICENSE="BSD" +# TODO: drop .1 on next SONAME change (2.3 -> 2.4?) as we needed to nudge it +# for changing to openexr 3 which broke ABI. +SLOT="0/$(ver_cut 1-2).1" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" + +X86_CPU_FEATURES=( + aes:aes sse2:sse2 sse3:sse3 ssse3:ssse3 sse4_1:sse4.1 sse4_2:sse4.2 + avx:avx avx2:avx2 avx512f:avx512f f16c:f16c +) +CPU_FEATURES=( ${X86_CPU_FEATURES[@]/#/cpu_flags_x86_} ) + +IUSE="dicom doc ffmpeg gif jpeg2k opencv opengl openvdb ptex python qt5 raw test +truetype ${CPU_FEATURES[@]%:*}" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +# Not quite working yet +RESTRICT="!test? ( test ) test" + +BDEPEND=" + doc? ( + app-doc/doxygen + dev-texlive/texlive-bibtexextra + dev-texlive/texlive-fontsextra + dev-texlive/texlive-fontutils + dev-texlive/texlive-latex + dev-texlive/texlive-latexextra + ) +" +RDEPEND=" + >=dev-libs/boost-1.62:= + dev-cpp/robin-map + dev-libs/libfmt:= + dev-libs/pugixml:= + >=media-libs/libheif-1.7.0:= + media-libs/libpng:0= + >=media-libs/libwebp-0.2.1:= + media-libs/imath:= + media-libs/opencolorio:= + media-libs/openexr:3= + media-libs/tiff:0= + sys-libs/zlib:= + virtual/jpeg:0 + dicom? ( sci-libs/dcmtk ) + ffmpeg? ( media-video/ffmpeg:= ) + gif? ( media-libs/giflib:0= ) + jpeg2k? ( >=media-libs/openjpeg-2.0:2= ) + opencv? ( media-libs/opencv:= ) + opengl? ( + media-libs/glew:= + virtual/glu + virtual/opengl + ) + openvdb? ( + dev-cpp/tbb:= + media-gfx/openvdb:= + ) + ptex? ( media-libs/ptex:= ) + python? ( + ${PYTHON_DEPS} + $(python_gen_cond_dep ' + dev-libs/boost:=[python,${PYTHON_USEDEP}] + dev-python/numpy[${PYTHON_USEDEP}] + dev-python/pybind11[${PYTHON_USEDEP}] + ') + ) + qt5? ( + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtwidgets:5 + opengl? ( dev-qt/qtopengl:5 ) + ) + raw? ( media-libs/libraw:= ) + truetype? ( media-libs/freetype:2= ) +" +DEPEND="${RDEPEND}" + +DOCS=( CHANGES.md CREDITS.md README.md ) + +PATCHES=( + "${FILESDIR}"/${PN}-2.3.11.0-imath-openexr-3.patch +) + +pkg_setup() { + use python && python-single-r1_pkg_setup +} + +src_prepare() { + # Note: on bumps, please try again with OpenEXR 3 + ilmmath! + # Sabotage finding OpenEXR 3 for now to force usage of OpenEXR 2 + # (because it mix and matches which version it uses; sed this to + # make sure it'll use OpenEXR 3 if it can, but it won't.) + # bug #821193 + #sed -i \ + # -e 's/find_package(OpenEXR CONFIG)/find_package(OpenEXR-3 CONFIG)/' \ + # src/cmake/modules/FindOpenEXR.cmake || die + + cmake_src_prepare + cmake_comment_add_subdirectory src/fonts + + if use test ; then + mkdir -p "${BUILD_DIR}"/testsuite || die + mv "${WORKDIR}"/oiio-images-${TEST_OIIO_IMAGE_COMMIT} "${BUILD_DIR}"/testsuite/oiio-images || die + mv "${WORKDIR}"/openexr-images-${TEST_OEXR_IMAGE_COMMIT} "${BUILD_DIR}"/testsuite/openexr-images || die + fi +} + +src_configure() { + # Build with SIMD support + local cpufeature + local mysimd=() + for cpufeature in "${CPU_FEATURES[@]}"; do + use "${cpufeature%:*}" && mysimd+=("${cpufeature#*:}") + done + + # If no CPU SIMDs were used, completely disable them + [[ -z ${mysimd} ]] && mysimd=("0") + + append-cppflags -DOIIO_USING_OPENEXR_3 + + local mycmakeargs=( + -DVERBOSE=ON + -DBUILD_TESTING=$(usex test) + -DOIIO_BUILD_TESTS=$(usex test) + -DINSTALL_FONTS=OFF + -DBUILD_DOCS=$(usex doc) + -DINSTALL_DOCS=$(usex doc) + -DSTOP_ON_WARNING=OFF + -DUSE_CCACHE=OFF + -DUSE_DCMTK=$(usex dicom) + -DUSE_EXTERNAL_PUGIXML=ON + -DUSE_JPEGTURBO=ON + -DUSE_NUKE=OFF # not in Gentoo + -DUSE_FFMPEG=$(usex ffmpeg) + -DUSE_GIF=$(usex gif) + -DUSE_OPENJPEG=$(usex jpeg2k) + -DUSE_OPENCV=$(usex opencv) + -DUSE_OPENGL=$(usex opengl) + -DUSE_OPENVDB=$(usex openvdb) + -DUSE_PTEX=$(usex ptex) + -DUSE_PYTHON=$(usex python) + -DUSE_QT=$(usex qt5) + -DUSE_LIBRAW=$(usex raw) + -DUSE_FREETYPE=$(usex truetype) + -DUSE_SIMD=$(local IFS=','; echo "${mysimd[*]}") + ) + if use python; then + mycmakeargs+=( + -DPYTHON_VERSION=${EPYTHON#python} + -DPYTHON_SITE_DIR=$(python_get_sitedir) + ) + fi + + cmake_src_configure +} + +src_install() { + cmake_src_install + # can't use font_src_install + # it does directory hierarchy recreation + FONT_S=( + "${S}/src/fonts/Droid_Sans" + "${S}/src/fonts/Droid_Sans_Mono" + "${S}/src/fonts/Droid_Serif" + ) + insinto ${FONTDIR} + for dir in "${FONT_S[@]}"; do + doins "${dir}"/*.ttf + done +}