diff options
author | Ludovic Courtès <ludo@gnu.org> | 2009-11-05 18:46:52 +0000 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2009-11-05 18:46:52 +0000 |
commit | 0e02b4ccf9d4366fe5c68e19ccf19186953b9d99 (patch) | |
tree | fbef23e756a9c7bf7f0f7052e4e90a96bb2dd3b4 | |
parent | 05437f62c97e764ffa869287955aaa066a190eaa (diff) | |
download | nixlib-0e02b4ccf9d4366fe5c68e19ccf19186953b9d99.tar nixlib-0e02b4ccf9d4366fe5c68e19ccf19186953b9d99.tar.gz nixlib-0e02b4ccf9d4366fe5c68e19ccf19186953b9d99.tar.bz2 nixlib-0e02b4ccf9d4366fe5c68e19ccf19186953b9d99.tar.lz nixlib-0e02b4ccf9d4366fe5c68e19ccf19186953b9d99.tar.xz nixlib-0e02b4ccf9d4366fe5c68e19ccf19186953b9d99.tar.zst nixlib-0e02b4ccf9d4366fe5c68e19ccf19186953b9d99.zip |
GCC 4.4.2; new `update-gcc.sh' script.
svn path=/nixpkgs/trunk/; revision=18153
-rw-r--r-- | pkgs/development/compilers/gcc-4.4/default.nix | 29 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc-4.4/sources.nix | 22 | ||||
-rwxr-xr-x | pkgs/development/compilers/gcc-4.4/update-gcc.sh | 59 |
3 files changed, 87 insertions, 23 deletions
diff --git a/pkgs/development/compilers/gcc-4.4/default.nix b/pkgs/development/compilers/gcc-4.4/default.nix index 1149da0a4ccc..25beaeb20bd4 100644 --- a/pkgs/development/compilers/gcc-4.4/default.nix +++ b/pkgs/development/compilers/gcc-4.4/default.nix @@ -22,7 +22,7 @@ assert langJava -> zip != null && unzip != null with stdenv.lib; -let version = "4.4.1"; +let version = "4.4.2"; javaEcj = fetchurl { # The `$(top_srcdir)/ecj.jar' file is automatically picked up at # `configure' time. @@ -55,28 +55,11 @@ stdenv.mkDerivation ({ name = "${name}-${version}"; builder = ./builder.sh; - - src = - optional /*langC*/ true (fetchurl { - url = "mirror://gcc/releases/gcc-${version}/gcc-core-${version}.tar.bz2"; - sha256 = "0jgwa98i964jhnjg6acvvhz0wb51v00kk3gal8qbps8j09g2mgag"; - }) ++ - - - optional langCC (fetchurl { - url = "mirror://gcc/releases/gcc-${version}/gcc-g++-${version}.tar.bz2"; - sha256 = "1pfgfgpvkq0i4023n4v1cghzmcq8c15xn4n967n29vmdrrwk8754"; - }) ++ - - optional langFortran (fetchurl { - url = "mirror://gcc/releases/gcc-${version}/gcc-fortran-${version}.tar.bz2"; - sha256 = "1406r8ndl7pjyas5naw8ygqpfrl72ypyn71llfzf953j736kmi50"; - }) ++ - - optional langJava (fetchurl { - url = "mirror://gcc/releases/gcc-${version}/gcc-java-${version}.tar.bz2"; - sha256 = "07lgph5zxskqqkzbq67wma2067dqr5my110l8rgzspqjq5rhgdil"; - }); + + src = (import ./sources.nix) { + inherit fetchurl optional version; + inherit langC langCC langFortran langJava; + }; patches = [./pass-cxxcpp.patch] diff --git a/pkgs/development/compilers/gcc-4.4/sources.nix b/pkgs/development/compilers/gcc-4.4/sources.nix new file mode 100644 index 000000000000..54cf14749bfd --- /dev/null +++ b/pkgs/development/compilers/gcc-4.4/sources.nix @@ -0,0 +1,22 @@ +/* Automatically generated by `update-gcc.sh', do not edit. + For GCC 4.4.2. */ +{ fetchurl, optional, version, langC, langCC, langFortran, langJava }: + +assert version == "4.4.2"; +optional /* langC */ true (fetchurl { + url = "mirror://gcc/releases/gcc-${version}/gcc-core-${version}.tar.bz2"; + sha256 = "03cgv3b9bqhap4bks5wfg7nyj64l5c3qyn1igpqc6gk60bxm9wym"; +}) ++ +optional langCC (fetchurl { + url = "mirror://gcc/releases/gcc-${version}/gcc-g++-${version}.tar.bz2"; + sha256 = "0al23gnx4v50j1y6xb23by34m2qhavm2xxn3f1v8kis7ajlbm1j1"; +}) ++ +optional langFortran (fetchurl { + url = "mirror://gcc/releases/gcc-${version}/gcc-fortran-${version}.tar.bz2"; + sha256 = "0zk3j5r1cc5ahm0njxba1xfvv2h39d17aqakgg354pig4hpjkidc"; +}) ++ +optional langJava (fetchurl { + url = "mirror://gcc/releases/gcc-${version}/gcc-java-${version}.tar.bz2"; + sha256 = "0ydk0qyhi1fdyz2xvj6m6l7cav4wg3962a1jxpf2j3nppm0p1dvp"; +}) ++ +[] diff --git a/pkgs/development/compilers/gcc-4.4/update-gcc.sh b/pkgs/development/compilers/gcc-4.4/update-gcc.sh new file mode 100755 index 000000000000..d4fff825f617 --- /dev/null +++ b/pkgs/development/compilers/gcc-4.4/update-gcc.sh @@ -0,0 +1,59 @@ +#!/bin/sh + +if [ $# -ne 1 ] +then + echo "Usage: $(basename $0) VERSION" + echo + echo "Download and GPG-check component tarballs for GCC VERSION." + exit 1 +fi + +version="$1" + +set -e + +out="sources.nix" + +declare -A options + +options["core"]="/* langC */ true" +options["g++"]="langCC" +options["fortran"]="langFortran" +options["java"]="langJava" + +cat > "$out"<<EOF +/* Automatically generated by \`$(basename $0)', do not edit. + For GCC ${version}. */ +{ fetchurl, optional, version, langC, langCC, langFortran, langJava }: + +assert version == "${version}"; +EOF + +for component in core g++ fortran java +do + dir="ftp.gnu.org/gnu/gcc/gcc-${version}" + file="gcc-${component}-${version}.tar.bz2" + url="${dir}/${file}" + + path_and_hash="$(nix-prefetch-url "$url" 2>&1 | grep -E '^(hash|path) is')" + path="$(echo $path_and_hash | sed -e's/^.*path is \([^ ]\+\).*$/\1/g')" + hash="$(echo $path_and_hash | sed -e's/^.*hash is \([^ ]\+\).*$/\1/g')" + + rm -f "${url}.sig" + wget "${url}.sig" + gpg --verify "${file}.sig" "${path}" + rm "${file}.sig" + + cat >> "$out" <<EOF +optional ${options[$component]} (fetchurl { + url = "mirror://gcc/releases/gcc-\${version}/gcc-${component}-\${version}.tar.bz2"; + sha256 = "${hash}"; +}) ++ +EOF +done + +cat >> "$out" <<EOF +[] +EOF + +echo "result stored in \`$out'" |