summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorbartus2020-07-30 00:43:17 +0200
committerbartus2020-07-30 01:11:11 +0200
commitf986b29600ae6a4aff4ad6e261c524cbb933a4a4 (patch)
tree76a725016594a499676f01c4aee5cff42763952d
parent1911a011461b9432e09065a073e8fbf7c5ffc58f (diff)
downloadaur-f986b29600ae6a4aff4ad6e261c524cbb933a4a4.tar.gz
Refactor:
* Drop old install file. * Drop old desktop shortcut. * Switch to openjpeg2 * Add FRAGMENT env var for bisect build. * Add CUDA_ARCH env var for specifying nvcc arch. * Fix pkgver() * Fix submodule (init with remote version) * Move optdep tests inside build() * Use array for cmake flags. * Drop redundant cmake flags. * Update url.
-rw-r--r--.SRCINFO23
-rw-r--r--PKGBUILD125
-rw-r--r--blender.desktop14
-rw-r--r--blender.install14
4 files changed, 73 insertions, 103 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 74a74df7723..c6097936d3f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -2,8 +2,7 @@ pkgbase = blender-git
pkgdesc = A fully integrated 3D graphics creation suite (development)
pkgver = 2.81.r91063.ab519b91b2c
pkgrel = 1
- url = http://blender.org/
- install = blender.install
+ url = https://blender.org/
arch = i686
arch = x86_64
license = GPL
@@ -15,9 +14,8 @@ pkgbase = blender-git
depends = alembic
depends = libgl
depends = python
- depends = desktop-file-utils
- depends = hicolor-icon-theme
- depends = openjpeg
+ depends = python-numpy
+ depends = openjpeg2
depends = ffmpeg
depends = fftw
depends = openal
@@ -31,24 +29,21 @@ pkgbase = blender-git
depends = openshadinglanguage
depends = libtiff
depends = libpng
- depends = python-numpy
optdepends = cuda: CUDA support in Cycles
optdepends = optix: OptiX support in Cycles
optdepends = openimagedenoise: Intel Open Image Denoise support in compositing
provides = blender
conflicts = blender
- source = git://git.blender.org/blender.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 = blender.desktop
- md5sums = SKIP
- md5sums = SKIP
- md5sums = SKIP
- md5sums = SKIP
- md5sums = SKIP
- md5sums = 47e5bbe93fc221066882947211ff7812
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
pkgname = blender-git
diff --git a/PKGBUILD b/PKGBUILD
index 6a0e83b60cf..48c1d3f5f3a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,14 +1,24 @@
+#!/bin/hint/bash
# Maintainer: Fredrick Brennan <copypaste@kittens.ph>
# Submitter: Lukas Jirkovsky <l.jirkovsky@gmail.com>
+# Co-maintainer : bartus <arch-user-repoᘓbartus.33mail.com>
+
+# Configuration.
+_fragment=${FRAGMENT:-#branch=master}
+[[ -v CUDA_ARCH ]] && _CUDA_ARCH=(${CUDA_ARCH})
+
+#some extra, unofficially supported stuff goes here:
+_CMAKE_FLAGS+=( -DWITH_ALEMBIC_HDF5=ON )
+
pkgname=blender-git
pkgver=2.81.r91063.ab519b91b2c
pkgrel=1
pkgdesc="A fully integrated 3D graphics creation suite (development)"
arch=('i686' 'x86_64')
-url="http://blender.org/"
-depends=('alembic' 'libgl' 'python' 'desktop-file-utils' 'hicolor-icon-theme' 'openjpeg'
+url="https://blender.org/"
+depends+=('alembic' 'libgl' 'python' 'python-numpy' 'openjpeg2'
'ffmpeg' 'fftw' 'openal' 'freetype2' 'libxi' 'openimageio' 'opencolorio'
- 'openvdb' 'opencollada' 'opensubdiv' 'openshadinglanguage' 'libtiff' 'libpng' 'python-numpy')
+ 'openvdb' 'opencollada' 'opensubdiv' 'openshadinglanguage' 'libtiff' 'libpng')
optdepends=('cuda: CUDA support in Cycles'
'optix: OptiX support in Cycles'
'openimagedenoise: Intel Open Image Denoise support in compositing')
@@ -16,90 +26,83 @@ makedepends=('git' 'cmake' 'boost' 'mesa' 'llvm')
provides=('blender')
conflicts=('blender')
license=('GPL')
-install=blender.install
# 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' \
- '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' \
- blender.desktop)
-md5sums=('SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- '47e5bbe93fc221066882947211ff7812')
+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'
+ )
+sha256sums=('SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ )
pkgver() {
- cd "$srcdir/blender"
- printf "%s.r%s.%s" "$(grep -Po "BLENDER_VERSION \K[0-9]{3}" source/blender/blenkernel/BKE_blender_version.h|sed 's/./&./1')" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ 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/blender" rev-list --count HEAD)" \
+ "$(git -C "$srcdir/blender" rev-parse --short HEAD)"
}
- _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
- _EXTRAOPTS="-DWITH_CYCLES_CUDA_BINARIES=ON \
- -DCUDA_TOOLKIT_ROOT_DIR=/opt/cuda"
-fi
-
-# check for optix
-_OPTIX_PKG=`pacman -Qq optix 2>/dev/null` || true
-if [ "$_OPTIX_PKG" != "" ]; then
- _EXTRAOPTS="$_EXTRAOPTS \
- -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
- _EXTRAOPTS="$_EXTRAOPTS \
- -DWITH_OPENIMAGEDENOISE=ON"
-fi
-
prepare() {
cd "$srcdir/blender"
# update the submodules
- git submodule update --init --recursive
- git submodule foreach git checkout master
- git submodule foreach git pull --rebase origin master
+ git submodule update --init --recursive --remote
}
build() {
- mkdir -p "$srcdir/blender-build"
- cd "$srcdir/blender-build"
+ _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
- cmake "$srcdir/blender" \
- -C${srcdir}/blender/build_files/cmake/config/blender_release.cmake \
+ cmake -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_OPENCOLORIO=ON \
- -DWITH_FFTW3=ON \
-DWITH_SYSTEM_GLEW=ON \
- -DWITH_CODEC_FFMPEG=ON \
-DWITH_PYTHON_INSTALL=OFF \
- -DPYTHON_VERSION=${_pyver} \
- -DWITH_MOD_OCEANSIM=ON \
- $_EXTRAOPTS
+ -DPYTHON_VERSION="${_pyver}" \
+ "${_CMAKE_FLAGS[@]}"
make
}
package() {
- cd "$srcdir/blender-build"
- make DESTDIR="$pkgdir" install
- install -D -m644 "$srcdir"/blender.desktop \
- "$pkgdir"/usr/share/applications/blender.desktop
+ _suffix=${pkgver%%.r*}
+ make -C "$srcdir/build" DESTDIR="$pkgdir" install
- if [ -e "$pkgdir"/usr/share/blender/*/scripts/addons/cycles/lib/ ] ; then
+ 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/*/scripts/addons/cycles/lib/*
+ chmod 444 "$pkgdir"/usr/share/blender/${_suffix}/scripts/addons/cycles/lib/*
fi
}
diff --git a/blender.desktop b/blender.desktop
deleted file mode 100644
index 86b82b32b7a..00000000000
--- a/blender.desktop
+++ /dev/null
@@ -1,14 +0,0 @@
-[Desktop Entry]
-Name=Blender-git
-Comment=A 3D program
-Comment[cs]=Program pro 3D modeling a animaci
-Comment[es]=Un programa de 3D
-Comment[no]=Et 3d-program
-Comment[da]=Et program til 3d-modelering
-Exec=blender
-Icon=blender
-Terminal=false
-X-MultipleArgs=false
-Type=Application
-Categories=Graphics;3DGraphics;
-MimeType=application/blender;application/x-blender;
diff --git a/blender.install b/blender.install
deleted file mode 100644
index d061748130f..00000000000
--- a/blender.install
+++ /dev/null
@@ -1,14 +0,0 @@
-
-post_install() {
- update-desktop-database -q
- gtk-update-icon-cache -qf /usr/share/icons/hicolor/
-}
-
-post_upgrade() {
- post_install $1
-}
-
-post_remove() {
- post_install $1
-}
-