diff options
author | bill-auger <mr.j.spam.me@gmail.com> | 2022-10-05 08:09:38 -0400 |
---|---|---|
committer | bill-auger <mr.j.spam.me@gmail.com> | 2022-10-09 08:47:23 -0400 |
commit | 8e3a3dff7ae1f0aafb9833fecae2a941040a4a94 (patch) | |
tree | 60ee7a30406f373237d11ecff358e7829563939c /libre/blender | |
parent | 3261a709c57480632f20ea6b84b2f1bdfbb0a027 (diff) |
[blender]: upgrade to v3.3.0
Diffstat (limited to 'libre/blender')
-rw-r--r-- | libre/blender/PKGBUILD | 107 | ||||
-rw-r--r-- | libre/blender/no-sse2.patch | 12 |
2 files changed, 82 insertions, 37 deletions
diff --git a/libre/blender/PKGBUILD b/libre/blender/PKGBUILD index 76274cfc0..28cf7ca56 100644 --- a/libre/blender/PKGBUILD +++ b/libre/blender/PKGBUILD @@ -1,9 +1,12 @@ # Maintainer (arch): Sven-Hendrik Haase <svenstaro@gmail.com> +# Maintainer (arch32): Andreas Baumann <mail@andreasbaumann.cc> +# Maintainer (archarm): Kevin Mihelich <kevin@archlinuxarm.org> # Contributor: John Sowiak <john@archlinux.org> # Contributor: tobias <tobias@archlinux.org> # Contributor: Andreas Grapentin <andreas@grapentin.org> # Contributor: Márcio Silva <coadde@hyperbola.info> # Contributor: bill-auger <bill-auger@programmer.net> +# Maintainer: Parabola Hackers <dev@lists.parabola.nu> # parabola changes and rationale: @@ -11,19 +14,27 @@ # - set OS type string to GNU/Linux-libre # - pin to tightly-coupled dependency versions +# NOTE: This PKGBUILD is kept in-sync, as closely as possible, +# with arch{,arm,32}, for the sake of documentation and cleaner diffs. +# That also helps to identify which changes were made by Parabola vs upstream. +# Therefore, this PKGBUILD may declare blacklisted dependencies, non-free sources, +# or include code for anti-features; but those will be filtered-out subsequently. +# Any code which implements an anti-feature should be commented-out; +# and include an 'anti-feature' comment, for clarity. +# Any blacklisted dependencies and non-free sources should be filtered, +# and include a 'non-free' comment, for clarity. +# Without those over-rides, the resulting program may not be FSDG-fit. +# Do not circumvent those over-rides, if compiling for the Parabola repos. + pkgname=blender -pkgver=3.2.0 -pkgrel=4 +pkgver=3.3.0 +pkgrel=3 pkgrel+=.parabola1 epoch=17 -_pythonver_x86_64=3.10 -_pythonver_i686=3.10 -_pythonver_armv7h=3.10 -eval "_python_ver=\$_pythonver_${CARCH}" pkgdesc="A fully integrated 3D graphics creation suite" arch=('x86_64') -arch+=('i686' 'armv7h') +arch+=('armv7h' 'i686') license=('GPL') url="https://www.blender.org" depends=('libpng' 'libtiff' 'openexr' 'python' 'desktop-file-utils' 'python-requests' 'potrace' @@ -32,9 +43,9 @@ depends=('libpng' 'libtiff' 'openexr' 'python' 'desktop-file-utils' 'python-requ 'openimageio' 'libsndfile' 'jack' 'opencolorio' 'openshadinglanguage' 'openimagedenoise' 'jemalloc' 'libspnav' 'ptex' 'opensubdiv' 'openvdb' 'log4cplus' 'sdl2' 'embree' 'libharu' 'draco') -[[ "${CARCH}" != 'x86_64' ]] && depends=( ${depends[*]/openimagedenoise/} ) -[[ "${CARCH}" != 'x86_64' ]] && depends=( ${depends[*]/libharu/} ) -[[ "${CARCH}" == 'armv7h' ]] && depends=( ${depends[*]/embree/} ) +[[ "${CARCH}" != 'x86_64' ]] && depends=( ${depends[*]/openimagedenoise/} ) # unavailable for armv7h and i686 +[[ "${CARCH}" == 'armv7h' ]] && depends=( ${depends[*]/embree/} ) # unavailable for armv7h +[[ "${CARCH}" == 'i686' ]] && depends=( ${depends[*]/jack/pipewire-jack} ) # (arch32) FS32#297: unable to satisfy dependency 'libcelt0.so=2-32' required by jack2 makedepends=('cmake' 'boost' 'mesa' 'git' 'llvm' 'cuda' 'ninja') makedepends=( ${makedepends[*]/cuda/} ) # non-free options=(!strip) @@ -43,10 +54,11 @@ source=("git+https://git.blender.org/blender.git#tag=v$pkgver" "git+https://git.blender.org/blender-addons-contrib.git" "git+https://git.blender.org/blender-translations.git" "git+https://git.blender.org/blender-dev-tools.git" - https://developer.download.nvidia.com/redist/optix/v7.3/OptiX-7.3.0-Include.zip + https://developer.download.nvidia.com/redist/optix/v7.5/OptiX-7.5-Include.zip force-draco1.patch force-draco2.patch) source=( ${source[*]/*optix*/dummy-source} ) # non-free +source_i686=(no-sse2.patch) sha512sums=('SKIP' 'SKIP' 'SKIP' @@ -55,35 +67,45 @@ sha512sums=('SKIP' 'SKIP' # dummy-source 'e239da4f3906f1b54265435181cf770bae3d269c8d915df9a73861e6ee71ec70bf2339426e7c81a91e5a567273b3b3742d7a99feefd3398d821b26e1ff3a56d0' '527ab66e5eace777de0043c1ca5787a488f6471450ce67fd6d08137ad0ef56177bc0c17696f30a5fca23fa55d8ca9c3f30cb7b17550dba2dbd8e89ca0b361990') +sha512sums_i686=('87da2bedb90af6dee559ef9d1eb83262ba75fb412aba83dcb2b88fe9c0740ff75ad336331033fec7a14ad6ecc3dd70f8f4742f147594e8dc530197dd51922c01') _version_constraint() # (dep_pkgname [precision]) { local dep_pkgname=$1 + local req_precision=$2 local full_version=$(pacman -S --print-format='%v' ${dep_pkgname} | tail -n 1) local n_dots=$(tmp=${full_version%-*} ; tmp=${tmp//[^\.]} ; echo "${#tmp}" ;) local def_precision=$(( n_dots + 1 )) - local precision=$( [[ "$2" =~ ^[1-${def_precision}]$ ]] && echo $2 || echo ${def_precision} ) + local is_reqprecision_valid=$( [[ "${req_precision}" =~ ^[1-${def_precision}]$ ]] && echo 1 || echo 0 ) + local precision=$( (( is_reqprecision_valid )) && echo ${req_precision} || echo ${def_precision} ) local pkgver_rx='[^-\.\ ]+' local subver_rx='\.'${pkgver_rx} local pkgrel_rx='[^-\ ]+' local capture_rx=${pkgver_rx} - for (( n_dots=1 ; n_dots < precision ; n_dots++ )) ; do capture_rx+=${subver_rx} ; done ; + for (( n_dots=1 ; n_dots < precision ; ++n_dots )) ; do capture_rx+=${subver_rx} ; done ; - if [[ "${full_version}" =~ ^(${capture_rx})(${subver_rx})*-${pkgrel_rx}$ ]] + if [[ "${full_version}" =~ ^(${capture_rx})(${subver_rx})*-(${pkgrel_rx})$ ]] then local version=${BASH_REMATCH[1]} - local subver_inc=$(( ${version##*.} + 1 )) - local version_inc=$( [[ "${version}" =~ \. ]] && echo ${version%.*}.${subver_inc} || \ - echo ${subver_inc} ) - local constraint_string="${dep_pkgname}>=${version} ${dep_pkgname}<${version_inc}" - - echo "applied version constraint: ${constraint_string}" >&2 - echo -n "${constraint_string}" + local pkgrel=${BASH_REMATCH[3]%%.*} + local subver_inc=$(( ${version##*.} + 1 )) # right-trims from any non-numeric + local pkgrel_inc=$(( pkgrel + 1 )) + local version_min=$( (( ! is_reqprecision_valid )) && echo ${full_version%-*}-${pkgrel} || \ + echo ${version} ) + local version_max=$( ( (( ! is_reqprecision_valid )) && echo ${full_version%-*}-${pkgrel_inc} ) || \ + ( [[ "${version}" =~ \. ]] && echo ${version%.*}.${subver_inc} ) || \ + echo ${subver_inc} ) + local constraint_string="${dep_pkgname}>=${version_min} ${dep_pkgname}<${version_max}" + + echo "applied version constraint: '${constraint_string}'" >&2 else echo "ERROR: _version_constraint() error parsing: dep_pkgname='${dep_pkgname}' full_version='${full_version}'" >&2 exit 1 fi + + echo -n "${constraint_string}" } + prepare() { cd "$pkgname" @@ -95,37 +117,48 @@ prepare() { git submodule update git submodule foreach git checkout v${pkgver} + + ## technical patching ## + patch -p1 -i "$srcdir"/force-draco1.patch patch -p1 -d release/scripts/addons -i "$srcdir"/force-draco2.patch + case "${CARCH}" in + armv7h) + ;; + i686) + patch -Np1 -i "$srcdir"/no-sse2.patch + + # FIXME: error: implicit declaration of function ‘atomic_add_and_fetch_uint64’; + # did you mean ‘atomic_add_and_fetch_uint32’? [-Werror=implicit-function-declaration] + local sed_cmd='s| atomic_add_and_fetch_uint64(| atomic_add_and_fetch_uint32(|' + sed -i "${sed_cmd}" source/blender/blenlib/intern/session_uuid.c + ;; + x86_64) + ;; + esac + - ## parabola patching ## + ## libre patching ## # set OS type string sed -i 's|BUILD_PLATFORM;|"GNU/Linux-libre";|' 'source/creator/buildinfo.c' - - # FIXME: error: implicit declaration of function ‘atomic_add_and_fetch_uint64’; - # did you mean ‘atomic_add_and_fetch_uint32’? [-Werror=implicit-function-declaration] - if [[ "${CARCH}" == 'armv7h' ]] || [[ "${CARCH}" == 'i686' ]] - then local sed_cmd='s| atomic_add_and_fetch_uint64(| atomic_add_and_fetch_uint32(|' - sed -i "${sed_cmd}" source/blender/blenlib/intern/session_uuid.c - fi } build() { cd "$pkgname" - local PYTHON_VER=${_python_ver} + local PYTHON_VER=3.10 + case "${CARCH}" in armv7h) PYTHON_VER=3.10 ;; i686) PYTHON_VER=3.10 ;; esac - # libre options + # libre configuration local _parabola_opts=( -DWITH_CYCLES_CUDA_BINARIES=OFF \ -DWITH_CYCLES_DEVICE_CUDA=OFF \ -DWITH_CYCLES_DEVICE_OPTIX=OFF ) - # arch-specific options + # arch-specific configuration case "${CARCH}" in - 'i686' ) _parabola_opts+=( -DWITH_RAYOPTIMIZATION=OFF \ - -DWITH_CYCLES_EMBREE=ON ) ;; - 'x86_64') _parabola_opts+=( -DWITH_CYCLES_EMBREE=ON ) ;; + 'armv7h') _parabola_opts+=( -DWITH_CYCLES_EMBREE=OFF ) ;; + 'i686' ) _parabola_opts+=( -DWITH_RAYOPTIMIZATION=OFF ) ;; esac cmake \ @@ -142,7 +175,7 @@ build() { -DPYTHON_LIBRARY=python$PYTHON_VER \ -DPYTHON_INCLUDE_DIRS=/usr/include/python$PYTHON_VER \ -DCMAKE_CXX_FLAGS="-I /usr/include/python$PYTHON_VER" - ninja -C build + cmake --build build } package() { @@ -162,7 +195,7 @@ package() { $(_version_constraint openvdb 2) # eg: libopenvdb.so.6.2 $(_version_constraint python 2) ) # eg: libpython3.6.so.1.0 - DESTDIR="${pkgdir}" ninja -C build install + DESTDIR="${pkgdir}" cmake --install build install -Dm755 release/bin/blender-softwaregl "${pkgdir}/usr/bin/blender-softwaregl" python -m compileall "${pkgdir}/usr/share/blender" python -O -m compileall "${pkgdir}/usr/share/blender" diff --git a/libre/blender/no-sse2.patch b/libre/blender/no-sse2.patch new file mode 100644 index 000000000..a32f7c64a --- /dev/null +++ b/libre/blender/no-sse2.patch @@ -0,0 +1,12 @@ +diff -rauN blender-vanilla/CMakeLists.txt blender-no-sse2-patch/CMakeLists.txt +--- blender-vanilla/CMakeLists.txt 2022-04-07 16:36:48.842414275 +0200 ++++ blender-no-sse2-patch/CMakeLists.txt 2022-04-07 16:37:12.012470531 +0200 +@@ -981,7 +981,7 @@ + # Test SIMD support, before platform includes to determine if sse2neon is needed. + if(WITH_CPU_SIMD) + set(COMPILER_SSE_FLAG) +- set(COMPILER_SSE2_FLAG) ++# set(COMPILER_SSE2_FLAG) + + # Test Neon first since macOS Arm can compile and run x86-64 SSE binaries. + TEST_NEON_SUPPORT() |