Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 May 2016 05:41:27 +0000 (UTC)
From:      Alexey Dokuchaev <danfe@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r415924 - in head/graphics/embree: . files
Message-ID:  <201605270541.u4R5fRHm012017@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: danfe
Date: Fri May 27 05:41:27 2016
New Revision: 415924
URL: https://svnweb.freebsd.org/changeset/ports/415924

Log:
  - 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)

Added:
  head/graphics/embree/files/patch-common_math_math.h   (contents, props changed)
  head/graphics/embree/files/patch-kernels_xeon_bvh_bvh__rotate.cpp
     - copied, changed from r415923, head/graphics/embree/files/patch-kernels_xeon_bvh4_bvh4__rotate.cpp
Deleted:
  head/graphics/embree/files/patch-common_cmake_clang.cmake
  head/graphics/embree/files/patch-common_cmake_gcc.cmake
  head/graphics/embree/files/patch-kernels_xeon_bvh4_bvh4__rotate.cpp
Modified:
  head/graphics/embree/Makefile
  head/graphics/embree/distinfo
  head/graphics/embree/files/patch-common_sys_intrinsics.h
  head/graphics/embree/files/patch-common_sys_thread.cpp
  head/graphics/embree/pkg-plist

Modified: head/graphics/embree/Makefile
==============================================================================
--- head/graphics/embree/Makefile	Fri May 27 04:35:40 2016	(r415923)
+++ head/graphics/embree/Makefile	Fri May 27 05:41:27 2016	(r415924)
@@ -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 
 
 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 (insuff
 
 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:STRI
 
 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>

Modified: head/graphics/embree/distinfo
==============================================================================
--- head/graphics/embree/distinfo	Fri May 27 04:35:40 2016	(r415923)
+++ head/graphics/embree/distinfo	Fri May 27 05:41:27 2016	(r415924)
@@ -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

Added: head/graphics/embree/files/patch-common_math_math.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/embree/files/patch-common_math_math.h	Fri May 27 05:41:27 2016	(r415924)
@@ -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);
+   }

Modified: head/graphics/embree/files/patch-common_sys_intrinsics.h
==============================================================================
--- head/graphics/embree/files/patch-common_sys_intrinsics.h	Fri May 27 04:35:40 2016	(r415923)
+++ head/graphics/embree/files/patch-common_sys_intrinsics.h	Fri May 27 05:41:27 2016	(r415924)
@@ -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

Modified: head/graphics/embree/files/patch-common_sys_thread.cpp
==============================================================================
--- head/graphics/embree/files/patch-common_sys_thread.cpp	Fri May 27 04:35:40 2016	(r415923)
+++ head/graphics/embree/files/patch-common_sys_thread.cpp	Fri May 27 05:41:27 2016	(r415924)
@@ -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

Copied and modified: head/graphics/embree/files/patch-kernels_xeon_bvh_bvh__rotate.cpp (from r415923, head/graphics/embree/files/patch-kernels_xeon_bvh4_bvh4__rotate.cpp)
==============================================================================
--- head/graphics/embree/files/patch-kernels_xeon_bvh4_bvh4__rotate.cpp	Fri May 27 04:35:40 2016	(r415923, copy source)
+++ head/graphics/embree/files/patch-kernels_xeon_bvh_bvh__rotate.cpp	Fri May 27 05:41:27 2016	(r415924)
@@ -1,15 +1,15 @@
---- kernels/xeon/bvh4/bvh4_rotate.cpp.orig	2015-09-17 06:11:18 UTC
-+++ kernels/xeon/bvh4/bvh4_rotate.cpp
+--- 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 */
- 	float4 area0123 = float4(extract<0>(min0),extract<0>(min1),extract<0>(min2),extract<0>(min3)) - float4(childArea[c2]);
+ 	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 };
--	bool4 valid = int4(int(depth+1))+cdepth <= int4(BVH4::maxBuildDepth); // only select swaps that fulfill depth constraints
+-	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 int4(BVH4::maxBuildDepth) call.
++	// for the vint4(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);
++	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);

Modified: head/graphics/embree/pkg-plist
==============================================================================
--- head/graphics/embree/pkg-plist	Fri May 27 04:35:40 2016	(r415923)
+++ head/graphics/embree/pkg-plist	Fri May 27 05:41:27 2016	(r415924)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605270541.u4R5fRHm012017>