OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

82 lines
2.6 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../blender/blender.conf
  5. # Copyright (C) 2011 The OpenSDE Project
  6. # Copyright (C) 2004 - 2006 The T2 SDE Project
  7. #
  8. # More information can be found in the files COPYING and README.
  9. #
  10. # This program is free software; you can redistribute it and/or modify
  11. # it under the terms of the GNU General Public License as published by
  12. # the Free Software Foundation; version 2 of the License. A copy of the
  13. # GNU General Public License can be found in the file COPYING.
  14. # --- SDE-COPYRIGHT-NOTE-END ---
  15. blender_preconf() {
  16. var_append sconsopt ' ' "BF_BUILDDIR='sde-build'"
  17. var_append sconsopt ' ' "BF_INSTALLDIR='sde-install'"
  18. var_append sconsopt ' ' "BF_DOCDIR='sde-install/doc'"
  19. # in x86-64 linking fails, needs to be told where xorg is
  20. var_append sconsopt ' ' "BF_OPENGL_LIBPATH=`pkg-config x11 --libs-only-L`"
  21. var_append sconsopt ' ' "BF_OPENGL_INC=`pkg-config x11 --cflags-only-I`"
  22. # FFMPeg Support
  23. if pkginstalled -f ffmpeg; then
  24. var_append sconsopt ' ' "BF_FFMPEG=\"$( pkgprefix -r ffmpeg )\""
  25. var_append sconsopt ' ' "BF_FFMPEG_LIB=\"avdevice avformat avcodec swscale avutil\""
  26. # var_append cmakeopt ' ' "WITH_FFMPEG=ON"
  27. fi
  28. }
  29. hook_add preconf 9 'blender_preconf'
  30. blender_build_plugins() {
  31. chmod +x sde-install/plugins/bmake
  32. eval $MAKE -C sde-install/plugins
  33. }
  34. hook_add inmake 9 'blender_build_plugins'
  35. blender_install() {
  36. cd sde-install
  37. # install binaries
  38. mkdir -p $root$bindir
  39. install -m 755 blender $root$bindir
  40. install -m 755 blenderplayer $root$bindir
  41. # install plugins
  42. mkdir -p $root$libdir/$pkg
  43. for x in sequence texture; do
  44. mkdir -p $root$libdir/$pkg/$x
  45. install -m 755 plugins/$x/*.so $root$libdir/$pkg/$x
  46. done
  47. # install plugin headers
  48. mkdir -p $root$includedir/$pkg
  49. install plugins/include/*.h $root$includedir/$pkg
  50. # install scripts
  51. mkdir -p $root$datadir/$pkg
  52. cp -av .blender/scripts $root$datadir/$pkg
  53. # install locales
  54. if [ "$SDECFG_DISABLE_NLS" != 1 ]; then
  55. for x in .blender/locale/* ; do
  56. local lcsrcdir="$x/LC_MESSAGES"
  57. local lcdestdir="$root$datadir/locale/$( basename $x )/LC_MESSAGES"
  58. mkdir -p $lcdestdir
  59. cp -av "$lcsrcdir/blender.mo" "$lcdestdir"
  60. done
  61. fi
  62. # install icon and desktop file
  63. for x in icons/* ; do cp $x/* $root$datadir/icons/hicolor/$( basename $x)/apps/; done
  64. cp -av ../release/freedesktop/blender.desktop $root/$datadir/applications/
  65. # install documentation files
  66. cp -av *.{txt,html,pdf} $root$docdir
  67. }
  68. hook_add postmake 9 'blender_install'
  69. # do not run scons install
  70. sconsinstopt=''