From 518b45bffd19d0b75715f338985f96c459f9d129 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 4 Sep 2024 12:28:34 +0100 Subject: gentoo auto-resync : 04:09:2024 - 12:28:34 --- media-gfx/Manifest.gz | Bin 38562 -> 38551 bytes media-gfx/blender/Manifest | 12 +- media-gfx/blender/blender-3.3.21.ebuild | 432 ++++++++++++++++ media-gfx/blender/blender-3.6.15.ebuild | 447 ++++++++++++++++ media-gfx/blender/blender-4.0.2-r1.ebuild | 2 +- media-gfx/blender/blender-4.1.1-r2.ebuild | 2 +- media-gfx/blender/blender-4.2.1.ebuild | 593 ++++++++++++++++++++++ media-gfx/blender/blender-9999.ebuild | 11 +- media-gfx/libbgcode/Manifest | 2 + media-gfx/libbgcode/libbgcode-0.0.20240903.ebuild | 35 ++ media-gfx/xv/Manifest | 2 + media-gfx/xv/xv-6.0.1.ebuild | 66 +++ 12 files changed, 1593 insertions(+), 11 deletions(-) create mode 100644 media-gfx/blender/blender-3.3.21.ebuild create mode 100644 media-gfx/blender/blender-3.6.15.ebuild create mode 100644 media-gfx/blender/blender-4.2.1.ebuild create mode 100644 media-gfx/libbgcode/libbgcode-0.0.20240903.ebuild create mode 100644 media-gfx/xv/xv-6.0.1.ebuild (limited to 'media-gfx') diff --git a/media-gfx/Manifest.gz b/media-gfx/Manifest.gz index 0fcecce9f147..dc24c2c49d0c 100644 Binary files a/media-gfx/Manifest.gz and b/media-gfx/Manifest.gz differ diff --git a/media-gfx/blender/Manifest b/media-gfx/blender/Manifest index 986167220b26..00b10ffb4559 100644 --- a/media-gfx/blender/Manifest +++ b/media-gfx/blender/Manifest @@ -9,15 +9,21 @@ AUX blender-4.0.2-CUDA_NVCC_FLAGS.patch 627 BLAKE2B 45c9f327ee6d2fbd45446ba0787f AUX blender-4.0.2-FindClang.patch 451 BLAKE2B 4b57395d440b590f9b2e097b74fbcf46dbe12fd13536cb335b914246995ede928f1208872c5044e1d0ecb1a702d0c46b656eb4b3abc3b0ed149abaf0d74bd433 SHA512 21aa3e158585184dfc1ccd931b53142cf436507a9126f4cee465214e7183553d02451babc5a636d3eb4ae0fd3ed0f0effb7b8962889f6dbec3e9476a61d0bbb2 AUX blender-4.0.2-r1-osl-1.13.patch 14364 BLAKE2B fdee46fa3c5b1dc9a48499573e6bda242e2aa5d57f17e8b1e1a262673c5c2912c75cc8c531a30bcc0fd5019c4ff50ae089d0987e15ff1d57137e00f903356738 SHA512 2020b4f34c50ab1bb911a3b37b95a3da2a7f754e0b0ead7f651664131aa19debc00f8a8d32871b467bfdce9d83c43ca4597309351512635fdaf35f98c82266ff DIST blender-3.3.15.tar.xz 41928632 BLAKE2B d93d7d47183fcd7afa547b8d3f0bd7240ea204dcce885f42d79d29352ebacac43a2f92e380f576c2688d2d90d910caff069484e22669847b0eea71079a8bdc7e SHA512 d55223b7b9ae9f9c6fdbf5ed2988e997693fcb8262196acb08bbe58bae86f9f34474ed1cf5a213ee0247225601726265ded3cb4ad4d89910fc247f9cf5fec1ff +DIST blender-3.3.21.tar.xz 41940868 BLAKE2B 74874226a0f690d2b81c0f96c441f519bd37ff0fec5c2dcae0f4f673d55863e2b2edbd60d2ed05890c440c5287e4cab943646cf4029d7c8287a636ac405e9bce SHA512 715a9808b25fe4c90ee3097edf21bdb3facfec51df0f6b6c6404a95bafe417d1e4998994f532ae9bac1e95de84cc8fd8fce8f8e672f9117646ad840074344d0e DIST blender-3.3.8.tar.xz 41915180 BLAKE2B 7fb24afe2151bba53d8c25160bd697145aced74a8cd9a7ac92b2f66bc0ab59e995009f20f9e9bb622b05d614919137153805a2e233de5b0bb0a41a2ac3405a76 SHA512 63aef1e543a9c8bbc5f8838292ad2e8d0d9a8ee6fd2d71a419c1edc1a0ee1f59f7e9eab59bc20bf32ca56ba440bab1534c6c94c6ca2c5ab964e80bd452b7e519 +DIST blender-3.6.15.tar.xz 67906200 BLAKE2B 8709b20347e78f3f71d22fee9799b1c0e20a39521b35cff83d6cd3462d4b172e31c1656812d7ce51eef25341a0cff2e9efdcdab0bc9a361ec843a666fc8c3185 SHA512 dfd1d80850fe6ab0616fd99ab039345da621418890b1a006e5320a4b739d1cf6f4ca313e8f8aed6e27c976400c75e8d6085847623d933de71932aefe82f3fd32 DIST blender-3.6.8.tar.xz 70453744 BLAKE2B 5361977951fa1720899fad26092b967cc78b7ba82c8823f92fe1e6a14419edae1f3914f639e88dd8b5fb3ec7c124783e1ece56199a80b9b51a0f320764e1eba7 SHA512 a5e15dc9de7024cebb955fc531ae592a4c58336196a07fd63ed5bb4eb14d66751a3697ea8b120283ca5078c92d8c87966e882862011ebb4368f132e2de004a45 DIST blender-4.0.2.tar.xz 73281252 BLAKE2B 6ec72baa360049681c8ba18ae668041e87745bad51113cf50bca93d18f52ef5db84c58f9a2dc5b341ef1f0439e76288a1b1eda892a19033fb494e79cd3b2f983 SHA512 c37b85d06f5cf8b48cb8c657a9fb6b0ab1325271706fa34039f2993420f7606cd1e2c052173cdea94e9bec2924e7aa4df373e3a0fc1f9c4be336e62211b6bc4b DIST blender-4.1.1.tar.xz 82146268 BLAKE2B 1ab4a6c1046851ef619394c62fc73794430dc091e2cab26d3d1d542e9d4519889e9b9731606385e9dc8657448ca3827875526f4a57dd1b5c326a73d8a6f9be8d SHA512 13ad0cdd09879b5c28554faca5a54172f43dc3dcb749d2d1723d3e89e741e6255179af3bd88309b735e058b9b350191e44f3158e882e55f1cedea70b8b21540e +DIST blender-4.2.1.tar.xz 72789532 BLAKE2B 74494e851e9e2e9fdcf4a77fa4e1c177d6b9f01ab1cde9daec40468e5399d84b04225ff3a6919191e685624e9094ea4cb2257a62344d3b0e87072f339253aa82 SHA512 20162bd1185e34c481a0520f4999f8c76018471b485fa72afa446f590638c564a370d036cc4a941bf204fce821d8305d4244b3ba9ec7f09f1839b8a276dfde39 EBUILD blender-3.3.15.ebuild 13723 BLAKE2B b22a4fa62e27aa0f25f2e769de636d87a80ad959c4271005dccb01bc19596a19d81b8cba19034d20e433ebd9eeb7f51d235ad10f6e145c912a343db31ad7364e SHA512 de3eb7c4453a48297b50dbd2ce10a25151673fafb29ff6c1241cd8c1be9865727c128f6265e66a39ac48f095b9e5ec5b5f70510ad2ec5f861a2f5129bb81db5a +EBUILD blender-3.3.21.ebuild 13726 BLAKE2B 8641e7d81d4d5ae7647a58bf5dce2f031c043714608501d4b4c1febae164741330467dc1253ea521fc4534b9323f2ee5ad043321674d13cd53ba2548193ab2b3 SHA512 ec16526c86f685824629a9a5f97e4a1f44439101781a07179f28f30b4502537d14c469dd83f474fe544cf8e1ae363b3f7d9810f346d94b32d83fb67f2642d0ea EBUILD blender-3.3.8.ebuild 13722 BLAKE2B 12465f59bb137aaa869216b623df34fb8758a742bc517cd467865ecfbff6856429c7fda725b6a3e14d1581964b22adb27956e0b74838c1da5e9a573560269fdf SHA512 8d985d8efd20233d111b7efe2aaa0b8fe486d3de36d676575347d66b24a7fd14904c04d9edfcfc1e03c34956419dc3ec06c4e20175749254f120ae52e79a1396 +EBUILD blender-3.6.15.ebuild 14133 BLAKE2B 97030e2d089b2bd7cc7e8a3e0c4b8b302c168f3b12be5e18366493776095fd4b95b2107691f467f67fb95e006b3d5ad5442dddff8e39fa53044dbaf263f79216 SHA512 3d90056f798ce49c5028ff860296e1c18201d44fea9056c59150b6b6815d3ac98e03e9b1ba2aa985e883996e7755dec6ef27a9799e889c21bd6d539940fe858c EBUILD blender-3.6.8.ebuild 14127 BLAKE2B 1de13a7ef689f16a899698c7262bf0a59a9d6ca1a9ed27c446e11b1cfc4b39b94231f08d96b17323f2049b1ec05a28319718402c083061a2b805838ca90931ad SHA512 0647e31bef93c125c407611a690437de86c710beb5b7771801e27e2e561c3d7bfbc350e67fe0275bcbe4a5f049e87c3e600b95bcef9013f156677624b1ce445c -EBUILD blender-4.0.2-r1.ebuild 17318 BLAKE2B 010552261087bdb8c937a5f081d0316e11ee5cb4809a43e0eed8292be7062e070eb0643c91582b89b0aaebffef20aba3e07c30ec73203fefc7e81f7ebb9d78a5 SHA512 e15eb447924b6c1048c5cf0af8770d1f916d7dbcce0f1f9b00482f8d56b31b0e98834c160bc996a8afd3393f58443b2de0e8783075bd3ee3812bb7b9eef31e52 -EBUILD blender-4.1.1-r2.ebuild 17223 BLAKE2B 9a18bd4d7fdca8959a30de975c43a121e5e8d623d5405f45c0ba0658309e30f4537cafdce7187ea373fe2e649e5a09d0bdd77efec7c028230314c51023ce0db8 SHA512 39566662e531ff1a35e895c9b7201b81b75cb6334e8802f359cc1eece944bad38a4e6d813884cc045497a09aae5bd00a9916ae13ffe8ed578ec8d861640cf8fb +EBUILD blender-4.0.2-r1.ebuild 17323 BLAKE2B da8dd2e98235314e7acf564867c688ce8ca258ef154b6fecfee4b247360bfd1eda7d2d0a42b37356cf79b061bf3f2d3c862f19db77f29b74701a29c3e36e4eed SHA512 f6ec16f31c2ecb1578b1d0222fb02041753cf225347cefdd0b75ab28386ecf9840d54be5366e9e7231b05aca1a84f3d52a10c801a2431a289182e1a1a0ac0aa8 +EBUILD blender-4.1.1-r2.ebuild 17228 BLAKE2B cb0fa27d3d2ac3b5e964f4fa1c10fc1e831c6d3d8a1f68093356aea80d99d942b421fe4db5ab97b69646c046391bfe6bfc24471245d4fa6cd138e182493fd359 SHA512 49ee9a06312e0e4f1b37c2489ae1297cb8fd7e505bf27839b8f13b050ff2b7d2af116602e4ea62716ed30f8e19c06276346985d0c594f83985b99a6b013e73a3 EBUILD blender-4.1.1.ebuild 17169 BLAKE2B 96ac5b0d84b5c45008ca67d07f55617833801220064e77e37d1f6f0b47a141f29ddc063667ebf09f482899640b02830c31b1cd8b148f3f5fbe61421f931ffd53 SHA512 ed20d53f7bcb93b0f0541145dabf903a10fe3811288c3cebf80396885a4d7aa4552687e86608d5510f8fe87adea9432956e6c21dec47f1e08adc0cc6e399b1c4 -EBUILD blender-9999.ebuild 17224 BLAKE2B 49f70034df58751a0ec4994a7b7aa7f7b74a2eb8163c9317c61b9147e413bec90a33c88dc2d6d42bee60570b61692a5fca5ced71800d5adff7306dcab1fee0aa SHA512 8c9137ee3bfbec89b124b2c12e730081e3b2de73b43d530bc5855ddaf76d7bf2156c7c433f0eb4bf85f0a4f04b5db9e6656ead9e98711262e7721071ef3c3155 +EBUILD blender-4.2.1.ebuild 17084 BLAKE2B f3e0fc7622c35b8e3c10be61e9b0bd2d07d04ea8c1f2aa7c43d20e72228434955f41ba863fc239e6e7971fce711acb4eecddc040c3a325337f78ca1fe7e8890a SHA512 407fafa5ccc112df0d235c3c0a539e2d783a2e99634f62ff286e9fcce9a07a47e5125516643148e4ae23ff10686b4a74ccdb2d12fae874dee6ee740e445d8622 +EBUILD blender-9999.ebuild 17084 BLAKE2B f3e0fc7622c35b8e3c10be61e9b0bd2d07d04ea8c1f2aa7c43d20e72228434955f41ba863fc239e6e7971fce711acb4eecddc040c3a325337f78ca1fe7e8890a SHA512 407fafa5ccc112df0d235c3c0a539e2d783a2e99634f62ff286e9fcce9a07a47e5125516643148e4ae23ff10686b4a74ccdb2d12fae874dee6ee740e445d8622 MISC metadata.xml 3679 BLAKE2B cca8c2f8568be6c83244cf5a90b2db0df11faffa4f55820692990e02ce0bfd84cf3e6c2fdb146af9e6c8e09d1c72fe297c73f126e04ad918e709dc9064908aca SHA512 ac8bdbc0e00442f56d9d077d7d8c97deba90121e7dd34aac9d51b7ae6348bbaa875d2fcd01fe20ff7e9b1c3bf332a5cde63fd0b406a1e29c3f4de323225a17a9 diff --git a/media-gfx/blender/blender-3.3.21.ebuild b/media-gfx/blender/blender-3.3.21.ebuild new file mode 100644 index 000000000000..66c872c02cea --- /dev/null +++ b/media-gfx/blender/blender-3.3.21.ebuild @@ -0,0 +1,432 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_10 python3_11 ) + +inherit check-reqs cmake flag-o-matic pax-utils python-single-r1 toolchain-funcs xdg-utils + +DESCRIPTION="3D Creation/Animation/Publishing System" +HOMEPAGE="https://www.blender.org" + +if [[ ${PV} = *9999* ]] ; then + # Subversion is needed for downloading unit test files + inherit git-r3 subversion + EGIT_REPO_URI="https://git.blender.org/blender.git" +else + SRC_URI="https://download.blender.org/source/${P}.tar.xz" + # Update these between major releases. + TEST_TARBALL_VERSION="$(ver_cut 1-2).0" + #SRC_URI+=" test? ( https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-${TEST_TARBALL_VERSION}-tests.tar.xz )" + KEYWORDS="~amd64 ~arm ~arm64" +fi + +LICENSE="GPL-3+ cycles? ( Apache-2.0 )" +SLOT="${PV%.*}" +IUSE="+bullet +dds +fluid +openexr +tbb \ + alembic collada +color-management cuda +cycles \ + debug doc +embree +ffmpeg +fftw +gmp headless jack jemalloc jpeg2k \ + man +nanovdb ndof nls openal +oidn +openimageio +openmp +opensubdiv \ + +openvdb optix osl +pdf +potrace +pugixml pulseaudio sdl +sndfile \ + test +tiff valgrind" +RESTRICT="!test? ( test ) test" + +REQUIRED_USE="${PYTHON_REQUIRED_USE} + alembic? ( openexr ) + cuda? ( cycles ) + cycles? ( openexr tiff openimageio ) + fluid? ( tbb ) + openvdb? ( tbb ) + optix? ( cuda ) + osl? ( cycles ) + test? ( color-management )" + +# Library versions for official builds can be found in the blender source directory in: +# build_files/build_environment/install_deps.sh +# +# 2.90). + BV=${BV:0:1}.${BV:1} + else + # Add period and skip the middle number (301 -> 3.1) + BV=${BV:0:1}.${BV:2} + fi +} + +pkg_pretend() { + blender_check_requirements +} + +pkg_setup() { + blender_check_requirements + python-single-r1_pkg_setup +} + +src_unpack() { + if [[ ${PV} = *9999* ]] ; then + git-r3_src_unpack + if use test; then + TESTS_SVN_URL=https://svn.blender.org/svnroot/bf-blender/trunk/lib/tests + subversion_fetch ${TESTS_SVN_URL} ../lib/tests + fi + else + default + if use test; then + #The tests are downloaded from: https://svn.blender.org/svnroot/bf-blender/tags/blender-${SLOT}-release/lib/tests + mkdir -p lib || die + mv "${WORKDIR}/blender-${TEST_TARBALL_VERSION}-tests/tests" lib || die + fi + fi + +} + +src_prepare() { + cmake_src_prepare + + blender_get_version + + # Disable MS Windows help generation. The variable doesn't do what it + # it sounds like. + sed -e "s|GENERATE_HTMLHELP = YES|GENERATE_HTMLHELP = NO|" \ + -i doc/doxygen/Doxyfile || die + + # Prepare icons and .desktop files for slotting. + sed -e "s|blender.svg|blender-${BV}.svg|" -i source/creator/CMakeLists.txt || die + sed -e "s|blender-symbolic.svg|blender-${BV}-symbolic.svg|" -i source/creator/CMakeLists.txt || die + sed -e "s|blender.desktop|blender-${BV}.desktop|" -i source/creator/CMakeLists.txt || die + + sed -e "s|Name=Blender|Name=Blender ${PV}|" -i release/freedesktop/blender.desktop || die + sed -e "s|Exec=blender|Exec=blender-${BV}|" -i release/freedesktop/blender.desktop || die + sed -e "s|Icon=blender|Icon=blender-${BV}|" -i release/freedesktop/blender.desktop || die + + mv release/freedesktop/icons/scalable/apps/blender.svg "release/freedesktop/icons/scalable/apps/blender-${BV}.svg" || die + mv release/freedesktop/icons/symbolic/apps/blender-symbolic.svg "release/freedesktop/icons/symbolic/apps/blender-${BV}-symbolic.svg" || die + mv release/freedesktop/blender.desktop "release/freedesktop/blender-${BV}.desktop" || die + + if use test; then + # Without this the tests will try to use /usr/bin/blender and /usr/share/blender/ to run the tests. + sed -e "s|string(REPLACE.*|set(TEST_INSTALL_DIR ${T}/usr)|g" -i tests/CMakeLists.txt || die + sed -e "s|string(REPLACE.*|set(TEST_INSTALL_DIR ${T}/usr)|g" -i build_files/cmake/Modules/GTestTesting.cmake || die + fi +} + +src_configure() { + # -Werror=odr, -Werror=lto-type-mismatch + # https://bugs.gentoo.org/859607 + # https://projects.blender.org/blender/blender/issues/120444 + filter-lto + + # Workaround for bug #922600 + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) + + append-lfs-flags + + local mycmakeargs=( + -DBUILD_SHARED_LIBS=OFF + -DPYTHON_INCLUDE_DIR="$(python_get_includedir)" + -DPYTHON_LIBRARY="$(python_get_library_path)" + -DPYTHON_VERSION="${EPYTHON/python/}" + -DWITH_ALEMBIC=$(usex alembic) + -DWITH_ASSERT_ABORT=$(usex debug) + -DWITH_BOOST=ON + -DWITH_BULLET=$(usex bullet) + -DWITH_CODEC_FFMPEG=$(usex ffmpeg) + -DWITH_CODEC_SNDFILE=$(usex sndfile) + -DWITH_CXX_GUARDEDALLOC=$(usex debug) + -DWITH_CYCLES=$(usex cycles) + -DWITH_CYCLES_DEVICE_CUDA=$(usex cuda TRUE FALSE) + -DWITH_CYCLES_DEVICE_OPTIX=$(usex optix) + -DWITH_CYCLES_EMBREE=$(usex embree) + -DWITH_CYCLES_OSL=$(usex osl) + -DWITH_CYCLES_STANDALONE=OFF + -DWITH_CYCLES_STANDALONE_GUI=OFF + -DWITH_DOC_MANPAGE=$(usex man) + -DWITH_FFTW3=$(usex fftw) + -DWITH_GMP=$(usex gmp) + -DWITH_GTESTS=$(usex test) + -DWITH_HARU=$(usex pdf) + -DWITH_HEADLESS=$(usex headless) + -DWITH_INSTALL_PORTABLE=OFF + -DWITH_IMAGE_DDS=$(usex dds) + -DWITH_IMAGE_OPENEXR=$(usex openexr) + -DWITH_IMAGE_OPENJPEG=$(usex jpeg2k) + -DWITH_IMAGE_TIFF=$(usex tiff) + -DWITH_INPUT_NDOF=$(usex ndof) + -DWITH_INTERNATIONAL=$(usex nls) + -DWITH_JACK=$(usex jack) + -DWITH_MEM_JEMALLOC=$(usex jemalloc) + -DWITH_MEM_VALGRIND=$(usex valgrind) + -DWITH_MOD_FLUID=$(usex fluid) + -DWITH_MOD_OCEANSIM=$(usex fftw) + -DWITH_NANOVDB=$(usex nanovdb) + -DWITH_OPENAL=$(usex openal) + -DWITH_OPENCOLLADA=$(usex collada) + -DWITH_OPENCOLORIO=$(usex color-management) + -DWITH_OPENIMAGEDENOISE=$(usex oidn) + -DWITH_OPENIMAGEIO=$(usex openimageio) + -DWITH_OPENMP=$(usex openmp) + -DWITH_OPENSUBDIV=$(usex opensubdiv) + -DWITH_OPENVDB=$(usex openvdb) + -DWITH_OPENVDB_BLOSC=$(usex openvdb) + -DWITH_POTRACE=$(usex potrace) + -DWITH_PUGIXML=$(usex pugixml) + -DWITH_PULSEAUDIO=$(usex pulseaudio) + -DWITH_PYTHON_INSTALL=OFF + -DWITH_SDL=$(usex sdl) + -DWITH_STATIC_LIBS=OFF + -DWITH_SYSTEM_EIGEN3=ON + -DWITH_SYSTEM_FREETYPE=ON + -DWITH_SYSTEM_GLEW=ON + -DWITH_SYSTEM_LZO=ON + -DWITH_TBB=$(usex tbb) + -DWITH_USD=OFF + -DWITH_XR_OPENXR=OFF + ) + + if use optix; then + mycmakeargs+=( + -DCYCLES_RUNTIME_OPTIX_ROOT_DIR="${EPREFIX}"/opt/optix + -DOPTIX_ROOT_DIR="${EPREFIX}"/opt/optix + ) + fi + + # This is currently needed on arm64 to get the NEON SIMD wrapper to compile the code successfully + use arm64 && append-flags -flax-vector-conversions + + append-flags $(usex debug '-DDEBUG' '-DNDEBUG') + + if tc-is-gcc ; then + # These options only exist when GCC is detected. + # We disable these to respect the user's choice of linker. + mycmakeargs+=( + -DWITH_LINKER_GOLD=OFF + -DWITH_LINKER_LLD=OFF + ) + fi + + cmake_src_configure +} + +src_test() { + # A lot of tests needs to have access to the installed data files. + # So install them into the image directory now. + DESTDIR="${T}" cmake_build install + + blender_get_version + # Define custom blender data/script file paths not be able to find them otherwise during testing. + # (Because the data is in the image directory and it will default to look in /usr/share) + export BLENDER_SYSTEM_SCRIPTS="${T}/usr/share/blender/${BV}/scripts" + export BLENDER_SYSTEM_DATAFILES="${T}/usr/share/blender/${BV}/datafiles" + + # Sanity check that the script and datafile path is valid. + # If they are not vaild, blender will fallback to the default path which is not what we want. + [ -d "$BLENDER_SYSTEM_SCRIPTS" ] || die "The custom script path is invalid, fix the ebuild!" + [ -d "$BLENDER_SYSTEM_DATAFILES" ] || die "The custom datafiles path is invalid, fix the ebuild!" + + cmake_src_test + + # Clean up the image directory for src_install + rm -fr "${T}"/usr || die +} + +src_install() { + blender_get_version + + # Pax mark blender for hardened support. + pax-mark m "${BUILD_DIR}"/bin/blender + + cmake_src_install + + if use man; then + # Slot the man page + mv "${ED}/usr/share/man/man1/blender.1" "${ED}/usr/share/man/man1/blender-${BV}.1" || die + fi + + if use doc; then + # Define custom blender data/script file paths. Otherwise Blender will not be able to find them during doc building. + # (Because the data is in the image directory and it will default to look in /usr/share) + export BLENDER_SYSTEM_SCRIPTS=${ED}/usr/share/blender/${BV}/scripts + export BLENDER_SYSTEM_DATAFILES=${ED}/usr/share/blender/${BV}/datafiles + + # Workaround for binary drivers. + addpredict /dev/ati + addpredict /dev/dri + addpredict /dev/nvidiactl + + einfo "Generating Blender C/C++ API docs ..." + cd "${CMAKE_USE_DIR}"/doc/doxygen || die + doxygen -u Doxyfile || die + doxygen || die "doxygen failed to build API docs." + + cd "${CMAKE_USE_DIR}" || die + einfo "Generating (BPY) Blender Python API docs ..." + "${BUILD_DIR}"/bin/blender --background --python doc/python_api/sphinx_doc_gen.py -noaudio || die "sphinx failed." + + cd "${CMAKE_USE_DIR}"/doc/python_api || die + sphinx-build sphinx-in BPY_API || die "sphinx failed." + + docinto "html/API/python" + dodoc -r "${CMAKE_USE_DIR}"/doc/python_api/BPY_API/. + + docinto "html/API/blender" + dodoc -r "${CMAKE_USE_DIR}"/doc/doxygen/html/. + fi + + # Fix doc installdir + docinto html + dodoc "${CMAKE_USE_DIR}"/release/text/readme.html + rm -r "${ED}"/usr/share/doc/blender || die + + python_optimize "${ED}/usr/share/blender/${BV}/scripts" + + mv "${ED}/usr/bin/blender-thumbnailer" "${ED}/usr/bin/blender-${BV}-thumbnailer" || die + mv "${ED}/usr/bin/blender" "${ED}/usr/bin/blender-${BV}" || die +} + +pkg_postinst() { + elog + elog "Blender uses python integration. As such, may have some" + elog "inherent risks with running unknown python scripts." + elog + elog "It is recommended to change your blender temp directory" + elog "from /tmp to /home/user/tmp or another tmp file under your" + elog "home directory. This can be done by starting blender, then" + elog "changing the 'Temporary Files' directory in Blender preferences." + elog + + if use osl; then + ewarn "" + ewarn "OSL is know to cause runtime segfaults if Mesa has been linked to" + ewarn "an other LLVM version than what OSL is linked to." + ewarn "See https://bugs.gentoo.org/880671 for more details" + ewarn "" + fi + + if ! use python_single_target_python3_10; then + elog "You are building Blender with a newer python version than" + elog "supported by this version upstream." + elog "If you experience breakages with e.g. plugins, please switch to" + elog "python_single_target_python3_10 instead." + elog "Bug: https://bugs.gentoo.org/737388" + elog + fi + + xdg_icon_cache_update + xdg_mimeinfo_database_update + xdg_desktop_database_update +} + +pkg_postrm() { + xdg_icon_cache_update + xdg_mimeinfo_database_update + xdg_desktop_database_update + + ewarn "" + ewarn "You may want to remove the following directory." + ewarn "~/.config/${PN}/${SLOT}/cache/" + ewarn "It may contain extra render kernels not tracked by portage" + ewarn "" +} diff --git a/media-gfx/blender/blender-3.6.15.ebuild b/media-gfx/blender/blender-3.6.15.ebuild new file mode 100644 index 000000000000..698ccf250f72 --- /dev/null +++ b/media-gfx/blender/blender-3.6.15.ebuild @@ -0,0 +1,447 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_10 python3_11 ) + +inherit check-reqs cmake flag-o-matic pax-utils python-single-r1 toolchain-funcs xdg-utils + +DESCRIPTION="3D Creation/Animation/Publishing System" +HOMEPAGE="https://www.blender.org" + +if [[ ${PV} = *9999* ]] ; then + # Subversion is needed for downloading unit test files + inherit git-r3 subversion + EGIT_REPO_URI="https://projects.blender.org/blender/blender.git" + ADDONS_EGIT_REPO_URI="https://projects.blender.org/blender/blender-addons.git" +else + SRC_URI="https://download.blender.org/source/${P}.tar.xz" + # Update these between major releases. + TEST_TARBALL_VERSION="$(ver_cut 1-2).0" + # SRC_URI+=" test? ( https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-${TEST_TARBALL_VERSION}-tests.tar.xz )" + KEYWORDS="~amd64 ~arm ~arm64" +fi + +LICENSE="GPL-3+ cycles? ( Apache-2.0 )" +SLOT="${PV%.*}" +IUSE="+bullet +dds +fluid +openexr +tbb + alembic collada +color-management cuda +cycles cycles-bin-kernels + debug doc +embree +ffmpeg +fftw +gmp jack jemalloc jpeg2k + man +nanovdb ndof nls openal +oidn +openmp +openpgl +opensubdiv + +openvdb optix osl +pdf +potrace +pugixml pulseaudio sdl + +sndfile test +tiff valgrind wayland X" +RESTRICT="!test? ( test )" + +REQUIRED_USE="${PYTHON_REQUIRED_USE} + alembic? ( openexr ) + cuda? ( cycles ) + cycles? ( openexr tiff ) + fluid? ( tbb ) + openvdb? ( tbb ) + optix? ( cuda ) + osl? ( cycles ) + test? ( color-management )" + +# Library versions for official builds can be found in the blender source directory in: +# build_files/build_environment/install_deps.sh +RDEPEND="${PYTHON_DEPS} + dev-libs/boost:=[nls?] + dev-libs/lzo:2= + $(python_gen_cond_dep ' + dev-python/cython[${PYTHON_USEDEP}] + dev-python/numpy[${PYTHON_USEDEP}] + dev-python/zstandard[${PYTHON_USEDEP}] + dev-python/requests[${PYTHON_USEDEP}] + ') + media-libs/freetype:=[brotli] + media-libs/libepoxy:= + media-libs/libjpeg-turbo:= + media-libs/libpng:= + media-libs/libsamplerate + >=media-libs/openimageio-2.4.6.0:= + sys-libs/zlib:= + virtual/glu + virtual/libintl + virtual/opengl + alembic? ( >=media-gfx/alembic-1.8.3-r2[boost(+),hdf(+)] ) + collada? ( >=media-libs/opencollada-1.6.68 ) + color-management? ( media-libs/opencolorio:= ) + cuda? ( dev-util/nvidia-cuda-toolkit:= ) + embree? ( >=media-libs/embree-3.10.0:=[raymask] ) + ffmpeg? ( media-video/ffmpeg:=[x264,mp3,encode,theora,jpeg2k?,vpx,vorbis,opus,xvid] ) + fftw? ( sci-libs/fftw:3.0= ) + gmp? ( dev-libs/gmp[cxx] ) + jack? ( virtual/jack ) + jemalloc? ( dev-libs/jemalloc:= ) + jpeg2k? ( media-libs/openjpeg:2= ) + ndof? ( + app-misc/spacenavd + dev-libs/libspnav + ) + nls? ( virtual/libiconv ) + openal? ( media-libs/openal ) + oidn? ( >=media-libs/oidn-1.4.1 ) + openexr? ( + >=dev-libs/imath-3.1.4-r2:= + >=media-libs/openexr-3:0= + ) + openpgl? ( media-libs/openpgl:0/0.5 ) + opensubdiv? ( >=media-libs/opensubdiv-3.4.0 ) + openvdb? ( + =dev-libs/wayland-1.12 + >=dev-libs/wayland-protocols-1.15 + >=x11-libs/libxkbcommon-0.2.0 + media-libs/mesa[wayland] + sys-apps/dbus + ) + X? ( + x11-libs/libX11 + x11-libs/libXi + x11-libs/libXxf86vm + ) +" + +DEPEND="${RDEPEND} + dev-cpp/eigen:= +" + +BDEPEND=" + virtual/pkgconfig + doc? ( + app-text/doxygen[dot] + dev-python/sphinx[latex] + dev-texlive/texlive-bibtexextra + dev-texlive/texlive-fontsextra + dev-texlive/texlive-fontutils + dev-texlive/texlive-latex + dev-texlive/texlive-latexextra + ) + nls? ( sys-devel/gettext ) + wayland? ( + dev-util/wayland-scanner + ) +" + +blender_check_requirements() { + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp + + if use doc; then + CHECKREQS_DISK_BUILD="4G" check-reqs_pkg_pretend + fi +} + +blender_get_version() { + # Get blender version from blender itself. + BV=$(grep "BLENDER_VERSION " source/blender/blenkernel/BKE_blender_version.h | cut -d " " -f 3; assert) + if ((${BV:0:1} < 3)) ; then + # Add period (290 -> 2.90). + BV=${BV:0:1}.${BV:1} + else + # Add period and skip the middle number (301 -> 3.1) + BV=${BV:0:1}.${BV:2} + fi +} + +pkg_pretend() { + blender_check_requirements +} + +pkg_setup() { + blender_check_requirements + python-single-r1_pkg_setup +} + +src_unpack() { + if [[ ${PV} = *9999* ]] ; then + git-r3_src_unpack + + git-r3_fetch "${ADDONS_EGIT_REPO_URI}" + git-r3_checkout "${ADDONS_EGIT_REPO_URI}" "${S}/scripts/addons" + + if use test; then + TESTS_SVN_URL=https://svn.blender.org/svnroot/bf-blender/trunk/lib/tests + subversion_fetch ${TESTS_SVN_URL} ../lib/tests + fi + ASSETS_SVN_URL=https://svn.blender.org/svnroot/bf-blender/trunk/lib/assets + subversion_fetch ${ASSETS_SVN_URL} ../lib/assets + else + default + if use test; then + #The tests are downloaded from: https://svn.blender.org/svnroot/bf-blender/tags/blender-${SLOT}-release/lib/tests + mkdir -p lib || die + mv "${WORKDIR}/blender-${TEST_TARBALL_VERSION}-tests/tests" lib || die + fi + fi + +} + +src_prepare() { + cmake_src_prepare + + blender_get_version + + # Disable MS Windows help generation. The variable doesn't do what it + # it sounds like. + sed -e "s|GENERATE_HTMLHELP = YES|GENERATE_HTMLHELP = NO|" \ + -i doc/doxygen/Doxyfile || die + + # Prepare icons and .desktop files for slotting. + sed -e "s|blender.svg|blender-${BV}.svg|" -i source/creator/CMakeLists.txt || die + sed -e "s|blender-symbolic.svg|blender-${BV}-symbolic.svg|" -i source/creator/CMakeLists.txt || die + sed -e "s|blender.desktop|blender-${BV}.desktop|" -i source/creator/CMakeLists.txt || die + + sed -e "s|Name=Blender|Name=Blender ${PV}|" -i release/freedesktop/blender.desktop || die + sed -e "s|Exec=blender|Exec=blender-${BV}|" -i release/freedesktop/blender.desktop || die + sed -e "s|Icon=blender|Icon=blender-${BV}|" -i release/freedesktop/blender.desktop || die + + mv release/freedesktop/icons/scalable/apps/blender.svg "release/freedesktop/icons/scalable/apps/blender-${BV}.svg" || die + mv release/freedesktop/icons/symbolic/apps/blender-symbolic.svg "release/freedesktop/icons/symbolic/apps/blender-${BV}-symbolic.svg" || die + mv release/freedesktop/blender.desktop "release/freedesktop/blender-${BV}.desktop" || die + + if use test; then + # Without this the tests will try to use /usr/bin/blender and /usr/share/blender/ to run the tests. + sed -e "s|set(TEST_INSTALL_DIR.*|set(TEST_INSTALL_DIR ${T}/usr)|g" -i tests/CMakeLists.txt || die + sed -e "s|string(REPLACE.*|set(TEST_INSTALL_DIR ${T}/usr)|g" -i build_files/cmake/Modules/GTestTesting.cmake || die + fi +} + +src_configure() { + # -Werror=odr, -Werror=lto-type-mismatch + # https://bugs.gentoo.org/859607 + # https://projects.blender.org/blender/blender/issues/120444 + filter-lto + + # Workaround for bug #922600 + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) + + append-lfs-flags + blender_get_version + + local mycmakeargs=( + -DBUILD_SHARED_LIBS=OFF + -DPYTHON_INCLUDE_DIR="$(python_get_includedir)" + -DPYTHON_LIBRARY="$(python_get_library_path)" + -DPYTHON_VERSION="${EPYTHON/python/}" + -DWITH_ALEMBIC=$(usex alembic) + -DWITH_ASSERT_ABORT=$(usex debug) + -DWITH_BOOST=ON + -DWITH_BULLET=$(usex bullet) + -DWITH_CODEC_FFMPEG=$(usex ffmpeg) + -DWITH_CODEC_SNDFILE=$(usex sndfile) + -DWITH_CXX_GUARDEDALLOC=$(usex debug) + -DWITH_CYCLES=$(usex cycles) + -DWITH_CYCLES_CUDA_BINARIES=$(usex cycles-bin-kernels) + -DWITH_CYCLES_DEVICE_CUDA=$(usex cuda TRUE FALSE) + -DWITH_CYCLES_DEVICE_OPTIX=$(usex optix) + -DWITH_CYCLES_EMBREE=$(usex embree) + -DWITH_CYCLES_OSL=$(usex osl) + -DWITH_CYCLES_PATH_GUIDING=$(usex openpgl) + -DWITH_CYCLES_STANDALONE=OFF + -DWITH_CYCLES_STANDALONE_GUI=OFF + -DWITH_DOC_MANPAGE=$(usex man) + -DWITH_FFTW3=$(usex fftw) + -DWITH_GHOST_WAYLAND=$(usex wayland) + -DWITH_GHOST_WAYLAND_APP_ID="blender-${BV}" + -DWITH_GHOST_WAYLAND_DBUS=$(usex wayland) + -DWITH_GHOST_WAYLAND_DYNLOAD=OFF + -DWITH_GHOST_WAYLAND_LIBDECOR=OFF + -DWITH_GHOST_X11=$(usex X) + -DWITH_GMP=$(usex gmp) + -DWITH_GTESTS=$(usex test) + -DWITH_HARU=$(usex pdf) + -DWITH_HEADLESS=$($(use X || use wayland) && echo OFF || echo ON) + -DWITH_INSTALL_PORTABLE=OFF + -DWITH_IMAGE_DDS=$(usex dds) + -DWITH_IMAGE_OPENEXR=$(usex openexr) + -DWITH_IMAGE_OPENJPEG=$(usex jpeg2k) + -DWITH_IMAGE_TIFF=$(usex tiff) + -DWITH_INPUT_NDOF=$(usex ndof) + -DWITH_INTERNATIONAL=$(usex nls) + -DWITH_JACK=$(usex jack) + -DWITH_MEM_JEMALLOC=$(usex jemalloc) + -DWITH_MEM_VALGRIND=$(usex valgrind) + -DWITH_MOD_FLUID=$(usex fluid) + -DWITH_MOD_OCEANSIM=$(usex fftw) + -DWITH_NANOVDB=$(usex nanovdb) + -DWITH_OPENAL=$(usex openal) + -DWITH_OPENCOLLADA=$(usex collada) + -DWITH_OPENCOLORIO=$(usex color-management) + -DWITH_OPENIMAGEDENOISE=$(usex oidn) + -DWITH_OPENMP=$(usex openmp) + -DWITH_OPENSUBDIV=$(usex opensubdiv) + -DWITH_OPENVDB=$(usex openvdb) + -DWITH_OPENVDB_BLOSC=$(usex openvdb) + -DWITH_POTRACE=$(usex potrace) + -DWITH_PUGIXML=$(usex pugixml) + -DWITH_PULSEAUDIO=$(usex pulseaudio) + -DWITH_PYTHON_INSTALL=OFF + -DWITH_SDL=$(usex sdl) + -DWITH_STATIC_LIBS=OFF + -DWITH_SYSTEM_EIGEN3=ON + -DWITH_SYSTEM_FREETYPE=ON + -DWITH_SYSTEM_LZO=ON + -DWITH_TBB=$(usex tbb) + -DWITH_USD=OFF + -DWITH_XR_OPENXR=OFF + ) + + if use optix; then + mycmakeargs+=( + -DCYCLES_RUNTIME_OPTIX_ROOT_DIR="${EPREFIX}"/opt/optix + -DOPTIX_ROOT_DIR="${EPREFIX}"/opt/optix + ) + fi + + # This is currently needed on arm64 to get the NEON SIMD wrapper to compile the code successfully + use arm64 && append-flags -flax-vector-conversions + + append-flags $(usex debug '-DDEBUG' '-DNDEBUG') + + if tc-is-gcc ; then + # These options only exist when GCC is detected. + # We disable these to respect the user's choice of linker. + mycmakeargs+=( + -DWITH_LINKER_GOLD=OFF + -DWITH_LINKER_LLD=OFF + ) + fi + + cmake_src_configure +} + +src_test() { + # A lot of tests needs to have access to the installed data files. + # So install them into the image directory now. + DESTDIR="${T}" cmake_build install + + blender_get_version + # Define custom blender data/script file paths not be able to find them otherwise during testing. + # (Because the data is in the image directory and it will default to look in /usr/share) + export BLENDER_SYSTEM_SCRIPTS="${T}/usr/share/blender/${BV}/scripts" + export BLENDER_SYSTEM_DATAFILES="${T}/usr/share/blender/${BV}/datafiles" + + # Sanity check that the script and datafile path is valid. + # If they are not vaild, blender will fallback to the default path which is not what we want. + [ -d "$BLENDER_SYSTEM_SCRIPTS" ] || die "The custom script path is invalid, fix the ebuild!" + [ -d "$BLENDER_SYSTEM_DATAFILES" ] || die "The custom datafiles path is invalid, fix the ebuild!" + + cmake_src_test + + # Clean up the image directory for src_install + rm -fr "${T}"/usr || die +} + +src_install() { + blender_get_version + + # Pax mark blender for hardened support. + pax-mark m "${BUILD_DIR}"/bin/blender + + cmake_src_install + + if use man; then + # Slot the man page + mv "${ED}/usr/share/man/man1/blender.1" "${ED}/usr/share/man/man1/blender-${BV}.1" || die + fi + + if use doc; then + # Define custom blender data/script file paths. Otherwise Blender will not be able to find them during doc building. + # (Because the data is in the image directory and it will default to look in /usr/share) + export BLENDER_SYSTEM_SCRIPTS=${ED}/usr/share/blender/${BV}/scripts + export BLENDER_SYSTEM_DATAFILES=${ED}/usr/share/blender/${BV}/datafiles + + # Workaround for binary drivers. + addpredict /dev/ati + addpredict /dev/dri + addpredict /dev/nvidiactl + + einfo "Generating Blender C/C++ API docs ..." + cd "${CMAKE_USE_DIR}"/doc/doxygen || die + doxygen -u Doxyfile || die + doxygen || die "doxygen failed to build API docs." + + cd "${CMAKE_USE_DIR}" || die + einfo "Generating (BPY) Blender Python API docs ..." + "${BUILD_DIR}"/bin/blender --background --python doc/python_api/sphinx_doc_gen.py -noaudio || die "sphinx failed." + + cd "${CMAKE_USE_DIR}"/doc/python_api || die + sphinx-build sphinx-in BPY_API || die "sphinx failed." + + docinto "html/API/python" + dodoc -r "${CMAKE_USE_DIR}"/doc/python_api/BPY_API/. + + docinto "html/API/blender" + dodoc -r "${CMAKE_USE_DIR}"/doc/doxygen/html/. + fi + + # Fix doc installdir + docinto html + dodoc "${CMAKE_USE_DIR}"/release/text/readme.html + rm -r "${ED}"/usr/share/doc/blender || die + + python_optimize "${ED}/usr/share/blender/${BV}/scripts" + + mv "${ED}/usr/bin/blender-thumbnailer" "${ED}/usr/bin/blender-${BV}-thumbnailer" || die + mv "${ED}/usr/bin/blender" "${ED}/usr/bin/blender-${BV}" || die +} + +pkg_postinst() { + elog + elog "Blender uses python integration. As such, may have some" + elog "inherent risks with running unknown python scripts." + elog + elog "It is recommended to change your blender temp directory" + elog "from /tmp to /home/user/tmp or another tmp file under your" + elog "home directory. This can be done by starting blender, then" + elog "changing the 'Temporary Files' directory in Blender preferences." + elog + + if use osl; then + ewarn "" + ewarn "OSL is know to cause runtime segfaults if Mesa has been linked to" + ewarn "an other LLVM version than what OSL is linked to." + ewarn "See https://bugs.gentoo.org/880671 for more details" + ewarn "" + fi + + if ! use python_single_target_python3_10; then + elog "You are building Blender with a newer python version than" + elog "supported by this version upstream." + elog "If you experience breakages with e.g. plugins, please switch to" + elog "python_single_target_python3_10 instead." + elog "Bug: https://bugs.gentoo.org/737388" + elog + fi + + xdg_icon_cache_update + xdg_mimeinfo_database_update + xdg_desktop_database_update +} + +pkg_postrm() { + xdg_icon_cache_update + xdg_mimeinfo_database_update + xdg_desktop_database_update + + ewarn "" + ewarn "You may want to remove the following directory." + ewarn "~/.config/${PN}/${SLOT}/cache/" + ewarn "It may contain extra render kernels not tracked by portage" + ewarn "" +} diff --git a/media-gfx/blender/blender-4.0.2-r1.ebuild b/media-gfx/blender/blender-4.0.2-r1.ebuild index 79149721f474..ae693845b6b7 100644 --- a/media-gfx/blender/blender-4.0.2-r1.ebuild +++ b/media-gfx/blender/blender-4.0.2-r1.ebuild @@ -83,7 +83,7 @@ RDEPEND="${PYTHON_DEPS} embree? ( media-libs/embree:=[raymask] ) ffmpeg? ( media-video/ffmpeg:=[x264,mp3,encode,theora,jpeg2k?,vpx,vorbis,opus,xvid] ) fftw? ( sci-libs/fftw:3.0= ) - gmp? ( dev-libs/gmp ) + gmp? ( dev-libs/gmp[cxx] ) gnome? ( gui-libs/libdecor ) hip? ( >=dev-util/hip-5.7:= ) jack? ( virtual/jack ) diff --git a/media-gfx/blender/blender-4.1.1-r2.ebuild b/media-gfx/blender/blender-4.1.1-r2.ebuild index 3de02e47f35d..949e78360f96 100644 --- a/media-gfx/blender/blender-4.1.1-r2.ebuild +++ b/media-gfx/blender/blender-4.1.1-r2.ebuild @@ -83,7 +83,7 @@ RDEPEND="${PYTHON_DEPS} embree? ( media-libs/embree:=[raymask] ) ffmpeg? ( media-video/ffmpeg:=[x264,mp3,encode,theora,jpeg2k?,vpx,vorbis,opus,xvid] ) fftw? ( sci-libs/fftw:3.0= ) - gmp? ( dev-libs/gmp ) + gmp? ( dev-libs/gmp[cxx] ) gnome? ( gui-libs/libdecor ) hip? ( llvm_slot_17? ( diff --git a/media-gfx/blender/blender-4.2.1.ebuild b/media-gfx/blender/blender-4.2.1.ebuild new file mode 100644 index 000000000000..59269e65e9da --- /dev/null +++ b/media-gfx/blender/blender-4.2.1.ebuild @@ -0,0 +1,593 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{11..12} ) +# matches media-libs/osl +LLVM_COMPAT=( {15..18} ) + +inherit check-reqs cmake cuda flag-o-matic llvm-r1 pax-utils python-single-r1 toolchain-funcs xdg-utils + +DESCRIPTION="3D Creation/Animation/Publishing System" +HOMEPAGE="https://www.blender.org" + +if [[ ${PV} = *9999* ]] ; then + EGIT_LFS="yes" + inherit git-r3 + EGIT_REPO_URI="https://projects.blender.org/blender/blender.git" + EGIT_SUBMODULES=( '*' '-lib/*' ) + RESTRICT="!test? ( test )" +else + SRC_URI=" + https://download.blender.org/source/${P}.tar.xz + " + # test? ( + # https://projects.blender.org/blender/blender-test-data/archive/blender-v$(ver_cut 1-2)-release.tar.gz + # ) + # " + KEYWORDS="~amd64 ~arm ~arm64" + RESTRICT="test" # the test archive returns LFS references. +fi + +LICENSE="GPL-3+ cycles? ( Apache-2.0 )" +SLOT="${PV%.*}" +IUSE=" + alembic +bullet collada +color-management cuda +cycles +cycles-bin-kernels + debug doc +embree experimental +ffmpeg +fftw +fluid +gmp gnome hip jack + jemalloc jpeg2k man +nanovdb ndof nls +oidn oneapi openal +openexr +openmp +openpgl + +opensubdiv +openvdb optix osl +otf +pdf +potrace +pugixml pulseaudio + renderdoc sdl +sndfile +tbb test +tiff valgrind vulkan wayland +webp X +" + +REQUIRED_USE="${PYTHON_REQUIRED_USE} + alembic? ( openexr ) + cuda? ( cycles ) + cycles? ( openexr tiff tbb ) + fluid? ( tbb ) + gnome? ( wayland ) + hip? ( cycles ) + nanovdb? ( openvdb ) + openvdb? ( tbb openexr ) + optix? ( cuda ) + osl? ( cycles pugixml ) + test? ( color-management )" + +# Library versions for official builds can be found in the blender source directory in: +# build_files/build_environment/cmake/versions.cmake +RDEPEND="${PYTHON_DEPS} + app-arch/zstd + dev-libs/boost:=[nls?] + dev-libs/lzo:2= + $(python_gen_cond_dep ' + dev-python/cython[${PYTHON_USEDEP}] + dev-python/numpy[${PYTHON_USEDEP}] + dev-python/zstandard[${PYTHON_USEDEP}] + dev-python/requests[${PYTHON_USEDEP}] + ') + media-libs/freetype:=[brotli] + media-libs/libepoxy:= + media-libs/libjpeg-turbo:= + media-libs/libpng:= + media-libs/libsamplerate + >=media-libs/openimageio-2.5.6.0:= + sys-libs/zlib:= + virtual/glu + virtual/libintl + virtual/opengl + alembic? ( >=media-gfx/alembic-1.8.3-r2[boost(+),hdf(+)] ) + collada? ( >=media-libs/opencollada-1.6.68 ) + color-management? ( media-libs/opencolorio:= ) + cuda? ( dev-util/nvidia-cuda-toolkit:= ) + embree? ( media-libs/embree:=[raymask] ) + ffmpeg? ( media-video/ffmpeg:=[x264,mp3,encode,theora,jpeg2k?,vpx,vorbis,opus,xvid] ) + fftw? ( sci-libs/fftw:3.0= ) + gmp? ( dev-libs/gmp[cxx] ) + gnome? ( gui-libs/libdecor ) + hip? ( + llvm_slot_17? ( + dev-util/hip:0/5.7 + ) + llvm_slot_18? ( + >=dev-util/hip-6.1:=[llvm_slot_18(-)] + ) + ) + jack? ( virtual/jack ) + jemalloc? ( dev-libs/jemalloc:= ) + jpeg2k? ( media-libs/openjpeg:2= ) + ndof? ( + app-misc/spacenavd + dev-libs/libspnav + ) + nls? ( virtual/libiconv ) + openal? ( media-libs/openal ) + oidn? ( >=media-libs/oidn-2.1.0 ) + oneapi? ( dev-libs/intel-compute-runtime[l0] ) + openexr? ( + >=dev-libs/imath-3.1.7:= + >=media-libs/openexr-3.2.1:0= + ) + openpgl? ( media-libs/openpgl:= ) + opensubdiv? ( >=media-libs/opensubdiv-3.5.0 ) + openvdb? ( + >=media-gfx/openvdb-11.0.0:=[nanovdb?] + dev-libs/c-blosc:= + ) + optix? ( dev-libs/optix ) + osl? ( + >=media-libs/osl-1.13:=[${LLVM_USEDEP}] + media-libs/mesa[${LLVM_USEDEP}] + ) + pdf? ( media-libs/libharu ) + potrace? ( media-gfx/potrace ) + pugixml? ( dev-libs/pugixml ) + pulseaudio? ( media-libs/libpulse ) + sdl? ( media-libs/libsdl2[sound,joystick] ) + sndfile? ( media-libs/libsndfile ) + tbb? ( dev-cpp/tbb:= ) + tiff? ( media-libs/tiff:= ) + valgrind? ( dev-debug/valgrind ) + wayland? ( + >=dev-libs/wayland-1.12 + >=dev-libs/wayland-protocols-1.15 + >=x11-libs/libxkbcommon-0.2.0 + dev-util/wayland-scanner + media-libs/mesa[wayland] + sys-apps/dbus + ) + vulkan? ( + media-libs/shaderc + dev-util/spirv-tools + dev-util/glslang + media-libs/vulkan-loader + ) + otf? ( + media-libs/harfbuzz + ) + renderdoc? ( + media-gfx/renderdoc + ) + X? ( + x11-libs/libX11 + x11-libs/libXi + x11-libs/libXxf86vm + ) +" + +DEPEND="${RDEPEND} + dev-cpp/eigen:= + vulkan? ( + dev-util/spirv-headers + dev-util/vulkan-headers + ) +" + +BDEPEND=" + virtual/pkgconfig + doc? ( + app-text/doxygen[dot] + dev-python/sphinx[latex] + dev-texlive/texlive-bibtexextra + dev-texlive/texlive-fontsextra + dev-texlive/texlive-fontutils + dev-texlive/texlive-latex + dev-texlive/texlive-latexextra + ) + nls? ( sys-devel/gettext ) + wayland? ( + dev-util/wayland-scanner + ) + X? ( + x11-base/xorg-proto + ) +" + +PATCHES=( + "${FILESDIR}/${PN}-4.0.2-FindClang.patch" + "${FILESDIR}/${PN}-4.0.2-CUDA_NVCC_FLAGS.patch" +) + +blender_check_requirements() { + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp + + if use doc; then + CHECKREQS_DISK_BUILD="4G" check-reqs_pkg_pretend + fi +} + +blender_get_version() { + # Get blender version from blender itself. + BV=$(grep "BLENDER_VERSION " source/blender/blenkernel/BKE_blender_version.h | cut -d " " -f 3; assert) + if ((${BV:0:1} < 3)) ; then + # Add period (290 -> 2.90). + BV=${BV:0:1}.${BV:1} + else + # Add period and skip the middle number (301 -> 3.1) + BV=${BV:0:1}.${BV:2} + fi +} + +pkg_pretend() { + blender_check_requirements + + if use oneapi; then + einfo "The Intel oneAPI support is rudimentary." + einfo "" + einfo "Please report any bugs you find to https://bugs.gentoo.org/" + fi +} + +pkg_setup() { + if use osl; then + llvm-r1_pkg_setup + fi + + blender_check_requirements + python-single-r1_pkg_setup +} + +src_unpack() { + if [[ ${PV} = *9999* ]] ; then + if ! use test; then + EGIT_SUBMODULES+=( '-tests/*' ) + fi + git-r3_src_unpack + else + default + + if use test; then + mkdir -p "${S}/tests/data/" || die + mv blender-test-data/* "${S}/tests/data/" || die + fi + fi +} + +src_prepare() { + use cuda && cuda_src_prepare + + cmake_src_prepare + + blender_get_version + + # Disable MS Windows help generation. The variable doesn't do what it + # it sounds like. + sed -e "s|GENERATE_HTMLHELP = YES|GENERATE_HTMLHELP = NO|" \ + -i doc/doxygen/Doxyfile || die + + # Prepare icons and .desktop files for slotting. + sed \ + -e "s|blender.svg|blender-${BV}.svg|" \ + -e "s|blender-symbolic.svg|blender-${BV}-symbolic.svg|" \ + -e "s|blender.desktop|blender-${BV}.desktop|" \ + -e "s|org.blender.Blender.metainfo.xml|blender-${BV}.metainfo.xml|" \ + -i source/creator/CMakeLists.txt || die + + sed \ + -e "s|Name=Blender|Name=Blender ${BV}|" \ + -e "s|Exec=blender|Exec=blender-${BV}|" \ + -e "s|Icon=blender|Icon=blender-${BV}|" \ + -i release/freedesktop/blender.desktop || die + + sed -e "s|\${CMAKE_INSTALL_PREFIX}/\${BLENDER_BIN}|${T}/usr/\${BLENDER_BIN}|g" -i source/creator/CMakeLists.txt || die + + mv \ + release/freedesktop/icons/scalable/apps/blender.svg \ + "release/freedesktop/icons/scalable/apps/blender-${BV}.svg" || die + mv \ + release/freedesktop/icons/symbolic/apps/blender-symbolic.svg \ + "release/freedesktop/icons/symbolic/apps/blender-${BV}-symbolic.svg" || die + mv release/freedesktop/blender.desktop "release/freedesktop/blender-${BV}.desktop" || die + mv release/freedesktop/org.blender.Blender.metainfo.xml "release/freedesktop/blender-${BV}.metainfo.xml" + mv release/freedesktop/org.blender.Blender.appdata.xml "release/freedesktop/blender-${BV}.appdata.xml" + + if use test; then + # Without this the tests will try to use /usr/bin/blender and /usr/share/blender/ to run the tests. + sed -e "s|set(TEST_INSTALL_DIR.*|set(TEST_INSTALL_DIR ${T}/usr)|g" -i tests/CMakeLists.txt || die + sed -e "s|string(REPLACE.*|set(TEST_INSTALL_DIR ${T}/usr)|g" -i build_files/cmake/testing.cmake || die + fi + + if use vulkan; then + sed -e "s/extern_vulkan_memory_allocator/extern_vulkan_memory_allocator\nSPIRV-Tools-opt\nSPIRV-Tools\nSPIRV-Tools-link\nglslang\nSPIRV\nSPVRemapper/" -i source/blender/gpu/CMakeLists.txt || die + fi +} + +src_configure() { + # -Werror=odr, -Werror=lto-type-mismatch + # https://bugs.gentoo.org/859607 + # https://projects.blender.org/blender/blender/issues/120444 + filter-lto + + # Workaround for bug #922600 + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) + + append-lfs-flags + blender_get_version + + local mycmakeargs=( + -DWITH_LIBS_PRECOMPILED=no + -DBUILD_SHARED_LIBS=no + -DPYTHON_INCLUDE_DIR="$(python_get_includedir)" + -DPYTHON_LIBRARY="$(python_get_library_path)" + -DPYTHON_VERSION="${EPYTHON/python/}" + -DWITH_ALEMBIC=$(usex alembic) + -DWITH_BOOST=yes + -DWITH_BULLET=$(usex bullet) + -DWITH_CODEC_FFMPEG=$(usex ffmpeg) + -DWITH_CODEC_SNDFILE=$(usex sndfile) + -DWITH_CPU_CHECK=no + + -DWITH_CYCLES=$(usex cycles) + + -DWITH_CYCLES_DEVICE_CUDA=$(usex cuda) + -DWITH_CYCLES_CUDA_BINARIES="$(usex cuda $(usex cycles-bin-kernels))" + -DWITH_CYCLES_DEVICE_OPTIX=$(usex optix) + + -DWITH_CYCLES_DEVICE_HIP="$(usex hip)" + -DWITH_CYCLES_HIP_BINARIES=$(usex hip $(usex cycles-bin-kernels)) + + -DWITH_CYCLES_DEVICE_ONEAPI="$(usex oneapi)" + -DWITH_CYCLES_ONEAPI_BINARIES="$(usex oneapi $(usex cycles-bin-kernels))" + + -DWITH_CYCLES_HYDRA_RENDER_DELEGATE="no" # TODO: package Hydra + -DWITH_CYCLES_EMBREE="$(usex embree)" + -DWITH_CYCLES_OSL=$(usex osl) + -DWITH_CYCLES_PATH_GUIDING=$(usex openpgl) + -DWITH_CYCLES_STANDALONE=no + -DWITH_CYCLES_STANDALONE_GUI=no + + -DWITH_DOC_MANPAGE=$(usex man) + -DWITH_DRACO="no" # TODO: Package Draco + -DWITH_EXPERIMENTAL_FEATURES="$(usex experimental)" + -DWITH_FFTW3=$(usex fftw) + -DWITH_GHOST_WAYLAND=$(usex wayland) + -DWITH_GHOST_WAYLAND_APP_ID="blender-${BV}" + -DWITH_GHOST_WAYLAND_DYNLOAD="no" + -DWITH_GHOST_WAYLAND_LIBDECOR="$(usex gnome)" + -DWITH_GHOST_X11=$(usex X) + -DWITH_GMP=$(usex gmp) + -DWITH_GTESTS=$(usex test) + -DWITH_HARFBUZZ="$(usex otf)" + -DWITH_HARU=$(usex pdf) + -DWITH_HEADLESS=$($(use X || use wayland) && echo OFF || echo ON) + -DWITH_HYDRA="no" # TODO: Package Hydra + -DWITH_IMAGE_OPENEXR=$(usex openexr) + -DWITH_IMAGE_OPENJPEG=$(usex jpeg2k) + -DWITH_IMAGE_WEBP=$(usex webp) + -DWITH_INPUT_NDOF=$(usex ndof) + -DWITH_INSTALL_PORTABLE="no" + -DWITH_INTERNATIONAL=$(usex nls) + -DWITH_JACK=$(usex jack) + -DWITH_MATERIALX="no" # TODO: Package MaterialX + -DWITH_MEM_JEMALLOC=$(usex jemalloc) + -DWITH_MEM_VALGRIND=$(usex valgrind) + -DWITH_MOD_FLUID=$(usex fluid) + -DWITH_MOD_OCEANSIM=$(usex fftw) + -DWITH_NANOVDB=$(usex nanovdb) + -DWITH_OPENAL=$(usex openal) + -DWITH_OPENCOLLADA=$(usex collada) + -DWITH_OPENCOLORIO=$(usex color-management) + -DWITH_OPENIMAGEDENOISE=$(usex oidn) + -DWITH_OPENMP=$(usex openmp) + -DWITH_OPENSUBDIV=$(usex opensubdiv) + -DWITH_OPENVDB=$(usex openvdb) + -DWITH_OPENVDB_BLOSC=$(usex openvdb) + -DWITH_POTRACE=$(usex potrace) + -DWITH_PUGIXML=$(usex pugixml) + -DWITH_PULSEAUDIO=$(usex pulseaudio) + -DWITH_PYTHON_INSTALL=no + -DWITH_PYTHON_INSTALL_NUMPY=no + -DWITH_PYTHON_INSTALL_ZSTANDARD=no + -DWITH_RENDERDOC="$(usex renderdoc)" + -DWITH_SDL=$(usex sdl) + -DWITH_STATIC_LIBS=no + -DWITH_STRICT_BUILD_OPTIONS=yes + -DWITH_SYSTEM_EIGEN3=yes + -DWITH_SYSTEM_FREETYPE=yes + -DWITH_SYSTEM_LZO=yes + -DWITH_TBB=$(usex tbb) + -DWITH_USD="no" # TODO: Package USD + -DWITH_VULKAN_BACKEND="$(usex vulkan)" + -DWITH_XR_OPENXR=no + ) + + # requires dev-vcs/git + if [[ ${PV} = *9999* ]] ; then + mycmakeargs+=( -DWITH_BUILDINFO="yes" ) + else + mycmakeargs+=( -DWITH_BUILDINFO="no" ) + fi + + if use cuda; then + mycmakeargs+=( + -DCUDA_NVCC_FLAGS="--compiler-bindir;$(cuda_gccdir)" + ) + fi + + if use hip; then + mycmakeargs+=( + -DROCM_PATH="$(hipconfig -R)" + -DHIP_HIPCC_FLAGS="-fcf-protection=none" + ) + fi + + if use optix; then + mycmakeargs+=( + -DCYCLES_RUNTIME_OPTIX_ROOT_DIR="${EPREFIX}"/opt/optix + -DOPTIX_ROOT_DIR="${EPREFIX}"/opt/optix + ) + fi + + # This is currently needed on arm64 to get the NEON SIMD wrapper to compile the code successfully + use arm64 && append-flags -flax-vector-conversions + + append-cflags "$(usex debug '-DDEBUG' '-DNDEBUG')" + append-cppflags "$(usex debug '-DDEBUG' '-DNDEBUG')" + + if tc-is-gcc ; then + # These options only exist when GCC is detected. + # We disable these to respect the user's choice of linker. + mycmakeargs+=( + -DWITH_LINKER_GOLD=no + -DWITH_LINKER_LLD=no + ) + # Ease compiling with required gcc similar to cuda_sanitize but for cmake + use cuda && use cycles-bin-kernels && mycmakeargs+=( -DCUDA_HOST_COMPILER="$(cuda_gccdir)" ) + fi + + if tc-is-clang || use osl; then + mycmakeargs+=( + -DWITH_CLANG=yes + -DWITH_LLVM=yes + ) + fi + + if use test ; then + local CYCLES_TEST_DEVICES=( "CPU" ) + if use cycles-bin-kernels; then + use cuda && CYCLES_TEST_DEVICES+=( "CUDA" ) + use optix && CYCLES_TEST_DEVICES+=( "OPTIX" ) + use hip && CYCLES_TEST_DEVICES+=( "HIP" ) + fi + mycmakeargs+=( + -DCYCLES_TEST_DEVICES:STRING="$(local IFS=";"; echo "${CYCLES_TEST_DEVICES[*]}")" + -DWITH_COMPOSITOR_REALTIME_TESTS=yes + -DWITH_GPU_DRAW_TESTS=yes + -DWITH_GPU_RENDER_TESTS=yes + ) + fi + + cmake_src_configure +} + +src_test() { + # A lot of tests needs to have access to the installed data files. + # So install them into the image directory now. + DESTDIR="${T}" cmake_build install + + blender_get_version + # Define custom blender data/script file paths not be able to find them otherwise during testing. + # (Because the data is in the image directory and it will default to look in /usr/share) + export BLENDER_SYSTEM_SCRIPTS="${T}/usr/share/blender/${BV}/scripts" + export BLENDER_SYSTEM_DATAFILES="${T}/usr/share/blender/${BV}/datafiles" + + # Sanity check that the script and datafile path is valid. + # If they are not vaild, blender will fallback to the default path which is not what we want. + [ -d "$BLENDER_SYSTEM_SCRIPTS" ] || die "The custom script path is invalid, fix the ebuild!" + [ -d "$BLENDER_SYSTEM_DATAFILES" ] || die "The custom datafiles path is invalid, fix the ebuild!" + + if use cuda; then + cuda_add_sandbox -w + addwrite "/dev/dri/renderD128" + addwrite "/dev/char/" + fi + + if use X; then + xdg_environment_reset + fi + + addwrite /dev/dri + + cmake_src_test + + # Clean up the image directory for src_install + rm -fr "${T}/usr" || die +} + +src_install() { + blender_get_version + + # Pax mark blender for hardened support. + pax-mark m "${BUILD_DIR}"/bin/blender + + cmake_src_install + + if use man; then + # Slot the man page + mv "${ED}/usr/share/man/man1/blender.1" "${ED}/usr/share/man/man1/blender-${BV}.1" || die + fi + + if use doc; then + # Define custom blender data/script file paths. Otherwise Blender will not be able to find them during doc building. + # (Because the data is in the image directory and it will default to look in /usr/share) + export BLENDER_SYSTEM_SCRIPTS=${ED}/usr/share/blender/${BV}/scripts + export BLENDER_SYSTEM_DATAFILES=${ED}/usr/share/blender/${BV}/datafiles + + # Workaround for binary drivers. + addpredict /dev/ati + addpredict /dev/dri + addpredict /dev/nvidiactl + + einfo "Generating Blender C/C++ API docs ..." + cd "${CMAKE_USE_DIR}"/doc/doxygen || die + doxygen -u Doxyfile || die + doxygen || die "doxygen failed to build API docs." + + cd "${CMAKE_USE_DIR}" || die + einfo "Generating (BPY) Blender Python API docs ..." + "${BUILD_DIR}"/bin/blender --background --python doc/python_api/sphinx_doc_gen.py -noaudio || die "sphinx failed." + + cd "${CMAKE_USE_DIR}"/doc/python_api || die + sphinx-build sphinx-in BPY_API || die "sphinx failed." + + docinto "html/API/python" + dodoc -r "${CMAKE_USE_DIR}"/doc/python_api/BPY_API/. + + docinto "html/API/blender" + dodoc -r "${CMAKE_USE_DIR}"/doc/doxygen/html/. + fi + + # Fix doc installdir + docinto html + dodoc "${CMAKE_USE_DIR}"/release/text/readme.html + rm -r "${ED}"/usr/share/doc/blender || die + + python_optimize "${ED}/usr/share/blender/${BV}/scripts" + + mv "${ED}/usr/bin/blender-thumbnailer" "${ED}/usr/bin/blender-${BV}-thumbnailer" || die + mv "${ED}/usr/bin/blender" "${ED}/usr/bin/blender-${BV}" || die +} + +pkg_postinst() { + elog + elog "Blender uses python integration. As such, may have some" + elog "inherent risks with running unknown python scripts." + elog + elog "It is recommended to change your blender temp directory" + elog "from /tmp to /home/user/tmp or another tmp file under your" + elog "home directory. This can be done by starting blender, then" + elog "changing the 'Temporary Files' directory in Blender preferences." + elog + + if use osl; then + ewarn "" + ewarn "OSL is know to cause runtime segfaults if Mesa has been linked to" + ewarn "an other LLVM version than what OSL is linked to." + ewarn "See https://bugs.gentoo.org/880671 for more details" + ewarn "" + fi + + if ! use python_single_target_python3_11; then + elog "You are building Blender with a newer python version than" + elog "supported by this version upstream." + elog "If you experience breakages with e.g. plugins, please switch to" + elog "python_single_target_python3_11 instead." + elog "Bug: https://bugs.gentoo.org/737388" + elog + fi + + xdg_icon_cache_update + xdg_mimeinfo_database_update + xdg_desktop_database_update +} + +pkg_postrm() { + xdg_icon_cache_update + xdg_mimeinfo_database_update + xdg_desktop_database_update + + ewarn "" + ewarn "You may want to remove the following directory." + ewarn "~/.config/${PN}/${BV}/cache/" + ewarn "It may contain extra render kernels not tracked by portage" + ewarn "" +} diff --git a/media-gfx/blender/blender-9999.ebuild b/media-gfx/blender/blender-9999.ebuild index 77eb9876c615..59269e65e9da 100644 --- a/media-gfx/blender/blender-9999.ebuild +++ b/media-gfx/blender/blender-9999.ebuild @@ -17,7 +17,6 @@ if [[ ${PV} = *9999* ]] ; then inherit git-r3 EGIT_REPO_URI="https://projects.blender.org/blender/blender.git" EGIT_SUBMODULES=( '*' '-lib/*' ) - ADDONS_EGIT_REPO_URI="https://projects.blender.org/blender/blender-addons.git" RESTRICT="!test? ( test )" else SRC_URI=" @@ -36,7 +35,7 @@ SLOT="${PV%.*}" IUSE=" alembic +bullet collada +color-management cuda +cycles +cycles-bin-kernels debug doc +embree experimental +ffmpeg +fftw +fluid +gmp gnome hip jack - jemalloc jpeg2k man +nanovdb ndof nls +oidn oneapi openal +openexr +openmp openpgl + jemalloc jpeg2k man +nanovdb ndof nls +oidn oneapi openal +openexr +openmp +openpgl +opensubdiv +openvdb optix osl +otf +pdf +potrace +pugixml pulseaudio renderdoc sdl +sndfile +tbb test +tiff valgrind vulkan wayland +webp X " @@ -83,7 +82,7 @@ RDEPEND="${PYTHON_DEPS} embree? ( media-libs/embree:=[raymask] ) ffmpeg? ( media-video/ffmpeg:=[x264,mp3,encode,theora,jpeg2k?,vpx,vorbis,opus,xvid] ) fftw? ( sci-libs/fftw:3.0= ) - gmp? ( dev-libs/gmp ) + gmp? ( dev-libs/gmp[cxx] ) gnome? ( gui-libs/libdecor ) hip? ( llvm_slot_17? ( @@ -233,9 +232,6 @@ src_unpack() { EGIT_SUBMODULES+=( '-tests/*' ) fi git-r3_src_unpack - - git-r3_fetch "${ADDONS_EGIT_REPO_URI}" - git-r3_checkout "${ADDONS_EGIT_REPO_URI}" "${S}/scripts/addons" else default @@ -318,6 +314,7 @@ src_configure() { -DWITH_BULLET=$(usex bullet) -DWITH_CODEC_FFMPEG=$(usex ffmpeg) -DWITH_CODEC_SNDFILE=$(usex sndfile) + -DWITH_CPU_CHECK=no -DWITH_CYCLES=$(usex cycles) @@ -488,6 +485,8 @@ src_test() { xdg_environment_reset fi + addwrite /dev/dri + cmake_src_test # Clean up the image directory for src_install diff --git a/media-gfx/libbgcode/Manifest b/media-gfx/libbgcode/Manifest index 765e06b0aa50..cfad3e9ac0cf 100644 --- a/media-gfx/libbgcode/Manifest +++ b/media-gfx/libbgcode/Manifest @@ -1,3 +1,5 @@ DIST libbgcode-0.0.20240730.tar.gz 456671 BLAKE2B a15e903e42090eff3945f446f7d805ceabad533a2edcc9e4c82d99bac7aa42e9f10470f5ee41ed449799d9bc318c9097439a6534607a00d0bfeb2e2dea252b79 SHA512 b448d9ace946d85a4decc4a2cc05e1a41c64ba49968db1f818ba5974120f458159d5b639d5501a98daf4544a483366cd0e299c052f21577bb5ad763f7220d7e3 +DIST libbgcode-0.0.20240903.tar.gz 456751 BLAKE2B 93cd8eb83083581ba1ba735c6820dc0ead18d13ca0613387559d610f39c8011881bcc92ffec65fbcb40113b2b877050c15c7816d6db063698ce7ba5df7b35eda SHA512 86e9d85f0e52ebde853979e79639dc4424e26686fe55c45d78ca683cf32d8ec059976d43ffda9339a41892d30ebb267f8c360851889ad0a48ced874c27546f04 EBUILD libbgcode-0.0.20240730.ebuild 769 BLAKE2B 59f6ad1854677761895653c2810d91560b0e82bd0ac423ec0f259c3dedea26d70ffb9163aa4a6bf107156716df813a4424397e49c99e5e464a430fcdfc9359de SHA512 d4e8eb634555dbd094da4b3992e10b3047e8c3d57026deb57933a9e85b2a31d43ded717d845f9a402a64c4d7b6f79efae9ebe16e70cbfce2b06a0747b3fda0ca +EBUILD libbgcode-0.0.20240903.ebuild 770 BLAKE2B 22c01f20d4350d8328ac9dc60a47c8167386ef6fe27e887124672b38b955e949f0cba1a225242dca2e8e9adea1dc96d7b2f84d7bc12ec9139d4b8c31682fa116 SHA512 aeef6a4f591f5a5490e65347ec5f8a570fc4476efced843f864f29e2127205980e2376169d1a14326f11d0d6335e213de9fd4f7510f60b4b143ea540b9fbdb90 MISC metadata.xml 517 BLAKE2B f13be19479e8ade30b867081f8014821be2c5650b407890268e6cab65330bd4b8e3ab37e6cba531f029ebb0499d0cb7269ccb17b309b15105f6bb6aa94b5c42e SHA512 0d09893294fc40e9b52bbdf7f8f31e075c1e8839fd90c2b9656b70d30ab52f088527ab2d1ffec797ecb1e309ea7d40bb48d571eafd19eb3a2592aef4e7c918c0 diff --git a/media-gfx/libbgcode/libbgcode-0.0.20240903.ebuild b/media-gfx/libbgcode/libbgcode-0.0.20240903.ebuild new file mode 100644 index 000000000000..938eb7efa59a --- /dev/null +++ b/media-gfx/libbgcode/libbgcode-0.0.20240903.ebuild @@ -0,0 +1,35 @@ +# Copyright 2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +LIBBGCODE_COMMIT=3db61e45713932b4a9cdd469aa567d65e0095d00 + +DESCRIPTION="Prusa Block & Binary G-code reader / writer / converter" +HOMEPAGE="https://github.com/prusa3d/libbgcode" +SRC_URI="https://github.com/prusa3d/libbgcode/archive/${LIBBGCODE_COMMIT}.tar.gz -> ${P}.tar.gz" + +S="${WORKDIR}/${PN}-${LIBBGCODE_COMMIT}" +LICENSE="AGPL-3" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~x86" +IUSE="test" +RESTRICT="!test? ( test )" + +RDEPEND=" + >=dev-libs/heatshrink-0.4.1 + >=sys-libs/zlib-1.0 +" +DEPEND="${RDEPEND} + dev-libs/boost + test? ( =dev-cpp/catch-2*:0 ) +" + +src_configure() { + local mycmakeargs=( + -DLibBGCode_BUILD_TESTS=$(usex test) + ) + cmake_src_configure +} diff --git a/media-gfx/xv/Manifest b/media-gfx/xv/Manifest index 93219a337bc4..1b90737a9f69 100644 --- a/media-gfx/xv/Manifest +++ b/media-gfx/xv/Manifest @@ -11,7 +11,9 @@ DIST xv-3.10a.png.bz2 3082 BLAKE2B 05f56053fc0a77bba155db306ae181f5404bced3b2c22 DIST xv-3.10a.tar.gz 2259124 BLAKE2B 42cea578a879c819be8f42ffb1d247643904d8b462a4d6faa208185e49566798605c89006cbc190725fa6356b87da3375cf04d2ba86b559419cf8f7471c867e5 SHA512 5b8c5890503e2796638921cabae8967e458c73e332acea8561b1025ed13c771bc44c0e309b4592852e33726eeaa9784f933d1312073b0ba2e0b8c0cedabcaa3f DIST xv-5.2.0.tar.gz 4785784 BLAKE2B 46dc637cbbeabfe1c034c34e73040de6efebbf5f423fe429028ebfeefd2fce5af0fdaff1c52db4807b8eb88de89dae6b7f0e2c8a3522a3d9b103d5777783a52d SHA512 0af7ff6db152be849c27be9fba116513595deeca9e3eb42ec6fd74a4756d0c525b55a40de49aa37dd5d2ea4a29e6d644c8c4c709f0e1ec0a98cbc0ae7221b110 DIST xv-6.0.0.tar.gz 5051786 BLAKE2B 42c6e06848c5cc7a3f7da1d5c5b10a7d665601f41eb79bda4b3e904c103e88592da416559adc9565c820c6402c9b03271521f515b8f7c873cc959dfd3b5652e8 SHA512 600fde882e1279b5c7147089790006bcbd4e31ba6220309a272aca43242c56062d4c85b181fb1f2d4b0497f1546347206d7827204c2ebbbabaaf3de40c50191a +DIST xv-6.0.1.tar.gz 5051856 BLAKE2B 7b7a76e211175776862312b48b1f5f91d1a901fffba2225390715c9e392a380add42eaee0429e0598dce677bbb4311e9bc1a506105b9a63595ab70e6253e6ae7 SHA512 7098a2600dc21f94ef1db3e1b23e79b0cdc989b93d792f891d7a29811037636a5887df88f1ad6df27b12be4b4b348f0cca34fe2ad0a58ed9b1228683f6b0b910 EBUILD xv-3.10a-r22.ebuild 2682 BLAKE2B 108e6f933866f1b663086d58b9418d5acd1d4f07fa332359325e8bb1e2e08009549f608f1d5f3d7ddbdff634dccbda9c78edf5e2abf7757f3ab29ccacb37b4d1 SHA512 3103387c8b54716418435c1f037138995df5761220b009b31583c9537395a53de0ff9684e2f488d7d047b449e76745989951dab662cfe892541aea56e130c100 EBUILD xv-5.2.0.ebuild 1359 BLAKE2B ce8ef5bc29eb554de83dc43061810347af9477bc7bbe7c7789d12f344deaaa9e9658273cc0e6e6f098b22dbea2c28d6d45993ea41097f2a4d63b00e3647f9724 SHA512 16873c37bfdd2b656ac0482681016eb917a405a4cae2eeb6669ae650c233072c19f28d3f42b33f7e69849252015edd91fbcc973bd52e4716dce7411d5d906a6c EBUILD xv-6.0.0.ebuild 1465 BLAKE2B 30fcbd9c7fbcaecdf32b543b20117039b3ace64164bcda5f447f52cc15e6fd94f1a6db3e0ebfb44d38f4380c22efb06f068940db378add096274e66eec15861e SHA512 430191195ef448e2067f1ab7781dfa5f4b877b69a773ee8deec0ea5e486ac605d49dda27e7889961aeeb2bd19830c1c07b9faf2188bf080a780f95e2093910fb +EBUILD xv-6.0.1.ebuild 1465 BLAKE2B 30fcbd9c7fbcaecdf32b543b20117039b3ace64164bcda5f447f52cc15e6fd94f1a6db3e0ebfb44d38f4380c22efb06f068940db378add096274e66eec15861e SHA512 430191195ef448e2067f1ab7781dfa5f4b877b69a773ee8deec0ea5e486ac605d49dda27e7889961aeeb2bd19830c1c07b9faf2188bf080a780f95e2093910fb MISC metadata.xml 392 BLAKE2B e1e306f8f6bd480912d6e45b5af362d54900117ae05a21995023e6611c1410af6682af867150179ecebd9d319a9f9810723dffec59a26e3f9f9ecc0a56061127 SHA512 e8aad6d1b24943fc3aeb6533fb0dc048ea0d3edc04abe2efa9a27930698ff3ddb0185dc3a2da69e08c050c4545d907c8580add6732fd8e3258ed496784902364 diff --git a/media-gfx/xv/xv-6.0.1.ebuild b/media-gfx/xv/xv-6.0.1.ebuild new file mode 100644 index 000000000000..2983ac332da6 --- /dev/null +++ b/media-gfx/xv/xv-6.0.1.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake desktop flag-o-matic xdg-utils + +JUMBOV=20070520 +DESCRIPTION="Interactive image manipulation program supporting a wide variety of formats" +HOMEPAGE="https://github.com/jasper-software/xv/" +SRC_URI="https://github.com/jasper-software/xv/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz + mirror://gentoo/xv-3.10a.png.bz2" + +LICENSE="xv" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos" +IUSE="jpeg tiff png webp" + +DEPEND=" + x11-libs/libXt + jpeg? ( media-libs/libjpeg-turbo:= ) + tiff? ( media-libs/tiff:= ) + png? ( + >=media-libs/libpng-1.2:= + sys-libs/zlib + ) + webp? ( media-libs/libwebp:= ) +" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}/xv-5.2.0-osx-bsd.patch" +) + +src_configure() { + # -Werror=lto-type-mismatch + # https://bugs.gentoo.org/859823 + # https://github.com/jasper-software/xv/issues/25 + filter-lto + + local mycmakeargs=( + -DCMAKE_INSTALL_SYSCONFDIR="${EPREFIX}/etc" + -DXV_ENABLE_JPEG=$(usex jpeg) + -DXV_ENABLE_JP2K=OFF + -DXV_ENABLE_PNG=$(usex png) + -DXV_ENABLE_TIFF=$(usex tiff) + -DXV_ENABLE_WEBP=$(usex webp) + ) + + cmake_src_configure +} + +src_install() { + cmake_src_install + + newicon "${WORKDIR}"/xv-3.10a.png ${PN}.png + make_desktop_entry xv "" "" "Graphics;Viewer" +} + +pkg_postinst() { + xdg_desktop_database_update +} + +pkg_postrm() { + xdg_desktop_database_update +} -- cgit v1.2.3