summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Attali2021-02-14 15:56:37 -0500
committerJeremy Attali2021-02-14 15:58:14 -0500
commit4fbd708c65f8bb04fe7244ae19aa69f65f590f0e (patch)
tree08690389022a3b5437776a0357a631dd8d25f07f
parent9d028967c806957c6f5b8ff3feb30e9bb18a2c1c (diff)
downloadaur-4fbd708c65f8bb04fe7244ae19aa69f65f590f0e.tar.gz
update pkgbuild based on blender-git
-rw-r--r--.SRCINFO85
-rw-r--r--.gitignore13
-rw-r--r--PKGBUILD188
-rw-r--r--embree.patch70
-rw-r--r--usd_python.patch26
5 files changed, 207 insertions, 175 deletions
diff --git a/.SRCINFO b/.SRCINFO
index aa1e589f3261..55869b21189d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,69 +1,56 @@
pkgbase = blender-wayland-git
- pkgdesc = A fully integrated 3D graphics creation suite
- pkgver = 2.90.r96894.g04390941050
- pkgrel = 2
- epoch = 17
- url = http://www.blender.org
+ pkgdesc = A fully integrated 3D graphics creation suite (development)
+ pkgver = 2.93.r103725.g80a8df72be9
+ pkgrel = 1
+ url = https://blender.org/
+ arch = i686
arch = x86_64
license = GPL
+ makedepends = git
makedepends = cmake
makedepends = boost
makedepends = mesa
- makedepends = git
- makedepends = llvm
- makedepends = cuda
makedepends = ninja
- depends = libpng
- depends = libtiff
- depends = openexr
+ makedepends = llvm
+ depends = alembic
+ depends = embree
+ depends = libgl
depends = python
- depends = desktop-file-utils
- depends = python-requests
- depends = shared-mime-info
- depends = hicolor-icon-theme
- depends = xdg-utils
- depends = glew
- depends = openjpeg2
depends = python-numpy
- depends = freetype2
- depends = openal
+ depends = openjpeg2
depends = ffmpeg
depends = fftw
- depends = boost-libs
- depends = opencollada
- depends = alembic
+ depends = openal
+ depends = freetype2
+ depends = libxi
depends = openimageio
- depends = libsndfile
- depends = jack
depends = opencolorio
- depends = openshadinglanguage
- depends = openimagedenoise
- depends = jemalloc
- depends = libspnav
- depends = ptex
- depends = opensubdiv
depends = openvdb
- depends = log4cplus
- depends = sdl2
- depends = embree
- optdepends = cuda: cycles renderer cuda support
+ depends = opencollada
+ depends = opensubdiv
+ depends = openshadinglanguage
+ depends = libtiff
+ depends = libpng
+ optdepends = cuda: CUDA support in Cycles
+ optdepends = optix=7.1.0: OptiX support in Cycles
+ optdepends = usd=20.05: USD export Scene
+ optdepends = openimagedenoise: Intel Open Image Denoise support in compositing
provides = blender
conflicts = blender
- options = !strip
- source = git://git.blender.org/blender-addons.git
- source = git://git.blender.org/blender-addons-contrib.git
- source = git://git.blender.org/blender-translations.git
- source = git://git.blender.org/blender-dev-tools.git
+ source = git://git.blender.org/blender.git#branch=master
+ source = blender-addons.git::git://git.blender.org/blender-addons.git
+ source = blender-addons-contrib.git::git://git.blender.org/blender-addons-contrib.git
+ source = blender-translations.git::git://git.blender.org/blender-translations.git
+ source = blender-dev-tools.git::git://git.blender.org/blender-dev-tools.git
+ source = usd_python.patch
source = embree.patch
- source = https://developer.download.nvidia.com/redist/optix/v7.0/OptiX-7.0.0-include.zip
- source = blender-wayland-git::git+https://github.com/christianrauch/blender.git#branch=master
- sha512sums = SKIP
- sha512sums = SKIP
- sha512sums = SKIP
- sha512sums = SKIP
- sha512sums = 6de779ad8649a034ee65c45a36d7838ac0b8b32c3336b4d476186265c060f56276e3e0a2860ec4bff42bef7d5582ee82238013845f6a697672767a05a455aaca
- sha512sums = b2cff73def3757d4259f4b4d318a8ccfe166bf7c215cbb2124f1c81bd6e742f96207285b24eb4d99b527b7b97dc6d5e8fdf2f16d78d5d1e2684c26d681328491
- sha512sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = 12bd6db5c1fe14244fd7321e3d740941a36aa545ec21b02325e7553c9214778a
+ sha256sums = 6249892f99ffd960e36f43fb893c14e2f8e4dd1d901b9581d25882e865f2603f
pkgname = blender-wayland-git
diff --git a/.gitignore b/.gitignore
index cdc4ec1e28d8..eff784f924cd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,12 +1,11 @@
-/blender-addons/
-/blender-addons-contrib/
-/blender-dev-tools/
-/blender-translations/
-/blender-wayland-git/
+/blender-addons-contrib.git/
+/blender-addons.git/
+/blender-dev-tools.git/
+/blender-translations.git/
+/blender/
/pkg/
/src/
-OptiX-7.0.0-include.zip
-
+*.tar.zst
*.xz
diff --git a/PKGBUILD b/PKGBUILD
index 780177011274..bd27daad8108 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,117 +1,123 @@
# Maintainer: Jeremy Attali <contact@jtheoof.me>
-# Contributor: Sven-Hendrik Haase <svenstaro@gmail.com>
-# Contributor: John Sowiak <john@archlinux.org>
-# Contributor: tobias <tobias@archlinux.org>
+# Contributor: Fredrick Brennan <copypaste@kittens.ph>
+# Contributor: Lukas Jirkovsky <l.jirkovsky@gmail.com>
+# Based on blender-git with wayland build flags
-## This is a blander build based on wayland branch by Christian Rauch
-## See Blender thread https://devtalk.blender.org/t/wayland-and-egl-support/11171
-## This PKGBUILD was mainly taken from blender-develop-git AUR package.
+# Configuration.
+_fragment=${FRAGMENT:-#branch=master}
+[[ -v CUDA_ARCH ]] && _CUDA_ARCH=(${CUDA_ARCH})
+((TRAVIS)) && _cuda_capability+=(sm_50 sm_52 sm_60 sm_61 sm_70 sm_75)
-# Sometimes blender.org takes some time to release patch releases and because Arch users
-# are impatient, we sometimes need to build from git directly.
-# Update because I get so many queries on this:
-# Due to our other rolling deps, it's sometimes not possible to build Blender stable releases.
-# More often than not, a new openshadinglanguage breaks it and I could either backport fixes
-# or simply roll with a new version. I usually choose the latter when the former seems
-# unreasonable.
-
-# For legal reasons, we can't separately package the Optix headers so we'll
-# just build the package against them. I checked with NVIDIA and this way is
-# fine with them.
-
-#_gittag=v2.82a
-# _gitcommit=054dbb833e15275e0e991e2c15e754a3e7583716
-_gitbranch=master
+#some extra, unofficially supported stuff goes here:
+_CMAKE_FLAGS+=( -DWITH_ALEMBIC_HDF5=ON )
+_CMAKE_FLAGS+=( -DWITH_CYCLES_NETWORK=OFF )
pkgname=blender-wayland-git
-pkgver=2.90.r96894.g04390941050
-[[ -n $_gitcommit ]] && pkgver=${pkgver}.git1.${_gitcommit:0:8}
-pkgrel=2
-epoch=17
-pkgdesc="A fully integrated 3D graphics creation suite"
-arch=('x86_64')
-license=('GPL')
-url="http://www.blender.org"
+pkgver=2.93.r103725.g80a8df72be9
+pkgrel=1
+pkgdesc="A fully integrated 3D graphics creation suite (development)"
+arch=('i686' 'x86_64')
+url="https://blender.org/"
+depends+=('alembic' 'embree' 'libgl' 'python' 'python-numpy' 'openjpeg2'
+ 'ffmpeg' 'fftw' 'openal' 'freetype2' 'libxi' 'openimageio' 'opencolorio'
+ 'openvdb' 'opencollada' 'opensubdiv' 'openshadinglanguage' 'libtiff' 'libpng')
+optdepends=('cuda: CUDA support in Cycles'
+ 'optix=7.1.0: OptiX support in Cycles'
+ 'usd=20.05: USD export Scene'
+ 'openimagedenoise: Intel Open Image Denoise support in compositing')
+makedepends=('git' 'cmake' 'boost' 'mesa' 'ninja' 'llvm')
provides=('blender')
conflicts=('blender')
-depends=('libpng' 'libtiff' 'openexr' 'python' 'desktop-file-utils' 'python-requests'
- 'shared-mime-info' 'hicolor-icon-theme' 'xdg-utils' 'glew' 'openjpeg2' 'python-numpy'
- 'freetype2' 'openal' 'ffmpeg' 'fftw' 'boost-libs' 'opencollada' 'alembic'
- 'openimageio' 'libsndfile' 'jack' 'opencolorio' 'openshadinglanguage' 'openimagedenoise'
- 'jemalloc' 'libspnav' 'ptex' 'opensubdiv' 'openvdb' 'log4cplus' 'sdl2' 'embree')
-makedepends=('cmake' 'boost' 'mesa' 'git' 'llvm' 'cuda' 'ninja')
-optdepends=('cuda: cycles renderer cuda support')
-options=(!strip)
-source=("git://git.blender.org/blender-addons.git"
- "git://git.blender.org/blender-addons-contrib.git"
- "git://git.blender.org/blender-translations.git"
- "git://git.blender.org/blender-dev-tools.git"
- embree.patch
- https://developer.download.nvidia.com/redist/optix/v7.0/OptiX-7.0.0-include.zip)
-
-if [[ -n $_gitbranch ]]; then
- source+=("${pkgname}::git+https://github.com/christianrauch/blender.git#branch=${_gitbranch}")
-fi
-
-sha512sums=('SKIP'
+license=('GPL')
+# NOTE: the source array has to be kept in sync with .gitmodules
+# the submodules has to be stored in path ending with git to match
+# the path in .gitmodules.
+# More info:
+# http://wiki.blender.org/index.php/Dev:Doc/Tools/Git
+source=("git://git.blender.org/blender.git${_fragment}"
+ 'blender-addons.git::git://git.blender.org/blender-addons.git'
+ 'blender-addons-contrib.git::git://git.blender.org/blender-addons-contrib.git'
+ 'blender-translations.git::git://git.blender.org/blender-translations.git'
+ 'blender-dev-tools.git::git://git.blender.org/blender-dev-tools.git'
+ usd_python.patch #add missing python headers when building against python enabled usd.
+ embree.patch #add missing embree link.
+ )
+sha256sums=('SKIP'
'SKIP'
'SKIP'
'SKIP'
- '6de779ad8649a034ee65c45a36d7838ac0b8b32c3336b4d476186265c060f56276e3e0a2860ec4bff42bef7d5582ee82238013845f6a697672767a05a455aaca'
- 'b2cff73def3757d4259f4b4d318a8ccfe166bf7c215cbb2124f1c81bd6e742f96207285b24eb4d99b527b7b97dc6d5e8fdf2f16d78d5d1e2684c26d681328491'
- 'SKIP')
-
+ 'SKIP'
+ '12bd6db5c1fe14244fd7321e3d740941a36aa545ec21b02325e7553c9214778a'
+ '6249892f99ffd960e36f43fb893c14e2f8e4dd1d901b9581d25882e865f2603f')
pkgver() {
- blender_version=$(grep -Po "BLENDER_VERSION \K[0-9]{3}" "$srcdir"/${pkgname}/source/blender/blenkernel/BKE_blender_version.h)
+ blender_version=$(grep -Po "BLENDER_VERSION \K[0-9]{3}" "$srcdir"/blender/source/blender/blenkernel/BKE_blender_version.h)
printf "%d.%d.r%s.g%s" \
$((blender_version/100)) \
$((blender_version%100)) \
- "$(git -C "$srcdir/${pkgname}" rev-list --count HEAD)" \
- "$(git -C "$srcdir/${pkgname}" rev-parse --short HEAD)"
+ "$(git -C "$srcdir/blender" rev-list --count HEAD)" \
+ "$(git -C "$srcdir/blender" rev-parse --short HEAD)"
}
-
prepare() {
- cd "$srcdir/$pkgname"
-
- git submodule init
- git config submodule."release/scripts/addons".url "${srcdir}/blender-addons"
- git config submodule."release/scripts/addons_contrib".url "${srcdir}/blender-addons-contrib"
- git config submodule."release/datafiles/locale".url "${srcdir}/blender-translations"
- git config submodule."source/tools".url "${srcdir}/blender-dev-tools"
- git submodule update
-
- patch -Np1 -i "$srcdir"/embree.patch
-
- mkdir build
+ cd "$srcdir/blender"
+ # update the submodules
+ git submodule update --init --recursive --remote
+ git apply -v "${srcdir}"/{embree,usd_python}.patch
}
build() {
- cd "$srcdir/$pkgname"/build
-
- cmake \
- -GNinja \
- -C../build_files/cmake/config/blender_release.cmake .. \
- -DOPTIX_ROOT_DIR="$srcdir"/include \
- -DWITH_CYCLES_EMBREE=ON \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DCMAKE_BUILD_TYPE=Release \
- -DWITH_INSTALL_PORTABLE=OFF \
- -DWITH_PYTHON_INSTALL=OFF \
- -DWITH_GHOST_WAYLAND=ON \
- -DPYTHON_VERSION=3.8 \
- -DPYTHON_LIBPATH=/usr/lib \
- -DPYTHON_LIBRARY=python3.8 \
- -DPYTHON_INCLUDE_DIRS=/usr/include/python3.8
- ninja
+ _pyver=$(python -c "from sys import version_info; print(\"%d.%d\" % (version_info[0],version_info[1]))")
+
+ # determine whether we can precompile CUDA kernels
+ _CUDA_PKG=`pacman -Qq cuda 2>/dev/null` || true
+ if [ "$_CUDA_PKG" != "" ]; then
+ _CMAKE_FLAGS+=( -DWITH_CYCLES_CUDA_BINARIES=ON
+ -DCUDA_TOOLKIT_ROOT_DIR=/opt/cuda )
+ if [[ -v _CUDA_ARCH ]]; then
+ _CMAKE_FLAGS+=( -DCYCLES_CUDA_BINARIES_ARCH="$(IFS=';'; echo "${_CUDA_ARCH[*]}";)" )
+ fi
+ fi
+
+ # check for optix
+ _OPTIX_PKG=`pacman -Qq optix 2>/dev/null` || true
+ if [ "$_OPTIX_PKG" != "" ]; then
+ _CMAKE_FLAGS+=( -DWITH_CYCLES_DEVICE_OPTIX=ON
+ -DOPTIX_ROOT_DIR=/opt/optix )
+ fi
+
+ # check for open image denoise
+ _OIDN_PKG=`pacman -Qq openimagedenoise 2>/dev/null` || true
+ if [ "$_OIDN_PKG" != "" ]; then
+ _CMAKE_FLAGS+=( -DWITH_OPENIMAGEDENOISE=ON )
+ fi
+
+ # check for universal scene descriptor
+ _USD_PKG=`pacman -Qq usd=20.05 2>/dev/null` || true
+ if [ "$_USD_PKG" != "" ]; then
+ _CMAKE_FLAGS+=( -DWITH_USD=ON
+ -DUSD_ROOT=/usr )
+ fi
+
+ cmake -G Ninja -S "$srcdir/blender" -B build \
+ -C "${srcdir}/blender/build_files/cmake/config/blender_release.cmake" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DWITH_INSTALL_PORTABLE=OFF \
+ -DWITH_SYSTEM_GLEW=OFF \
+ -DWITH_PYTHON_INSTALL=OFF \
+ -DWITH_GHOST_WAYLAND=ON \
+ -DPYTHON_VERSION="${_pyver}" \
+ "${_CMAKE_FLAGS[@]}"
+ ninja -C "$srcdir/build" ${MAKEFLAGS:--j1}
}
package() {
- cd "$srcdir/$pkgname/build"
+ _suffix=${pkgver%%.r*}
+ DESTDIR="$pkgdir" ninja -C "$srcdir/build" install
- DESTDIR="${pkgdir}" ninja install
- 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"
+ if [[ -e "$pkgdir/usr/share/blender/${_suffix}/scripts/addons/cycles/lib/" ]] ; then
+ # make sure the cuda kernels are not stripped
+ chmod 444 "$pkgdir"/usr/share/blender/${_suffix}/scripts/addons/cycles/lib/*
+ fi
}
diff --git a/embree.patch b/embree.patch
index bed0b39e744c..e638b434d75f 100644
--- a/embree.patch
+++ b/embree.patch
@@ -1,37 +1,34 @@
-diff --git a/intern/cycles/blender/CMakeLists.txt b/intern/cycles/blender/CMakeLists.txt
-index d9a2ebf8571..f3b7d156024 100644
---- a/intern/cycles/blender/CMakeLists.txt
-+++ b/intern/cycles/blender/CMakeLists.txt
-@@ -66,6 +66,12 @@ if(WITH_CYCLES_LOGGING)
- )
- endif()
-
-+if(WITH_CYCLES_EMBREE)
-+ list(APPEND LIB
-+ ${EMBREE_LIBRARIES}
-+ )
-+endif()
-+
- set(ADDON_FILES
- addon/__init__.py
- addon/engine.py
diff --git a/build_files/cmake/Modules/FindEmbree.cmake b/build_files/cmake/Modules/FindEmbree.cmake
-index d9d525d4586..03b509a28f3 100644
+index 90cf23d3e13..f625efaa542 100644
--- a/build_files/cmake/Modules/FindEmbree.cmake
+++ b/build_files/cmake/Modules/FindEmbree.cmake
-@@ -72,7 +72,7 @@ ENDFOREACH()
+@@ -7,6 +7,9 @@
+ # EMBREE_ROOT_DIR, The base directory to search for Embree.
+ # This can also be an environment variable.
+ # EMBREEFOUND, If false, do not try to use Embree.
++#
++# also defined, but not for general use are
++# EMBREE_LIBRARY, where to find the Embree library.
+
+ #=============================================================================
+ # Copyright 2018 Blender Foundation.
+@@ -67,14 +70,23 @@ FOREACH(COMPONENT ${_embree_FIND_COMPONENTS})
+ ENDFOREACH()
+
- FIND_LIBRARY(EMBREE_LIBRARY
- NAMES
-- libembree3
++FIND_LIBRARY(EMBREE_LIBRARY
++ NAMES
+ embree3
- HINTS
- ${_embree_SEARCH_DIRS}
- PATH_SUFFIXES
-@@ -83,10 +83,10 @@ FIND_LIBRARY(EMBREE_LIBRARY
++ HINTS
++ ${_embree_SEARCH_DIRS}
++ PATH_SUFFIXES
++ lib64 lib
++)
++
+ # handle the QUIETLY and REQUIRED arguments and set EMBREE_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
- FIND_PACKAGE_HANDLE_STANDARD_ARGS(EMBREE DEFAULT_MSG
+ FIND_PACKAGE_HANDLE_STANDARD_ARGS(Embree DEFAULT_MSG
- _embree_LIBRARIES EMBREE_INCLUDE_DIR)
+ EMBREE_LIBRARY EMBREE_INCLUDE_DIR)
@@ -39,5 +36,22 @@ index d9d525d4586..03b509a28f3 100644
- SET(EMBREE_LIBRARIES ${_embree_LIBRARIES})
+ SET(EMBREE_LIBRARIES ${EMBREE_LIBRARY})
SET(EMBREE_INCLUDE_DIRS ${EMBREE_INCLUDE_DIR})
- ENDIF(EMBREE_FOUND)
+ ENDIF()
+
+diff --git a/intern/cycles/blender/CMakeLists.txt b/intern/cycles/blender/CMakeLists.txt
+index 2316800e21e..591841152e2 100644
+--- a/intern/cycles/blender/CMakeLists.txt
++++ b/intern/cycles/blender/CMakeLists.txt
+@@ -67,6 +67,12 @@ if(WITH_CYCLES_LOGGING)
+ )
+ endif()
++if(WITH_CYCLES_EMBREE)
++ list(APPEND LIB
++ ${EMBREE_LIBRARIES}
++ )
++endif()
++
+ set(ADDON_FILES
+ addon/__init__.py
+ addon/engine.py
diff --git a/usd_python.patch b/usd_python.patch
new file mode 100644
index 000000000000..a72d75cd6f0e
--- /dev/null
+++ b/usd_python.patch
@@ -0,0 +1,26 @@
+diff --git a/build_files/cmake/platform/platform_unix.cmake b/build_files/cmake/platform/platform_unix.cmake
+index ac570f17e47..505aa97934c 100644
+--- a/build_files/cmake/platform/platform_unix.cmake
++++ b/build_files/cmake/platform/platform_unix.cmake
+@@ -320,6 +320,9 @@ if(WITH_BOOST)
+ if(WITH_OPENVDB)
+ list(APPEND __boost_packages iostreams)
+ endif()
++ if(WITH_USD)
++ list(APPEND __boost_packages python27)
++ endif()
+ list(APPEND __boost_packages system)
+ find_package(Boost 1.48 COMPONENTS ${__boost_packages})
+ if(NOT Boost_FOUND)
+diff --git a/source/blender/usd/CMakeLists.txt b/source/blender/usd/CMakeLists.txt
+index 6ea02f44d76..0ec18e17689 100644
+--- a/source/blender/io/usd/CMakeLists.txt
++++ b/source/blender/io/usd/CMakeLists.txt
+@@ -48,6 +48,7 @@ set(INC
+ set(INC_SYS
+ ${USD_INCLUDE_DIRS}
+ ${BOOST_INCLUDE_DIR}
++ ${PYTHON_INCLUDE_DIRS}
+ ${TBB_INCLUDE_DIR}
+ )
+