Updating wings and dependencies to match erlang
I updated the erlang esdl lib, added the erlang cl lib, added opencl-headers and ocl-icd to make wings build and run. I have not tested its opencl part; I only added dependencies so it builds.
This commit is contained in:
@@ -1,29 +1,34 @@
|
||||
{ fetchurl, stdenv, erlang, esdl }:
|
||||
{ fetchurl, stdenv, erlang, esdl, cl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "wings-1.4.1";
|
||||
name = "wings-1.5.4";
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/wings/${name}.tar.bz2";
|
||||
sha256 = "16kqy92rapmbvkc58mc50cidp1pm8nlwlwx69riyadc9w4qs9bji";
|
||||
sha256 = "0qz6rmmkqgk3p0d3v2ikkf22n511bq0m7xp3kkradwrp28fcl15x";
|
||||
};
|
||||
|
||||
ERL_LIBS = "${esdl}/lib/erlang/addons";
|
||||
ERL_LIBS = "${esdl}/lib/erlang/lib:${cl}/lib/erlang/lib";
|
||||
|
||||
patchPhase = ''
|
||||
sed -i 's,include("sdl_keyboard.hrl"),include_lib("esdl/include/sdl_keyboard.hrl"),' \
|
||||
src/wings_body.erl plugins_src/commands/wpc_constraints.erl
|
||||
|
||||
# Fix reference
|
||||
sed -i 's,wings/e3d/,,' plugins_src/import_export/wpc_lwo.erl
|
||||
'';
|
||||
|
||||
buildInputs = [ erlang esdl ];
|
||||
buildInputs = [ erlang esdl cl ];
|
||||
|
||||
# I did not test the *cl* part. I added the -pa just by imitation.
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin $out/lib/${name}/ebin
|
||||
cp ebin/* $out/lib/${name}/ebin
|
||||
cp -R fonts textures shaders plugins $out/lib/$name
|
||||
cat << EOF > $out/bin/wings
|
||||
#!/bin/sh
|
||||
export ROOTDIR=$out/lib/erlang/addons/${name}
|
||||
${erlang}/bin/erl -smp disable -pa ${esdl}/lib/erlang/addons/${esdl.name}/ebin \
|
||||
${erlang}/bin/erl -smp disable \
|
||||
-pa ${esdl}/lib/erlang/lib/${cl.name}/ebin \
|
||||
-pa ${esdl}/lib/erlang/lib/${esdl.name}/ebin \
|
||||
-pa $out/lib/${name}/ebin -run wings_start start_halt "$@"
|
||||
EOF
|
||||
chmod +x $out/bin/wings
|
||||
|
||||
Reference in New Issue
Block a user