diff --git a/Imath.spec b/Imath.spec index 2caccab3abcee91f9e864ca3e6b230cc33895802..9b0647b15fc87fe9037eb1c8a85cb439fa341737 100644 --- a/Imath.spec +++ b/Imath.spec @@ -2,12 +2,13 @@ %global sover 29 Name: Imath Version: 3.1.4 -Release: 1 +Release: 2 Summary: Library of 2D and 3D vector, matrix, and math operations for computer graphics License: BSD URL: https://github.com/AcademySoftwareFoundation/Imath Source0: https://github.com/AcademySoftwareFoundation/%{srcname}/archive/v%{version}/%{srcname}-%{version}.tar.gz Patch0: Imath-python-test.patch +Patch1: Use-_WIN32-instead-of-_MSC_VER-to-fix-mingw-build-24.patch BuildRequires: cmake gcc gcc-c++ make boost-devel python3-devel BuildRequires: python3-breathe python3-numpy doxygen python3-sphinx %description @@ -73,5 +74,8 @@ make test %{_libdir}/libPyImath_Python3_9-3_1.so %changelog +* Wed Dec 27 fandehui - 2.1.4-2 +- Use _WIN32 instead of _MSC_VER to fix mingw build (#245) + * Mon Feb 7 2022 liyanan - 3.1.4-1 - package init diff --git a/Use-_WIN32-instead-of-_MSC_VER-to-fix-mingw-build-24.patch b/Use-_WIN32-instead-of-_MSC_VER-to-fix-mingw-build-24.patch new file mode 100644 index 0000000000000000000000000000000000000000..75b8e6820ada78dcb57099e90d872ce586e61422 --- /dev/null +++ b/Use-_WIN32-instead-of-_MSC_VER-to-fix-mingw-build-24.patch @@ -0,0 +1,59 @@ +From 8dfb8e613edf56732e9bd4a7e72cd65aa0e07bc5 Mon Sep 17 00:00:00 2001 +From: Cary Phillips +Date: Wed, 16 Mar 2022 17:16:35 -0700 +Subject: [PATCH] Use _WIN32 instead of _MSC_VER to fix mingw build (#245) + +* Use _WIN32 instead of _MSC_VER to fix mingw build + +Signed-off-by: Cary Phillips + +* fix formatting + +Signed-off-by: Cary Phillips +--- + src/ImathTest/half_perf_test.cpp | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/ImathTest/half_perf_test.cpp b/src/ImathTest/half_perf_test.cpp +index 81fe82e..f1ee599 100644 +--- a/src/ImathTest/half_perf_test.cpp ++++ b/src/ImathTest/half_perf_test.cpp +@@ -3,7 +3,7 @@ + // Copyright Contributors to the OpenEXR Project. + // + +-#ifdef _MSC_VER ++#ifdef _WIN32 + # define _CRT_RAND_S + #endif + +@@ -14,7 +14,7 @@ + #include + #include + #include +-#ifdef _MSC_VER ++#ifdef _WIN32 + # include + #else + # include +@@ -267,7 +267,7 @@ static inline half exptable_half_constructor(float f) + int64_t + get_ticks (void) + { +-#ifdef _MSC_VER ++#ifdef _WIN32 + static uint64_t scale = 0; + if (scale == 0) + { +@@ -381,7 +381,7 @@ main (int argc, char* argv[]) + perf_test_half_to_float (floats, halfs, numentries); + + // test float -> half with real-world values +-#ifdef _MSC_VER ++#ifdef _WIN32 + unsigned int rv; + for (int i = 0; i < numentries; ++i) + { +-- +2.42.0.windows.2 +