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
|
||||
# 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.
|
||||
export LIBRARY_PATH="$glibc_libdir"
|
||||
|
||||
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
|
||||
export LIBRARY_PATH="$glibc_libdir:$LIBRARY_PATH"
|
||||
|
||||
echo "setting \$CPATH to \`$CPATH'"
|
||||
echo "setting \$LIBRARY_PATH to \`$LIBRARY_PATH'"
|
||||
|
@ -10,15 +10,14 @@
|
||||
, zlib ? null, boehmgc ? null
|
||||
, zip ? null, unzip ? null, pkgconfig ? null, gtk ? null, libart_lgpl ? null
|
||||
, libX11 ? null, libXt ? null, libSM ? null, libICE ? null, libXtst ? null
|
||||
, xproto ? null
|
||||
, enableMultilib ? false
|
||||
, name ? "gcc"
|
||||
}:
|
||||
|
||||
assert langTreelang -> bison != null && flex != null;
|
||||
assert langJava -> zip != null && unzip != null;
|
||||
assert gtk != null -> pkgconfig != null && libart_lgpl != null
|
||||
&& libX11 != null && libXt != null && libSM != null
|
||||
&& libICE != null && libXtst != null;
|
||||
assert langJava -> zip != null && unzip != null
|
||||
&& zlib != null && boehmgc != null;
|
||||
|
||||
with stdenv.lib;
|
||||
|
||||
@ -31,9 +30,13 @@ let version = "4.4.1";
|
||||
url = "ftp://sourceware.org/pub/java/ecj-4.3.jar";
|
||||
sha256 = "0jz7hvc0s6iydmhgh5h2m15yza7p2rlss2vkif30vm9y77m97qcx";
|
||||
};
|
||||
xlibs = [ libX11 libXt libSM libICE libXtst xproto ];
|
||||
|
||||
in
|
||||
|
||||
# We need all these X libraries when building AWT with GTK+.
|
||||
assert gtk != null -> (filter (x: x == null) xlibs) == [];
|
||||
|
||||
stdenv.mkDerivation ({
|
||||
name = "${name}-${version}";
|
||||
|
||||
@ -74,8 +77,7 @@ stdenv.mkDerivation ({
|
||||
++ (optional (zlib != null) zlib)
|
||||
++ (optional (boehmgc != null) boehmgc)
|
||||
++ (optionals langJava [zip unzip])
|
||||
++ (optionals (gtk != null)
|
||||
[gtk pkgconfig libart_lgpl libX11 libXt libSM libICE libXtst])
|
||||
++ (optionals (gtk != null) [gtk pkgconfig libart_lgpl] ++ xlibs)
|
||||
;
|
||||
|
||||
configureFlags = "
|
||||
@ -84,6 +86,8 @@ stdenv.mkDerivation ({
|
||||
${if cloogppl != null then "--with-cloog=${cloogppl}" else ""}
|
||||
${if langJava then "--with-ecj-jar=${javaEcj}" else ""}
|
||||
${if (langJava && gtk != null) then "--enable-java-awt=gtk" else ""}
|
||||
--with-gmp=${gmp}
|
||||
--with-mpfr=${mpfr}
|
||||
--disable-libstdcxx-pch
|
||||
--without-included-gettext
|
||||
--with-system-zlib
|
||||
@ -100,8 +104,22 @@ stdenv.mkDerivation ({
|
||||
${if stdenv.isi686 then "--with-arch=i686" else ""}
|
||||
";
|
||||
|
||||
inherit gmp mpfr zlib boehmgc;
|
||||
inherit libX11 libXt libSM libICE libXtst;
|
||||
# Setting $CPATH and $LIBRARY_PATH to make sure both `gcc' and `xgcc' find
|
||||
# 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; };
|
||||
|
||||
|
@ -1736,7 +1736,7 @@ let
|
||||
inherit zip unzip zlib boehmgc gettext pkgconfig;
|
||||
inherit (gtkLibs) gtk;
|
||||
inherit (gnome) libart_lgpl;
|
||||
inherit (xlibs) libX11 libXt libSM libICE libXtst;
|
||||
inherit (xlibs) libX11 libXt libSM libICE libXtst xproto;
|
||||
});
|
||||
|
||||
#ghc = haskellPackages.ghc;
|
||||
|
Loading…
Reference in New Issue
Block a user