Compare commits

..

3 Commits

Author SHA1 Message Date
Troy Dawson 2d0a63c00a remove package.cfg per new epel-playground policy 2020-09-24 17:23:15 +00:00
Richard Shaw 7a1c39fa54 Initial import for epel8. 2019-08-12 01:33:22 -05:00
Gwyn Ciesla 3f42f4220e "Adding package.cfg file" 2019-08-06 09:31:00 -05:00
5 changed files with 47 additions and 340 deletions

6
.gitignore vendored
View File

@ -1,6 +0,0 @@
/imageworks-Field3D-v1.3.2-0-gcac7b57.tar.gz
/Field3D-1.4.3.tar.gz
/Field3D-1.6.1.tar.gz
/Field3D-1.7.1.tar.gz
/Field3D-1.7.2.tar.gz
/Field3D-1.7.3.tar.gz

View File

@ -1,244 +0,0 @@
Index: Field3D-1.7.3/export/StdMathLib.h
===================================================================
--- Field3D-1.7.3.orig/export/StdMathLib.h
+++ Field3D-1.7.3/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"
Index: Field3D-1.7.3/export/Curve.h
===================================================================
--- Field3D-1.7.3.orig/export/Curve.h
+++ Field3D-1.7.3/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
+
//----------------------------------------------------------------------------//
Index: Field3D-1.7.3/include/OgUtil.h
===================================================================
--- Field3D-1.7.3.orig/include/OgUtil.h
+++ Field3D-1.7.3/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"
Index: Field3D-1.7.3/include/UtilFoundation.h
===================================================================
--- Field3D-1.7.3.orig/include/UtilFoundation.h
+++ Field3D-1.7.3/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>
Index: Field3D-1.7.3/include/OgIAttribute.h
===================================================================
--- Field3D-1.7.3.orig/include/OgIAttribute.h
+++ Field3D-1.7.3/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
//----------------------------------------------------------------------------//
Index: Field3D-1.7.3/CMakeLists.txt
===================================================================
--- Field3D-1.7.3.orig/CMakeLists.txt
+++ Field3D-1.7.3/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} )
Index: Field3D-1.7.3/test/unit_tests/UnitTest.cpp
===================================================================
--- Field3D-1.7.3.orig/test/unit_tests/UnitTest.cpp
+++ Field3D-1.7.3/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"

34
Field3D-unit_test.patch Normal file
View File

