git: a439278b39e8 - main - science/anari: new port, ANARI Cross-Platform 3D Rendering Engine API

Thierry Thomas <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.ports
Message-ID <[email protected]>
The branch main has been updated by thierry:

URL: https://cgit.FreeBSD.org/ports/commit/?id=a439278b39e8e9d7f09d1a8390a957fe937a6016

commit a439278b39e8e9d7f09d1a8390a957fe937a6016
Author:     Thierry Thomas <[email protected]>
AuthorDate: 2026-08-15 16:02:08 +0000
Commit:     Thierry Thomas <[email protected]>
CommitDate: 2026-08-15 19:58:03 +0000

    science/anari: new port, ANARI Cross-Platform 3D Rendering Engine API
---
 science/Makefile                                   |   1 +
 science/anari/Makefile                             |  47 ++++++
 science/anari/distinfo                             |   5 +
 .../patch-cmake_anari__sdk__fetch__project.cmake   |  21 +++
 .../files/patch-examples_simple_anariTutorial.c    |  12 ++
 .../patch-examples_simple_anariTutorialDebug.c     |  12 ++
 science/anari/pkg-descr                            |   8 +
 science/anari/pkg-plist                            | 183 +++++++++++++++++++++
 8 files changed, 289 insertions(+)

diff --git a/science/Makefile b/science/Makefile
index ef2f84e5c9ed..aa9cd8510412 100644
--- a/science/Makefile
+++ b/science/Makefile
@@ -25,6 +25,7 @@
     SUBDIR += agrum
     SUBDIR += aircraft-datcom
     SUBDIR += amrex
+    SUBDIR += anari
     SUBDIR += antioch
     SUBDIR += apbs
     SUBDIR += arbor
