1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-01-22 14:45:27 +00:00

* Indentation fixes.

svn path=/nixpkgs/branches/stdenv-updates/; revision=22961
This commit is contained in:
Eelco Dolstra 2010-08-05 13:21:29 +00:00
parent e0a11f532b
commit 6fe628b99a
2 changed files with 61 additions and 55 deletions

View file

@ -183,6 +183,7 @@ stdenv.mkDerivation ({
buildNativeInputs = [ texinfo which ]
++ optional (perl != null) perl;
buildInputs = [ gmp mpfr mpc libelf gettext ]
++ (optional (ppl != null) ppl)
++ (optional (cloogppl != null) cloogppl)
@ -241,50 +242,50 @@ stdenv.mkDerivation ({
targetConfig = if (cross != null) then cross.config else null;
crossAttrs = {
AR = "${stdenv.cross.config}-ar";
LD = "${stdenv.cross.config}-ld";
CC = "${stdenv.cross.config}-gcc";
CXX = "${stdenv.cross.config}-gcc";
AR_FOR_TARGET = "${stdenv.cross.config}-ar";
LD_FOR_TARGET = "${stdenv.cross.config}-ld";
CC_FOR_TARGET = "${stdenv.cross.config}-gcc";
NM_FOR_TARGET = "${stdenv.cross.config}-nm";
CXX_FOR_TARGET = "${stdenv.cross.config}-g++";
# If we are making a cross compiler, cross != null
NIX_GCC_CROSS = if cross == null then "${stdenv.gccCross}" else "";
dontStrip = true;
configureFlags = "
${if enableMultilib then "" else "--disable-multilib"}
${if enableShared then "" else "--disable-shared"}
${if ppl != null then "--with-ppl=${ppl.hostDrv}" else ""}
${if cloogppl != null then "--with-cloog=${cloogppl.hostDrv}" else ""}
${if langJava then "--with-ecj-jar=${javaEcj.hostDrv}" else ""}
${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.hostDrv}" else ""}
--with-gmp=${gmp.hostDrv}
--with-mpfr=${mpfr.hostDrv}
--disable-libstdcxx-pch
--without-included-gettext
--with-system-zlib
--enable-languages=${
concatStrings (intersperse ","
( optional langC "c"
++ optional langCC "c++"
++ optional langFortran "fortran"
++ optional langJava "java"
++ optional langTreelang "treelang"
++ optional langAda "ada"
++ optional langVhdl "vhdl"
)
)
}
${if langAda then " --enable-libada" else ""}
${if (cross == null && stdenv.isi686) then "--with-arch=i686" else ""}
${if cross != null then crossConfigureFlags else ""}
--target=${stdenv.cross.config}
";
};
crossAttrs = {
AR = "${stdenv.cross.config}-ar";
LD = "${stdenv.cross.config}-ld";
CC = "${stdenv.cross.config}-gcc";
CXX = "${stdenv.cross.config}-gcc";
AR_FOR_TARGET = "${stdenv.cross.config}-ar";
LD_FOR_TARGET = "${stdenv.cross.config}-ld";
CC_FOR_TARGET = "${stdenv.cross.config}-gcc";
NM_FOR_TARGET = "${stdenv.cross.config}-nm";
CXX_FOR_TARGET = "${stdenv.cross.config}-g++";
# If we are making a cross compiler, cross != null
NIX_GCC_CROSS = if cross == null then "${stdenv.gccCross}" else "";
dontStrip = true;
configureFlags = ''
${if enableMultilib then "" else "--disable-multilib"}
${if enableShared then "" else "--disable-shared"}
${if ppl != null then "--with-ppl=${ppl.hostDrv}" else ""}
${if cloogppl != null then "--with-cloog=${cloogppl.hostDrv}" else ""}
${if langJava then "--with-ecj-jar=${javaEcj.hostDrv}" else ""}
${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.hostDrv}" else ""}
--with-gmp=${gmp.hostDrv}
--with-mpfr=${mpfr.hostDrv}
--disable-libstdcxx-pch
--without-included-gettext
--with-system-zlib
--enable-languages=${
concatStrings (intersperse ","
( optional langC "c"
++ optional langCC "c++"
++ optional langFortran "fortran"
++ optional langJava "java"
++ optional langTreelang "treelang"
++ optional langAda "ada"
++ optional langVhdl "vhdl"
)
)
}
${if langAda then " --enable-libada" else ""}
${if (cross == null && stdenv.isi686) then "--with-arch=i686" else ""}
${if cross != null then crossConfigureFlags else ""}
--target=${stdenv.cross.config}
'';
};
# Needed for the cross compilation to work
@ -368,11 +369,13 @@ stdenv.mkDerivation ({
platforms = stdenv.lib.platforms.linux ++ optionals (langAda == false) [ "i686-darwin" ];
};
}
// (if cross != null && cross.libc == "msvcrt" && crossStageStatic then rec {
// optionalAttrs (cross != null && cross.libc == "msvcrt" && crossStageStatic) {
makeFlags = [ "all-gcc" "all-target-libgcc" ];
installTargets = "install-gcc install-target-libgcc";
} else {})
// (if langVhdl then rec {
}
// optionalAttrs langVhdl rec {
name = "ghdl-0.29";
ghdlSrc = fetchurl {
@ -405,4 +408,4 @@ stdenv.mkDerivation ({
platforms = with stdenv.lib.platforms; linux;
};
} else {}))
})

View file

@ -1,13 +1,16 @@
{ fetchurl, stdenv, ppl, static ? false }:
let
# --with-host-libstdcxx helps when *ppl* is built statically.
# But I will suppose that this is statically built only when ppl is also
# statically built.
staticFlags = assert static -> ppl.dontDisableStatic == true;
if static then " --enable-static --disable-shared --with-host-libstdcxx=-lstdc++" else "";
# --with-host-libstdcxx helps when *ppl* is built statically.
# But I will suppose that this is statically built only when ppl is also
# statically built.
staticFlags =
assert static -> ppl.dontDisableStatic == true;
if static then " --enable-static --disable-shared --with-host-libstdcxx=-lstdc++" else "";
in
stdenv.mkDerivation rec {
name = "cloog-ppl-0.15.9";
@ -22,7 +25,7 @@ stdenv.mkDerivation rec {
dontDisableStatic = if static then true else false;
crossAttrs = {
configureFlags = "--with-ppl=${ppl.hostDrv}" + staticFlags;
configureFlags = "--with-ppl=${ppl.hostDrv}" + staticFlags;
};
doCheck = true;