diff options
author | bartus | 2018-05-25 14:58:48 +0200 |
---|---|---|
committer | bartus | 2018-05-25 15:00:51 +0200 |
commit | e60af7afa51f900fbba32b51e15feb23e09d43f0 (patch) | |
tree | 8614284b376650d32ffb6e994bff4803d52aee64 | |
download | aur-e60af7afa51f900fbba32b51e15feb23e09d43f0.tar.gz |
init
-rw-r--r-- | .SRCINFO | 62 | ||||
-rw-r--r-- | PKGBUILD | 144 | ||||
-rw-r--r-- | SelectCudaComputeArch.patch | 15 | ||||
-rw-r--r-- | blender-fracture_modifier.desktop | 14 | ||||
-rw-r--r-- | blender.install | 14 | ||||
-rw-r--r-- | ffmpeg.patch | 63 | ||||
-rw-r--r-- | gcc8.patch | 13 | ||||
-rw-r--r-- | openvdb.patch | 13 |
8 files changed, 338 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..f45e2eedf242 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,62 @@ +pkgbase = blender-fracture_modifier-git + pkgdesc = Development version of Blenders fracture_modifier branch + pkgver = v2.79b.r2130.g9a21afd18d4 + pkgrel = 1 + url = http://blender.org/ + install = blender.install + arch = i686 + arch = x86_64 + license = GPL + makedepends = git + makedepends = cmake + makedepends = boost + makedepends = mesa + makedepends = llvm + depends = alembic + depends = openjpeg + depends = python-numpy + depends = libgl + depends = python + depends = desktop-file-utils + depends = hicolor-icon-theme + depends = ffmpeg + depends = fftw + depends = openal + depends = freetype2 + depends = libxi + depends = openimageio + depends = opencolorio + depends = openvdb + depends = opencollada + depends = opensubdiv + depends = openshadinglanguage + depends = libtiff + depends = libpng + optdepends = cuda: CUDA support in Cycles + provides = blender-fracture_modifier + conflicts = blender-fracture_modifier + source = git://git.blender.org/blender.git#branch=fracture_modifier + 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 = git+https://github.com/scorpion81/blender-fracture-helper.git + source = blender-fracture_modifier.desktop + source = SelectCudaComputeArch.patch + source = gcc8.patch + source = ffmpeg.patch + source = openvdb.patch + md5sums = SKIP + md5sums = SKIP + md5sums = SKIP + md5sums = SKIP + md5sums = SKIP + md5sums = SKIP + md5sums = 0a4847775c9eec16a76ec7d3a03a678d + md5sums = 9454ff7e994f72ead5027356e227cbd2 + md5sums = f36d19118ae0a58801a6e3e47e017eb3 + md5sums = bb325c8c879d677ad1f1c54797268716 + md5sums = fe709e616e52c1acc47c1cc0f77c2694 + +pkgname = blender-fracture_modifier-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..e0c4ba458de9 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,144 @@ +# Maintainer: bartus {aur@bartus.33mail.com} + +_branch="fracture_modifier" +_sufix=${_branch} +_blenver=2.79 +_fragment="#branch=${_branch}" +pkgname=blender-${_sufix}-git +pkgver=v2.79b.r2130.g9a21afd18d4 +pkgrel=1 +pkgdesc="Development version of Blenders ${_branch} branch" +arch=('i686' 'x86_64') +url="http://blender.org/" +depends=('alembic' 'openjpeg' 'python-numpy' 'libgl' 'python' 'desktop-file-utils' 'hicolor-icon-theme' + 'ffmpeg' 'fftw' 'openal' 'freetype2' 'libxi' 'openimageio' 'opencolorio' + 'openvdb' 'opencollada' 'opensubdiv' 'openshadinglanguage' 'libtiff' 'libpng') +optdepends=('cuda: CUDA support in Cycles') +makedepends=('git' 'cmake' 'boost' 'mesa' 'llvm') +provides=('blender-fracture_modifier') +conflicts=('blender-fracture_modifier') +#options=(!makeflags) +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${_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' \ + 'git+https://github.com/scorpion81/blender-fracture-helper.git' \ + blender-fracture_modifier.desktop \ + SelectCudaComputeArch.patch \ + gcc8.patch \ + ffmpeg.patch \ + openvdb.patch \ + ) +md5sums=('SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + '0a4847775c9eec16a76ec7d3a03a678d' + '9454ff7e994f72ead5027356e227cbd2' + 'f36d19118ae0a58801a6e3e47e017eb3' + 'bb325c8c879d677ad1f1c54797268716' + 'fe709e616e52c1acc47c1cc0f77c2694') + +# 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 + +pkgver() { + cd "$srcdir/blender" + git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g' +} + +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 apply -v ${srcdir}/SelectCudaComputeArch.patch + git apply -v ${srcdir}/gcc8.patch + git apply -v ${srcdir}/ffmpeg.patch + git apply -v ${srcdir}/openvdb.patch +} + +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]))") + msg "python version detected: ${_pyver}" + + export CFLAGS="${CFLAGS} -DOPENVDB_3_ABI_COMPATIBLE" + export CXXFLAGS="${CXXFLAGS} -DOPENVDB_3_ABI_COMPATIBLE" + + cmake "$srcdir/blender" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DWITH_INSTALL_PORTABLE=OFF \ + -DWITH_PLAYER=OFF \ + -DWITH_ALEMBIC=ON \ + -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 \ + -DWITH_CYCLES_OPENSUBDIV=ON \ + -DWITH_CYCLES_OSL=ON \ + -DWITH_LLVM=ON \ + -DWITH_IMAGE_OPENEXR=ON \ + -DWITH_OPENSUBDIV=ON \ + -DWITH_OPENVDB=ON \ + -DWITH_OPENVDB_BLOSC=ON \ + -DWITH_OPENCOLLADA=ON \ + $_EXTRAOPTS + make +} + +package() { + cd "$srcdir/blender-build" + make DESTDIR="$pkgdir" install + + msg "install fracture-helper addon" + install ${srcdir}/blender-fracture-helper/*.py ${pkgdir}/usr/share/blender/${_blenver}/scripts/addons/ + + msg "add -${_sufix} sufix to desktop shortcut" + sed -i "s/=blender/=blender-${_sufix}/g" ${pkgdir}/usr/share/applications/blender.desktop + sed -i "s/=Blender/=Blender-${_sufix}/g" ${pkgdir}/usr/share/applications/blender.desktop + mv ${pkgdir}/usr/share/applications/blender.desktop ${pkgdir}/usr/share/applications/blender-${_sufix}.desktop + + msg "add -${_sufix} sufix to binaries" + mv ${pkgdir}/usr/bin/blender ${pkgdir}/usr/bin/blender-${_sufix} + mv ${pkgdir}/usr/bin/blender-thumbnailer.py ${pkgdir}/usr/bin/blender-${_sufix}-thumbnailer.py +# mv ${pkgdir}/usr/bin/blenderplayer ${pkgdir}/usr/bin/blenderplayer-${_sufix} + + msg "mv doc/blender to doc/blender-${_sufix}" + mv ${pkgdir}/usr/share/doc/blender ${pkgdir}/usr/share/doc/blender-${_sufix} + + msg "add -${_sufix} sufix to all icons" + for icon in `find ${pkgdir}/usr/share/icons -type f` + do + # ${filename##/*.} extra extenssion from path + # ${filename%.*} extract filename form path + # look at bash "manipulatin string" + mv $icon ${icon%.*}-${_sufix}.${icon##/*.} + done + + if [ -e "$pkgdir"/usr/share/blender/*/scripts/addons/cycles/lib/ ] ; then + # make sure the cuda kernels are not stripped + chmod 444 "$pkgdir"/usr/share/blender/*/scripts/addons/cycles/lib/* + fi +} +# vim:set sw=2 ts=2 et: diff --git a/SelectCudaComputeArch.patch b/SelectCudaComputeArch.patch new file mode 100644 index 000000000000..540d50f0bcc3 --- /dev/null +++ b/SelectCudaComputeArch.patch @@ -0,0 +1,15 @@ +diff --git a/intern/cycles/cmake/external_libs.cmake b/intern/cycles/cmake/external_libs.cmake +index 8d04025e6fd..a6949c99f60 100644 +--- a/intern/cycles/cmake/external_libs.cmake ++++ b/intern/cycles/cmake/external_libs.cmake +@@ -41,6 +41,10 @@ if(WITH_CYCLES_CUDA_BINARIES OR NOT WITH_CUDA_DYNLOAD) + find_package(CUDA) # Try to auto locate CUDA toolkit + if(CUDA_FOUND) + message(STATUS "CUDA nvcc = ${CUDA_NVCC_EXECUTABLE}") ++ CUDA_SELECT_NVCC_ARCH_FLAGS(CUDA_ARCH_FLAGS Auto) ++ set(CYCLES_CUDA_BINARIES_ARCH "${CUDA_ARCH_FLAGS_readable}") ++ message(STATUS "Enabling CUDA support (version: ${CUDA_VERSION_STRING}," ++ " archs: ${CUDA_ARCH_FLAGS_readable})") + else() + message(STATUS "CUDA compiler not found, disabling WITH_CYCLES_CUDA_BINARIES") + set(WITH_CYCLES_CUDA_BINARIES OFF) diff --git a/blender-fracture_modifier.desktop b/blender-fracture_modifier.desktop new file mode 100644 index 000000000000..4a5bf6b3d9d0 --- /dev/null +++ b/blender-fracture_modifier.desktop @@ -0,0 +1,14 @@ +[Desktop Entry] +Name=Blender-fracture_modifier +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-fracture_modifier +Icon=blender-fracture_modifier +Terminal=false +X-MultipleArgs=false +Type=Application +Categories=Graphics;3DGraphics; +MimeType=application/blender;application/x-blender; diff --git a/blender.install b/blender.install new file mode 100644 index 000000000000..d061748130f3 --- /dev/null +++ b/blender.install @@ -0,0 +1,14 @@ + +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 +} + diff --git a/ffmpeg.patch b/ffmpeg.patch new file mode 100644 index 000000000000..42567047773f --- /dev/null +++ b/ffmpeg.patch @@ -0,0 +1,63 @@ +diff --git a/intern/ffmpeg/ffmpeg_compat.h b/intern/ffmpeg/ffmpeg_compat.h +index 9c06c8a6d67..f7f437ced6f 100644 +--- a/intern/ffmpeg/ffmpeg_compat.h ++++ b/intern/ffmpeg/ffmpeg_compat.h +@@ -109,6 +109,45 @@ int av_sample_fmt_is_planar(enum AVSampleFormat sample_fmt) + + #endif + ++/* XXX TODO Probably fix to correct modern flags in code? Not sure how old FFMPEG we want to support though, ++ * so for now this will do. */ ++ ++#ifndef FF_MIN_BUFFER_SIZE ++# ifdef AV_INPUT_BUFFER_MIN_SIZE ++# define FF_MIN_BUFFER_SIZE AV_INPUT_BUFFER_MIN_SIZE ++# endif ++#endif ++ ++#ifndef FF_INPUT_BUFFER_PADDING_SIZE ++# ifdef AV_INPUT_BUFFER_PADDING_SIZE ++# define FF_INPUT_BUFFER_PADDING_SIZE AV_INPUT_BUFFER_PADDING_SIZE ++# endif ++#endif ++ ++#ifndef CODEC_FLAG_GLOBAL_HEADER ++# ifdef AV_CODEC_FLAG_GLOBAL_HEADER ++# define CODEC_FLAG_GLOBAL_HEADER AV_CODEC_FLAG_GLOBAL_HEADER ++# endif ++#endif ++ ++#ifndef CODEC_FLAG_GLOBAL_HEADER ++# ifdef AV_CODEC_FLAG_GLOBAL_HEADER ++# define CODEC_FLAG_GLOBAL_HEADER AV_CODEC_FLAG_GLOBAL_HEADER ++# endif ++#endif ++ ++#ifndef CODEC_FLAG_INTERLACED_DCT ++# ifdef AV_CODEC_FLAG_INTERLACED_DCT ++# define CODEC_FLAG_INTERLACED_DCT AV_CODEC_FLAG_INTERLACED_DCT ++# endif ++#endif ++ ++#ifndef CODEC_FLAG_INTERLACED_ME ++# ifdef AV_CODEC_FLAG_INTERLACED_ME ++# define CODEC_FLAG_INTERLACED_ME AV_CODEC_FLAG_INTERLACED_ME ++# endif ++#endif ++ + /* FFmpeg upstream 1.0 is the first who added AV_ prefix. */ + #if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54, 59, 100) + # define AV_CODEC_ID_NONE CODEC_ID_NONE +diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c +index 57dbbe82603..3e5d5c92f04 100644 +--- a/source/blender/blenkernel/intern/writeffmpeg.c ++++ b/source/blender/blenkernel/intern/writeffmpeg.c +@@ -605,7 +605,7 @@ static AVStream *alloc_video_stream(FFMpegContext *context, RenderData *rd, int + c->rc_buffer_aggressivity = 1.0; + #endif + +- c->me_method = ME_EPZS; ++ //c->me_method = ME_EPZS; + + codec = avcodec_find_encoder(c->codec_id); + if (!codec) diff --git a/gcc8.patch b/gcc8.patch new file mode 100644 index 000000000000..55cd19a4b661 --- /dev/null +++ b/gcc8.patch @@ -0,0 +1,13 @@ +diff --git a/intern/itasc/kdl/tree.hpp b/intern/itasc/kdl/tree.hpp +index c8a253fc901..bd35f82d185 100644 +--- a/intern/itasc/kdl/tree.hpp ++++ b/intern/itasc/kdl/tree.hpp +@@ -34,7 +34,7 @@ namespace KDL + //Forward declaration + class TreeElement; + // Eigen allocator is needed for alignment of Eigen data types +- typedef std::map<std::string,TreeElement, std::less<std::string>, Eigen::aligned_allocator<std::pair<std::string, TreeElement> > > SegmentMap; ++ typedef std::map<std::string,TreeElement, std::less<std::string>, Eigen::aligned_allocator<std::pair<const std::string, TreeElement> > > SegmentMap; + + class TreeElement + { diff --git a/openvdb.patch b/openvdb.patch new file mode 100644 index 000000000000..8d0a3b656152 --- /dev/null +++ b/openvdb.patch @@ -0,0 +1,13 @@ +diff --git a/intern/openvdb/intern/openvdb_writer.cc b/intern/openvdb/intern/openvdb_writer.cc +index e886c5a76a8..bedcfe65552 100644 +--- a/intern/openvdb/intern/openvdb_writer.cc ++++ b/intern/openvdb/intern/openvdb_writer.cc +@@ -45,7 +45,7 @@ void OpenVDBWriter::insert(const openvdb::GridBase::Ptr &grid) + + void OpenVDBWriter::insert(const openvdb::GridBase &grid) + { +-#if (OPENVDB_LIBRARY_MAJOR_VERSION_NUMBER == 3) ++#if (OPENVDB_LIBRARY_MAJOR_VERSION_NUMBER <= 3) || defined(OPENVDB_3_ABI_COMPATIBLE) + m_grids->push_back(grid.copyGrid()); + #else + m_grids->push_back(grid.copyGridWithNewTree()); |