2015-08-26 11:20:06 +03:00
|
|
|
{ stdenv, fetchurl, qt4, libpng, lib3ds, freeglut, libXi, libqglviewer
|
2010-07-30 18:47:23 +04:00
|
|
|
, swig, python }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2008-06-08 07:56:32 +04:00
|
|
|
name = "freestyle-2.2.0";
|
|
|
|
|
2010-07-30 18:47:23 +04:00
|
|
|
src = fetchurl {
|
2008-06-08 07:56:32 +04:00
|
|
|
url = mirror://sourceforge/freestyle/freestyle.2.2.0-src.tar.bz2;
|
|
|
|
sha256 = "1h4880fijmfy0x6dbl9hfri071rpj3lnwfzkxi1qyqhy7zyxy7ga";
|
|
|
|
};
|
|
|
|
|
2015-08-26 11:20:06 +03:00
|
|
|
buildInputs = [ qt4 libpng lib3ds freeglut libXi libqglviewer swig ];
|
2010-07-30 18:47:23 +04:00
|
|
|
|
2015-08-26 11:20:06 +03:00
|
|
|
inherit python freeglut libqglviewer lib3ds; # if you want to use another adopt patch and Config.pri
|
2008-06-08 07:56:32 +04:00
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
export PYTHON_VERSION=2.5
|
|
|
|
cd src/system && qmake -makefile PREFIX=\$out && cd ..
|
|
|
|
cd rendering && qmake -makefile PREFIX=\$out && cd ..
|
|
|
|
qmake -makefile PREFIX=\$out && make
|
|
|
|
cd swig && make -f Makefile
|
|
|
|
cd ../..
|
|
|
|
|
|
|
|
hide=$out/nix-support/hide
|
|
|
|
moddir=$out/share/freestyle
|
|
|
|
mkdir -p $out/bin $moddir $hide
|
|
|
|
cp -r style_modules $moddir
|
|
|
|
cp build/lib/*.so* $hide
|
|
|
|
cp build/Freestyle $hide
|
|
|
|
cp -r build/linux-g++/debug/lib/python $hide/pylib
|
|
|
|
cat > $out/bin/Freestyle << EOF
|
|
|
|
#!/bin/sh
|
|
|
|
echo use export PYTHONPATH to add your py files to the search path
|
|
|
|
echo the style modules can be loded from directory $moddir
|
|
|
|
echo starting Freestyle know - have fun
|
|
|
|
echo -e "\n\n\n\n"
|
|
|
|
export PYTHONPATH=$PYTHONPATH:$moddir/style_modules:$hide/pylib
|
|
|
|
LD_LIBRARY_PATH=$hide
|
|
|
|
$hide/Freestyle
|
|
|
|
EOF
|
|
|
|
chmod +x $out/bin/Freestyle
|
2010-07-30 18:47:23 +04:00
|
|
|
'';
|
2008-06-08 07:56:32 +04:00
|
|
|
|
|
|
|
patches = ./patch;
|
|
|
|
|
|
|
|
installPhase = ":";
|
|
|
|
|
|
|
|
meta = {
|
2010-07-30 18:47:23 +04:00
|
|
|
description = "Non-Photorealistic Line Drawing rendering from 3D scenes";
|
|
|
|
homepage = http://freestyle.sourceforge.net;
|
2014-06-19 08:19:00 +04:00
|
|
|
license = stdenv.lib.licenses.gpl2;
|
2008-06-08 07:56:32 +04:00
|
|
|
};
|
|
|
|
}
|