On субота 06 жовтень 2007, Norikatsu Shigemura wrote: = On Thu, 4 Oct 2007 23:22:44 -0400 = Mikhail Teterin <[EMAIL PROTECTED]> wrote: = I think that you should use pkg-config like following. = = $ pkg-config --cflags OpenEXR = -D_THREAD_SAFE -I/usr/local/include/OpenEXR = = $ pkg-config --libs OpenEXR = -pthread -L/usr/local/lib -lIlmImf -lImath -lHalf -lIex -lz
Yes, ImageMagick uses OpenEXR like that. And the ImageMagick's /executables/ (such as display, convert, identify, etc.) are linked correctly. But -- because perl does not have threads by default on FreeBSD -- PerlMagick does not work. This is a known problem -- and not only with Perl. The only solution for -stable is to not use -threads wherever possible... This is why I'm asking, if it is, indeed, possible to turn multi-threading off in OpenEXR by default. Seems like it is... Please, make threading optional in the new version (1.6.0) of OpenEXR port. = And I'll update OpenEXR to 1.6.0. Thanks for your remind. The update will, probably, require splitting the port in two -- the ilmbase is now released separately and contains libHalf, libIlmBase, libIlmMath. The actual graphics library remains in OpenEXR. By the time your e-mail arrived I almost finished the port of ilmbase. I'm attaching it here -- only the pkg-plist may need re-verification. The port needs to be committed together with the matching OpenEXR update. The dependant ports may need to revisit their dependencies -- those, who need only libHalf will need to depend on devel/ilmbase instead of the full-blown OpenEXR, for example. Yours, -mi
# This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # ilmbase/files/patch-warnings # ilmbase/Makefile # ilmbase/pkg-descr # ilmbase/pkg-plist # ilmbase/distinfo # echo x - ilmbase/files/patch-warnings sed 's/^X//' >ilmbase/files/patch-warnings << 'END-of-ilmbase/files/patch-warnings' X--- Imath/ImathFun.cpp 2006-12-08 16:59:37.000000000 -0500 X+++ Imath/ImathFun.cpp 2007-10-06 17:24:11.000000000 -0400 X@@ -33,5 +33,5 @@ X /////////////////////////////////////////////////////////////////////////// X X- X+#include <inttypes.h> X #include "ImathFun.h" X X@@ -42,5 +42,5 @@ X succf (float f) X { X- union {float f; int i;} u; X+ union {float f; int32_t i;} u; X u.f = f; X X@@ -49,5 +49,5 @@ X // Nan or infinity; don't change value. X } X- else if (u.i == 0x00000000 || u.i == 0x80000000) X+ else if (u.i == (int32_t)0x00000000 || u.i == (int32_t)0x80000000) X { X // Plus or minus zero. X@@ -77,5 +77,5 @@ X predf (float f) X { X- union {float f; int i;} u; X+ union {float f; int32_t i;} u; X u.f = f; X X@@ -84,5 +84,5 @@ X // Nan or infinity; don't change value. X } X- else if (u.i == 0x00000000 || u.i == 0x80000000) X+ else if (u.i == (int32_t)0x00000000 || u.i == (int32_t)0x80000000) X { X // Plus or minus zero. X--- ImathTest/testShear.cpp 2006-12-08 16:59:38.000000000 -0500 X+++ ImathTest/testShear.cpp 2007-10-06 17:25:38.000000000 -0400 X@@ -55,5 +55,4 @@ X const float epsilon = Imath::limits< float >::epsilon(); X X- float array[6] = { 1.0F, 2.0F, 3.0F, 4.0F, 5.0F, 6.0F }; X Imath::Shear6f testConstructor1; X Imath::Shear6f testConstructor2( testConstructor1 ); X--- ImathTest/testLineAlgo.cpp 2006-12-08 16:59:38.000000000 -0500 X+++ ImathTest/testLineAlgo.cpp 2007-10-06 17:26:26.000000000 -0400 X@@ -400,5 +400,4 @@ X X V3f p0; X- int j = 0; X X do X--- ImathTest/testBoxAlgo.cpp 2007-07-13 00:48:45.000000000 -0400 X+++ ImathTest/testBoxAlgo.cpp 2007-10-06 17:27:06.000000000 -0400 X@@ -337,5 +337,5 @@ X }; X X- for (int i = 0; i < sizeof (boxes) / sizeof (boxes[0]); ++i) X+ for (unsigned int i = 0; i < sizeof (boxes) / sizeof (boxes[0]); ++i) X testRayBoxIntersection (boxes[i]); X } X--- IlmThread/IlmThreadPool.cpp 2006-12-08 16:59:36.000000000 -0500 X+++ IlmThread/IlmThreadPool.cpp 2007-10-06 17:24:11.000000000 -0400 X@@ -248,5 +248,5 @@ X // X X- for (int i = 0; i < numThreads; i++) X+ for (unsigned int i = 0; i < numThreads; i++) X { X taskSemaphore.post(); X@@ -365,5 +365,5 @@ X Lock lock (_data->threadMutex); X X- if (count > _data->numThreads) X+ if ((unsigned int)count > _data->numThreads) X { X // X@@ -371,5 +371,5 @@ X // X X- while (_data->numThreads < count) X+ while (_data->numThreads < (unsigned int)count) X { X _data->threads.push_back (new WorkerThread (_data)); X@@ -377,5 +377,5 @@ X } X } X- else if (count < _data->numThreads) X+ else if ((unsigned int)count < _data->numThreads) X { X // X@@ -390,5 +390,5 @@ X // X X- while (_data->numThreads < count) X+ while (_data->numThreads < (unsigned int)count) X { X _data->threads.push_back (new WorkerThread (_data)); END-of-ilmbase/files/patch-warnings echo x - ilmbase/Makefile sed 's/^X//' >ilmbase/Makefile << 'END-of-ilmbase/Makefile' X# New ports collection makefile for: OpenEXR X# Date created: 2007/10/06 X# Whom: [EMAIL PROTECTED] X# X# $FreeBSD$ X# X XPORTNAME= ilmbase XPORTVERSION= 1.0.0 XCATEGORIES= devel XMASTER_SITES= ${MASTER_SITE_SAVANNAH} XMASTER_SITE_SUBDIR= openexr X XMAINTAINER= [EMAIL PROTECTED] XCOMMENT= Industrial Light & Magic\'s \"base\" libraries X X# CONFLICTS= OpenEXR-1.[0-4].* X XOPTIONS= EXR_THREADING "Enable threads" off \ X EXR_TESTS "Run vendor's self-tests" on X XUSE_AUTOTOOLS= libtool:15 XGNU_CONFIGURE= YES XUSE_GMAKE= yes XUSE_GNOME= pkgconfig XINSTALLS_SHLIB= YES X#CXXFLAGS+= -Wall -Werror XALL_TARGET= -j`${SYSCTL} -n hw.ncpu` X XEXAMPLESDIR= ${PREFIX}/share/examples/${PORTNAME}-${PORTVERSION} X Xtest check: X cd ${WRKSRC} && ${MAKE} check X X.include <bsd.port.pre.mk> X X.if defined(WITH_EXR_THREADING) XCONFIGURE_ENV+= PTHREAD_LIBS=${PTHREAD_LIBS} \ X PTHREAD_CFLAGS=${PTHREAD_CFLAGS} X.else XCONFIGURE_ARGS+=--disable-threading X.endif X.if !defined(WITHOUT_EXR_TESTS) Xpost-build: test X.endif X X.include <bsd.port.post.mk> END-of-ilmbase/Makefile echo x - ilmbase/pkg-descr sed 's/^X//' >ilmbase/pkg-descr << 'END-of-ilmbase/pkg-descr' XThe "base" development libraries by Industrial Light & Magic(ILM) -- Xrequired by their and some other vendors' software. X XWWW: http://www.openexr.org/ END-of-ilmbase/pkg-descr echo x - ilmbase/pkg-plist sed 's/^X//' >ilmbase/pkg-plist << 'END-of-ilmbase/pkg-plist' Xlib/libHalf.a Xlib/libHalf.la Xlib/libHalf.so Xlib/libHalf.so.6 Xlib/libIex.a Xlib/libIex.la Xlib/libIex.so Xlib/libIex.so.6 Xlib/libImath.a Xlib/libImath.la Xlib/libImath.so Xlib/libImath.so.6 Xlib/libIlmThread.a Xlib/libIlmThread.la Xlib/libIlmThread.so Xlib/libIlmThread.so.6 Xinclude/OpenEXR/Iex.h Xinclude/OpenEXR/IexBaseExc.h Xinclude/OpenEXR/IexErrnoExc.h Xinclude/OpenEXR/IexMacros.h Xinclude/OpenEXR/IexMathExc.h Xinclude/OpenEXR/IexThrowErrnoExc.h Xinclude/OpenEXR/IlmBaseConfig.h Xinclude/OpenEXR/IlmThread.h Xinclude/OpenEXR/IlmThreadMutex.h Xinclude/OpenEXR/IlmThreadPool.h Xinclude/OpenEXR/IlmThreadSemaphore.h Xinclude/OpenEXR/ImathBox.h Xinclude/OpenEXR/ImathBoxAlgo.h Xinclude/OpenEXR/ImathColor.h Xinclude/OpenEXR/ImathColorAlgo.h Xinclude/OpenEXR/ImathEuler.h Xinclude/OpenEXR/ImathExc.h Xinclude/OpenEXR/ImathFrame.h Xinclude/OpenEXR/ImathFrustum.h Xinclude/OpenEXR/ImathFun.h Xinclude/OpenEXR/ImathGL.h Xinclude/OpenEXR/ImathGLU.h Xinclude/OpenEXR/ImathHalfLimits.h Xinclude/OpenEXR/ImathInt64.h Xinclude/OpenEXR/ImathInterval.h Xinclude/OpenEXR/ImathLimits.h Xinclude/OpenEXR/ImathLine.h Xinclude/OpenEXR/ImathLineAlgo.h Xinclude/OpenEXR/ImathMath.h Xinclude/OpenEXR/ImathMatrix.h Xinclude/OpenEXR/ImathMatrixAlgo.h Xinclude/OpenEXR/ImathPlane.h Xinclude/OpenEXR/ImathPlatform.h Xinclude/OpenEXR/ImathQuat.h Xinclude/OpenEXR/ImathRandom.h Xinclude/OpenEXR/ImathRoots.h Xinclude/OpenEXR/ImathShear.h Xinclude/OpenEXR/ImathSphere.h Xinclude/OpenEXR/ImathVec.h Xinclude/OpenEXR/ImathVecAlgo.h Xinclude/OpenEXR/half.h Xinclude/OpenEXR/halfFunction.h Xinclude/OpenEXR/halfLimits.h [EMAIL PROTECTED] include/OpenEXR Xlib/pkgconfig/IlmBase.pc END-of-ilmbase/pkg-plist echo x - ilmbase/distinfo sed 's/^X//' >ilmbase/distinfo << 'END-of-ilmbase/distinfo' XMD5 (ilmbase-1.0.0.tar.gz) = 9e0fd3357ea36995382978a2b7d22401 XSHA256 (ilmbase-1.0.0.tar.gz) = dfde8800b449709310ec2dc98a5e81ab3cadcdaa5ae4921e753639b7e088efb6 XSIZE (ilmbase-1.0.0.tar.gz) = 470217 END-of-ilmbase/distinfo exit
_______________________________________________ kde-freebsd mailing list kde-freebsd@kde.org https://mail.kde.org/mailman/listinfo/kde-freebsd