Merge pull request #53078 from tex/wings3d

wings3d: 1.5.4 -> 2.2.1
This commit is contained in:
Silvan Mosberger 2018-12-31 16:20:02 +01:00 committed by GitHub
commit ced0be5c06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 50 deletions

View File

@ -1,34 +1,35 @@
{ fetchurl, stdenv, erlang, esdl, cl }:
{ fetchurl, stdenv, erlang, cl, libGL, libGLU }:
stdenv.mkDerivation rec {
name = "wings-1.5.4";
name = "wings-2.2.1";
src = fetchurl {
url = "mirror://sourceforge/wings/${name}.tar.bz2";
sha256 = "0qz6rmmkqgk3p0d3v2ikkf22n511bq0m7xp3kkradwrp28fcl15x";
sha256 = "1adlq3wd9bz0hjznpzsgilxgsbhr0kk01f06872mq37v4cbw76bh";
};
ERL_LIBS = "${esdl}/lib/erlang/lib:${cl}/lib/erlang/lib";
ERL_LIBS = "${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
sed -i 's,-Werror ,,' e3d/Makefile
sed -i 's,../../wings/,../,' icons/Makefile
find plugins_src -mindepth 2 -type f -name "*.[eh]rl" -exec sed -i 's,wings/src/,../../src/,' {} \;
find plugins_src -mindepth 2 -type f -name "*.[eh]rl" -exec sed -i 's,wings/e3d/,../../e3d/,' {} \;
find plugins_src -mindepth 2 -type f -name "*.[eh]rl" -exec sed -i 's,wings/intl_tools/,../../intl_tools/,' {} \;
find . -type f -name "*.[eh]rl" -exec sed -i 's,wings/src/,../src/,' {} \;
find . -type f -name "*.[eh]rl" -exec sed -i 's,wings/e3d/,../e3d/,' {} \;
find . -type f -name "*.[eh]rl" -exec sed -i 's,wings/intl_tools/,../intl_tools/,' {} \;
'';
buildInputs = [ erlang esdl cl ];
buildInputs = [ erlang cl libGL libGLU ];
# 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
cp -R textures shaders plugins $out/lib/$name
cat << EOF > $out/bin/wings
#!/bin/sh
${erlang}/bin/erl -smp disable \
-pa ${esdl}/lib/erlang/lib/${cl.name}/ebin \
-pa ${esdl}/lib/erlang/lib/${esdl.name}/ebin \
${erlang}/bin/erl \
-pa $out/lib/${name}/ebin -run wings_start start_halt "$@"
EOF
chmod +x $out/bin/wings

View File

@ -1,32 +0,0 @@
{stdenv, fetchurl, SDL, libGLU_combined, rebar, erlang}:
stdenv.mkDerivation rec {
name = "esdl-1.3.1";
src = fetchurl {
url = "mirror://sourceforge/esdl/${name}.src.tgz";
sha256 = "0f5ad519600qarsa2anmnaxh6b7djzx1dnwxzi4l36pxsq896y01";
};
buildInputs = [ erlang rebar ];
propagatedBuildInputs = [ SDL libGLU_combined ];
buildPhase = ''
rebar compile
'';
# 'cp' line taken from Arch recipe
# https://projects.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/erlang-sdl
installPhase = ''
DIR=$out/lib/erlang/lib/${name}
mkdir -p $DIR
cp -ruv c_src doc ebin include priv src $DIR
'';
meta = {
homepage = http://esdl.sourceforge.net/;
description = "Erlang binding to SDL that includes a binding to OpenGL";
license = "BSD";
platforms = stdenv.lib.platforms.linux;
};
}

View File

@ -9657,8 +9657,6 @@ in
epoxy = callPackage ../development/libraries/epoxy {};
esdl = callPackage ../development/libraries/esdl { };
libesmtp = callPackage ../development/libraries/libesmtp { };
exiv2 = callPackage ../development/libraries/exiv2 { };
@ -19993,8 +19991,7 @@ in
winswitch = callPackage ../tools/X11/winswitch { };
wings = callPackage ../applications/graphics/wings {
esdl = esdl.override { erlang = erlangR18; };
erlang = erlangR18;
erlang = erlangR21;
};
write_stylus = libsForQt5.callPackage ../applications/graphics/write_stylus { };