media-gfx/blender-bin: add 5.0.0

Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/44694
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Paul Zander 2025-11-20 17:42:07 +01:00 committed by Sam James
parent ff2f35bee4
commit 93e658fe5b
No known key found for this signature in database
GPG Key ID: 738409F520DF9190
2 changed files with 197 additions and 0 deletions

View File

@ -1,3 +1,4 @@
DIST blender-3.6.23-linux-x64.tar.xz 272819000 BLAKE2B 99cec0fe547b32dbee7c0024474a0a51224f53131b613eebbc4c7b28cf54948fbd742a09e63c37700913a3c764a85cb0d1fd0932faa95e7a61d48dfdf4c5adb1 SHA512 073cf218c74796e22afe0fb4d9d781fa92d42d38f29becde650a87bae625ede0ca77af2d935783e5e44f40802948012589f5ca173e287102a8abb3197817baeb
DIST blender-4.2.16-linux-x64.tar.xz 350677256 BLAKE2B b1c13cbfd441dd11480fb2edbfe4cad11d518148b134aa3112cd6c09c0d5b6711d5e0dd08d1a7966ac2181de131c0061e2ce9622aeba31d23de5348fb6968d85 SHA512 304ae514bd9ffe47b2859513877abd83834f3790caac3b087c12d4381ec0ff7938681cb83f616dfdd3c660c65f5f0fec0759a6dea69d538e2b9a96f4a864919d
DIST blender-4.5.5-linux-x64.tar.xz 377364660 BLAKE2B baa15c9ec4a7cd049f35a3aad93fd7e641b4afdc6a3634039e6ffeb70c0bb150da8a70c4e4cd59d4568af9d040b6277b9673445d17f74757a01de953628988ab SHA512 7ce4a2cc873417b140874381ff7229dab79adab12ea50dc4148ee2b0c2335b6f25af6c1e9f1adff82046bb58e21f3c0eeb69c7993421016b10605029a88309d6
DIST blender-5.0.0-linux-x64.tar.xz 387739652 BLAKE2B 71001e96a2e7a307e794dd90f0dcc0bd54ade5380168e09bd9c3715f3c39442e14dd38c6eb411ff42876ffe60b4b378ea62f4a52c9ab1ab305d76f4282ac1520 SHA512 36f30eff8db3d14b8a0f0143ffde81f70e61c29d761a1694ae0796e6a5a2e972eed585d192a1c565819d308418822886b048c86a540f87f7a3ff26b09d6d1ae3

View File

