Updating blender
svn path=/nixpkgs/trunk/; revision=21670
This commit is contained in:
parent
4f62c83781
commit
c82a9ac921
|
@ -1,50 +1,29 @@
|
||||||
args: with args;
|
{stdenv, fetchurl, cmake, mesa, gettext, python, libjpeg, libpng, zlib, openal, SDL
|
||||||
|
, openexr, libsamplerate, libXi, libtiff, ilmbase }:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "blender-2.48";
|
name = "blender-2.50a";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = http://download.blender.org/source/blender-2.48a.tar.gz;
|
url = http://download.blender.org/source/blender-2.50a1.tar.gz;
|
||||||
sha256 = "0ijfpy510ls8xq1i8fb6j6wd0vac1jvnzmpiga4g7x1j4fg4s7bq";
|
sha256 = "1cik05fmf9b8z3qpwsm6q9h1ia87w1piz87hxhfs24jw6l5pyiwr";
|
||||||
};
|
};
|
||||||
|
|
||||||
phases="unpackPhase buildPhase";
|
buildInputs = [ cmake mesa gettext python libjpeg libpng zlib openal SDL openexr libsamplerate
|
||||||
|
libXi libtiff ilmbase ];
|
||||||
|
|
||||||
inherit scons SDL freetype openal python openexr mesa;
|
cmakeFlags = [ "-DOPENEXR_INC=${openexr}/include/OpenEXR" "-DWITH_OPENCOLLADA=OFF"
|
||||||
|
"-DPYTHON_LIBPATH=${python}/lib" ];
|
||||||
|
|
||||||
buildInputs = [python scons
|
NIX_CFLAGS_COMPILE = "-iquote ${ilmbase}/include/OpenEXR -I${python}/include/${python.libPrefix}";
|
||||||
gettext libjpeg libpng zlib freetype /* fmod smpeg */ freealut openal x11 mesa inputproto libtiff libXi
|
|
||||||
];
|
|
||||||
|
|
||||||
# patch SConstruct so that we can pass on additional include. Either blender
|
patches = [ ./python-chmod.patch ];
|
||||||
# or openEXR is broken. I think OpenEXR should use include "" isntead of <> to
|
|
||||||
# include files beeing in the same directory
|
|
||||||
buildPhase = "
|
|
||||||
cat >> user-config.py << EOF
|
|
||||||
WITH_BF_OPENAL = 'true'
|
|
||||||
WITH_BF_GAMEENGINE='true'
|
|
||||||
WITH_BF_BULLET = 'true'
|
|
||||||
WITH_BF_INTERNATIONAL = 'true'
|
|
||||||
WITH_BF_OPENEXR = 'true'
|
|
||||||
EOF
|
|
||||||
|
|
||||||
sed -i -e \"s=##### END SETUP ##########=env['CPPFLAGS'].append(os.getenv('CPPFLAGS').split(':'))\\n##### END SETUP ##########=\" SConstruct\n"
|
|
||||||
+ " CPPFLAGS=-I$openexr/include/OpenEXR"
|
|
||||||
+ " scons PREFIX=\$out/nix-support"
|
|
||||||
+ " BF_SDL=\$SDL"
|
|
||||||
+ " BF_SDL_LIBPATH=\$SDL/lib"
|
|
||||||
+ " BF_FREETYPE=\$freetype"
|
|
||||||
+ " BF_OPENAL=\$openal"
|
|
||||||
+ " BF_PYTHON=\$python"
|
|
||||||
+ " BF_OPENEXR_INC=\$openexr/include"
|
|
||||||
+ " BF_OPENEXR_LIBPATH=\$openexr/lib"
|
|
||||||
+ " BF_INSTALLDIR=\$out/nix-support/dontLinkThatMuch \n"
|
|
||||||
+ " ensureDir \$out/bin\n"
|
|
||||||
+ " ln -s \$out/nix-support/dontLinkThatMuch/blender \$out/bin/blender"
|
|
||||||
;
|
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "3D Creation/Animation/Publishing System";
|
description = "3D Creation/Animation/Publishing System";
|
||||||
homepage = http://www.blender.org;
|
homepage = http://www.blender.org;
|
||||||
license = "GPL-2 BL";
|
# They comment two licenses: GPLv2 and Blender License, but they
|
||||||
};
|
# say: "We've decided to cancel the BL offering for an indefinite period."
|
||||||
|
license = "GPLv2+";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
As the code copied from the nix store, the files there do not have the 'writeable' permission.
|
||||||
|
Hence this fix, needed on nix but not on usual LSB linuces.
|
||||||
|
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
|
||||||
|
index 386ef1b..6a180fa 100644
|
||||||
|
--- a/source/creator/CMakeLists.txt
|
||||||
|
+++ b/source/creator/CMakeLists.txt
|
||||||
|
@@ -152,6 +152,7 @@ IF(WITH_INSTALL)
|
||||||
|
COMMAND mkdir ${TARGETDIR}/.blender/python # PYTHONPATH and PYTHONHOME is set here
|
||||||
|
COMMAND mkdir ${TARGETDIR}/.blender/python/lib/
|
||||||
|
COMMAND cp -R ${PYTHON_LIBPATH}/python${PYTHON_VERSION} ${TARGETDIR}/.blender/python/lib/
|
||||||
|
+ COMMAND chmod -R +w ${TARGETDIR}/.blender/python/lib/
|
||||||
|
|
||||||
|
COMMAND rm -rf ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/distutils
|
||||||
|
COMMAND rm -rf ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/lib2to3
|
|
@ -4920,6 +4920,8 @@ let
|
||||||
version = "1.4.0";
|
version = "1.4.0";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
openexr = openexr_1_6_1;
|
||||||
|
|
||||||
openldap = import ../development/libraries/openldap {
|
openldap = import ../development/libraries/openldap {
|
||||||
inherit fetchurl stdenv openssl cyrus_sasl db4 groff;
|
inherit fetchurl stdenv openssl cyrus_sasl db4 groff;
|
||||||
};
|
};
|
||||||
|
@ -7119,15 +7121,11 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
blender = import ../applications/misc/blender {
|
blender = import ../applications/misc/blender {
|
||||||
inherit cmake mesa gettext freetype SDL libtiff fetchurl glibc scons x11 lib
|
inherit fetchurl cmake mesa gettext libjpeg libpng zlib openal SDL openexr
|
||||||
libjpeg libpng zlib /* smpeg sdl */ python;
|
libsamplerate libtiff ilmbase;
|
||||||
inherit (xlibs) inputproto libXi;
|
inherit (xlibs) libXi;
|
||||||
freealut = freealut_soft;
|
python = python31Base;
|
||||||
openal = openalSoft;
|
stdenv = stdenv2;
|
||||||
openexr = openexr_1_4_0;
|
|
||||||
# using gcc43 makes blender segfault when pressing p then esc.
|
|
||||||
# is this related to the PHP bug? I'm to lazy to try recompilng it without optimizations
|
|
||||||
stdenv = overrideGCC stdenv gcc42;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
bmp = import ../applications/audio/bmp {
|
bmp = import ../applications/audio/bmp {
|
||||||
|
|
Loading…
Reference in New Issue