cl, wings: unbreak on aarch64-linux

This commit is contained in:
Weijia Wang 2023-03-18 18:39:59 +02:00
parent d0781217d2
commit 7f5a37392d
3 changed files with 20 additions and 13 deletions

View File

@ -1,4 +1,4 @@
{ fetchurl, lib, stdenv, erlang, cl, libGL, libGLU, runtimeShell }:
{ lib, stdenv, fetchurl, fetchpatch, erlang, cl, libGL, libGLU, runtimeShell }:
stdenv.mkDerivation rec {
pname = "wings";
@ -9,10 +9,15 @@ stdenv.mkDerivation rec {
sha256 = "1xcmifs4vq2810pqqvsjsm8z3lz24ys4c05xkh82nyppip2s89a3";
};
ERL_LIBS = "${cl}/lib/erlang/lib";
patches = [
(fetchpatch {
url = "https://github.com/dgud/wings/commit/94b3a3c6a0cfdcdbd98edce055d5c83ecb361f37.patch";
hash = "sha256-DHT1TiYoowloIWrdutBu70mL+557cTFr1dRcNgwbkpE=";
})
];
patchPhase = ''
sed -i 's,-Werror ,,' e3d/Makefile
postPatch = ''
find . -type f -name "Makefile" -exec sed -i 's,-Werror ,,' {} \;
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/,' {} \;
@ -24,6 +29,8 @@ stdenv.mkDerivation rec {
buildInputs = [ erlang cl libGL libGLU ];
ERL_LIBS = "${cl}/lib/erlang/lib";
# I did not test the *cl* part. I added the -pa just by imitation.
installPhase = ''
mkdir -p $out/bin $out/lib/wings-${version}/ebin

View File

@ -1,4 +1,4 @@
{lib, stdenv, fetchFromGitHub, rebar, erlang, opencl-headers, ocl-icd }:
{ lib, stdenv, fetchFromGitHub, rebar, erlang, opencl-headers, ocl-icd }:
stdenv.mkDerivation rec {
version = "1.2.4";
@ -11,6 +11,12 @@ stdenv.mkDerivation rec {
sha256 = "1gwkjl305a0231hz3k0w448dsgbgdriaq764sizs5qfn59nzvinz";
};
# https://github.com/tonyrog/cl/issues/39
postPatch = ''
substituteInPlace c_src/Makefile \
--replace "-m64" ""
'';
buildInputs = [ erlang rebar opencl-headers ocl-icd ];
buildPhase = ''
@ -29,8 +35,6 @@ stdenv.mkDerivation rec {
homepage = "https://github.com/tonyrog/cl";
description = "OpenCL binding for Erlang";
license = licenses.mit;
# https://github.com/tonyrog/cl/issues/39
broken = stdenv.isAarch64;
platforms = platforms.linux;
};
}

View File

@ -19506,9 +19506,7 @@ with pkgs;
chromaprint = callPackage ../development/libraries/chromaprint { };
cl = callPackage ../development/libraries/cl {
erlang = erlangR23;
};
cl = callPackage ../development/libraries/cl { };
clanlib = callPackage ../development/libraries/clanlib { };
@ -34389,9 +34387,7 @@ with pkgs;
wily = callPackage ../applications/editors/wily { };
wings = callPackage ../applications/graphics/wings {
erlang = erlangR21;
};
wings = callPackage ../applications/graphics/wings { };
write_stylus = libsForQt5.callPackage ../applications/graphics/write_stylus { };