aboutsummaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authornork <nork@FreeBSD.org>2007-10-07 22:47:38 +0800
committernork <nork@FreeBSD.org>2007-10-07 22:47:38 +0800
commit9ff63c6484d23e3778e28ca2c1e132587a19c6e7 (patch)
tree600dcbe96c91a259d69f276de895a95421df0e33 /graphics
parent90f56202c443ae1a1b5a85c61f6bc71d5f3650ef (diff)
downloadfreebsd-ports-gnome-9ff63c6484d23e3778e28ca2c1e132587a19c6e7.tar.gz
freebsd-ports-gnome-9ff63c6484d23e3778e28ca2c1e132587a19c6e7.tar.zst
freebsd-ports-gnome-9ff63c6484d23e3778e28ca2c1e132587a19c6e7.zip
o Enable/disable multithread file I/O support.
o Add make test. o Fix some warning. o Bump PORTREVISION, accordingly. Submitted by: mi
Diffstat (limited to 'graphics')
-rw-r--r--graphics/ilmbase/Makefile14
-rw-r--r--graphics/ilmbase/files/patch-IlmThread-IlmThreadPool.cpp43
-rw-r--r--graphics/ilmbase/files/patch-Imath-ImathFun.cpp44
-rw-r--r--graphics/ilmbase/files/patch-ImathTest-testBoxAlgo.cpp11
-rw-r--r--graphics/ilmbase/files/patch-ImathTest-testLineAlgo.cpp10
-rw-r--r--graphics/ilmbase/files/patch-ImathTest-testShear.cpp10
6 files changed, 131 insertions, 1 deletions
diff --git a/graphics/ilmbase/Makefile b/graphics/ilmbase/Makefile
index 7d38858a00a9..f4a5be99b26b 100644
--- a/graphics/ilmbase/Makefile
+++ b/graphics/ilmbase/Makefile
@@ -7,6 +7,7 @@
PORTNAME= ilmbase
PORTVERSION= 1.0.0
+PORTREVISION= 1
CATEGORIES= graphics devel
MASTER_SITES= ${MASTER_SITE_SAVANNAH}
MASTER_SITE_SUBDIR= openexr
@@ -14,12 +15,23 @@ MASTER_SITE_SUBDIR= openexr
MAINTAINER= nork@FreeBSD.org
COMMENT= ILM Base libraries a.k.a. Half, IlmThread, Imath and Iex
+OPTIONS= THREAD "Enable multithreaded file I/O support" off
+
USE_GNOME= pkgconfig
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
USE_AUTOTOOLS= libtool:15
+test check: build
+ @(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} check)
+
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_THREAD)
CONFIGURE_ENV+= PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
PTHREAD_LIBS="${PTHREAD_LIBS}"
+.else
+CONFIGURE_ARGS+=--disable-threading
+.endif
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/graphics/ilmbase/files/patch-IlmThread-IlmThreadPool.cpp b/graphics/ilmbase/files/patch-IlmThread-IlmThreadPool.cpp
new file mode 100644
index 000000000000..56630ef346cf
--- /dev/null
+++ b/graphics/ilmbase/files/patch-IlmThread-IlmThreadPool.cpp
@@ -0,0 +1,43 @@
+--- IlmThread/IlmThreadPool.cpp.orig 2006-12-09 06:59:36.000000000 +0900
++++ IlmThread/IlmThreadPool.cpp 2007-10-07 23:29:07.000000000 +0900
+@@ -247,7 +247,7 @@
+ // an error like: "pure virtual method called"
+ //
+
+- for (int i = 0; i < numThreads; i++)
++ for (unsigned int i = 0; i < numThreads; i++)
+ {
+ taskSemaphore.post();
+ threadSemaphore.wait();
+@@ -364,19 +364,19 @@
+
+ Lock lock (_data->threadMutex);
+
+- if (count > _data->numThreads)
++ if ((unsigned int)count > _data->numThreads)
+ {
+ //
+ // Add more threads
+ //
+
+- while (_data->numThreads < count)
++ while (_data->numThreads < (unsigned int)count)
+ {
+ _data->threads.push_back (new WorkerThread (_data));
+ _data->numThreads++;
+ }
+ }
+- else if (count < _data->numThreads)
++ else if ((unsigned int)count < _data->numThreads)
+ {
+ //
+ // Wait until all existing threads are finished processing,
+@@ -389,7 +389,7 @@
+ // Add in new threads
+ //
+
+- while (_data->numThreads < count)
++ while (_data->numThreads < (unsigned int)count)
+ {
+ _data->threads.push_back (new WorkerThread (_data));
+ _data->numThreads++;
diff --git a/graphics/ilmbase/files/patch-Imath-ImathFun.cpp b/graphics/ilmbase/files/patch-Imath-ImathFun.cpp
new file mode 100644
index 000000000000..0b29461b0152
--- /dev/null
+++ b/graphics/ilmbase/files/patch-Imath-ImathFun.cpp
@@ -0,0 +1,44 @@
+--- Imath/ImathFun.cpp.orig 2006-12-09 06:59:37.000000000 +0900
++++ Imath/ImathFun.cpp 2007-10-07 23:23:38.000000000 +0900
+@@ -33,6 +33,7 @@
+ ///////////////////////////////////////////////////////////////////////////
+
+
++#include <inttypes.h>
+ #include "ImathFun.h"
+
+ namespace Imath {
+@@ -41,14 +42,14 @@
+ float
+ succf (float f)
+ {
+- union {float f; int i;} u;
++ union {float f; int32_t i;} u;
+ u.f = f;
+
+ if ((u.i & 0x7f800000) == 0x7f800000)
+ {
+ // Nan or infinity; don't change value.
+ }
+- else if (u.i == 0x00000000 || u.i == 0x80000000)
++ else if (u.i == (int32_t)0x00000000 || u.i == (int32_t)0x80000000)
+ {
+ // Plus or minus zero.
+
+@@ -76,14 +77,14 @@
+ float
+ predf (float f)
+ {
+- union {float f; int i;} u;
++ union {float f; int32_t i;} u;
+ u.f = f;
+
+ if ((u.i & 0x7f800000) == 0x7f800000)
+ {
+ // Nan or infinity; don't change value.
+ }
+- else if (u.i == 0x00000000 || u.i == 0x80000000)
++ else if (u.i == (int32_t)0x00000000 || u.i == (int32_t)0x80000000)
+ {
+ // Plus or minus zero.
+
diff --git a/graphics/ilmbase/files/patch-ImathTest-testBoxAlgo.cpp b/graphics/ilmbase/files/patch-ImathTest-testBoxAlgo.cpp
new file mode 100644
index 000000000000..5eca503d4d1d
--- /dev/null
+++ b/graphics/ilmbase/files/patch-ImathTest-testBoxAlgo.cpp
@@ -0,0 +1,11 @@
+--- ImathTest/testBoxAlgo.cpp.orig 2007-07-13 13:48:45.000000000 +0900
++++ ImathTest/testBoxAlgo.cpp 2007-10-07 23:26:22.000000000 +0900
+@@ -336,7 +336,7 @@
+ Box3f ()
+ };
+
+- for (int i = 0; i < sizeof (boxes) / sizeof (boxes[0]); ++i)
++ for (unsigned int i = 0; i < sizeof (boxes) / sizeof (boxes[0]); ++i)
+ testRayBoxIntersection (boxes[i]);
+ }
+
diff --git a/graphics/ilmbase/files/patch-ImathTest-testLineAlgo.cpp b/graphics/ilmbase/files/patch-ImathTest-testLineAlgo.cpp
new file mode 100644
index 000000000000..bb7452049a65
--- /dev/null
+++ b/graphics/ilmbase/files/patch-ImathTest-testLineAlgo.cpp
@@ -0,0 +1,10 @@
+--- ImathTest/testLineAlgo.cpp.orig 2006-12-09 06:59:38.000000000 +0900
++++ ImathTest/testLineAlgo.cpp 2007-10-07 23:24:58.000000000 +0900
+@@ -399,7 +399,6 @@
+ V3f p1 = v0 * b.x + v1 * b.y + v2 * b.z;
+
+ V3f p0;
+- int j = 0;
+
+ do
+ {
diff --git a/graphics/ilmbase/files/patch-ImathTest-testShear.cpp b/graphics/ilmbase/files/patch-ImathTest-testShear.cpp
new file mode 100644
index 000000000000..c396a2b43abc
--- /dev/null
+++ b/graphics/ilmbase/files/patch-ImathTest-testShear.cpp
@@ -0,0 +1,10 @@
+--- ImathTest/testShear.cpp.orig 2006-12-09 06:59:38.000000000 +0900
++++ ImathTest/testShear.cpp 2007-10-07 23:24:27.000000000 +0900
+@@ -54,7 +54,6 @@
+
+ const float epsilon = Imath::limits< float >::epsilon();
+
+- float array[6] = { 1.0F, 2.0F, 3.0F, 4.0F, 5.0F, 6.0F };
+ Imath::Shear6f testConstructor1;
+ Imath::Shear6f testConstructor2( testConstructor1 );
+