@ -0,0 +1,34 @@
From fc8ec604f5cc4cafca063029adb2cdfee3107360 Mon Sep 17 00:00:00 2001
From: Rafael Fonseca <rdossant@redhat.com>
Date: Thu, 13 Oct 2016 15:36:20 +0200
Subject: [PATCH] Fallback to HDF5 in case of big endian architectures.
Fixes https://github.com/imageworks/Field3D/issues/90
---
src/Field3DFile.cpp | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/src/Field3DFile.cpp b/src/Field3DFile.cpp
index d34d364..e6caced 100644
--- a/src/Field3DFile.cpp
+++ b/src/Field3DFile.cpp
@@ -826,6 +826,19 @@ bool Field3DInputFile::open(const string &filename)
"In file: " + filename + " - Bad file hierarchy. ");
success = false;
}
+ catch (runtime_error &e) {
+ // HDF5 fallback
+ m_hdf5.reset(new Field3DInputFileHDF5);
+ m_hdf5Base = m_hdf5;
+ if (m_hdf5->open(filename)) {
+ // Handled. Just return.
+ return true;
+ } else {
+ Msg::print(Msg::SevWarning,
+ "In file: " + filename + ": " + string(e.what()));
+ success = false;
+ }
+ }
catch (...) {
Msg::print(Msg::SevWarning,
"In file: " + filename + " Unknown exception ");

View File

@ -1,6 +1,6 @@
Name: Field3D
Version: 1.7.3
Release: 22%{?dist}
Version: 1.7.2
Release: 16%{?dist}
Summary: Library for storing voxel data
License: BSD
@ -8,19 +8,12 @@ URL: https://sites.google.com/site/field3d/
Source0: https://github.com/imageworks/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
Patch0: Field3D-openexr.patch
Patch0: Field3D-unit_test.patch
BuildRequires: cmake gcc-c++ doxygen
BuildRequires: hdf5-devel
BuildRequires: boost-devel
%if 0%{?fedora} > 34
# OpenEXR is only needed for OpenEXRConfig.h
BuildRequires: cmake(OpenEXR)
BuildRequires: cmake(Imath)
%else
BuildRequires: ilmbase-devel
BuildRequires: openexr-devel
%endif
Requires: hdf5 = %{_hdf5_version}
@ -45,20 +38,23 @@ Development headers and documentation for %{name}.
%build
export CXXFLAGS="%{optflags} -DH5_USE_110_API"
%cmake -DINSTALL_DOCS=OFF
rm -rf build && mkdir build && pushd build
%cmake -DINSTALL_DOCS=OFF \
../
%cmake_build
%make_build
%install
%cmake_install
pushd build
%make_install
popd
install -D -m 0644 man/f3dinfo.1 %{buildroot}%{_mandir}/man1/f3dinfo.1
%check
pushd %{_vpath_builddir}
pushd build
./unitTest
@ -67,7 +63,7 @@ pushd %{_vpath_builddir}
%license COPYING
%{_bindir}/f3dinfo
%{_libdir}/libField3D.so.*
%{_mandir}/man1/f3dinfo.1*
%{_mandir}/man1/f3dinfo.1.gz
%files devel
%doc docs/html/
@ -76,79 +72,6 @@ pushd %{_vpath_builddir}
%changelog
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.3-22
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Mon Feb 20 2023 Jonathan Wakely <jwakely@redhat.com> - 1.7.3-21
- Rebuilt for Boost 1.81
* Wed Jan 18 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.3-20
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.3-19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Wed May 04 2022 Thomas Rodgers <trodgers@redhat.com> - 1.7.3-18
- Rebuilt for Boost 1.78
* Wed Jan 19 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.3-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Sun Nov 21 2021 Orion Poplawski <orion@nwra.com> - 1.7.3-16
- Rebuild for hdf5 1.12.1
* Fri Aug 20 2021 Richard Shaw <hobbes1069@gmail.com> - 1.7.3-15
- Rebuild for OpenEXR/Imath 3.1.
* Tue Aug 10 2021 Orion Poplawski <orion@nwra.com> - 1.7.3-14
- Rebuild for hdf5 1.10.7
* Fri Aug 06 2021 Jonathan Wakely <jwakely@redhat.com> - 1.7.3-13
- Rebuilt for Boost 1.76
* Sat Jul 31 2021 Richard Shaw <hobbes1069@gmail.com> - 1.7.3-12
- Add minimal patch for OpenEXR/Imath 3.
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.3-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Tue Mar 30 2021 Jonathan Wakely <jwakely@redhat.com> - 1.7.3-10
- Rebuilt for removed libstdc++ symbol (#1937698)
* Fri Jan 29 2021 Richard Shaw <hobbes1069@gmail.com> - 1.7.3-9
- Add openexr to build requirements.
* Mon Jan 25 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.3-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Fri Jan 22 2021 Jonathan Wakely <jwakely@redhat.com> - 1.7.3-7
- Rebuilt for Boost 1.75
* Fri Jan 01 2021 Richard Shaw <hobbes1069@gmail.com> - 1.7.3-6
- Rebuild for OpenEXR 2.5.3.
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.3-5
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Thu Jun 25 2020 Orion Poplawski <orion@cora.nwra.com> - 1.7.3-3
- Rebuild for hdf5 1.10.6
* Thu May 28 2020 Jonathan Wakely <jwakely@redhat.com> - 1.7.3-2
- Rebuilt for Boost 1.73
* Thu Mar 12 2020 Richard Shaw <hobbes1069@gmail.com> - 1.7.3-1
- Update to 1.7.3.
* Mon Feb 03 2020 Kalev Lember <klember@redhat.com> - 1.7.2-18
- Avoid hardcoding man page compression
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.2-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.2-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

View File

@ -1 +1 @@
SHA512 (Field3D-1.7.3.tar.gz) = de3f10ff120420925de67064b2169f2a30c9180e308acc9090d70567b45be5423f4b1f7eb32bb376c887cea1364803cf7b2db66c2bc49f8a39a1037bbf0e5f39
61660c2400213ca9adbb3e17782cccfb Field3D-1.7.2.tar.gz