diff options
author | danfe <danfe@FreeBSD.org> | 2016-05-27 13:41:27 +0800 |
---|---|---|
committer | danfe <danfe@FreeBSD.org> | 2016-05-27 13:41:27 +0800 |
commit | 01d4a6c635a83acd44b851ae67e7f0b007a101b8 (patch) | |
tree | 6ef26de5bb3b82196dc8e3c53d2526fa55c109d6 /graphics/embree | |
parent | 1d52096acffc4d019f21c43ecf877ddcdb15067a (diff) | |
download | freebsd-ports-gnome-01d4a6c635a83acd44b851ae67e7f0b007a101b8.tar.gz freebsd-ports-gnome-01d4a6c635a83acd44b851ae67e7f0b007a101b8.tar.zst freebsd-ports-gnome-01d4a6c635a83acd44b851ae67e7f0b007a101b8.zip |
- Update to version 2.10.0
- Remove `compiler:c++11-lang' from USES, it is not needed (the port does
not build on 9.x with any of c++11-lang/c++11-lib/USE_GCC=yes anyways)
- Make image format support in helper programs optional (and off by default)
Diffstat (limited to 'graphics/embree')
-rw-r--r-- | graphics/embree/Makefile | 36 | ||||
-rw-r--r-- | graphics/embree/distinfo | 4 | ||||
-rw-r--r-- | graphics/embree/files/patch-common_cmake_clang.cmake | 18 | ||||
-rw-r--r-- | graphics/embree/files/patch-common_cmake_gcc.cmake | 18 | ||||
-rw-r--r-- | graphics/embree/files/patch-common_math_math.h | 11 | ||||
-rw-r--r-- | graphics/embree/files/patch-common_sys_intrinsics.h | 25 | ||||
-rw-r--r-- | graphics/embree/files/patch-common_sys_thread.cpp | 66 | ||||
-rw-r--r-- | graphics/embree/files/patch-kernels_xeon_bvh4_bvh4__rotate.cpp | 15 | ||||
-rw-r--r-- | graphics/embree/files/patch-kernels_xeon_bvh_bvh__rotate.cpp | 15 | ||||
-rw-r--r-- | graphics/embree/pkg-plist | 69 |
10 files changed, 151 insertions, 126 deletions
diff --git a/graphics/embree/Makefile b/graphics/embree/Makefile index 1537dbdc1a64..1b99c6324dbe 100644 --- a/graphics/embree/Makefile +++ b/graphics/embree/Makefile @@ -3,8 +3,7 @@ PORTNAME= embree DISTVERSIONPREFIX= v -DISTVERSION= 2.7.0 -PORTREVISION= 1 +DISTVERSION= 2.10.0 CATEGORIES= graphics MAINTAINER= danfe@FreeBSD.org @@ -12,9 +11,6 @@ COMMENT= Collection of high-performance ray tracing kernels LICENSE= APACHE20 -LIB_DEPENDS= libMagick++-6.so:graphics/ImageMagick \ - libIlmImf.so:graphics/OpenEXR - ONLY_FOR_ARCHS= i386 amd64 ONLY_FOR_ARCHS_REASON= heavy use of SSE instructions @@ -22,7 +18,7 @@ BROKEN_FreeBSD_9= does not build (insufficient C++11 support) USE_GITHUB= yes -USES= cmake compiler:c++11-lang +USES= cmake USE_GL= glut USE_XORG= xmu USE_LDCONFIG= yes @@ -33,25 +29,33 @@ CMAKE_ARGS= -DRTCORE_TASKING_SYSTEM:STRING=INTERNAL \ CXXFLAGS+= -msse2 # required on i386 +DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}2 PLIST_SUB+= VERSION=${DISTVERSION} +OPTIONS_DEFINE= IMAGE_MAGICK JPEG OPENEXR PNG +IMAGE_MAGICK_DESC= BMP, GIF, PNG, TGA, TIFF image formats support + +IMAGE_MAGICK_LIB_DEPENDS= libMagick++-6.so:graphics/ImageMagick +IMAGE_MAGICK_CMAKE_ON= -DUSE_IMAGE_MAGICK:BOOL=ON + +JPEG_USES= jpeg +JPEG_CMAKE_OFF= -DUSE_LIBJPEG:BOOL=OFF + +OPENEXR_LIB_DEPENDS= libIlmImf.so:graphics/OpenEXR +OPENEXR_CMAKE_OFF= -DUSE_OPENEXR:BOOL=OFF + +PNG_LIB_DEPENDS= libpng.so:graphics/png +PNG_CMAKE_OFF= -DUSE_LIBPNG:BOOL=OFF + post-patch: -# MAP_NORESERVE was never implemented in FreeBSD and retired in r273250 - @${REINPLACE_CMD} -e 's,MAP_NORESERVE,0,' \ + @${REINPLACE_CMD} -e 's,MAP_HUGETLB,MAP_ALIGNED_SUPER,' \ ${WRKSRC}/common/sys/alloc.cpp @${REINPLACE_CMD} -e '/__aligned/s,^,//,' \ ${WRKSRC}/common/sys/platform.h - @${REINPLACE_CMD} -e 's,__UNIX__) &&.*,__LINUX__),' \ + @${REINPLACE_CMD} -e 's,MAP_POPULATE,MAP_PREFAULT_READ,' \ ${WRKSRC}/tests/benchmark.cpp - @${REINPLACE_CMD} -e '/share\/doc/,+2 { \ - s,share/doc/embree-[^)]*,${DOCSDIR_REL}, ; \ - s,bin/,, ; } ' ${WRKSRC}/common/cmake/package.cmake @${REINPLACE_CMD} -e '/encodeRGB8_to_JPEG/s,size_t \*,unsigned \ long *,' ${WRKSRC}/tutorials/common/image/image.h \ ${WRKSRC}/tutorials/common/image/jpeg.cpp -post-install: - ${LN} -sf libembree.so.${DISTVERSION} \ - ${STAGEDIR}${PREFIX}/lib/libembree.so - .include <bsd.port.mk> diff --git a/graphics/embree/distinfo b/graphics/embree/distinfo index 9c79d18622bc..c81342b17881 100644 --- a/graphics/embree/distinfo +++ b/graphics/embree/distinfo @@ -1,2 +1,2 @@ -SHA256 (embree-embree-v2.7.0_GH0.tar.gz) = 2b5dacbf1c94a2e6568661eae7cdb91abbdc65feaccd8aec03c8fd4b32fca6aa -SIZE (embree-embree-v2.7.0_GH0.tar.gz) = 1697062 +SHA256 (embree-embree-v2.10.0_GH0.tar.gz) = c011dc3c035c9618733a2e256ca24efe54aea937f86069e24ff87b02af2d50e4 +SIZE (embree-embree-v2.10.0_GH0.tar.gz) = 1774006 diff --git a/graphics/embree/files/patch-common_cmake_clang.cmake b/graphics/embree/files/patch-common_cmake_clang.cmake deleted file mode 100644 index 540629b62ac2..000000000000 --- a/graphics/embree/files/patch-common_cmake_clang.cmake +++ /dev/null @@ -1,18 +0,0 @@ ---- common/cmake/clang.cmake.orig 2015-09-17 06:11:18 UTC -+++ common/cmake/clang.cmake -@@ -23,11 +23,11 @@ SET(FLAGS_AVX "-mavx") - SET(FLAGS_AVX2 "-mf16c -mavx2 -mfma -mlzcnt -mbmi -mbmi2") - SET(FLAGS_AVX512 "-mavx512") - --SET(CMAKE_CXX_COMPILER "clang++") --SET(CMAKE_C_COMPILER "clang") --SET(CMAKE_CXX_FLAGS "-fPIC -std=c++11 -fno-strict-aliasing -Wno-narrowing -Wno-deprecated-register") -+#SET(CMAKE_CXX_COMPILER "clang++") -+#SET(CMAKE_C_COMPILER "clang") -+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -std=c++11 -fno-strict-aliasing -Wno-narrowing -Wno-deprecated-register") - SET(CMAKE_CXX_FLAGS_DEBUG "-DDEBUG -g -O0") --SET(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG -O3") -+SET(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG") - SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-DDEBUG -g -O3") - SET(CMAKE_EXE_LINKER_FLAGS "") - diff --git a/graphics/embree/files/patch-common_cmake_gcc.cmake b/graphics/embree/files/patch-common_cmake_gcc.cmake deleted file mode 100644 index f3ba95c99eda..000000000000 --- a/graphics/embree/files/patch-common_cmake_gcc.cmake +++ /dev/null @@ -1,18 +0,0 @@ ---- common/cmake/gcc.cmake.orig 2015-09-17 06:11:18 UTC -+++ common/cmake/gcc.cmake -@@ -23,11 +23,11 @@ SET(FLAGS_AVX "-mavx") - SET(FLAGS_AVX2 "-mf16c -mavx2 -mfma -mlzcnt -mbmi -mbmi2") - SET(FLAGS_AVX512 "-mavx512f -mavx512pf -mavx512er -mavx512cd") - --SET(CMAKE_CXX_COMPILER "g++") --SET(CMAKE_C_COMPILER "gcc") --SET(CMAKE_CXX_FLAGS "-fPIC -std=c++11 -fno-strict-aliasing -Wno-narrowing") -+#SET(CMAKE_CXX_COMPILER "g++") -+#SET(CMAKE_C_COMPILER "gcc") -+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -std=c++11 -fno-strict-aliasing -Wno-narrowing") - SET(CMAKE_CXX_FLAGS_DEBUG "-DDEBUG -g -O0") --SET(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG -O3") -+SET(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG") - SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-DDEBUG -g -O3") - SET(CMAKE_EXE_LINKER_FLAGS "") - diff --git a/graphics/embree/files/patch-common_math_math.h b/graphics/embree/files/patch-common_math_math.h new file mode 100644 index 000000000000..1b8109969999 --- /dev/null +++ b/graphics/embree/files/patch-common_math_math.h @@ -0,0 +1,11 @@ +--- common/math/math.h.orig 2016-05-20 05:45:13 UTC ++++ common/math/math.h +@@ -179,7 +179,7 @@ namespace embree + } + #endif + +-#if defined(__WIN32__) ++#if defined(__WIN32__) || defined(__FreeBSD__) + __forceinline void sincosf(float x, float *s, float *c) { + *s = sinf(x); *c = cosf(x); + } diff --git a/graphics/embree/files/patch-common_sys_intrinsics.h b/graphics/embree/files/patch-common_sys_intrinsics.h index 1aef830e3f15..e15937e2005e 100644 --- a/graphics/embree/files/patch-common_sys_intrinsics.h +++ b/graphics/embree/files/patch-common_sys_intrinsics.h @@ -1,6 +1,6 @@ ---- common/sys/intrinsics.h.orig 2015-09-17 06:11:18 UTC +--- common/sys/intrinsics.h.orig 2016-05-20 05:45:13 UTC +++ common/sys/intrinsics.h -@@ -361,6 +361,7 @@ namespace embree +@@ -268,6 +268,7 @@ namespace embree #endif } @@ -8,7 +8,7 @@ __forceinline unsigned __bsf(unsigned v) { #if defined(__AVX2__) -@@ -369,6 +370,7 @@ namespace embree +@@ -276,6 +277,7 @@ namespace embree unsigned r = 0; asm ("bsf %1,%0" : "=r"(r) : "r"(v)); return r; #endif } @@ -16,7 +16,7 @@ __forceinline size_t __bsf(size_t v) { #if defined(__AVX2__) -@@ -389,12 +391,14 @@ namespace embree +@@ -306,12 +308,14 @@ namespace embree return i; } @@ -31,7 +31,7 @@ __forceinline size_t __bscf(size_t& v) { -@@ -411,6 +415,7 @@ namespace embree +@@ -328,6 +332,7 @@ namespace embree #endif } @@ -39,7 +39,7 @@ __forceinline unsigned __bsr(unsigned v) { #if defined(__AVX2__) return 31 - _lzcnt_u32(v); -@@ -418,6 +423,7 @@ namespace embree +@@ -335,6 +340,7 @@ namespace embree unsigned r = 0; asm ("bsr %1,%0" : "=r"(r) : "r"(v)); return r; #endif } @@ -47,16 +47,15 @@ __forceinline size_t __bsr(size_t v) { #if defined(__AVX2__) -@@ -443,7 +449,11 @@ namespace embree - - __forceinline size_t __blsr(size_t v) { - #if defined(__AVX2__) -- return _blsr_u64(v); +@@ -363,7 +369,11 @@ namespace embree + #if defined(__INTEL_COMPILER) + return _blsr_u64(v); + #else +#if defined(__X86_64__) -+ return __blsr_u64(v); + return __blsr_u64(v); +#else + return __blsr_u32(v); +#endif + #endif #else return v & (v-1); - #endif diff --git a/graphics/embree/files/patch-common_sys_thread.cpp b/graphics/embree/files/patch-common_sys_thread.cpp index 71b9c5980eda..ef18224f1227 100644 --- a/graphics/embree/files/patch-common_sys_thread.cpp +++ b/graphics/embree/files/patch-common_sys_thread.cpp @@ -1,21 +1,59 @@ ---- common/sys/thread.cpp.orig 2015-09-17 06:11:18 UTC +--- common/sys/thread.cpp.orig 2016-05-20 05:45:13 UTC +++ common/sys/thread.cpp -@@ -171,13 +171,16 @@ namespace embree - /// Linux Platform - //////////////////////////////////////////////////////////////////////////////// +@@ -239,6 +239,29 @@ namespace embree + #endif --#if defined(__LINUX__) -+#if defined(__LINUX__) || defined(__FreeBSD__) + //////////////////////////////////////////////////////////////////////////////// ++/// FreeBSD Platform ++//////////////////////////////////////////////////////////////////////////////// ++ ++#if defined(__FreeBSD__) + +#include <pthread_np.h> + - namespace embree - { - /*! set affinity of the calling thread */ - void setAffinity(ssize_t affinity) - { -- cpu_set_t cset; ++namespace embree ++{ ++ /*! set affinity of the calling thread */ ++ void setAffinity(ssize_t affinity) ++ { + cpuset_t cset; - CPU_ZERO(&cset); - CPU_SET(affinity, &cset); ++ CPU_ZERO(&cset); ++ CPU_SET(affinity, &cset); ++ ++ if (pthread_setaffinity_np(pthread_self(), sizeof(cset), &cset) != 0) ++ WARNING("pthread_setaffinity_np failed"); // on purpose only a warning ++ } ++} ++#endif ++ ++//////////////////////////////////////////////////////////////////////////////// + /// MacOSX Platform + //////////////////////////////////////////////////////////////////////////////// + +@@ -291,7 +314,8 @@ namespace embree + { + _mm_setcsr(_mm_getcsr() | /*FTZ:*/ (1<<15) | /*DAZ:*/ (1<<6)); +-#if !defined(__LINUX__) ++#if defined(__MACOSX__) ++ /*! Mac OS X does not support setting affinity at thread creation time */ + if (parg->affinity >= 0) + setAffinity(parg->affinity); + #endif +@@ -320,7 +344,15 @@ namespace embree + cpu_set_t cset; + CPU_ZERO(&cset); + CPU_SET(mapThreadID(threadID), &cset); +- if (pthread_setaffinity_np(*tid,sizeof(cpu_set_t),&cset)) ++ if (pthread_setaffinity_np(*tid, sizeof(cset), &cset)) ++ WARNING("pthread_setaffinity_np failed"); // on purpose only a warning ++ } ++#elif defined(__FreeBSD__) ++ if (threadID >= 0) { ++ cpuset_t cset; ++ CPU_ZERO(&cset); ++ CPU_SET(threadID, &cset); ++ if (pthread_setaffinity_np(*tid, sizeof(cset), &cset)) + WARNING("pthread_setaffinity_np failed"); // on purpose only a warning + } + #endif diff --git a/graphics/embree/files/patch-kernels_xeon_bvh4_bvh4__rotate.cpp b/graphics/embree/files/patch-kernels_xeon_bvh4_bvh4__rotate.cpp deleted file mode 100644 index b698833cadf9..000000000000 --- a/graphics/embree/files/patch-kernels_xeon_bvh4_bvh4__rotate.cpp +++ /dev/null @@ -1,15 +0,0 @@ ---- kernels/xeon/bvh4/bvh4_rotate.cpp.orig 2015-09-17 06:11:18 UTC -+++ kernels/xeon/bvh4/bvh4_rotate.cpp -@@ -104,7 +104,11 @@ namespace embree - /*! find best other child */ - float4 area0123 = float4(extract<0>(min0),extract<0>(min1),extract<0>(min2),extract<0>(min3)) - float4(childArea[c2]); - int pos[4] = { pos0,pos1,pos2,pos3 }; -- bool4 valid = int4(int(depth+1))+cdepth <= int4(BVH4::maxBuildDepth); // only select swaps that fulfill depth constraints -+ // Ensure that we have a variable to avoid linking problems on i386. -+ // On amd64 sizeof(size_t) == 8, so previously temporary was created -+ // for the int4(BVH4::maxBuildDepth) call. -+ const size_t mbd = BVH4::maxBuildDepth; -+ bool4 valid = int4(int(depth+1))+cdepth <= int4(mbd); // only select swaps that fulfill depth constraints - valid &= int4(c2) != int4(step); - if (none(valid)) continue; - size_t c1 = select_min(valid,area0123); diff --git a/graphics/embree/files/patch-kernels_xeon_bvh_bvh__rotate.cpp b/graphics/embree/files/patch-kernels_xeon_bvh_bvh__rotate.cpp new file mode 100644 index 000000000000..c6709409e5cc --- /dev/null +++ b/graphics/embree/files/patch-kernels_xeon_bvh_bvh__rotate.cpp @@ -0,0 +1,15 @@ +--- kernels/xeon/bvh/bvh_rotate.cpp.orig 2016-05-20 05:45:13 UTC ++++ kernels/xeon/bvh/bvh_rotate.cpp +@@ -104,7 +104,11 @@ namespace embree + /*! find best other child */ + vfloat4 area0123 = vfloat4(extract<0>(min0),extract<0>(min1),extract<0>(min2),extract<0>(min3)) - vfloat4(childArea[c2]); + int pos[4] = { pos0,pos1,pos2,pos3 }; +- vbool4 valid = vint4(int(depth+1))+cdepth <= vint4(BVH4::maxBuildDepth); // only select swaps that fulfill depth constraints ++ // Ensure that we have a variable to avoid linking problems on i386. ++ // On amd64 sizeof(size_t) == 8, so previously temporary was created ++ // for the vint4(BVH4::maxBuildDepth) call. ++ const size_t mbd = BVH4::maxBuildDepth; ++ vbool4 valid = vint4(int(depth+1))+cdepth <= vint4(mbd); // only select swaps that fulfill depth constraints + valid &= vint4(c2) != vint4(step); + if (none(valid)) continue; + size_t c1 = select_min(valid,area0123); diff --git a/graphics/embree/pkg-plist b/graphics/embree/pkg-plist index 3a54c9aeb058..b20249c5a469 100644 --- a/graphics/embree/pkg-plist +++ b/graphics/embree/pkg-plist @@ -1,33 +1,41 @@ -embree-%%VERSION%%/benchmark -embree-%%VERSION%%/bvh_builder -embree-%%VERSION%%/displacement_geometry -embree-%%VERSION%%/dynamic_scene -embree-%%VERSION%%/hair_geometry -embree-%%VERSION%%/instanced_geometry -embree-%%VERSION%%/interpolation -embree-%%VERSION%%/intersection_filter -embree-%%VERSION%%/lazy_geometry -embree-%%VERSION%%/models/cornell_box.ecs -embree-%%VERSION%%/models/cornell_box.mtl -embree-%%VERSION%%/models/cornell_box.obj -embree-%%VERSION%%/models/subdiv0.xml -embree-%%VERSION%%/models/subdiv1.xml -embree-%%VERSION%%/models/subdiv2.xml -embree-%%VERSION%%/models/subdiv3.xml -embree-%%VERSION%%/models/subdiv4.xml -embree-%%VERSION%%/models/subdiv5.xml -embree-%%VERSION%%/models/subdiv6.xml -embree-%%VERSION%%/models/subdiv7.xml -embree-%%VERSION%%/models/subdiv8.xml -embree-%%VERSION%%/models/subdiv9.xml -embree-%%VERSION%%/motion_blur_geometry -embree-%%VERSION%%/pathtracer -embree-%%VERSION%%/retrace -embree-%%VERSION%%/subdivision_geometry -embree-%%VERSION%%/triangle_geometry -embree-%%VERSION%%/user_geometry -embree-%%VERSION%%/verify -embree-%%VERSION%%/viewer +bin/embree2/benchmark +bin/embree2/bvh_access +bin/embree2/bvh_builder +bin/embree2/convert +bin/embree2/curve_geometry +bin/embree2/displacement_geometry +bin/embree2/dynamic_scene +bin/embree2/hair_geometry +bin/embree2/instanced_geometry +bin/embree2/interpolation +bin/embree2/intersection_filter +bin/embree2/lazy_geometry +bin/embree2/models/cornell_box.ecs +bin/embree2/models/cornell_box.mtl +bin/embree2/models/cornell_box.obj +bin/embree2/models/curve0.xml +bin/embree2/models/curve1.xml +bin/embree2/models/linesegments.ecs +bin/embree2/models/linesegments.xml +bin/embree2/models/subdiv0.xml +bin/embree2/models/subdiv1.xml +bin/embree2/models/subdiv2.xml +bin/embree2/models/subdiv3.xml +bin/embree2/models/subdiv4.xml +bin/embree2/models/subdiv5.xml +bin/embree2/models/subdiv6.xml +bin/embree2/models/subdiv7.xml +bin/embree2/models/subdiv8.xml +bin/embree2/models/subdiv9.xml +bin/embree2/motion_blur_geometry +bin/embree2/pathtracer +bin/embree2/retrace +bin/embree2/subdivision_geometry +bin/embree2/triangle_geometry +bin/embree2/user_geometry +bin/embree2/verify +bin/embree2/viewer +bin/embree2/viewer_stream include/embree2/rtcore.h include/embree2/rtcore.isph include/embree2/rtcore_geometry.h @@ -38,6 +46,7 @@ include/embree2/rtcore_ray.h include/embree2/rtcore_ray.isph include/embree2/rtcore_scene.h include/embree2/rtcore_scene.isph +lib/cmake/embree-%%VERSION%%/embree-config-default.cmake lib/cmake/embree-%%VERSION%%/embree-config-version.cmake lib/cmake/embree-%%VERSION%%/embree-config.cmake lib/libembree.so |