summaryrefslogtreecommitdiff
path: root/media-libs/Field3D
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-03-20 00:40:44 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-03-20 00:40:44 +0000
commit4cbcc855382a06088e2f016f62cafdbcb7e40665 (patch)
tree356496503d52354aa6d9f2d36126302fed5f3a73 /media-libs/Field3D
parentfcc5224904648a8e6eb528d7603154160a20022f (diff)
gentoo resync : 20.03.2022
Diffstat (limited to 'media-libs/Field3D')
-rw-r--r--media-libs/Field3D/Field3D-1.7.2-r3.ebuild42
-rw-r--r--media-libs/Field3D/Manifest2
-rw-r--r--media-libs/Field3D/files/Field3D-1.7.2-openexr-3-imath.patch233
3 files changed, 277 insertions, 0 deletions
diff --git a/media-libs/Field3D/Field3D-1.7.2-r3.ebuild b/media-libs/Field3D/Field3D-1.7.2-r3.ebuild
new file mode 100644
index 000000000000..834067f5713b
--- /dev/null
+++ b/media-libs/Field3D/Field3D-1.7.2-r3.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake flag-o-matic
+
+DESCRIPTION="A library for storing voxel data"
+HOMEPAGE="http://opensource.imageworks.com/?p=field3d"
+SRC_URI="https://github.com/imageworks/Field3D/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~arm64 x86"
+IUSE="mpi"
+
+RDEPEND="
+ >=dev-libs/boost-1.62:=
+ >=dev-libs/imath-3.1.4-r2:=
+ >=media-libs/openexr-3:0=
+ sci-libs/hdf5:=
+ mpi? ( virtual/mpi )
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.7.2-openexr-3-imath.patch
+)
+
+src_configure() {
+ # Needed for now ("fix" compatibility with >=sci-libs/hdf5-1.12)
+ # bug #808731
+ append-cppflags -DH5_USE_110_API
+
+ local mycmakeargs=(
+ -DINSTALL_DOCS=OFF # Docs are not finished yet.
+ -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=ON
+ $(cmake_use_find_package mpi MPI)
+ )
+
+ cmake_src_configure
+}
diff --git a/media-libs/Field3D/Manifest b/media-libs/Field3D/Manifest
index fc61bb7c43f0..b11606a6493f 100644
--- a/media-libs/Field3D/Manifest
+++ b/media-libs/Field3D/Manifest
@@ -1,4 +1,6 @@
AUX Field3D-1.7.2-Use-PkgConfig-for-IlmBase.patch 5371 BLAKE2B c8a1360db04de4cfa18b739af024934469b9cf2a2314d3fb248ad2df371be902369989f120dc7c1adb86ea77cf01a7a5e0944b9a4a57e9a9e329a06c5d24c97d SHA512 167da6b57983e317266ccbb9670cc5ec03f041343e44af3cbedc14366e349edd1d5f2a0ac163fa919827b2dfdd9811525b81c446a0e32016b3bd51f84f202bcb
+AUX Field3D-1.7.2-openexr-3-imath.patch 7968 BLAKE2B 8700dca8ee30b09b4e0d5e247377da9ec2032e91ef45af0c0f2a46a85ce1f00e402dce5317b7a371cbd56b0228183521ec27223b6a86ccabcd6b770b351d2439 SHA512 edbd7d0af80f74e5d9ac9e516cc1c2ed7c7f96a46eb4c390d2f2cdfbacb0eac0e5030f936012ba5fc50555f415599e4fefc359c4b16b5dff0d6bfb4384dc723e
DIST Field3D-1.7.2.tar.gz 502481 BLAKE2B 8d5fbac915b52b36e66250f8fcd2beb5fff9d2446696ad1829e3edf05c9810b5d54928c6ab4f5aa99c1338da24cea446134434a59aa1d053f3da3500c2800f59 SHA512 e4ea51310105980f759dce48830db8ae3592ce32a02b246214d8aed9df7a7f5c500314f2daf92196b7a76d648f2909b18112df4c5c3c8949c0676d710dfbf1f2
+EBUILD Field3D-1.7.2-r3.ebuild 922 BLAKE2B f078ed2b059987b4bf0867c3d50acc83795aba8f34aa341f96d02986291d59bdf4aad3eddbebd89e83c4f86affa96d000662f5b3d0708db884da4a4e97f3780b SHA512 94c5752415aa41a83464a2ad38391ca2db3a813dfaf16f79b97cc735173f30e8b274136fed5b82f395ff93c1526b537e8f684271d83faa1b46be3e3bf9cdc019
EBUILD Field3D-1.7.2.ebuild 925 BLAKE2B e1b07186c1718294d5c0a35c93e81dae7ff2e9f210feeb51213b70a3bb500d04f6668709444d67f9b098867e847cbdfb91512b3d3f74c21cf3c8530874fa77a8 SHA512 5b31697dc8fba020e4e5346181c037f37efdedec85fc4ad24c809f32700e947702330bd87178296dff296495c1e86db62b214597fb8b845c9939e39b961cab1a
MISC metadata.xml 739 BLAKE2B 7fe96438b4f2f78238a6cfb1818391840039d002daa574edaec6a0976141222647da4e8c5e91a5a15acc582dbaef7005e356925443f09f0046fc5ec5283518db SHA512 04fca4a4ac5c768c389455c3d2ce382f68d1905506058879ccb5cdb333627f26fdfbf2e6d977c381d9d4f025a7481f484c94f5a48fa06ac91a7927d93abd467f
diff --git a/media-libs/Field3D/files/Field3D-1.7.2-openexr-3-imath.patch b/media-libs/Field3D/files/Field3D-1.7.2-openexr-3-imath.patch
new file mode 100644
index 000000000000..a4155403d46c
--- /dev/null
+++ b/media-libs/Field3D/files/Field3D-1.7.2-openexr-3-imath.patch
@@ -0,0 +1,233 @@
+https://src.fedoraproject.org/rpms/Field3D/raw/rawhide/f/Field3D-openexr.patch
+https://github.com/imageworks/Field3D/issues/101
+
+--- a/export/StdMathLib.h
++++ b/export/StdMathLib.h
+@@ -38,18 +38,41 @@
+ #ifndef _INCLUDED_Field3D_StdMathLib_H_
+ #define _INCLUDED_Field3D_StdMathLib_H_
+
+-#include <OpenEXR/ImathBox.h>
+-#include <OpenEXR/ImathBoxAlgo.h>
+-#include <OpenEXR/ImathColor.h>
+-#include <OpenEXR/ImathHalfLimits.h>
+-#include <OpenEXR/ImathMatrix.h>
+-#include <OpenEXR/ImathMatrixAlgo.h>
+-#include <OpenEXR/ImathPlane.h>
+-#include <OpenEXR/ImathRandom.h>
+-#include <OpenEXR/ImathRoots.h>
+-#include <OpenEXR/ImathVec.h>
+-#include <OpenEXR/half.h>
++// The version can reliably be found in this header file from OpenEXR,
++// for both 2.x and 3.x:
++#include <OpenEXR/OpenEXRConfig.h>
++#define COMBINED_OPENEXR_VERSION ((10000*OPENEXR_VERSION_MAJOR) + \
++ (100*OPENEXR_VERSION_MINOR) + \
++ OPENEXR_VERSION_PATCH)
+
++// There's just no easy way to have an `#include` that works in both
++// cases, so we use the version to switch which set of include files we
++// use.
++#if COMBINED_OPENEXR_VERSION >= 20599 /* 2.5.99: pre-3.0 */
++# include <Imath/ImathBox.h>
++# include <Imath/ImathBoxAlgo.h>
++# include <Imath/ImathColor.h>
++# include <Imath/ImathMatrix.h>
++# include <Imath/ImathMatrixAlgo.h>
++# include <Imath/ImathPlane.h>
++# include <Imath/ImathRandom.h>
++# include <Imath/ImathRoots.h>
++# include <Imath/ImathVec.h>
++# include <Imath/half.h>
++#else
++ // OpenEXR 2.x, use the old locations
++# include <OpenEXR/ImathBox.h>
++# include <OpenEXR/ImathBoxAlgo.h>
++# include <OpenEXR/ImathColor.h>
++# include <OpenEXR/ImathHalfLimits.h>
++# include <OpenEXR/ImathMatrix.h>
++# include <OpenEXR/ImathMatrixAlgo.h>
++# include <OpenEXR/ImathPlane.h>
++# include <OpenEXR/ImathRandom.h>
++# include <OpenEXR/ImathRoots.h>
++# include <OpenEXR/ImathVec.h>
++# include <OpenEXR/half.h>
++#endif
+ //----------------------------------------------------------------------------//
+
+ #include "ns.h"
+--- a/export/Curve.h
++++ b/export/Curve.h
+@@ -53,8 +53,25 @@
+
+ #include <boost/lexical_cast.hpp>
+
+-#include <OpenEXR/ImathFun.h>
+-#include <OpenEXR/ImathMatrix.h>
++// The version can reliably be found in this header file from OpenEXR,
++// for both 2.x and 3.x:
++#include <OpenEXR/OpenEXRConfig.h>
++#define COMBINED_OPENEXR_VERSION ((10000*OPENEXR_VERSION_MAJOR) + \
++ (100*OPENEXR_VERSION_MINOR) + \
++ OPENEXR_VERSION_PATCH)
++
++// There's just no easy way to have an `#include` that works in both
++// cases, so we use the version to switch which set of include files we
++// use.
++#if COMBINED_OPENEXR_VERSION >= 20599 /* 2.5.99: pre-3.0 */
++# include <Imath/ImathFun.h>
++# include <Imath/ImathMatrix.h>
++#else
++ // OpenEXR 2.x, use the old locations
++# include <OpenEXR/ImathFun.h>
++# include <OpenEXR/ImathMatrix.h>
++#endif
++
+
+ //----------------------------------------------------------------------------//
+
+--- a/include/OgUtil.h
++++ b/include/OgUtil.h
+@@ -10,7 +10,22 @@
+ #include <iostream>
+ #include <string>
+
+-#include <OpenEXR/ImathVec.h>
++// The version can reliably be found in this header file from OpenEXR,
++// for both 2.x and 3.x:
++#include <OpenEXR/OpenEXRConfig.h>
++#define COMBINED_OPENEXR_VERSION ((10000*OPENEXR_VERSION_MAJOR) + \
++ (100*OPENEXR_VERSION_MINOR) + \
++ OPENEXR_VERSION_PATCH)
++
++// There's just no easy way to have an `#include` that works in both
++// cases, so we use the version to switch which set of include files we
++// use.
++#if COMBINED_OPENEXR_VERSION >= 20599 /* 2.5.99: pre-3.0 */
++# include <Imath/ImathVec.h>
++#else
++ // OpenEXR 2.x, use the old locations
++# include <OpenEXR/ImathVec.h>
++#endif
+
+ #include "All.h"
+ #include "UtilFoundation.h"
+--- a/include/UtilFoundation.h
++++ b/include/UtilFoundation.h
+@@ -68,7 +68,22 @@
+
+ #include <memory>
+
+-#include <half.h>
++// The version can reliably be found in this header file from OpenEXR,
++// for both 2.x and 3.x:
++#include <OpenEXR/OpenEXRConfig.h>
++#define COMBINED_OPENEXR_VERSION ((10000*OPENEXR_VERSION_MAJOR) + \
++ (100*OPENEXR_VERSION_MINOR) + \
++ OPENEXR_VERSION_PATCH)
++
++// There's just no easy way to have an `#include` that works in both
++// cases, so we use the version to switch which set of include files we
++// use.
++#if COMBINED_OPENEXR_VERSION >= 20599 /* 2.5.99: pre-3.0 */
++# include <Imath/half.h>
++#else
++ // OpenEXR 2.x, use the old locations
++# include <OpenEXR/half.h>
++#endif
+
+ #include <iomanip>
+ #include <iostream>
+--- a/include/OgIAttribute.h
++++ b/include/OgIAttribute.h
+@@ -9,7 +9,22 @@
+
+ #include "OgUtil.h"
+
+-#include <OpenEXR/ImathMatrix.h>
++// The version can reliably be found in this header file from OpenEXR,
++// for both 2.x and 3.x:
++#include <OpenEXR/OpenEXRConfig.h>
++#define COMBINED_OPENEXR_VERSION ((10000*OPENEXR_VERSION_MAJOR) + \
++ (100*OPENEXR_VERSION_MINOR) + \
++ OPENEXR_VERSION_PATCH)
++
++// There's just no easy way to have an `#include` that works in both
++// cases, so we use the version to switch which set of include files we
++// use.
++#if COMBINED_OPENEXR_VERSION >= 20599 /* 2.5.99: pre-3.0 */
++# include <Imath/ImathMatrix.h>
++#else
++ // OpenEXR 2.x, use the old locations
++# include <OpenEXR/ImathMatrix.h>
++#endif
+
+ //----------------------------------------------------------------------------//
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -49,7 +49,13 @@ FIND_PACKAGE (Boost COMPONENTS regex thr
+ FIND_PACKAGE (MPI)
+ ENDIF ()
+
+-FIND_PACKAGE (ILMBase)
++# First, try to find just the right config files
++find_package(Imath CONFIG)
++if (NOT TARGET Imath::Imath)
++ # Couldn't find Imath::Imath, maybe it's older and has IlmBase?
++ find_package(IlmBase CONFIG)
++endif ()
++find_package(OpenEXR CONFIG)
+
+ # Allow the developer to select if Dynamic or Static libraries are built
+ OPTION (BUILD_SHARED_LIBS "Build Shared Libraries" ON)
+@@ -146,9 +152,20 @@ IF ( CMAKE_HOST_UNIX )
+ LIST ( APPEND Field3D_Libraries_Shared
+ ${MPI_LIBRARIES} )
+ ENDIF ( MPI_FOUND )
+- LIST ( APPEND Field3D_Libraries_Shared
+- Iex Half IlmThread Imath
+- pthread dl z )
++ if(TARGET Imath::Imath)
++ list(APPEND Field3D_Libraries_Shared
++ # For OpenEXR/Imath 3.x:
++ $<$<TARGET_EXISTS:OpenEXR::OpenEXR>:OpenEXR::OpenEXR>
++ $<$<TARGET_EXISTS:Imath::Imath>:Imath::Imath>
++ $<$<TARGET_EXISTS:Imath::Half>:Imath::Half>
++ pthread
++ dl
++ z)
++ else()
++ LIST ( APPEND Field3D_Libraries_Shared
++ Iex Half IlmThread Imath
++ pthread dl z )
++ endif()
+ SET ( Field3D_DSO_Libraries ${Field3D_Libraries_Shared} )
+ SET ( Field3D_BIN_Libraries Field3D ${Field3D_Libraries_Shared}
+ ${Boost_LIBRARIES} )
+--- a/test/unit_tests/UnitTest.cpp
++++ b/test/unit_tests/UnitTest.cpp
+@@ -44,7 +44,22 @@
+ #include <boost/thread/thread.hpp>
+ #include <boost/thread/mutex.hpp>
+
+-#include <OpenEXR/ImathFrustum.h>
++// The version can reliably be found in this header file from OpenEXR,
++// for both 2.x and 3.x:
++#include <OpenEXR/OpenEXRConfig.h>
++#define COMBINED_OPENEXR_VERSION ((10000*OPENEXR_VERSION_MAJOR) + \
++ (100*OPENEXR_VERSION_MINOR) + \
++ OPENEXR_VERSION_PATCH)
++
++// There's just no easy way to have an `#include` that works in both
++// cases, so we use the version to switch which set of include files we
++// use.
++#if COMBINED_OPENEXR_VERSION >= 20599 /* 2.5.99: pre-3.0 */
++# include <Imath/ImathFrustum.h>
++#else
++ // OpenEXR 2.x, use the old locations
++# include <OpenEXR/ImathFrustum.h>
++#endif
+
+ #include "Field3D/DenseField.h"
+ #include "Field3D/EmptyField.h"