diff --git a/science/anari/Makefile b/science/anari/Makefile
new file mode 100644
index 000000000000..0d286ba7469a
--- /dev/null
+++ b/science/anari/Makefile
@@ -0,0 +1,47 @@
+PORTNAME=	ANARI
+DISTVERSIONPREFIX=	v
+DISTVERSION=	0.16.0
+CATEGORIES=	science devel graphics
+MASTER_SITES=	https://github.com/KhronosGroup/ANARI-SDK/archive/refs/tags/:anari \
+		https://github.com/RenderKit/embree/archive/refs/tags/:embree
+PKGNAMESUFFIX=	-SDK
+DISTFILES=	${DISTVERSIONPREFIX}${PORTVERSION}${EXTRACT_SUFX}:anari \
+		${DISTVERSIONPREFIX}${EMBREE_VER}${EXTRACT_SUFX}:embree
+DIST_SUBDIR=	${PORTNAME}
+
+MAINTAINER=	[email protected]
+COMMENT=	ANARI Cross-Platform 3D Rendering Engine API
+WWW=		https://www.khronos.org/anari/
+
+LICENSE=	APACHE20
+
+#USE_GITHUB=	yes
+#GH_ACCOUNT=	KhronosGroup
+#GH_PROJECT=	${PORTNAME}${PKGNAMESUFFIX}
+
+USES=		cmake python
+
+EMBREE_VER=	4.3.3
+WRKSRC=		${WRKDIR}/${PORTNAME}${PKGNAMESUFFIX}-${PORTVERSION}
+DATADIR=	${PREFIX}/share/${PORTNAME:tl}
+USE_LDCONFIG=	yes
+
+TMPDIR?=	/tmp
+TEST_ENV=	ANARI_LIBRARY=helide
+
+OPTIONS_DEFINE=	DOCS EXAMPLES
+
+EXAMPLES_CMAKE_BOOL=	BUILD_EXAMPLES
+
+PORTDOCS=	*
+PORTEXAMPLES=	*
+
+pre-configure:
+	${MKDIR} ${CONFIGURE_WRKSRC}/deps/source
+	${MV} ${WRKDIR}/embree-${EMBREE_VER}	\
+		${CONFIGURE_WRKSRC}/deps/source/anari_helide_embree
+
+do-test:
+	cd ${TMPDIR} && ${TEST_ENV} ${TEST_WRKSRC}/anariRenderTests
+
+.include <bsd.port.mk>
diff --git a/science/anari/distinfo b/science/anari/distinfo
new file mode 100644
index 000000000000..36be7f4adfd1
--- /dev/null
+++ b/science/anari/distinfo
@@ -0,0 +1,5 @@
+TIMESTAMP = 1786805097
+SHA256 (ANARI/v0.16.0.tar.gz) = 657d995e834ec534b9ac8b57b01f16912320a015fe07ff0ef687e2f3611966b9
+SIZE (ANARI/v0.16.0.tar.gz) = 1255293
+SHA256 (ANARI/v4.3.3.tar.gz) = 8a3bc3c3e21aa209d9861a28f8ba93b2f82ed0dc93341dddac09f1f03c36ef2d
+SIZE (ANARI/v4.3.3.tar.gz) = 71114884
diff --git a/science/anari/files/patch-cmake_anari__sdk__fetch__project.cmake b/science/anari/files/patch-cmake_anari__sdk__fetch__project.cmake
new file mode 100644
index 000000000000..d16c335e69d6
--- /dev/null
+++ b/science/anari/files/patch-cmake_anari__sdk__fetch__project.cmake
@@ -0,0 +1,21 @@
+--- cmake/anari_sdk_fetch_project.cmake.orig	2026-07-19 23:31:40 UTC
++++ cmake/anari_sdk_fetch_project.cmake
+@@ -11,18 +11,7 @@ function(anari_sdk_fetch_project)
+     ${ARGN}
+   )
+ 
+-  if (FETCH_SOURCE_MD5)
+-    set(FETCH_SOURCE_MD5_COMMAND URL_MD5 ${FETCH_SOURCE_MD5})
+-  endif()
+-
+   set(SOURCE ${CMAKE_BINARY_DIR}/deps/source/${FETCH_SOURCE_NAME})
+-
+-  FetchContent_Populate(${FETCH_SOURCE_NAME}
+-    URL ${FETCH_SOURCE_URL}
+-    DOWNLOAD_DIR ${CMAKE_SOURCE_DIR}/.anari_deps/${FETCH_SOURCE_NAME}
+-    ${FETCH_SOURCE_MD5_COMMAND}
+-    SOURCE_DIR ${SOURCE}
+-  )
+ 
+   set("${FETCH_SOURCE_NAME}_LOCATION" ${SOURCE} PARENT_SCOPE)
+ 
diff --git a/science/anari/files/patch-examples_simple_anariTutorial.c b/science/anari/files/patch-examples_simple_anariTutorial.c
new file mode 100644
index 000000000000..572380be4ea3
--- /dev/null
+++ b/science/anari/files/patch-examples_simple_anariTutorial.c
@@ -0,0 +1,12 @@
+--- examples/simple/anariTutorial.c.orig	2026-07-19 23:31:40 UTC
++++ examples/simple/anariTutorial.c
+@@ -13,7 +13,9 @@
+ #ifdef _WIN32
+ #include <malloc.h>
+ #else
++#  ifndef __FreeBSD__
+ #include <alloca.h>
++#  endif
+ #endif
+ #include <errno.h>
+ #include <stdint.h>
diff --git a/science/anari/files/patch-examples_simple_anariTutorialDebug.c b/science/anari/files/patch-examples_simple_anariTutorialDebug.c
new file mode 100644
index 000000000000..5be0d54a8bdb
--- /dev/null
+++ b/science/anari/files/patch-examples_simple_anariTutorialDebug.c
@@ -0,0 +1,12 @@
+--- examples/simple/anariTutorialDebug.c.orig	2026-07-19 23:31:40 UTC
++++ examples/simple/anariTutorialDebug.c
+@@ -4,7 +4,9 @@
+ #ifdef _WIN32
+ #include <malloc.h>
+ #else
++#  ifndef __FreeBSD__
+ #include <alloca.h>
++#  endif
+ #endif
+ #include <errno.h>
+ #include <stdint.h>
diff --git a/science/anari/pkg-descr b/science/anari/pkg-descr
new file mode 100644
index 000000000000..65b99cbd5c90
--- /dev/null
+++ b/science/anari/pkg-descr
@@ -0,0 +1,8 @@
+ANARI significantly simplifies the development of applications in domains such
+as scientific visualization by providing high-level functionality to build an
+in-memory scene representation to be rendered without need for low-level
+graphics code, and enabling the use of any 3D rendering engine that supports the
+ANARI API. ANARI has already been widely integrated into scientific
+visualization applications, and is expected to be used by diverse applications
+needing portable access to multiple rendering engines delivering sophisticated
+3D functionality such as ray tracing and global illumination.
diff --git a/science/anari/pkg-plist b/science/anari/pkg-plist
new file mode 100644
index 000000000000..fd3fbbec3fec
--- /dev/null
+++ b/science/anari/pkg-plist
@@ -0,0 +1,183 @@
+bin/anariInfo
+bin/anariRenderTests
+include/anari/anari.h
+include/anari/anari_cpp.hpp
+include/anari/anari_cpp/Traits.h
+include/anari/anari_cpp/anari_cpp_impl.hpp
+include/anari/anari_cpp/ext/glm.h
+include/anari/anari_cpp/ext/linalg.h
+include/anari/anari_cpp/ext/std.h
+include/anari/anari_test_scenes/anari_test_scenes.h
+include/anari/anari_test_scenes/anari_test_scenes_export.h
+include/anari/anari_test_scenes/scene.h
+include/anari/backend/DeviceImpl.h
+include/anari/backend/LibraryImpl.h
+include/anari/backend/helium/BaseArray.h
+include/anari/backend/helium/BaseDevice.h
+include/anari/backend/helium/BaseFrame.h
+include/anari/backend/helium/BaseGlobalDeviceState.h
+include/anari/backend/helium/BaseObject.h
+include/anari/backend/helium/LockableObject.h
+include/anari/backend/helium/TaskQueue.h
+include/anari/backend/helium/array/Array.h
+include/anari/backend/helium/array/Array1D.h
+include/anari/backend/helium/array/Array2D.h
+include/anari/backend/helium/array/Array3D.h
+include/anari/backend/helium/array/ObjectArray.h
+include/anari/backend/helium/helium_math.h
+include/anari/backend/helium/utility/AnariAny.h
+include/anari/backend/helium/utility/ChangeObserverPtr.h
+include/anari/backend/helium/utility/DeferredCommitBuffer.h
+include/anari/backend/helium/utility/IntrusivePtr.h
+include/anari/backend/helium/utility/ParameterInfo.h
+include/anari/backend/helium/utility/ParameterizedObject.h
+include/anari/backend/helium/utility/TimeStamp.h
+include/anari/ext/anari_debug.h
+include/anari/ext/anari_ext_interface.h
+include/anari/ext/helide/anariNewHelideDevice.h
+include/anari/ext/helide/anari_library_helide_export.h
+include/anari/frontend/anari_device_introspection.hpp
+include/anari/frontend/anari_enums.h
+include/anari/frontend/anari_extension_utility.h
+include/anari/frontend/anari_sdk_version.h
+include/anari/frontend/type_utility.h
+lib/cmake/anari-0.16.0/anariConfig.cmake
+lib/cmake/anari-0.16.0/anariConfigVersion.cmake
+lib/cmake/anari-0.16.0/anari_Exports-%%CMAKE_BUILD_TYPE%%.cmake
+lib/cmake/anari-0.16.0/anari_Exports.cmake
+lib/cmake/anari-0.16.0/cmake/anari_generate_codegen.cmake
+lib/cmake/anari-0.16.0/cmake/anari_generate_frontend.cmake
+lib/cmake/anari-0.16.0/cmake/anari_sdk_fetch_project.cmake
+lib/cmake/anari-0.16.0/cmake/cmake_project_commands.cmake
+lib/cmake/anari-0.16.0/cmake/mark_cache_variables_as_advanced.cmake
+lib/libanari.so
+lib/libanari.so.0
+lib/libanari.so.0.16.0
+lib/libanari_backend.a
+lib/libanari_device_introspection.a
+lib/libanari_library_debug.so
+lib/libanari_library_helide.so
+lib/libanari_library_sink.so
+lib/libanari_static.a
+lib/libanari_test_scenes.so
+lib/libhelium.a
+%%DATADIR%%/anari_viewer/Application.cpp
+%%DATADIR%%/anari_viewer/Application.h
+%%DATADIR%%/anari_viewer/CMakeLists.txt
+%%DATADIR%%/anari_viewer/HDRImage.cpp
+%%DATADIR%%/anari_viewer/HDRImage.h
+%%DATADIR%%/anari_viewer/Orbit.cpp
+%%DATADIR%%/anari_viewer/Orbit.h
+%%DATADIR%%/anari_viewer/external/CMakeLists.txt
+%%DATADIR%%/anari_viewer/external/imgui/CMakeLists.txt
+%%DATADIR%%/anari_viewer/external/stb_image/CMakeLists.txt
+%%DATADIR%%/anari_viewer/external/stb_image/stb_image.c
+%%DATADIR%%/anari_viewer/external/stb_image/stb_image.h
+%%DATADIR%%/anari_viewer/external/stb_image/stb_image_resize.h
+%%DATADIR%%/anari_viewer/external/stb_image/stb_image_write.c
+%%DATADIR%%/anari_viewer/external/stb_image/stb_image_write.h
+%%DATADIR%%/anari_viewer/external/tinyexr/tinyexr.h
+%%DATADIR%%/anari_viewer/ui_anari.cpp
+%%DATADIR%%/anari_viewer/ui_anari.h
+%%DATADIR%%/anari_viewer/windows/LightsEditor.cpp
+%%DATADIR%%/anari_viewer/windows/LightsEditor.h
+%%DATADIR%%/anari_viewer/windows/Viewport.cpp
+%%DATADIR%%/anari_viewer/windows/Viewport.h
+%%DATADIR%%/anari_viewer/windows/Window.cpp
+%%DATADIR%%/anari_viewer/windows/Window.h
+%%DATADIR%%/code_gen/__init__.py.in
+%%DATADIR%%/code_gen/api/anari_core_1_0.json
+%%DATADIR%%/code_gen/api/anari_core_objects_all_1_0.json
+%%DATADIR%%/code_gen/api/anari_core_objects_base_1_0.json
+%%DATADIR%%/code_gen/api/experimental/exp_volume_sample_rate.json
+%%DATADIR%%/code_gen/api/ext_sampler_compressed_format_astc.json
+%%DATADIR%%/code_gen/api/ext_sampler_compressed_format_bc123.json
+%%DATADIR%%/code_gen/api/ext_sampler_compressed_format_bc45.json
+%%DATADIR%%/code_gen/api/ext_sampler_compressed_format_bc67.json
+%%DATADIR%%/code_gen/api/ext_sampler_compressed_format_eac.json
+%%DATADIR%%/code_gen/api/ext_sampler_compressed_format_etc.json
+%%DATADIR%%/code_gen/api/ext_sampler_compressed_format_etc2.json
+%%DATADIR%%/code_gen/api/ext_sampler_compressed_image2d.json
+%%DATADIR%%/code_gen/api/khr_array1d_region.json
+%%DATADIR%%/code_gen/api/khr_camera_depth_of_field.json
+%%DATADIR%%/code_gen/api/khr_camera_motion_transformation.json
+%%DATADIR%%/code_gen/api/khr_camera_omnidirectional.json
+%%DATADIR%%/code_gen/api/khr_camera_orthographic.json
+%%DATADIR%%/code_gen/api/khr_camera_perspective.json
+%%DATADIR%%/code_gen/api/khr_camera_rolling_shutter.json
+%%DATADIR%%/code_gen/api/khr_camera_shutter.json
+%%DATADIR%%/code_gen/api/khr_camera_stereo.json
+%%DATADIR%%/code_gen/api/khr_data_parallel_mpi.json
+%%DATADIR%%/code_gen/api/khr_device_synchronization.json
+%%DATADIR%%/code_gen/api/khr_frame_accumulation.json
+%%DATADIR%%/code_gen/api/khr_frame_channel_albedo.json
+%%DATADIR%%/code_gen/api/khr_frame_channel_instance_id.json
+%%DATADIR%%/code_gen/api/khr_frame_channel_normal.json
+%%DATADIR%%/code_gen/api/khr_frame_channel_object_id.json
+%%DATADIR%%/code_gen/api/khr_frame_channel_primitive_id.json
+%%DATADIR%%/code_gen/api/khr_frame_completion_callback.json
+%%DATADIR%%/code_gen/api/khr_geometry_cone.json
+%%DATADIR%%/code_gen/api/khr_geometry_curve.json
+%%DATADIR%%/code_gen/api/khr_geometry_cylinder.json
+%%DATADIR%%/code_gen/api/khr_geometry_isosurface.json
+%%DATADIR%%/code_gen/api/khr_geometry_quad.json
+%%DATADIR%%/code_gen/api/khr_geometry_quad_motion_deformation.json
+%%DATADIR%%/code_gen/api/khr_geometry_sphere.json
+%%DATADIR%%/code_gen/api/khr_geometry_triangle.json
+%%DATADIR%%/code_gen/api/khr_geometry_triangle_motion_deformation.json
+%%DATADIR%%/code_gen/api/khr_instance_motion_scale_rotation_translation.json
+%%DATADIR%%/code_gen/api/khr_instance_motion_transform.json
+%%DATADIR%%/code_gen/api/khr_instance_transform.json
+%%DATADIR%%/code_gen/api/khr_instance_transform_array.json
+%%DATADIR%%/code_gen/api/khr_light_directional.json
+%%DATADIR%%/code_gen/api/khr_light_hdri.json
+%%DATADIR%%/code_gen/api/khr_light_point.json
+%%DATADIR%%/code_gen/api/khr_light_primary_visibility.json
+%%DATADIR%%/code_gen/api/khr_light_quad.json
+%%DATADIR%%/code_gen/api/khr_light_ring.json
+%%DATADIR%%/code_gen/api/khr_light_spot.json
+%%DATADIR%%/code_gen/api/khr_material_matte.json
+%%DATADIR%%/code_gen/api/khr_material_physically_based.json
+%%DATADIR%%/code_gen/api/khr_renderer_ambient_light.json
+%%DATADIR%%/code_gen/api/khr_renderer_background_color.json
+%%DATADIR%%/code_gen/api/khr_renderer_background_image.json
+%%DATADIR%%/code_gen/api/khr_renderer_denoise.json
+%%DATADIR%%/code_gen/api/khr_sampler_image1d.json
+%%DATADIR%%/code_gen/api/khr_sampler_image2d.json
+%%DATADIR%%/code_gen/api/khr_sampler_image3d.json
+%%DATADIR%%/code_gen/api/khr_sampler_imagexd_clamp_to_border.json
+%%DATADIR%%/code_gen/api/khr_sampler_primitive.json
+%%DATADIR%%/code_gen/api/khr_sampler_transform.json
+%%DATADIR%%/code_gen/api/khr_spatial_field_nanovdb.json
+%%DATADIR%%/code_gen/api/khr_spatial_field_structured_regular.json
+%%DATADIR%%/code_gen/api/khr_spatial_field_structured_regular_filter_cubic.json
+%%DATADIR%%/code_gen/api/khr_spatial_field_unstructured.json
+%%DATADIR%%/code_gen/api/khr_volume_transfer_function1d.json
+%%DATADIR%%/code_gen/cffi_gen.py
+%%DATADIR%%/code_gen/device_trampoline.py.in
+%%DATADIR%%/code_gen/device_wrapper.py
+%%DATADIR%%/code_gen/devices/experimental_device.json
+%%DATADIR%%/code_gen/devices/generic_device.json
+%%DATADIR%%/code_gen/generate_device_frontend.py
+%%DATADIR%%/code_gen/generate_extension_utility.py
+%%DATADIR%%/code_gen/generate_headers.py
+%%DATADIR%%/code_gen/generate_lists.py
+%%DATADIR%%/code_gen/generate_queries.py
+%%DATADIR%%/code_gen/hash_gen.py
+%%DATADIR%%/code_gen/merge_anari.py
+%%DATADIR%%/code_gen/misc/descriptions.json
+%%DATADIR%%/code_gen/pyanari_build.py
+%%DATADIR%%/code_gen/templates/ArrayObjects.cpp
+%%DATADIR%%/code_gen/templates/ArrayObjects.h
+%%DATADIR%%/code_gen/templates/CMakeLists.txt
+%%DATADIR%%/code_gen/templates/Device.cpp
+%%DATADIR%%/code_gen/templates/Device.h
+%%DATADIR%%/code_gen/templates/DeviceObject.cpp
+%%DATADIR%%/code_gen/templates/DeviceObject.h
+%%DATADIR%%/code_gen/templates/FrameObject.cpp
+%%DATADIR%%/code_gen/templates/FrameObject.h
+%%DATADIR%%/code_gen/templates/Object.h
+%%DATADIR%%/code_gen/templates/Parameter.h
+%%DATADIR%%/code_gen/templates/Specializations.h
+%%DATADIR%%/code_gen/validate_device.py
+@dir %%DATADIR%%/code_gen/__pycache__
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.