|
|
|
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
|
|
|
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
|
|
|
|
#
|
|
|
|
# Filename: package/.../blender/blender.conf
|
|
|
|
# Copyright (C) 2011 The OpenSDE Project
|
|
|
|
# Copyright (C) 2004 - 2006 The T2 SDE Project
|
|
|
|
#
|
|
|
|
# More information can be found in the files COPYING and README.
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; version 2 of the License. A copy of the
|
|
|
|
# GNU General Public License can be found in the file COPYING.
|
|
|
|
# --- SDE-COPYRIGHT-NOTE-END ---
|
|
|
|
|
|
|
|
blender_preconf() {
|
|
|
|
var_append sconsopt ' ' "BF_BUILDDIR='sde-build'"
|
|
|
|
var_append sconsopt ' ' "BF_INSTALLDIR='sde-install'"
|
|
|
|
var_append sconsopt ' ' "BF_DOCDIR='sde-install/doc'"
|
|
|
|
# in x86-64 linking fails, needs to be told where xorg is
|
|
|
|
var_append sconsopt ' ' "BF_OPENGL_LIBPATH=`pkg-config x11 --libs-only-L`"
|
|
|
|
var_append sconsopt ' ' "BF_OPENGL_INC=`pkg-config x11 --cflags-only-I`"
|
|
|
|
|
|
|
|
# FFMPeg Support
|
|
|
|
if pkginstalled -f ffmpeg; then
|
|
|
|
var_append sconsopt ' ' "BF_FFMPEG=\"$( pkgprefix -r ffmpeg )\""
|
|
|
|
var_append sconsopt ' ' "BF_FFMPEG_LIB=\"avdevice avformat avcodec swscale avutil\""
|
|
|
|
# var_append cmakeopt ' ' "WITH_FFMPEG=ON"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
hook_add preconf 9 'blender_preconf'
|
|
|
|
|
|
|
|
blender_build_plugins() {
|
|
|
|
chmod +x sde-install/plugins/bmake
|
|
|
|
eval $MAKE -C sde-install/plugins
|
|
|
|
}
|
|
|
|
hook_add inmake 9 'blender_build_plugins'
|
|
|
|
|
|
|
|
blender_install() {
|
|
|
|
cd sde-install
|
|
|
|
|
|
|
|
# install binaries
|
|
|
|
mkdir -p $root$bindir
|
|
|
|
install -m 755 blender $root$bindir
|
|
|
|
install -m 755 blenderplayer $root$bindir
|
|
|
|
|
|
|
|
# install plugins
|
|
|
|
mkdir -p $root$libdir/$pkg
|
|
|
|
for x in sequence texture; do
|
|
|
|
mkdir -p $root$libdir/$pkg/$x
|
|
|
|
install -m 755 plugins/$x/*.so $root$libdir/$pkg/$x
|
|
|
|
done
|
|
|
|
|
|
|
|
# install plugin headers
|
|
|
|
mkdir -p $root$includedir/$pkg
|
|
|
|
install plugins/include/*.h $root$includedir/$pkg
|
|
|
|
|
|
|
|
# install scripts
|
|
|
|
mkdir -p $root$datadir/$pkg
|
|
|
|
cp -av .blender/scripts $root$datadir/$pkg
|
|
|
|
|
|
|
|
# install locales
|
|
|
|
if [ "$SDECFG_DISABLE_NLS" != 1 ]; then
|
|
|
|
for x in .blender/locale/* ; do
|
|
|
|
local lcsrcdir="$x/LC_MESSAGES"
|
|
|
|
local lcdestdir="$root$datadir/locale/$( basename $x )/LC_MESSAGES"
|
|
|
|
mkdir -p $lcdestdir
|
|
|
|
cp -av "$lcsrcdir/blender.mo" "$lcdestdir"
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
|
|
|
# install icon and desktop file
|
|
|
|
for x in icons/* ; do cp $x/* $root$datadir/icons/hicolor/$( basename $x)/apps/; done
|
|
|
|
cp -av ../release/freedesktop/blender.desktop $root/$datadir/applications/
|
|
|
|
|
|
|
|
# install documentation files
|
|
|
|
cp -av *.{txt,html,pdf} $root$docdir
|
|
|
|
}
|
|
|
|
hook_add postmake 9 'blender_install'
|
|
|
|
|
|
|
|
# do not run scons install
|
|
|
|
sconsinstopt=''
|