mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-27 05:10:36 +00:00
Fix compilation if SSE2 is enabled on i386.
While here, fix regression tests and see that things are fine. (Some regression-test issues remain for largestack, the default build passes make regression now on i386 and amd64). (No revision bump because these are build fixes, and the regression test stuff does not become part of the installed material.) Assisted by: truckman@ PR: 196014 Submitted by: truckman@
This commit is contained in:
parent
6d07df8ef9
commit
0b9ce1503b
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=377376
@ -5,8 +5,11 @@ PORTNAME= OpenEXR
|
||||
PORTVERSION= 2.2.0
|
||||
PORTREVISION= 4
|
||||
CATEGORIES= graphics devel
|
||||
MASTER_SITES= SAVANNAH/openexr/
|
||||
MASTER_SITES= SAVANNAH/openexr/:dist \
|
||||
LOCAL/mandree/:test
|
||||
DISTNAME= openexr-${DISTVERSION}
|
||||
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:dist \
|
||||
openexr-2.2.0-comp_dwa-test-images.tar.xz:test
|
||||
|
||||
MAINTAINER= mandree@FreeBSD.org
|
||||
COMMENT= High dynamic-range (HDR) image file format
|
||||
@ -79,13 +82,12 @@ pre-configure:
|
||||
${ECHO_CMD} "*** same C++ std. library before trying to build OpenEXR. Abort. ***" ; \
|
||||
exit 1; }
|
||||
|
||||
|
||||
.if ! ${PORT_OPTIONS:MEXAMPLES}
|
||||
EXTRA_PATCHES+=${FILESDIR}/extra-patch-IlmImfExamples__Makefile.in
|
||||
.endif
|
||||
|
||||
regression-test regression test check: build
|
||||
@(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} check)
|
||||
@(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${_MAKE_JOBS} check)
|
||||
|
||||
post-install:
|
||||
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libIlmImf-${MAJORVER}.so.${VER}
|
||||
|
@ -1,2 +1,4 @@
|
||||
SHA256 (openexr-2.2.0.tar.gz) = 36a012f6c43213f840ce29a8b182700f6cf6b214bea0d5735594136b44914231
|
||||
SIZE (openexr-2.2.0.tar.gz) = 14489661
|
||||
SHA256 (openexr-2.2.0-comp_dwa-test-images.tar.xz) = bbb8ff547e9b68f0dfb1e8804a7ad984978c2b15897988399cc68176e99dd63a
|
||||
SIZE (openexr-2.2.0-comp_dwa-test-images.tar.xz) = 653768
|
||||
|
11
graphics/OpenEXR/files/patch-IlmImfTest__main.cpp
Normal file
11
graphics/OpenEXR/files/patch-IlmImfTest__main.cpp
Normal file
@ -0,0 +1,11 @@
|
||||
--- IlmImfTest/main.cpp.orig 2014-08-10 04:23:59 UTC
|
||||
+++ IlmImfTest/main.cpp
|
||||
@@ -100,7 +100,7 @@
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
|
||||
-#if defined(OPENEXR_IMF_HAVE_LINUX_PROCFS) || defined(OPENEXR_IMF_HAVE_DARWIN)
|
||||
+#if defined(OPENEXR_IMF_HAVE_LINUX_PROCFS) || defined(OPENEXR_IMF_HAVE_DARWIN) || defined(__FreeBSD__)
|
||||
#include <unistd.h>
|
||||
#include <sstream>
|
||||
#endif
|
@ -0,0 +1,22 @@
|
||||
--- IlmImfTest/testOptimizedInterleavePatterns.cpp.orig 2014-08-10 02:03:49 UTC
|
||||
+++ IlmImfTest/testOptimizedInterleavePatterns.cpp
|
||||
@@ -226,7 +226,8 @@ bool compare(const FrameBuffer& asRead,
|
||||
writtenHalf=half(i.slice().fillValue);
|
||||
}
|
||||
|
||||
- if (writtenHalf.bits()!=readHalf.bits())
|
||||
+ if (writtenHalf.bits()!=readHalf.bits() &&
|
||||
+ !(writtenHalf.isNan() && readHalf.isNan()))
|
||||
{
|
||||
if (nonfatal)
|
||||
{
|
||||
@@ -235,7 +236,8 @@ bool compare(const FrameBuffer& asRead,
|
||||
else
|
||||
{
|
||||
cout << "\n\nerror reading back channel " << i.name() << " pixel " << x << ',' << y << " got " << readHalf << " expected " << writtenHalf << endl;
|
||||
- assert(writtenHalf.bits()==readHalf.bits());
|
||||
+ assert(writtenHalf.bits()==readHalf.bits() ||
|
||||
+ (writtenHalf.isNan() && readHalf.isNan()));
|
||||
exit(1);
|
||||
}
|
||||
}
|
11
graphics/OpenEXR/files/patch-IlmImfUtilTest_main.cpp
Normal file
11
graphics/OpenEXR/files/patch-IlmImfUtilTest_main.cpp
Normal file
@ -0,0 +1,11 @@
|
||||
--- IlmImfUtilTest/main.cpp.orig 2014-08-10 04:24:00 UTC
|
||||
+++ IlmImfUtilTest/main.cpp
|
||||
@@ -46,7 +46,7 @@
|
||||
#include <cstring>
|
||||
#include <time.h>
|
||||
|
||||
-#if defined(OPENEXR_IMF_HAVE_LINUX_PROCFS) || defined(OPENEXR_IMF_HAVE_DARWIN)
|
||||
+#if defined(OPENEXR_IMF_HAVE_LINUX_PROCFS) || defined(OPENEXR_IMF_HAVE_DARWIN) || defined(__FreeBSD__)
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
25
graphics/OpenEXR/files/patch-IlmImf__ImfSystemSpecific.cpp
Normal file
25
graphics/OpenEXR/files/patch-IlmImf__ImfSystemSpecific.cpp
Normal file
@ -0,0 +1,25 @@
|
||||
--- 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 {
|
||||
// Helper functions for gcc + SSE enabled
|
||||
void cpuid(int n, int &eax, int &ebx, int &ecx, int &edx)
|
||||
{
|
||||
- __asm__ __volatile__ (
|
||||
- "cpuid"
|
||||
- : /* Output */ "=a"(eax), "=b"(ebx), "=c"(ecx), "=d"(edx)
|
||||
- : /* Input */ "a"(n)
|
||||
- : /* Clobber */);
|
||||
+ __cpuid(n, eax, ebx, ecx, edx);
|
||||
}
|
||||
|
||||
#else // IMF_HAVE_SSE2 && __GNUC__
|
Loading…
Reference in New Issue
Block a user