* [gentoo-commits] repo/gentoo:master commit in: media-libs/Field3D/, media-libs/Field3D/files/
@ 2022-02-15 19:51 Sam James
0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2022-02-15 19:51 UTC (permalink / raw
To: gentoo-commits
commit: 56aff67d12ed9fac1c638b64c804828f3e7026e9
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 12 20:50:23 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Feb 15 19:50:07 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=56aff67d
media-libs/Field3D: support OpenEXR 3 / imath
Bug: https://bugs.gentoo.org/833158
Signed-off-by: Sam James <sam <AT> gentoo.org>
media-libs/Field3D/Field3D-1.7.2-r1.ebuild | 41 ++++
.../files/Field3D-1.7.2-openexr-3-imath.patch | 233 +++++++++++++++++++++
2 files changed, 274 insertions(+)
diff --git a/media-libs/Field3D/Field3D-1.7.2-r1.ebuild b/media-libs/Field3D/Field3D-1.7.2-r1.ebuild
new file mode 100644
index 000000000000..71f70435a8ca
--- /dev/null
+++ b/media-libs/Field3D/Field3D-1.7.2-r1.ebuild
@@ -0,0 +1,41 @@
+# 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:=
+ 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/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"
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-libs/Field3D/, media-libs/Field3D/files/
@ 2024-01-11 17:58 Joonas Niilola
0 siblings, 0 replies; 2+ messages in thread
From: Joonas Niilola @ 2024-01-11 17:58 UTC (permalink / raw
To: gentoo-commits
commit: 3620f00fdd19e4eadd7433a84d9b4185ff2ac8a3
Author: Paul Zander <negril.nx+gentoo <AT> gmail <DOT> com>
AuthorDate: Fri Dec 8 14:38:42 2023 +0000
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Thu Jan 11 17:57:18 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3620f00f
media-libs/Field3D: add 1.7.3_p20230509
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.
Snapshot of last commit before archiving.
Closes: https://bugs.gentoo.org/912312
Closes: https://bugs.gentoo.org/808703
Closes: https://bugs.gentoo.org/717504
Signed-off-by: Paul Zander <negril.nx+gentoo <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/34221
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
media-libs/Field3D/Field3D-1.7.3_p20230509.ebuild | 67 ++++++++++++++++++++++
media-libs/Field3D/Manifest | 1 +
| 35 +++++++++++
3 files changed, 103 insertions(+)
diff --git a/media-libs/Field3D/Field3D-1.7.3_p20230509.ebuild b/media-libs/Field3D/Field3D-1.7.3_p20230509.ebuild
new file mode 100644
index 000000000000..b21dc0fb64b2
--- /dev/null
+++ b/media-libs/Field3D/Field3D-1.7.3_p20230509.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake flag-o-matic
+
+DESCRIPTION="A library for storing voxel data"
+HOMEPAGE="http://opensource.imageworks.com/?p=field3d"
+SRC_COMMIT="b0ff0cd67893a4cbfa322676eb3eef10100d904d"
+SRC_URI="https://github.com/imageworks/Field3D/archive/${SRC_COMMIT}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+IUSE="doc mpi test"
+
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ dev-libs/boost:=
+ >=dev-libs/imath-3.1.4-r2:=
+ >=media-libs/openexr-3:0=
+ sci-libs/hdf5:=
+ doc? ( app-doc/doxygen )
+ mpi? ( virtual/mpi )
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.7.2-openexr-3-imath.patch"
+ "${FILESDIR}/${PN}-1.7.2-boost-1.83-timer-header-deprecated.patch"
+)
+
+S="${WORKDIR}/${PN}-${SRC_COMMIT}"
+
+src_prepare() {
+ sed -e "s#auto_ptr#unique_ptr#g" -i include/*.h || die
+ sed \
+ -e "s#DESTINATION \${CMAKE_INSTALL_PREFIX}#DESTINATION \${CMAKE_INSTALL_DOCDIR}#" \
+ -e "s#CMAKE_MINIMUM_REQUIRED( VERSION 2.8 )#CMAKE_MINIMUM_REQUIRED( VERSION 3.5 )#" \
+ -i CMakeLists.txt || die
+
+ cmake_src_prepare
+}
+
+src_configure() {
+ # Needed for now ("fix" compatibility with >=sci-libs/hdf5-1.12)
+ # bug #808731
+ append-cppflags -DH5_USE_110_API
+
+ local mycmakeargs=(
+ -DCMAKE_CXX_STANDARD=11
+
+ -DINSTALL_DOCS="$(usex doc)" # Docs are not finished yet.
+ -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen="$(usex !doc)"
+
+ "$(cmake_use_find_package mpi MPI)"
+ )
+
+ cmake_src_configure
+}
+
+src_test() {
+ cd "${BUILD_DIR}" || die
+ ./unitTest || die
+}
diff --git a/media-libs/Field3D/Manifest b/media-libs/Field3D/Manifest
index dbf8d221f9c2..6b3139c3a094 100644
--- a/media-libs/Field3D/Manifest
+++ b/media-libs/Field3D/Manifest
@@ -1 +1,2 @@
DIST Field3D-1.7.2.tar.gz 502481 BLAKE2B 8d5fbac915b52b36e66250f8fcd2beb5fff9d2446696ad1829e3edf05c9810b5d54928c6ab4f5aa99c1338da24cea446134434a59aa1d053f3da3500c2800f59 SHA512 e4ea51310105980f759dce48830db8ae3592ce32a02b246214d8aed9df7a7f5c500314f2daf92196b7a76d648f2909b18112df4c5c3c8949c0676d710dfbf1f2
+DIST Field3D-1.7.3_p20230509.tar.gz 503942 BLAKE2B 30926a3229306b444a0267ff22c05d51bd3cd9804f9685608813bee5a738e498286d1e7b35c32e48214e949e5aa91a1604c9b92d5ab4dc3c71d3bb85bd5f5920 SHA512 fcc718c0b1629af36f5a403cc4a453c343d97d464fe5b1e7b6a6ac2b36a38e245f785735c91f7bc9abceffc522d5a20855310f04e006f83f8660253de6e4cdda
--git a/media-libs/Field3D/files/Field3D-1.7.2-boost-1.83-timer-header-deprecated.patch b/media-libs/Field3D/files/Field3D-1.7.2-boost-1.83-timer-header-deprecated.patch
new file mode 100644
index 000000000000..e583dfcb4a3f
--- /dev/null
+++ b/media-libs/Field3D/files/Field3D-1.7.2-boost-1.83-timer-header-deprecated.patch
@@ -0,0 +1,35 @@
+From: https://bugs.gentoo.org/912312#c10
+From: Attila Tóth <atoth@atoth.sote.hu>
+--- a/apps/sample_code/sparse_field_io/main.cpp 2023-08-24 11:30:05.951289118 +0200
++++ b/apps/sample_code/sparse_field_io/main.cpp 2023-08-24 11:30:32.491719405 +0200
+@@ -38,7 +38,7 @@
+ #include <vector>
+
+ #include <boost/lexical_cast.hpp>
+-#include <boost/timer.hpp>
++#include <boost/timer/timer.hpp>
+
+ #include <Field3D/SparseField.h>
+ #include <Field3D/SparseFile.h>
+--- a/test/misc_tests/access_speed/main.cpp 2023-08-24 11:30:05.963289314 +0200
++++ b/test/misc_tests/access_speed/main.cpp 2023-08-24 11:30:42.903885904 +0200
+@@ -38,7 +38,7 @@
+ #include <vector>
+
+ #include <boost/lexical_cast.hpp>
+-#include <boost/timer.hpp>
++#include <boost/timer/timer.hpp>
+
+ #include <Field3D/DenseField.h>
+ #include <Field3D/SparseField.h>
+--- a/test/misc_tests/threading_and_virtual_calls/main.cpp 2023-08-24 11:30:05.963289314 +0200
++++ b/test/misc_tests/threading_and_virtual_calls/main.cpp 2023-08-24 11:30:51.656025852 +0200
+@@ -38,7 +38,7 @@
+ #include <vector>
+
+ #include <boost/lexical_cast.hpp>
+-#include <boost/timer.hpp>
++#include <boost/timer/timer.hpp>
+ #include <boost/thread/thread.hpp>
+ #include <boost/date_time/posix_time/posix_time.hpp>
+
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-01-11 17:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-15 19:51 [gentoo-commits] repo/gentoo:master commit in: media-libs/Field3D/, media-libs/Field3D/files/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2024-01-11 17:58 Joonas Niilola
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox