diff options
author | Sebastian Parborg <darkdefende@gmail.com> | 2023-05-01 13:48:53 +0200 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-05-01 16:14:22 +0100 |
commit | a745fa9c26344a753e39289694f72b9375aaba1f (patch) | |
tree | 6cf587e458584d1d9ecd0be516f7d271903d9346 /media-libs | |
parent | media-gfx/blender: Drop 2.93 (diff) | |
download | gentoo-a745fa9c26344a753e39289694f72b9375aaba1f.tar.gz gentoo-a745fa9c26344a753e39289694f72b9375aaba1f.tar.bz2 gentoo-a745fa9c26344a753e39289694f72b9375aaba1f.zip |
media-libs/embree: Bump to 3.13.5
Signed-off-by: Sebastian Parborg <darkdefende@gmail.com>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-libs')
-rw-r--r-- | media-libs/embree/Manifest | 1 | ||||
-rw-r--r-- | media-libs/embree/embree-3.13.5.ebuild | 134 | ||||
-rw-r--r-- | media-libs/embree/files/embree-3.13.5-fix-openimageio-test.patch | 71 |
3 files changed, 206 insertions, 0 deletions
diff --git a/media-libs/embree/Manifest b/media-libs/embree/Manifest index a056b4c9a819..514a411dba17 100644 --- a/media-libs/embree/Manifest +++ b/media-libs/embree/Manifest @@ -1 +1,2 @@ DIST embree-3.13.4.tar.gz 13733908 BLAKE2B 4c6c24f62ee88a09149bd930716c71e91d54563eea5cc103c0346d3808c693e8470fc7ea98651e0df9e4423bda565d7ab1a23e16c9d0441c79e9ec9c8571b0fa SHA512 685c3935fabe1bfa7260ef148df26b686b085b75011d72011461471cbcef786a5ce7a0e85c57b2df05798489a2d4e80a8d3ee5df986029edad7df7511d99c0ca +DIST embree-3.13.5.tar.gz 13739115 BLAKE2B 52ad8e3520aa789f7987467c6979be06f883803757e842316ecf708deeed11214dd60570eda5708e701047b1a14ea37710d158df544817dc536bfda444a68218 SHA512 13ae19b1750197fb4887ba601c75d1b54b3c388224672b6561dd922bc9b9747139cf46ce554727e3afa13dcf152ce4d703935cb9105ced792b011f2d05fa3e95 diff --git a/media-libs/embree/embree-3.13.5.ebuild b/media-libs/embree/embree-3.13.5.ebuild new file mode 100644 index 000000000000..7b1ffb2691e9 --- /dev/null +++ b/media-libs/embree/embree-3.13.5.ebuild @@ -0,0 +1,134 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake flag-o-matic linux-info + +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="3" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" +X86_CPU_FLAGS=( sse2:sse2 sse4_2:sse4_2 avx:avx avx2:avx2 avx512dq:avx512dq ) +CPU_FLAGS=( cpu_flags_arm_neon ${X86_CPU_FLAGS[@]/#/cpu_flags_x86_} ) +IUSE="+compact-polys ispc +raymask ssp +tbb tutorial ${CPU_FLAGS[@]%:*}" +# Let's be explicit here even though we could simplify it. +REQUIRED_USE="amd64? ( cpu_flags_x86_sse2 ) + x86? ( cpu_flags_x86_sse2 )" + +BDEPEND=" + virtual/pkgconfig +" +RDEPEND=" + >=media-libs/glfw-3.2.1 + virtual/opengl + ispc? ( dev-lang/ispc ) + tbb? ( dev-cpp/tbb:= ) + tutorial? ( + media-libs/libjpeg-turbo + >=media-libs/libpng-1.6.34:0= + >=media-libs/openimageio-1.8.7:0= + ) +" +DEPEND="${RDEPEND}" + +DOCS=( CHANGELOG.md README.md readme.pdf ) + +PATCHES=( + "${FILESDIR}"/${PN}-3.13.5-fix-openimageio-test.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 +} + +src_configure() { + # 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* + + local mycmakeargs=( + # Currently Intel only host their test files on their internal network. + # So it seems like users can't easily get a hold of these and do + # regression testing on their own. + -DBUILD_TESTING:BOOL=OFF + -DCMAKE_SKIP_INSTALL_RPATH:BOOL=ON + + # default + -DEMBREE_BACKFACE_CULLING=OFF + -DEMBREE_COMPACT_POLYS=$(usex compact-polys) + + # default + -DEMBREE_FILTER_FUNCTION=ON + # default + -DEMBREE_GEOMETRY_CURVE=ON + # default + -DEMBREE_GEOMETRY_GRID=ON + # default + -DEMBREE_GEOMETRY_INSTANCE=ON + # default + -DEMBREE_GEOMETRY_POINT=ON + # default + -DEMBREE_GEOMETRY_QUAD=ON + # default + -DEMBREE_GEOMETRY_SUBDIVISION=ON + # default + -DEMBREE_GEOMETRY_TRIANGLE=ON + # default + -DEMBREE_GEOMETRY_USER=ON + # default + -DEMBREE_IGNORE_CMAKE_CXX_FLAGS=OFF + # default + -DEMBREE_IGNORE_INVALID_RAYS=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_NEON=$(usex cpu_flags_arm_neon) + -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) + # default + -DEMBREE_RAY_PACKETS=ON + -DEMBREE_STACK_PROTECTOR=$(usex ssp) + -DEMBREE_STATIC_LIB=OFF + -DEMBREE_STAT_COUNTERS=OFF + -DEMBREE_TASKING_SYSTEM:STRING=$(usex tbb "TBB" "INTERNAL") + -DEMBREE_TUTORIALS=$(usex tutorial)) + + # Disable asserts + append-cppflags -DNDEBUG + + if use tutorial; then + mycmakeargs+=( + -DEMBREE_TUTORIALS_LIBJPEG=ON + -DEMBREE_TUTORIALS_LIBPNG=ON + -DEMBREE_TUTORIALS_OPENIMAGEIO=ON + ) + fi + + cmake_src_configure +} diff --git a/media-libs/embree/files/embree-3.13.5-fix-openimageio-test.patch b/media-libs/embree/files/embree-3.13.5-fix-openimageio-test.patch new file mode 100644 index 000000000000..b5763e8c5dda --- /dev/null +++ b/media-libs/embree/files/embree-3.13.5-fix-openimageio-test.patch @@ -0,0 +1,71 @@ +diff --git a/common/cmake/FindOpenImageIO.cmake b/common/cmake/FindOpenImageIO.cmake +index 086b91183..5816f3bc5 100644 +--- a/common/cmake/FindOpenImageIO.cmake ++++ b/common/cmake/FindOpenImageIO.cmake +@@ -53,6 +53,7 @@ SET(OPENIMAGEIO_HINTS + ) + SET(OPENIMAGEIO_PATHS PATHS /usr/lib /usr/lib64 /lib /lib64) + FIND_LIBRARY(OPENIMAGEIO_LIBRARY OpenImageIO ${OPENIMAGEIO_HINTS} ${OPENIMAGEIO_PATHS}) ++FIND_LIBRARY(OPENIMAGEIO_UTIL_LIBRARY OpenImageIO_Util ${OPENIMAGEIO_HINTS} ${OPENIMAGEIO_PATHS}) + + SET(OPENIMAGEIO_ROOT_LAST ${OPENIMAGEIO_ROOT} CACHE INTERNAL "Last value of OPENIMAGEIO_ROOT to detect changes") + +@@ -68,8 +69,9 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenImageIO + + IF (OPENIMAGEIO_FOUND) + SET(OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO_INCLUDE_DIR}) +- SET(OPENIMAGEIO_LIBRARIES ${OPENIMAGEIO_LIBRARY}) ++ SET(OPENIMAGEIO_LIBRARIES ${OPENIMAGEIO_LIBRARY} ${OPENIMAGEIO_UTIL_LIBRARY}) + ENDIF() + + MARK_AS_ADVANCED(OPENIMAGEIO_INCLUDE_DIR) + MARK_AS_ADVANCED(OPENIMAGEIO_LIBRARY) ++MARK_AS_ADVANCED(OPENIMAGEIO_UTIL_LIBRARY) +diff --git a/common/cmake/clang.cmake b/common/cmake/clang.cmake +index 01480ac73..4380823ed 100644 +--- a/common/cmake/clang.cmake ++++ b/common/cmake/clang.cmake +@@ -86,7 +86,6 @@ ELSE() + ENDIF() + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") # generate position independent code suitable for shared libraries + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") # generate position independent code suitable for shared libraries +- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") # enables C++11 features + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden") # makes all symbols hidden by default + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden") # makes all inline symbols hidden by default + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing") # disables strict aliasing rules +diff --git a/common/cmake/dpcpp.cmake b/common/cmake/dpcpp.cmake +index aecb35169..fcdfb4ce4 100644 +--- a/common/cmake/dpcpp.cmake ++++ b/common/cmake/dpcpp.cmake +@@ -83,7 +83,6 @@ ELSE() + ENDIF() + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") # generate position independent code suitable for shared libraries + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") # generate position independent code suitable for shared libraries +- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") # enables C++11 features + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden") # makes all symbols hidden by default + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden") # makes all inline symbols hidden by default + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing") # disables strict aliasing rules +diff --git a/common/cmake/gnu.cmake b/common/cmake/gnu.cmake +index 1b2682d9e..cb96ecb64 100644 +--- a/common/cmake/gnu.cmake ++++ b/common/cmake/gnu.cmake +@@ -44,7 +44,6 @@ IF (NOT APPLE) + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") # generate position independent code suitable for shared libraries + ENDIF() + +-SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") # enables C++11 features + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden") # makes all symbols hidden by default + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden") # makes all inline symbols hidden by default + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing") # disables strict aliasing rules +diff --git a/common/cmake/intel.cmake b/common/cmake/intel.cmake +index 2c8e86e6c..abdffba90 100644 +--- a/common/cmake/intel.cmake ++++ b/common/cmake/intel.cmake +@@ -120,7 +120,6 @@ ELSE() + ENDIF() + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") # generate position independent code suitable for shared libraries + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") # generate position independent code suitable for shared libraries +- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") # enables C++11 features + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden") # makes all symbols hidden by default + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden") # makes all inline symbols hidden by default + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -no-ansi-alias") # disables strict aliasing rules |