From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 4A3A3159C9B for ; Wed, 14 Aug 2024 14:26:46 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 408E6E29E4; Wed, 14 Aug 2024 14:26:45 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 29612E29E4 for ; Wed, 14 Aug 2024 14:26:45 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5842E343088 for ; Wed, 14 Aug 2024 14:26:44 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 437D31EEA for ; Wed, 14 Aug 2024 14:26:42 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1723645527.efacc8d56335abb5b10c2a4b536d1add8a2e500e.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/embree/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-libs/embree/Manifest media-libs/embree/embree-4.3.3.ebuild X-VCS-Directories: media-libs/embree/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: efacc8d56335abb5b10c2a4b536d1add8a2e500e X-VCS-Branch: master Date: Wed, 14 Aug 2024 14:26:42 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: e8261ea1-46a8-4be6-b35c-d49335b4c4af X-Archives-Hash: 3ae2e8b1d887a88a59dd1ba2166cecde commit: efacc8d56335abb5b10c2a4b536d1add8a2e500e Author: Paul Zander gmail com> AuthorDate: Mon Aug 12 21:13:53 2024 +0000 Commit: Sam James gentoo org> CommitDate: Wed Aug 14 14:25:27 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=efacc8d5 media-libs/embree: add 4.3.3 Closes: https://bugs.gentoo.org/937275 Closes: https://bugs.gentoo.org/936509 Closes: https://bugs.gentoo.org/906049 Closes: https://bugs.gentoo.org/895016 Signed-off-by: Paul Zander gmail.com> Closes: https://github.com/gentoo/gentoo/pull/38125 Signed-off-by: Sam James gentoo.org> media-libs/embree/Manifest | 1 + media-libs/embree/embree-4.3.3.ebuild | 174 ++++++++++++++++++++++++++++++++++ 2 files changed, 175 insertions(+) diff --git a/media-libs/embree/Manifest b/media-libs/embree/Manifest index e007a68a16b3..ddfdd4541560 100644 --- a/media-libs/embree/Manifest +++ b/media-libs/embree/Manifest @@ -1,3 +1,4 @@ DIST embree-3.13.4.tar.gz 13733908 BLAKE2B 4c6c24f62ee88a09149bd930716c71e91d54563eea5cc103c0346d3808c693e8470fc7ea98651e0df9e4423bda565d7ab1a23e16c9d0441c79e9ec9c8571b0fa SHA512 685c3935fabe1bfa7260ef148df26b686b085b75011d72011461471cbcef786a5ce7a0e85c57b2df05798489a2d4e80a8d3ee5df986029edad7df7511d99c0ca DIST embree-3.13.5.tar.gz 13739115 BLAKE2B 52ad8e3520aa789f7987467c6979be06f883803757e842316ecf708deeed11214dd60570eda5708e701047b1a14ea37710d158df544817dc536bfda444a68218 SHA512 13ae19b1750197fb4887ba601c75d1b54b3c388224672b6561dd922bc9b9747139cf46ce554727e3afa13dcf152ce4d703935cb9105ced792b011f2d05fa3e95 DIST embree-4.3.1.tar.gz 71110988 BLAKE2B 0ab183fe8fae3948b319c74a922c001d0567d223adab74da3a0f55fd4e4fd5c2c17afeb065da706d411238b7877e208e7041aad9430f109e606ed1a9dd23646f SHA512 da7710c6dfaa90970c223a503702fc7c7dd86c1397372b3d6f51c4377d28d8e62b90ee8c99b70e3aa49e16971a5789bb8f588ea924881b9dd5dd8d5fcd16518a +DIST embree-4.3.3.tar.gz 71114884 BLAKE2B 154d95a5e04d86d13738b0cb28782d0f47ec4c7c1af207fdbeb17805873be85501881e6699e488477af483505c181afdf95d8199d2f54de6623fe06cc77ec603 SHA512 f614c72c5e5c83b8936d37d4e916711b3ab29329786e96944e851a41d5e2358cf7ac739c145aee131403b0b91f7e2ce5422e892dc88d490e29356f79b47c8581 diff --git a/media-libs/embree/embree-4.3.3.ebuild b/media-libs/embree/embree-4.3.3.ebuild new file mode 100644 index 000000000000..eb4bc120565a --- /dev/null +++ b/media-libs/embree/embree-4.3.3.ebuild @@ -0,0 +1,174 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake flag-o-matic linux-info toolchain-funcs + +DESCRIPTION="Collection of high-performance ray tracing kernels" +HOMEPAGE="https://github.com/embree/embree" +SRC_URI="https://github.com/embree/embree/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="$(ver_cut 1)" +KEYWORDS="-* ~amd64 ~arm64" +X86_CPU_FLAGS=( sse2 sse4_2 avx avx2 avx512dq ) +CPU_FLAGS=( cpu_flags_arm_neon "${X86_CPU_FLAGS[@]/#/cpu_flags_x86_}" ) +IUSE="compact-polys ispc +raymask ssp +tbb test ${CPU_FLAGS[*]}" +RESTRICT="!test? ( test )" +REQUIRED_USE=" + amd64? ( || ( ${X86_CPU_FLAGS[*]/#/cpu_flags_x86_} ) ) + arm? ( cpu_flags_arm_neon ) +" + +BDEPEND=" + virtual/pkgconfig +" +RDEPEND=" + ispc? ( dev-lang/ispc ) + tbb? ( dev-cpp/tbb:= ) +" +DEPEND="${RDEPEND}" + +DOCS=( CHANGELOG.md README.md readme.pdf ) + +PATCHES=( + "${FILESDIR}/embree-4.3.1-dont-install-tutorials.patch" +) + +pkg_setup() { + CONFIG_CHECK="~TRANSPARENT_HUGEPAGE" + WARNING_TRANSPARENT_HUGEPAGE="Not enabling Transparent Hugepages (CONFIG_TRANSPARENT_HUGEPAGE) will impact rendering performance." + + linux-info_pkg_setup +} + +src_prepare() { + cmake_src_prepare + + # disable RPM package building + sed -e 's|CPACK_RPM_PACKAGE_RELEASE 1|CPACK_RPM_PACKAGE_RELEASE 0|' \ + -i CMakeLists.txt || die + + # don't redefine _FORTIFY_SOURCE https://bugs.gentoo.org/895016 + sed -e '/-D_FORTIFY_SOURCE=2/d' \ + -i common/cmake/*.cmake \ + || die + + # raise cmake minimum version to silence warning + sed -e 's#CMAKE_MINIMUM_REQUIRED(VERSION 3.[0-9].0)#CMAKE_MINIMUM_REQUIRED(VERSION 3.5)#I' \ + -i \ + CMakeLists.txt \ + kernels/rthwif/CMakeLists.txt \ + tutorials/embree_info/CMakeLists.txt \ + tutorials/minimal/CMakeLists.txt \ + || die +} + +src_configure() { + # -Werror=odr + # https://bugs.gentoo.org/859838 + # https://github.com/embree/embree/issues/481 + filter-lto + + # NOTE: You can make embree accept custom CXXFLAGS by turning off + # EMBREE_IGNORE_CMAKE_CXX_FLAGS. However, the linking will fail if you use + # any "m*" compile flags. This is because embree builds modules for the + # different supported ISAs and picks the correct one at runtime. + # "m*" will pull in cpu instructions that shouldn't be in specific modules + # and it fails to link properly. + # https://github.com/embree/embree/issues/115 + + filter-flags -m* + + # https://bugs.gentoo.org/910164 + tc-is-clang && filter-lto + + local mycmakeargs=( + -DCMAKE_SKIP_INSTALL_RPATH:BOOL=ON + + # Default culling settings for Blender + # (Cycles will not render correctly without these) + # Some Embree tests will fail with these settings though... + -DEMBREE_BACKFACE_CULLING=OFF + -DEMBREE_BACKFACE_CULLING_CURVES=ON + -DEMBREE_BACKFACE_CULLING_SPHERES=ON + + -DEMBREE_COMPACT_POLYS=$(usex compact-polys) + + # Make sure that we are using our custom compilie flags + -DEMBREE_IGNORE_CMAKE_CXX_FLAGS=OFF + + # Set to NONE so we can manually switch on ISAs below + -DEMBREE_MAX_ISA:STRING="NONE" + -DEMBREE_ISA_AVX=$(usex cpu_flags_x86_avx) + -DEMBREE_ISA_AVX2=$(usex cpu_flags_x86_avx2) + -DEMBREE_ISA_AVX512=$(usex cpu_flags_x86_avx512dq) + -DEMBREE_ISA_SSE2=$(usex cpu_flags_x86_sse2) + -DEMBREE_ISA_SSE42=$(usex cpu_flags_x86_sse4_2) + -DEMBREE_ISPC_SUPPORT=$(usex ispc) + -DEMBREE_RAY_MASK=$(usex raymask) + + # TODO figure out sycl support + -DEMBREE_SYCL_SUPPORT="no" + + -DEMBREE_STACK_PROTECTOR=$(usex ssp) + -DEMBREE_STATIC_LIB=OFF + -DEMBREE_TASKING_SYSTEM:STRING=$(usex tbb "TBB" "INTERNAL") + # Tutorial binaries are required by the tests + -DEMBREE_TUTORIALS=$(usex test) + -DEMBREE_ZIP_MODE=OFF + ) + + if { use arm && usex cpu_flags_arm_neon; } || use arm64; then + mycmakeargs+=( + -DEMBREE_ISA_NEON="yes" + # TODO look into neon 2x support + # -DEMBREE_ISA_NEON2X="yes" + ) + fi + + # Disable asserts + append-cppflags -DNDEBUG + + if use test; then + mycmakeargs+=( + -DBUILD_TESTING=ON + -DEMBREE_TESTING_INSTALL_TESTS=OFF + -DEMBREE_TESTING_INTENSITY=4 + # These tutorials are not used by the default tests + -DEMBREE_TUTORIALS_GLFW=OFF + -DEMBREE_TUTORIALS_INSTALL=OFF + ) + fi + + cmake_src_configure +} + +src_test() { + # NOTE Some Embree tests will fail due to EMBREE_BACKFACE_CULLING settings for blender... + local CMAKE_SKIP_TESTS=( + '^embree_verify$' + '^embree_verify_i2$' + '^viewer_models_curves_round_line_segments_3.ecs(|_ispc)$' + '^viewer_models_curves_round_line_segments_7.ecs(|_ispc)$' + '^viewer_models_curves_round_line_segments_8.ecs(|_ispc)$' + '^viewer_models_curves_round_line_segments_9.ecs(|_ispc)$' + '^viewer_coherent_models_curves_round_line_segments_3.ecs(|_ispc)$' + '^viewer_coherent_models_curves_round_line_segments_7.ecs(|_ispc)$' + '^viewer_coherent_models_curves_round_line_segments_8.ecs(|_ispc)$' + '^viewer_coherent_models_curves_round_line_segments_9.ecs(|_ispc)$' + '^viewer_quad_coherent_models_curves_round_line_segments_3.ecs(|_ispc)$' + '^viewer_quad_coherent_models_curves_round_line_segments_7.ecs(|_ispc)$' + '^viewer_quad_coherent_models_curves_round_line_segments_8.ecs(|_ispc)$' + '^viewer_quad_coherent_models_curves_round_line_segments_9.ecs(|_ispc)$' + '^viewer_grid_coherent_models_curves_round_line_segments_3.ecs(|_ispc)$' + '^viewer_grid_coherent_models_curves_round_line_segments_7.ecs(|_ispc)$' + '^viewer_grid_coherent_models_curves_round_line_segments_8.ecs(|_ispc)$' + '^viewer_grid_coherent_models_curves_round_line_segments_9.ecs(|_ispc)$' + '^hair_geometry(|_ispc)$' + '^embree_tests$' + ) + + cmake_src_test +}