Merge pull request #87546 from FireyFly/pkgs/j/avx-flag
j: add avxSupport option
This commit is contained in:
commit
b2f83be34d
@ -1,4 +1,6 @@
|
|||||||
{ stdenv, fetchFromGitHub, readline, libedit, bc }:
|
{ stdenv, fetchFromGitHub, readline, libedit, bc
|
||||||
|
, avxSupport ? false
|
||||||
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "j";
|
pname = "j";
|
||||||
@ -19,6 +21,9 @@ stdenv.mkDerivation rec {
|
|||||||
if stdenv.isLinux then "linux" else
|
if stdenv.isLinux then "linux" else
|
||||||
if stdenv.isDarwin then "darwin" else
|
if stdenv.isDarwin then "darwin" else
|
||||||
"unknown";
|
"unknown";
|
||||||
|
variant = if stdenv.isx86_64 && avxSupport then "avx" else "";
|
||||||
|
|
||||||
|
j64x="j${bits}${variant}";
|
||||||
|
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
|
||||||
@ -34,7 +39,7 @@ stdenv.mkDerivation rec {
|
|||||||
patchShebangs .
|
patchShebangs .
|
||||||
sed -i $JLIB/bin/profile.ijs -e "s@'/usr/share/j/.*'@'$out/share/j'@;"
|
sed -i $JLIB/bin/profile.ijs -e "s@'/usr/share/j/.*'@'$out/share/j'@;"
|
||||||
|
|
||||||
./build_all.sh
|
j64x="${j64x}" ./build_all.sh
|
||||||
|
|
||||||
cp $SOURCE_DIR/bin/${platform}/j${bits}*/* "$JLIB/bin"
|
cp $SOURCE_DIR/bin/${platform}/j${bits}*/* "$JLIB/bin"
|
||||||
'';
|
'';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user