@ -0,0 +1,196 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit desktop xdg-utils
DESCRIPTION="3D Creation/Animation/Publishing System"
HOMEPAGE="https://www.blender.org"
LICENSE="GPL-3+ Apache-2.0"
SLOT="$(ver_cut 1-2)"
if [[ ${PV} == *9999* ]] ; then
# BLENDER_BIN_URL can be used to point to the url of an upstream release archive.
PROPERTIES="live"
else
SRC_URI="
https://download.blender.org/release/Blender${SLOT}/blender-${PV}-linux-x64.tar.xz
"
KEYWORDS="~amd64"
fi
IUSE="cuda hip oneapi"
RESTRICT="strip test"
QA_PREBUILT="opt/${P}/*"
if [[ ${PV} == *9999* ]] ; then
BDEPEND="
app-misc/jq
"
fi
# no := here, this is prebuilt
RDEPEND="
media-libs/libglvnd[X]
sys-apps/util-linux
sys-libs/glibc
sys-libs/ncurses
virtual/libcrypt
x11-base/xorg-server
x11-libs/libICE
x11-libs/libSM
x11-libs/libX11
x11-libs/libXext
x11-libs/libXfixes
x11-libs/libXi
x11-libs/libXrender
x11-libs/libXt
x11-libs/libdrm
x11-libs/libxkbcommon
cuda? (
x11-drivers/nvidia-drivers
)
hip? (
=dev-util/hip-6*
)
oneapi? (
dev-libs/level-zero
)
"
src_unpack() {
local my_A
if [[ ${PV} == *9999* ]] ; then
local file_name url
if [[ -n "${BLENDER_BIN_URL}" ]]; then
einfo "Using ${BLENDER_BIN_URL} as SRC_URI. You are on your own."
file_name="$(basename "${BLENDER_BIN_URL}")"
url="${BLENDER_BIN_URL}"
else
wget "https://builder.blender.org/download/daily/?format=json&v=2" -O "${T}/release.json" \
|| die "failed to retrieve release.json"
local branch commit rel_json release_cycle version
rel_json=$(
jq -r 'map(select(.platform == "linux" and .branch == "'"${EGIT_BRANCH:-main}"'" and .file_extension == "xz"))
| .[0]' \
"${T}/release.json"
)
branch=$( echo "${rel_json}" | jq -r '.branch' )
commit=$( echo "${rel_json}" | jq -r '.hash' )
file_name=$( echo "${rel_json}" | jq -r '.file_name' )
release_cycle=$( echo "${rel_json}" | jq -r '.release_cycle' )
url=$( echo "${rel_json}" | jq -r '.url' )
version=$( echo "${rel_json}" | jq -r '.version' )
einfo "Fetching blender-${version}-${release_cycle}-${branch}-${commit}"
einfo " url: ${url}"
einfo " version: ${version}"
einfo " release_cycle: ${release_cycle}"
einfo " branch: ${branch}"
einfo " commit: ${commit}"
einfo
fi
wget -c "${url}"{,.sha256} -P "${T}" || die "failed to fetch ${url}"
my_A="${T}/${file_name}"
# Check sha256sum
local sha256sum_exp sha256sum_is
sha256sum_exp="$(cat "${T}/${file_name}.sha256")"
sha256sum_is="$(sha256sum "${T}/${file_name}" | cut -d ' ' -f 1)"
if [[ "${sha256sum_exp}" != "${sha256sum_is}" ]]; then
eerror "sha256sum mismatch for ${file_name}"
eerror " expected ${sha256sum_exp}"
eerror " found ${sha256sum_is}"
die "sha256sum mismatch"
fi
else
my_A="blender-${PV}-linux-x64.tar.xz"
fi
unpack "${my_A}"
local dirs
dirs="$(find "${WORKDIR}" -mindepth 1 -maxdepth 1 | wc -l)"
if [[ "${dirs}" -ne 1 ]]; then
die "unpack resulted in ${dirs} dirs in ${WORKDIR}"
fi
mv "${WORKDIR}"/* "${S}" || die "mv"
}
src_prepare() {
default
# Remove unused gpu libraries so we don't get missing libraries from QA
if ! use cuda; then
rm \
lib/libOpenImageDenoise_device_cuda* \
|| eqawarn "failed cleaning cuda"
fi
if ! use hip; then
rm \
lib/libOpenImageDenoise_device_hip* \
|| eqawarn "failed cleaning hip"
fi
if ! use oneapi; then
rm \
lib/libOpenImageDenoise_device_sycl* \
lib/libur_adapter_level_zero* \
|| eqawarn "failed cleaning oneapi"
fi
# Prepare icons and .desktop for menu entry
mv blender.desktop "${P}.desktop" || die
mv blender.svg "${P}.svg" || die
mv blender-symbolic.svg "${P}-symbolic.svg" || die
sed \
-e "s/=blender/=${P}/" \
-e "s/Name=Blender/Name=Blender Bin ${PV}/" \
-i "${P}.desktop" || die
}
src_configure() {
:;
}
src_compile() {
:;
}
src_install() {
# We could use the version from the release.json instead of PN here
local BLENDER_OPT_HOME="/opt/${P}"
# Install icons and .desktop for menu entry
doicon -s scalable "${S}"/blender*.svg
domenu "${P}.desktop"
# Install all the blender files in /opt
dodir "${BLENDER_OPT_HOME%/*}"
mv "${S}" "${ED}${BLENDER_OPT_HOME}" || die
# Create symlink /usr/bin/blender-bin
dodir "/usr/bin"
dosym -r "${BLENDER_OPT_HOME}/blender" "/usr/bin/${P}"
}
pkg_postinst() {
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
}