Guest User

bartus

a guest
Aug 31st, 2018
124
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Maintainer : bartus <arch-user-repoᘓbartus.33mail.com>
  2.  
  3. #to enforce cuda verison uncomment this line and update value of sm_xx model accordingly
  4. _cuda_capability="sm_50"
  5.  
  6. pkgname=blender-2.8-git
  7. pkgver=2.8_r79892.d7c58cd8f73
  8. pkgrel=1
  9. pkgdesc="Development version of Blender 2.8 branch"
  10. arch=('i686' 'x86_64')
  11. url="http://blender.org/"
  12. depends=('alembic' 'libgl' 'python' 'python-numpy' 'openjpeg' 'desktop-file-utils' 'hicolor-icon-theme'
  13. 'ffmpeg' 'fftw' 'openal' 'freetype2' 'libxi' 'openimageio' 'opencolorio'
  14. 'openvdb' 'opencollada' 'opensubdiv' 'openshadinglanguage' 'libtiff' 'libpng')
  15. optdepends=('cuda: CUDA support in Cycles')
  16. makedepends=('git' 'cmake' 'cuda' 'boost' 'mesa' 'llvm')
  17. options=(!strip)
  18. provides=('blender-2.8')
  19. conflicts=('blender-2.8')
  20. license=('GPL')
  21. install=blender.install
  22. # NOTE: the source array has to be kept in sync with .gitmodules
  23. # the submodules has to be stored in path ending with git to match
  24. # the path in .gitmodules.
  25. # More info:
  26. # http://wiki.blender.org/index.php/Dev:Doc/Tools/Git
  27. source=('git://git.blender.org/blender.git#branch=blender2.8' \
  28. 'blender-addons.git::git://git.blender.org/blender-addons.git' \
  29. 'blender-addons-contrib.git::git://git.blender.org/blender-addons-contrib.git' \
  30. 'blender-translations.git::git://git.blender.org/blender-translations.git' \
  31. 'blender-dev-tools.git::git://git.blender.org/blender-dev-tools.git' \
  32. blender-2.8.desktop \
  33. ffmpeg.patch \
  34. )
  35. md5sums=('SKIP'
  36. 'SKIP'
  37. 'SKIP'
  38. 'SKIP'
  39. 'SKIP'
  40. 'cd108dca1c77607c6a7cc45aa284ea97'
  41. '9d4bfb5b3dd33e95b13cc6c7d9d2d2e1')
  42.  
  43. # determine whether we can precompile CUDA kernels
  44. _CUDA_PKG=`pacman -Qq cuda 2>/dev/null` || true
  45. if [ "$_CUDA_PKG" != "" ]; then
  46. _EXTRAOPTS=(-DWITH_CYCLES_CUDA_BINARIES=ON \
  47. -DCUDA_TOOLKIT_ROOT_DIR=/opt/cuda)
  48. if [ "$_cuda_capability" != "" ]; then
  49. _EXTRAOPTS+=(-DCYCLES_CUDA_BINARIES_ARCH:STRING="${_cuda_capability}")
  50. fi
  51. fi
  52.  
  53. pkgver() {
  54. cd "$srcdir/blender"
  55. printf "2.8_r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  56. }
  57.  
  58. prepare() {
  59. cd "$srcdir/blender"
  60. # update the submodules
  61. git submodule update --init --recursive
  62. git submodule foreach git checkout master
  63. git submodule foreach git pull --rebase origin master
  64. git apply ${srcdir}/ffmpeg.patch
  65. }
  66.  
  67. build() {
  68. mkdir -p "$srcdir/blender-build"
  69. cd "$srcdir/blender-build"
  70.  
  71. _pyver=$(python -c "from sys import version_info; print(\"%d.%d\" % (version_info[0],version_info[1]))")
  72. msg "python version detected: ${_pyver}"
  73.  
  74. export CFLAGS="${CFLAGS} -DOPENVDB_3_ABI_COMPATIBLE"
  75. export CXXFLAGS="${CXXFLAGS} -DOPENVDB_3_ABI_COMPATIBLE"
  76.  
  77. cmake "$srcdir/blender" \
  78. -DCMAKE_INSTALL_PREFIX=/usr \
  79. -DWITH_INSTALL_PORTABLE=OFF \
  80. -DWITH_CXX11=ON \
  81. -DWITH_ALEMBIC=NO \
  82. -DWITH_OPENCOLORIO=ON \
  83. -DWITH_FFTW3=ON \
  84. -DWITH_SYSTEM_GLEW=ON \
  85. -DWITH_CODEC_FFMPEG=ON \
  86. -DWITH_PYTHON_INSTALL=OFF \
  87. -DPYTHON_VERSION=${_pyver} \
  88. -DWITH_MOD_OCEANSIM=ON \
  89. -DWITH_CYCLES_OPENSUBDIV=ON \
  90. -DWITH_CYCLES_OSL=ON \
  91. -DWITH_LLVM=ON \
  92. -DWITH_IMAGE_OPENEXR=ON \
  93. -DWITH_OPENSUBDIV=ON \
  94. -DWITH_OPENVDB=ON \
  95. -DWITH_OPENVDB_BLOSC=ON \
  96. -DWITH_OPENCOLLADA=ON \
  97. ${_EXTRAOPTS[@]}
  98. make
  99. }
  100.  
  101. package() {
  102. cd "$srcdir/blender-build"
  103. make DESTDIR="$pkgdir" install
  104.  
  105. msg "add -2.8 sufix to desktop shortcut"
  106. sed -i 's/=blender/=blender-2.8/g' ${pkgdir}/usr/share/applications/blender.desktop
  107. sed -i 's/=Blender/=Blender-2.8/g' ${pkgdir}/usr/share/applications/blender.desktop
  108. mv ${pkgdir}/usr/share/applications/blender.desktop ${pkgdir}/usr/share/applications/blender-2.8.desktop
  109.  
  110. msg "add -2.8 sufix to binaries"
  111. mv ${pkgdir}/usr/bin/blender ${pkgdir}/usr/bin/blender-2.8
  112. mv ${pkgdir}/usr/bin/blender-thumbnailer.py ${pkgdir}/usr/bin/blender-2.8-thumbnailer.py
  113. # mv ${pkgdir}/usr/bin/blenderplayer ${pkgdir}/usr/bin/blenderplayer-2.8
  114.  
  115. msg "mv doc/blender to doc/blender-2.8"
  116. mv ${pkgdir}/usr/share/doc/blender ${pkgdir}/usr/share/doc/blender-2.8
  117.  
  118. msg "add -2.8 sufix to all icons"
  119. for icon in `find ${pkgdir}/usr/share/icons -type f`
  120. do
  121. # ${filename##/*.} extra extenssion from path
  122. # ${filename%.*} extract filename form path
  123. # look at bash "manipulatin string"
  124. mv $icon ${icon%.*}-2.8.${icon##/*.}
  125. done
  126.  
  127. ## not needed when using options=(!strip)?
  128. #if [ -e "$pkgdir"/usr/share/blender/*/scripts/addons/cycles/lib/ ] ; then
  129. # # make sure the cuda kernels are not stripped
  130. # chmod 444 "$pkgdir"/usr/share/blender/*/scripts/addons/cycles/lib/*
  131. #fi
  132. }
  133. # vim:set sw=2 ts=2 et:
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×