diff options
author | amdmi3 <amdmi3@FreeBSD.org> | 2015-04-09 17:59:39 +0800 |
---|---|---|
committer | amdmi3 <amdmi3@FreeBSD.org> | 2015-04-09 17:59:39 +0800 |
commit | 466807ef12c23bbf19fb92434feda1b0c3d94998 (patch) | |
tree | 6827c1e0f7d9b85af82b983db585c13fdc3dbd7d /graphics/OpenEXR | |
parent | ba0fdca94aebf32a3d261ae7823716475ceaf6f4 (diff) | |
download | freebsd-ports-gnome-466807ef12c23bbf19fb92434feda1b0c3d94998.tar.gz freebsd-ports-gnome-466807ef12c23bbf19fb92434feda1b0c3d94998.tar.zst freebsd-ports-gnome-466807ef12c23bbf19fb92434feda1b0c3d94998.zip |
- Fix build with base gcc on 8.x and 9.x, remove USE_GCC
PR: 196712
Approved by: mandree (maintainer)
Diffstat (limited to 'graphics/OpenEXR')
-rw-r--r-- | graphics/OpenEXR/Makefile | 9 | ||||
-rw-r--r-- | graphics/OpenEXR/files/patch-IlmImf_ImfFastHuf.cpp | 47 | ||||
-rw-r--r-- | graphics/OpenEXR/files/patch-IlmImf__ImfSystemSpecific.cpp | 36 |
3 files changed, 68 insertions, 24 deletions
diff --git a/graphics/OpenEXR/Makefile b/graphics/OpenEXR/Makefile index e0d71a316a03..f974d624e510 100644 --- a/graphics/OpenEXR/Makefile +++ b/graphics/OpenEXR/Makefile @@ -3,7 +3,7 @@ PORTNAME= OpenEXR PORTVERSION= 2.2.0 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= graphics devel MASTER_SITES= SAVANNAH/openexr/:dist \ LOCAL/mandree/:test @@ -49,13 +49,6 @@ LARGE_STACK_CONFIGURE_ENABLE= large-stack .include <bsd.port.pre.mk> -# If default compiler is GCC, upgrade it because -# g++ 4.2 is too old to auto-upgrade 0xffffffffffffffffl to -# a long long integer constant - and has likely more issues. -.if ${COMPILER_TYPE} == gcc -USE_GCC= yes -.endif - MAJORVER= 2_2 VER= 22 diff --git a/graphics/OpenEXR/files/patch-IlmImf_ImfFastHuf.cpp b/graphics/OpenEXR/files/patch-IlmImf_ImfFastHuf.cpp new file mode 100644 index 000000000000..8253cdaaf75d --- /dev/null +++ b/graphics/OpenEXR/files/patch-IlmImf_ImfFastHuf.cpp @@ -0,0 +1,47 @@ +--- IlmImf/ImfFastHuf.cpp.orig 2014-08-10 08:23:56.000000000 +0400 ++++ IlmImf/ImfFastHuf.cpp 2015-04-08 00:10:07.536640000 +0300 +@@ -107,7 +107,7 @@ + for (int i = 0; i <= MAX_CODE_LEN; ++i) + { + codeCount[i] = 0; +- base[i] = 0xffffffffffffffffL; ++ base[i] = 0xffffffffffffffffULL; + offset[i] = 0; + } + +@@ -352,7 +352,7 @@ + + for (int i = 0; i <= MAX_CODE_LEN; ++i) + { +- if (base[i] != 0xffffffffffffffffL) ++ if (base[i] != 0xffffffffffffffffULL) + { + _ljBase[i] = base[i] << (64 - i); + } +@@ -362,7 +362,7 @@ + // Unused code length - insert dummy values + // + +- _ljBase[i] = 0xffffffffffffffffL; ++ _ljBase[i] = 0xffffffffffffffffULL; + } + } + +@@ -417,7 +417,7 @@ + + int minIdx = TABLE_LOOKUP_BITS; + +- while (minIdx > 0 && _ljBase[minIdx] == 0xffffffffffffffffL) ++ while (minIdx > 0 && _ljBase[minIdx] == 0xffffffffffffffffULL) + minIdx--; + + if (minIdx < 0) +@@ -427,7 +427,7 @@ + // Set the min value such that the table is never tested. + // + +- _tableMin = 0xffffffffffffffffL; ++ _tableMin = 0xffffffffffffffffULL; + } + else + { diff --git a/graphics/OpenEXR/files/patch-IlmImf__ImfSystemSpecific.cpp b/graphics/OpenEXR/files/patch-IlmImf__ImfSystemSpecific.cpp index d2cf5b2f2e78..32af4ebb1297 100644 --- a/graphics/OpenEXR/files/patch-IlmImf__ImfSystemSpecific.cpp +++ b/graphics/OpenEXR/files/patch-IlmImf__ImfSystemSpecific.cpp @@ -1,25 +1,29 @@ ---- IlmImf/ImfSystemSpecific.cpp.orig 2014-08-10 04:23:57 UTC -+++ IlmImf/ImfSystemSpecific.cpp -@@ -35,6 +35,9 @@ - #include "ImfSystemSpecific.h" - #include "ImfNamespace.h" - #include "OpenEXRConfig.h" -+#if defined(IMF_HAVE_SSE2) && defined(__GNUC__) -+#include <cpuid.h> -+#endif - - OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -@@ -44,11 +47,7 @@ namespace { +--- IlmImf/ImfSystemSpecific.cpp.orig 2014-08-10 08:23:57.000000000 +0400 ++++ IlmImf/ImfSystemSpecific.cpp 2015-04-09 00:08:50.100958000 +0300 +@@ -44,11 +44,23 @@ // Helper functions for gcc + SSE enabled void cpuid(int n, int &eax, int &ebx, int &ecx, int &edx) { -- __asm__ __volatile__ ( ++#if __i386__ + __asm__ __volatile__ ( - "cpuid" - : /* Output */ "=a"(eax), "=b"(ebx), "=c"(ecx), "=d"(edx) - : /* Input */ "a"(n) -- : /* Clobber */); -+ __cpuid(n, eax, ebx, ecx, edx); ++ "xchgl %%ebx,%k1\n" ++ "cpuid\n" ++ "xchgl %%ebx,%k1" \ ++ : /* Output */ "=a"(eax), "=&r"(ebx), "=c"(ecx), "=d"(edx) ++ : /* Input */ "0"(n) + : /* Clobber */); ++#else ++ __asm__ __volatile__ ( ++ "xchgq %%rbx,%q1\n" ++ "cpuid\n" ++ "xchgq %%rbx,%q1" \ ++ : /* Output */ "=a"(eax), "=&r"(ebx), "=c"(ecx), "=d"(edx) ++ : /* Input */ "0"(n) ++ : /* Clobber */); ++#endif } #else // IMF_HAVE_SSE2 && __GNUC__ |