GCJ 4.4: Provide xproto; move CPATH/LIBRARY_PATH compuation to `default.nix'.
svn path=/nixpkgs/trunk/; revision=16501
This commit is contained in:
parent
0b235f3ec5
commit
be4437bed0
@ -42,22 +42,10 @@ if test "$noSysDirs" = "1"; then
|
|||||||
|
|
||||||
# Setting $CPATH makes sure both `gcc' and `xgcc' find the C
|
# Setting $CPATH makes sure both `gcc' and `xgcc' find the C
|
||||||
# library headers, regarless of the language being compiled.
|
# library headers, regarless of the language being compiled.
|
||||||
export CPATH="$NIX_FIXINC_DUMMY:$gmp/include:$mpfr/include"
|
export CPATH="$NIX_FIXINC_DUMMY:$CPATH"
|
||||||
|
|
||||||
# Likewise, to help it find `crti.o' and similar files.
|
# Likewise, to help it find `crti.o' and similar files.
|
||||||
export LIBRARY_PATH="$glibc_libdir"
|
export LIBRARY_PATH="$glibc_libdir:$LIBRARY_PATH"
|
||||||
|
|
||||||
if test "$langJava" = "1"; then
|
|
||||||
for lib in "$zlib" "$boehmgc" "$libX11" "$libXt" "$libSM" \
|
|
||||||
"$libICE" "$libXtst"
|
|
||||||
do
|
|
||||||
if test -n "$lib"
|
|
||||||
then
|
|
||||||
export CPATH="$CPATH:$lib/include"
|
|
||||||
export LIBRARY_PATH="$LIBRARY_PATH:$lib/lib"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "setting \$CPATH to \`$CPATH'"
|
echo "setting \$CPATH to \`$CPATH'"
|
||||||
echo "setting \$LIBRARY_PATH to \`$LIBRARY_PATH'"
|
echo "setting \$LIBRARY_PATH to \`$LIBRARY_PATH'"
|
||||||
|
@ -10,15 +10,14 @@
|
|||||||
, zlib ? null, boehmgc ? null
|
, zlib ? null, boehmgc ? null
|
||||||
, zip ? null, unzip ? null, pkgconfig ? null, gtk ? null, libart_lgpl ? null
|
, zip ? null, unzip ? null, pkgconfig ? null, gtk ? null, libart_lgpl ? null
|
||||||
, libX11 ? null, libXt ? null, libSM ? null, libICE ? null, libXtst ? null
|
, libX11 ? null, libXt ? null, libSM ? null, libICE ? null, libXtst ? null
|
||||||
|
, xproto ? null
|
||||||
, enableMultilib ? false
|
, enableMultilib ? false
|
||||||
, name ? "gcc"
|
, name ? "gcc"
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert langTreelang -> bison != null && flex != null;
|
assert langTreelang -> bison != null && flex != null;
|
||||||
assert langJava -> zip != null && unzip != null;
|
assert langJava -> zip != null && unzip != null
|
||||||
assert gtk != null -> pkgconfig != null && libart_lgpl != null
|
&& zlib != null && boehmgc != null;
|
||||||
&& libX11 != null && libXt != null && libSM != null
|
|
||||||
&& libICE != null && libXtst != null;
|
|
||||||
|
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
|
|
||||||
@ -31,9 +30,13 @@ let version = "4.4.1";
|
|||||||
url = "ftp://sourceware.org/pub/java/ecj-4.3.jar";
|
url = "ftp://sourceware.org/pub/java/ecj-4.3.jar";
|
||||||
sha256 = "0jz7hvc0s6iydmhgh5h2m15yza7p2rlss2vkif30vm9y77m97qcx";
|
sha256 = "0jz7hvc0s6iydmhgh5h2m15yza7p2rlss2vkif30vm9y77m97qcx";
|
||||||
};
|
};
|
||||||
|
xlibs = [ libX11 libXt libSM libICE libXtst xproto ];
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
|
# We need all these X libraries when building AWT with GTK+.
|
||||||
|
assert gtk != null -> (filter (x: x == null) xlibs) == [];
|
||||||
|
|
||||||
stdenv.mkDerivation ({
|
stdenv.mkDerivation ({
|
||||||
name = "${name}-${version}";
|
name = "${name}-${version}";
|
||||||
|
|
||||||
@ -74,8 +77,7 @@ stdenv.mkDerivation ({
|
|||||||
++ (optional (zlib != null) zlib)
|
++ (optional (zlib != null) zlib)
|
||||||
++ (optional (boehmgc != null) boehmgc)
|
++ (optional (boehmgc != null) boehmgc)
|
||||||
++ (optionals langJava [zip unzip])
|
++ (optionals langJava [zip unzip])
|
||||||
++ (optionals (gtk != null)
|
++ (optionals (gtk != null) [gtk pkgconfig libart_lgpl] ++ xlibs)
|
||||||
[gtk pkgconfig libart_lgpl libX11 libXt libSM libICE libXtst])
|
|
||||||
;
|
;
|
||||||
|
|
||||||
configureFlags = "
|
configureFlags = "
|
||||||
@ -84,6 +86,8 @@ stdenv.mkDerivation ({
|
|||||||
${if cloogppl != null then "--with-cloog=${cloogppl}" else ""}
|
${if cloogppl != null then "--with-cloog=${cloogppl}" else ""}
|
||||||
${if langJava then "--with-ecj-jar=${javaEcj}" else ""}
|
${if langJava then "--with-ecj-jar=${javaEcj}" else ""}
|
||||||
${if (langJava && gtk != null) then "--enable-java-awt=gtk" else ""}
|
${if (langJava && gtk != null) then "--enable-java-awt=gtk" else ""}
|
||||||
|
--with-gmp=${gmp}
|
||||||
|
--with-mpfr=${mpfr}
|
||||||
--disable-libstdcxx-pch
|
--disable-libstdcxx-pch
|
||||||
--without-included-gettext
|
--without-included-gettext
|
||||||
--with-system-zlib
|
--with-system-zlib
|
||||||
@ -100,8 +104,22 @@ stdenv.mkDerivation ({
|
|||||||
${if stdenv.isi686 then "--with-arch=i686" else ""}
|
${if stdenv.isi686 then "--with-arch=i686" else ""}
|
||||||
";
|
";
|
||||||
|
|
||||||
inherit gmp mpfr zlib boehmgc;
|
# Setting $CPATH and $LIBRARY_PATH to make sure both `gcc' and `xgcc' find
|
||||||
inherit libX11 libXt libSM libICE libXtst;
|
# the library headers and binaries, regarless of the language being
|
||||||
|
# compiled.
|
||||||
|
|
||||||
|
CPATH = concatStrings
|
||||||
|
(intersperse ":" (map (x: x + "/include")
|
||||||
|
([ zlib ]
|
||||||
|
++ optional langJava boehmgc
|
||||||
|
++ optionals (gtk != null) xlibs)));
|
||||||
|
|
||||||
|
LIBRARY_PATH = concatStrings
|
||||||
|
(intersperse ":" (map (x: x + "/lib")
|
||||||
|
([ zlib ]
|
||||||
|
++ optional langJava boehmgc
|
||||||
|
++ optionals (gtk != null) xlibs)));
|
||||||
|
|
||||||
|
|
||||||
passthru = { inherit langC langCC langFortran langTreelang enableMultilib; };
|
passthru = { inherit langC langCC langFortran langTreelang enableMultilib; };
|
||||||
|
|
||||||
|
@ -1736,7 +1736,7 @@ let
|
|||||||
inherit zip unzip zlib boehmgc gettext pkgconfig;
|
inherit zip unzip zlib boehmgc gettext pkgconfig;
|
||||||
inherit (gtkLibs) gtk;
|
inherit (gtkLibs) gtk;
|
||||||
inherit (gnome) libart_lgpl;
|
inherit (gnome) libart_lgpl;
|
||||||
inherit (xlibs) libX11 libXt libSM libICE libXtst;
|
inherit (xlibs) libX11 libXt libSM libICE libXtst xproto;
|
||||||
});
|
});
|
||||||
|
|
||||||
#ghc = haskellPackages.ghc;
|
#ghc = haskellPackages.ghc;
|
||||||
|
Loading…
Reference in New Issue
Block a user