mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-01-27 23:44:04 +00:00
community/blender to 3.3.1-6
This commit is contained in:
parent
362a0ffec5
commit
06a061e53c
1 changed files with 15 additions and 6 deletions
|
@ -15,7 +15,7 @@ buildarch=8
|
|||
|
||||
pkgname=blender
|
||||
pkgver=3.3.1
|
||||
pkgrel=4
|
||||
pkgrel=6
|
||||
epoch=17
|
||||
pkgdesc="A fully integrated 3D graphics creation suite"
|
||||
arch=('x86_64')
|
||||
|
@ -61,25 +61,34 @@ prepare() {
|
|||
patch -p1 -d release/scripts/addons -i "$srcdir"/force-draco2.patch
|
||||
}
|
||||
|
||||
get_pyver() {
|
||||
python -c 'import sys; print(str(sys.version_info[0]) + "." + str(sys.version_info[1]))'
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$pkgname"
|
||||
|
||||
local PYTHON_VER=3.10
|
||||
local PYTHON_VER="$(get_pyver)"
|
||||
|
||||
# CUDA arch 90 is unsupported
|
||||
echo 'set(CYCLES_CUDA_BINARIES_ARCH sm_52 sm_53 sm_60 sm_61 sm_62 sm_70 sm_72 sm_75 sm_80 sm_86 sm_87 sm_89 compute_89 CACHE STRING "CUDA architectures to build binaries for" FORCE)' > precache
|
||||
echo 'mark_as_advanced(CYCLES_CUDA_BINARIES_ARCH)' >> precache
|
||||
|
||||
cmake \
|
||||
-Bbuild \
|
||||
-GNinja \
|
||||
-Cbuild_files/cmake/config/blender_release.cmake \
|
||||
-C precache \
|
||||
-DOPTIX_ROOT_DIR="$srcdir" \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DWITH_INSTALL_PORTABLE=OFF \
|
||||
-DWITH_PYTHON_INSTALL=OFF \
|
||||
-DWITH_CYCLES_EMBREE=OFF \
|
||||
-DPYTHON_VERSION=$PYTHON_VER \
|
||||
-DPYTHON_VERSION="$PYTHON_VER" \
|
||||
-DPYTHON_LIBPATH=/usr/lib \
|
||||
-DPYTHON_LIBRARY=python$PYTHON_VER \
|
||||
-DPYTHON_INCLUDE_DIRS=/usr/include/python$PYTHON_VER \
|
||||
-DPYTHON_LIBRARY="python$PYTHON_VER" \
|
||||
-DPYTHON_INCLUDE_DIRS="/usr/include/python$PYTHON_VER" \
|
||||
-DCMAKE_CXX_FLAGS="-I /usr/include/python$PYTHON_VER"
|
||||
cmake --build build
|
||||
}
|
||||
|
@ -98,7 +107,7 @@ package() {
|
|||
cp -r release/scripts/addons_contrib/* "${pkgdir}"/usr/share/blender/3*/scripts/addons_contrib/
|
||||
|
||||
# Manually install draco bindings (See FS#73415)
|
||||
mkdir -p "${pkgdir}"/usr/lib/python3.10/
|
||||
mkdir -p "${pkgdir}/usr/lib/python$(get_pyver)"/
|
||||
mv "${pkgdir}"/usr/share/blender/3*/python/lib/* "${pkgdir}"/usr/lib/
|
||||
rm -r "${pkgdir}"/usr/share/blender/3*/python
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue