Date: Sun, 11 Oct 2015 21:17:06 +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: r399102 - in head/graphics: . embree embree/files Message-ID: <201510112117.t9BLH6gQ093030@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: danfe Date: Sun Oct 11 21:17:06 2015 New Revision: 399102 URL: https://svnweb.freebsd.org/changeset/ports/399102 Log: Add a port of Embree, is a collection of high-performance ray tracing kernels developed at Intel. WWW: https://embree.github.io/ Added: head/graphics/embree/ head/graphics/embree/Makefile (contents, props changed) head/graphics/embree/distinfo (contents, props changed) head/graphics/embree/files/ head/graphics/embree/files/patch-common_sys_sysinfo.cpp (contents, props changed) head/graphics/embree/files/patch-common_sys_thread.cpp (contents, props changed) head/graphics/embree/pkg-descr (contents, props changed) head/graphics/embree/pkg-plist (contents, props changed) Modified: head/graphics/Makefile Modified: head/graphics/Makefile ============================================================================== --- head/graphics/Makefile Sun Oct 11 19:08:02 2015 (r399101) +++ head/graphics/Makefile Sun Oct 11 21:17:06 2015 (r399102) @@ -141,6 +141,7 @@ SUBDIR += easypaint SUBDIR += edje_viewer SUBDIR += electrix + SUBDIR += embree SUBDIR += enblend SUBDIR += entangle SUBDIR += eog Added: head/graphics/embree/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/embree/Makefile Sun Oct 11 21:17:06 2015 (r399102) @@ -0,0 +1,48 @@ +# Created by: Alexey Dokuchaev <danfe@FreeBSD.org> +# $FreeBSD$ + +PORTNAME= embree +DISTVERSIONPREFIX= v +DISTVERSION= 2.7.0 +CATEGORIES= graphics + +MAINTAINER= danfe@FreeBSD.org +COMMENT= Collection of high-performance ray tracing kernels + +LICENSE= APACHE20 + +LIB_DEPENDS= libMagick++-6.so:${PORTSDIR}/graphics/ImageMagick \ + libIlmImf.so:${PORTSDIR}/graphics/OpenEXR + +BROKEN_FreeBSD_9= does not build (insufficient C++11 support) + +USE_GITHUB= yes + +USES= cmake compiler:c++11-lang +USE_GL= glut +USE_XORG= xmu +USE_LDCONFIG= yes + +CMAKE_ARGS= -DRTCORE_TASKING_SYSTEM:STRING=INTERNAL \ + -DENABLE_ISPC_SUPPORT:BOOL=OFF \ + -DCOMPILER:STRING=${CHOSEN_COMPILER_TYPE:tu} + +PLIST_SUB+= VERSION=${DISTVERSION} + +post-patch: +# MAP_NORESERVE was never implemented in FreeBSD and retired in r273250 + @${REINPLACE_CMD} -e 's,MAP_NORESERVE,0,' \ + ${WRKSRC}/common/sys/alloc.cpp + @${REINPLACE_CMD} -e 's,_blsr_u64,_&,' \ + ${WRKSRC}/common/sys/intrinsics.h + @${REINPLACE_CMD} -e 's,__UNIX__) &&.*,__LINUX__),' \ + ${WRKSRC}/tests/benchmark.cpp + @${REINPLACE_CMD} -e '/share\/doc/,+2 { \ + s,share/doc/embree-[^)]*,${DOCSDIR_REL}, ; \ + s,bin/,, ; } ' ${WRKSRC}/common/cmake/package.cmake +# Do not force particular compiler binaries (obey the framework) + @${REINPLACE_CMD} -e '/_COMPILER/s,^,#,' \ + ${WRKSRC}/common/cmake/clang.cmake \ + ${WRKSRC}/common/cmake/gcc.cmake + +.include <bsd.port.mk> Added: head/graphics/embree/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/embree/distinfo Sun Oct 11 21:17:06 2015 (r399102) @@ -0,0 +1,2 @@ +SHA256 (embree-embree-v2.7.0_GH0.tar.gz) = 2b5dacbf1c94a2e6568661eae7cdb91abbdc65feaccd8aec03c8fd4b32fca6aa +SIZE (embree-embree-v2.7.0_GH0.tar.gz) = 1697062 Added: head/graphics/embree/files/patch-common_sys_sysinfo.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/embree/files/patch-common_sys_sysinfo.cpp Sun Oct 11 21:17:06 2015 (r399102) @@ -0,0 +1,34 @@ +--- common/sys/sysinfo.cpp.orig 2015-09-17 06:11:18 UTC ++++ common/sys/sysinfo.cpp +@@ -414,6 +414,31 @@ namespace embree + #endif + + //////////////////////////////////////////////////////////////////////////////// ++/// FreeBSD Platform ++//////////////////////////////////////////////////////////////////////////////// ++ ++#ifdef __FreeBSD__ ++ ++#include <sys/sysctl.h> ++ ++namespace embree ++{ ++ std::string getExecutableFileName() ++ { ++#if __FreeBSD_version > 900009 ++ const ++#endif ++ int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 }; ++ char buf[1024]; ++ size_t len = sizeof(buf); ++ if (sysctl(mib, 4, buf, &len, 0x0, 0) == -1) *buf = '\0'; ++ return std::string(buf); ++ } ++} ++ ++#endif ++ ++//////////////////////////////////////////////////////////////////////////////// + /// Mac OS X Platform + //////////////////////////////////////////////////////////////////////////////// + Added: head/graphics/embree/files/patch-common_sys_thread.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/embree/files/patch-common_sys_thread.cpp Sun Oct 11 21:17:06 2015 (r399102) @@ -0,0 +1,21 @@ +--- common/sys/thread.cpp.orig 2015-09-17 06:11:18 UTC ++++ common/sys/thread.cpp +@@ -171,13 +171,16 @@ namespace embree + /// Linux Platform + //////////////////////////////////////////////////////////////////////////////// + +-#if defined(__LINUX__) ++#if defined(__LINUX__) || defined(__FreeBSD__) ++ ++#include <pthread_np.h> ++ + namespace embree + { + /*! set affinity of the calling thread */ + void setAffinity(ssize_t affinity) + { +- cpu_set_t cset; ++ cpuset_t cset; + CPU_ZERO(&cset); + CPU_SET(affinity, &cset); + Added: head/graphics/embree/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/embree/pkg-descr Sun Oct 11 21:17:06 2015 (r399102) @@ -0,0 +1,10 @@ +Embree is a collection of high-performance ray tracing kernels developed +at Intel. The target users of Embree are graphics application engineers +that want to improve the performance of their application by leveraging +the optimized ray tracing kernels of Embree. + +These kernels are optimized for photo-realistic rendering on the latest +Intel processors with support for SSE, AVX, AVX2, AVX512, and the 16-wide +Intel Xeon Phi coprocessor vector instructions. + +WWW: https://embree.github.io/ Added: head/graphics/embree/pkg-plist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/embree/pkg-plist Sun Oct 11 21:17:06 2015 (r399102) @@ -0,0 +1,48 @@ +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 +include/embree2/rtcore.h +include/embree2/rtcore.isph +include/embree2/rtcore_geometry.h +include/embree2/rtcore_geometry.isph +include/embree2/rtcore_geometry_user.h +include/embree2/rtcore_geometry_user.isph +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-version.cmake +lib/cmake/embree-%%VERSION%%/embree-config.cmake +lib/libembree.so.2 +lib/libembree.so.%%VERSION%% +%%PORTDOCS%%%%DOCSDIR%%/CHANGELOG.md +%%PORTDOCS%%%%DOCSDIR%%/LICENSE.txt +%%PORTDOCS%%%%DOCSDIR%%/README.md +%%PORTDOCS%%%%DOCSDIR%%/readme.pdf
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201510112117.t9BLH6gQ093030>