View | Details | Raw Unified | Return to bug 196712 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-8 / +1 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	OpenEXR
4
PORTNAME=	OpenEXR
5
PORTVERSION=	2.2.0
5
PORTVERSION=	2.2.0
6
PORTREVISION=	4
6
PORTREVISION=	5
7
CATEGORIES=	graphics devel
7
CATEGORIES=	graphics devel
8
MASTER_SITES=	SAVANNAH/openexr/:dist \
8
MASTER_SITES=	SAVANNAH/openexr/:dist \
9
		LOCAL/mandree/:test
9
		LOCAL/mandree/:test
Lines 49-61 Link Here
49
49
50
.include <bsd.port.pre.mk>
50
.include <bsd.port.pre.mk>
51
51
52
# If default compiler is GCC, upgrade it because
53
# g++ 4.2 is too old to auto-upgrade 0xffffffffffffffffl to
54
# a long long integer constant - and has likely more issues.
55
.if ${COMPILER_TYPE} == gcc
56
USE_GCC=	yes
57
.endif
58
59
MAJORVER=	2_2
52
MAJORVER=	2_2
60
VER=		22
53
VER=		22
61
54
(-)files/patch-IlmImf_ImfFastHuf.cpp (+47 lines)
Line 0 Link Here
1
--- IlmImf/ImfFastHuf.cpp.orig	2014-08-10 08:23:56.000000000 +0400
2
+++ IlmImf/ImfFastHuf.cpp	2015-04-08 00:10:07.536640000 +0300
3
@@ -107,7 +107,7 @@
4
     for (int i = 0; i <= MAX_CODE_LEN; ++i)
5
     {
6
         codeCount[i] = 0;
7
-        base[i]      = 0xffffffffffffffffL;
8
+        base[i]      = 0xffffffffffffffffULL;
9
         offset[i]    = 0;
10
     }
11
 
12
@@ -352,7 +352,7 @@
13
 
14
     for (int i = 0; i <= MAX_CODE_LEN; ++i)
15
     {
16
-        if (base[i] != 0xffffffffffffffffL)
17
+        if (base[i] != 0xffffffffffffffffULL)
18
         {
19
             _ljBase[i] = base[i] << (64 - i);
20
         }
21
@@ -362,7 +362,7 @@
22
             // Unused code length - insert dummy values
23
             //
24
 
25
-            _ljBase[i] = 0xffffffffffffffffL;
26
+            _ljBase[i] = 0xffffffffffffffffULL;
27
         }
28
     }
29
 
30
@@ -417,7 +417,7 @@
31
 
32
     int minIdx = TABLE_LOOKUP_BITS;
33
 
34
-    while (minIdx > 0 && _ljBase[minIdx] == 0xffffffffffffffffL)
35
+    while (minIdx > 0 && _ljBase[minIdx] == 0xffffffffffffffffULL)
36
         minIdx--;
37
 
38
     if (minIdx < 0)
39
@@ -427,7 +427,7 @@
40
         // Set the min value such that the table is never tested.
41
         //
42
 
43
-        _tableMin = 0xffffffffffffffffL;
44
+        _tableMin = 0xffffffffffffffffULL;
45
     }
46
     else
47
     {
(-)files/patch-IlmImf__ImfSystemSpecific.cpp (-16 / +20 lines)
Lines 1-25 Link Here
1
--- IlmImf/ImfSystemSpecific.cpp.orig	2014-08-10 04:23:57 UTC
1
--- IlmImf/ImfSystemSpecific.cpp.orig	2014-08-10 08:23:57.000000000 +0400
2
+++ IlmImf/ImfSystemSpecific.cpp
2
+++ IlmImf/ImfSystemSpecific.cpp	2015-04-09 00:08:50.100958000 +0300
3
@@ -35,6 +35,9 @@
3
@@ -44,11 +44,23 @@
4
 #include "ImfSystemSpecific.h"
5
 #include "ImfNamespace.h"
6
 #include "OpenEXRConfig.h"
7
+#if defined(IMF_HAVE_SSE2) &&  defined(__GNUC__)
8
+#include <cpuid.h>
9
+#endif
10
 
11
 OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER
12
 
13
@@ -44,11 +47,7 @@ namespace {
14
     // Helper functions for gcc + SSE enabled
4
     // Helper functions for gcc + SSE enabled
15
     void cpuid(int n, int &eax, int &ebx, int &ecx, int &edx)
5
     void cpuid(int n, int &eax, int &ebx, int &ecx, int &edx)
16
     {
6
     {
17
-        __asm__ __volatile__ (
7
+#if __i386__
8
         __asm__ __volatile__ (
18
-            "cpuid"
9
-            "cpuid"
19
-            : /* Output  */ "=a"(eax), "=b"(ebx), "=c"(ecx), "=d"(edx) 
10
-            : /* Output  */ "=a"(eax), "=b"(ebx), "=c"(ecx), "=d"(edx) 
20
-            : /* Input   */ "a"(n)
11
-            : /* Input   */ "a"(n)
21
-            : /* Clobber */);
12
+            "xchgl %%ebx,%k1\n"
22
+	__cpuid(n, eax, ebx, ecx, edx);
13
+            "cpuid\n"
14
+            "xchgl %%ebx,%k1" \
15
+            : /* Output  */ "=a"(eax), "=&r"(ebx), "=c"(ecx), "=d"(edx)
16
+            : /* Input   */ "0"(n)
17
             : /* Clobber */);
18
+#else
19
+        __asm__ __volatile__ (
20
+            "xchgq %%rbx,%q1\n"
21
+            "cpuid\n"
22
+            "xchgq %%rbx,%q1" \
23
+            : /* Output  */ "=a"(eax), "=&r"(ebx), "=c"(ecx), "=d"(edx)
24
+            : /* Input   */ "0"(n)
25
+            : /* Clobber */);
26
+#endif
23
     }
27
     }
24
 
28
 
25
 #else // IMF_HAVE_SSE2 && __GNUC__
29
 #else // IMF_HAVE_SSE2 && __GNUC__

Return to bug 196712