* Added gperf, texinfo, ncurses.
* Started moving the gcc wrapper stuff out of stdenv. * Added octavefront and rna. svn path=/nixpkgs/trunk/; revision=814
This commit is contained in:
parent
f82050134e
commit
287edecf42
64
pkgs/development/compilers/gcc-new/builder.sh
Executable file
64
pkgs/development/compilers/gcc-new/builder.sh
Executable file
@ -0,0 +1,64 @@
|
||||
#! /bin/sh -e
|
||||
|
||||
buildinputs="$binutils"
|
||||
. $stdenv/setup
|
||||
|
||||
tar xvfj $src
|
||||
|
||||
if test "$noSysDirs" == "1"; then
|
||||
# Disable the standard include directories.
|
||||
cd gcc-*
|
||||
cat >> ./gcc/cppdefault.h <<EOF
|
||||
#undef LOCAL_INCLUDE_DIR
|
||||
#undef SYSTEM_INCLUDE_DIR
|
||||
#undef STANDARD_INCLUDE_DIR
|
||||
EOF
|
||||
cd ..
|
||||
fi
|
||||
|
||||
langs="c"
|
||||
if test -n "$langCC"; then
|
||||
langs="$langs,c++"
|
||||
fi
|
||||
if test -n "$langF77"; then
|
||||
langs="$langs,f77"
|
||||
fi
|
||||
|
||||
# Configure.
|
||||
mkdir build
|
||||
cd build
|
||||
../gcc-*/configure --prefix=$out --enable-languages="$langs"
|
||||
|
||||
if test "$noSysDirs" == "1"; then
|
||||
# Patch some of the makefiles to force linking against our own glibc.
|
||||
extraflags="-Wl,-s $NIX_CFLAGS_COMPILE $NIX_CFLAGS_LINK"
|
||||
for i in $NIX_LDFLAGS; do
|
||||
extraflags="$extraflags -Wl,$i"
|
||||
done
|
||||
|
||||
mf=Makefile
|
||||
sed \
|
||||
-e "s^FLAGS_FOR_TARGET =\(.*\)^FLAGS_FOR_TARGET = \1 $extraflags^" \
|
||||
< $mf > $mf.tmp
|
||||
mv $mf.tmp $mf
|
||||
|
||||
mf=gcc/Makefile
|
||||
sed \
|
||||
-e "s^X_CFLAGS =\(.*\)^X_CFLAGS = \1 $extraflags^" \
|
||||
< $mf > $mf.tmp
|
||||
mv $mf.tmp $mf
|
||||
|
||||
# Patch gcc/Makefile to prevent fixinc.sh from "fixing" system header files
|
||||
# from /usr/include.
|
||||
mf=gcc/Makefile
|
||||
sed \
|
||||
-e "s^NATIVE_SYSTEM_HEADER_DIR =\(.*\)^NATIVE_SYSTEM_HEADER_DIR = /fixinc-disabled^" \
|
||||
< $mf > $mf.tmp
|
||||
mv $mf.tmp $mf
|
||||
fi
|
||||
|
||||
# Build and install.
|
||||
make bootstrap
|
||||
make install
|
||||
|
||||
find $out -name "*.a" -exec strip -S {} \;
|
19
pkgs/development/compilers/gcc-new/default.nix
Normal file
19
pkgs/development/compilers/gcc-new/default.nix
Normal file
@ -0,0 +1,19 @@
|
||||
{ stdenv, fetchurl
|
||||
, langC ? true, langCC ? true, langF77 ? false
|
||||
}:
|
||||
|
||||
assert langC;
|
||||
|
||||
derivation {
|
||||
name = "gcc-3.3.2";
|
||||
system = stdenv.system;
|
||||
builder = ./builder.sh;
|
||||
src = fetchurl {
|
||||
# url = ftp://ftp.nluug.nl/mirror/languages/gcc/releases/gcc-3.3.3/gcc-3.3.3.tar.bz2;
|
||||
# md5 = "3c6cfd9fcd180481063b4058cf6faff2";
|
||||
url = ftp://ftp.nluug.nl/pub/gnu/gcc/gcc-3.3.2/gcc-3.3.2.tar.bz2;
|
||||
md5 = "65999f654102f5438ac8562d13a6eced";
|
||||
};
|
||||
noSysDirs = stdenv.noSysDirs;
|
||||
inherit stdenv langC langCC langF77;
|
||||
}
|
65
pkgs/development/compilers/gcc-wrapper/builder.sh
Executable file
65
pkgs/development/compilers/gcc-wrapper/builder.sh
Executable file
@ -0,0 +1,65 @@
|
||||
#! /bin/sh -e
|
||||
|
||||
. $stdenv/setup
|
||||
|
||||
mkdir $out
|
||||
mkdir $out/bin
|
||||
for i in $(cd $gcc/bin && ls); do
|
||||
cat > $out/bin/$i <<EOF
|
||||
#! /bin/sh
|
||||
|
||||
_NIX_CFLAGS_COMPILE="-B$glibc/lib -isystem $glibc/include $NIX_CFLAGS_COMPILE"
|
||||
_NIX_CFLAGS_LINK="-L$glibc/lib -L$gcc/lib $NIX_CFLAGS_LINK"
|
||||
_NIX_LDFLAGS="-dynamic-linker $glibc/lib/ld-linux.so.2 -rpath $glibc/lib -rpath $gcc/lib $NIX_LDFLAGS"
|
||||
|
||||
IFS=
|
||||
|
||||
justcompile=0
|
||||
if test "\$*" = "-v"; then
|
||||
justcompile=1
|
||||
else
|
||||
for i in \$@; do
|
||||
if test "\$i" == "-c"; then
|
||||
justcompile=1
|
||||
elif test "\$i" == "-S"; then
|
||||
justcompile=1
|
||||
elif test "\$i" == "-E"; then
|
||||
justcompile=1
|
||||
elif test "\$i" == "-E"; then
|
||||
justcompile=1
|
||||
elif test "\$i" == "-M"; then
|
||||
justcompile=1
|
||||
elif test "\$i" == "-MM"; then
|
||||
justcompile=1
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
IFS=" "
|
||||
extra=(\$_NIX_CFLAGS_COMPILE)
|
||||
if test "\$justcompile" != "1"; then
|
||||
extra=(\${extra[@]} \$_NIX_CFLAGS_LINK)
|
||||
for i in \$_NIX_LDFLAGS; do
|
||||
extra=(\${extra[@]} "-Wl,\$i")
|
||||
done
|
||||
if test "\$_NIX_STRIP_DEBUG" == "1"; then
|
||||
extra=(\${extra[@]} -g0 -Wl,-s)
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "\$NIX_DEBUG" == "1"; then
|
||||
echo "extra flags to @GCC@:" >&2
|
||||
for i in \${extra[@]}; do
|
||||
echo " \$i" >&2
|
||||
done
|
||||
fi
|
||||
|
||||
IFS=
|
||||
|
||||
exec $gcc/bin/$i \$@ \${extra[@]}
|
||||
EOF
|
||||
chmod +x $out/bin/$i
|
||||
done
|
||||
|
||||
echo $gcc > $out/orig-gcc
|
||||
echo $glibc > $out/orig-glibc
|
17
pkgs/development/compilers/gcc-wrapper/default.nix
Normal file
17
pkgs/development/compilers/gcc-wrapper/default.nix
Normal file
@ -0,0 +1,17 @@
|
||||
# The Nix `gcc' derivation is not directly usable, since it doesn't
|
||||
# know where the C library and standard header files are. Therefore
|
||||
# the compiler produced by that package cannot be installed directly
|
||||
# in a user environment and used from the command line. This
|
||||
# derivation provides a wrapper that sets up the right environment
|
||||
# variables so that the compiler and the linker just "work".
|
||||
|
||||
{stdenv, gcc}:
|
||||
|
||||
derivation {
|
||||
name = gcc.name; # maybe a bad idea
|
||||
system = stdenv.system;
|
||||
builder = ./builder.sh;
|
||||
glibc = stdenv.param4; # !!! hack
|
||||
inherit stdenv gcc;
|
||||
inherit (gcc) langC langCC langF77;
|
||||
}
|
11
pkgs/development/libraries/ncurses/builder.sh
Executable file
11
pkgs/development/libraries/ncurses/builder.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#! /bin/sh -e
|
||||
|
||||
buildinputs=""
|
||||
. $stdenv/setup
|
||||
|
||||
tar xvfz $src
|
||||
cd ncurses-*
|
||||
./configure --prefix=$out --with-shared
|
||||
make
|
||||
make install
|
||||
strip -S $out/lib/*.a
|
12
pkgs/development/libraries/ncurses/default.nix
Normal file
12
pkgs/development/libraries/ncurses/default.nix
Normal file
@ -0,0 +1,12 @@
|
||||
{stdenv, fetchurl}:
|
||||
|
||||
derivation {
|
||||
name = "ncurses-5.4";
|
||||
system = stdenv.system;
|
||||
builder = ./builder.sh;
|
||||
src = fetchurl {
|
||||
url = http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.4.tar.gz;
|
||||
md5 = "069c8880072060373290a4fefff43520";
|
||||
};
|
||||
inherit stdenv;
|
||||
}
|
13
pkgs/development/libraries/rna/builder.sh
Executable file
13
pkgs/development/libraries/rna/builder.sh
Executable file
@ -0,0 +1,13 @@
|
||||
#! /bin/sh -e
|
||||
|
||||
buildinputs="$zlib"
|
||||
. $stdenv/setup
|
||||
|
||||
tar xvfz $src
|
||||
cd rna-*
|
||||
./configure --prefix=$out
|
||||
make
|
||||
make install
|
||||
strip -S $out/lib/*.a
|
||||
|
||||
echo "$zlib" > $out/propagated-build-inputs
|
14
pkgs/development/libraries/rna/default.nix
Normal file
14
pkgs/development/libraries/rna/default.nix
Normal file
@ -0,0 +1,14 @@
|
||||
{stdenv, fetchurl, zlib}:
|
||||
|
||||
assert zlib != null;
|
||||
|
||||
derivation {
|
||||
name = "rna-0.14c";
|
||||
system = stdenv.system;
|
||||
builder = ./builder.sh;
|
||||
src = fetchurl {
|
||||
url = ftp://ftp.radionetworkprocessor.com/pub/radionetworkprocessor/rna-0.14c.tar.gz;
|
||||
md5 = "1e2947caf8a680e93cac55bffe2d6ec6";
|
||||
};
|
||||
inherit stdenv zlib;
|
||||
}
|
9
pkgs/development/tools/misc/gperf/builder.sh
Executable file
9
pkgs/development/tools/misc/gperf/builder.sh
Executable file
@ -0,0 +1,9 @@
|
||||
#! /bin/sh -e
|
||||
|
||||
. $stdenv/setup
|
||||
|
||||
tar xvfz $src
|
||||
cd gperf-*
|
||||
./configure --prefix=$out
|
||||
make
|
||||
make install
|
12
pkgs/development/tools/misc/gperf/default.nix
Normal file
12
pkgs/development/tools/misc/gperf/default.nix
Normal file
@ -0,0 +1,12 @@
|
||||
{stdenv, fetchurl}:
|
||||
|
||||
derivation {
|
||||
name = "gperf-2.7.2";
|
||||
system = stdenv.system;
|
||||
builder = ./builder.sh;
|
||||
src = fetchurl {
|
||||
url = ftp://ftp.gnu.org/gnu/gperf/gperf-2.7.2.tar.gz;
|
||||
md5 = "e501acc2e18eed2c8f25ca0ac2330d68";
|
||||
};
|
||||
inherit stdenv;
|
||||
}
|
15
pkgs/development/tools/misc/octavefront/builder.sh
Executable file
15
pkgs/development/tools/misc/octavefront/builder.sh
Executable file
@ -0,0 +1,15 @@
|
||||
#! /bin/sh -e
|
||||
|
||||
buildinputs="$autoconf $g77 $texinfo $bison $flex $gperf $rna $aterm"
|
||||
. $stdenv/setup
|
||||
|
||||
g77orig=$(cat $g77/orig-gcc)
|
||||
export NIX_LDFLAGS="-rpath $g77orig/lib $NIX_LDFLAGS"
|
||||
|
||||
tar xvfz $src
|
||||
cd octavefront-*
|
||||
./autogen.sh
|
||||
./configure --prefix=$out --disable-readline --enable-rna=$rna --enable-aterm
|
||||
make
|
||||
make install
|
||||
strip -S $out/lib/*/*.a
|
19
pkgs/development/tools/misc/octavefront/default.nix
Normal file
19
pkgs/development/tools/misc/octavefront/default.nix
Normal file
@ -0,0 +1,19 @@
|
||||
{ stdenv, fetchurl, autoconf, g77, texinfo, bison, flex, gperf
|
||||
, rna, aterm
|
||||
}:
|
||||
|
||||
assert autoconf != null && texinfo != null
|
||||
&& bison != null && flex != null && gperf != null
|
||||
&& rna != null && aterm != null;
|
||||
assert g77.langF77;
|
||||
|
||||
derivation {
|
||||
name = "octavefront-0.2";
|
||||
system = stdenv.system;
|
||||
builder = ./builder.sh;
|
||||
src = fetchurl {
|
||||
url = ftp://ftp.radionetworkprocessor.com/pub/radionetworkprocessor/octavefront-0.2.tar.gz;
|
||||
md5 = "14e02d060fd6afc6752dbba0a7445ff2";
|
||||
};
|
||||
inherit stdenv autoconf g77 texinfo bison flex gperf rna aterm;
|
||||
}
|
10
pkgs/development/tools/misc/texinfo/builder.sh
Executable file
10
pkgs/development/tools/misc/texinfo/builder.sh
Executable file
@ -0,0 +1,10 @@
|
||||
#! /bin/sh -e
|
||||
|
||||
buildinputs="$ncurses"
|
||||
. $stdenv/setup
|
||||
|
||||
tar xvfz $src
|
||||
cd texinfo-*
|
||||
./configure --prefix=$out
|
||||
make
|
||||
make install
|
14
pkgs/development/tools/misc/texinfo/default.nix
Normal file
14
pkgs/development/tools/misc/texinfo/default.nix
Normal file
@ -0,0 +1,14 @@
|
||||
{stdenv, fetchurl, ncurses}:
|
||||
|
||||
assert ncurses != null;
|
||||
|
||||
derivation {
|
||||
name = "texinfo-4.6";
|
||||
system = stdenv.system;
|
||||
builder = ./builder.sh;
|
||||
src = fetchurl {
|
||||
url = ftp://ftp.gnu.org/gnu/texinfo/texinfo-4.6.tar.gz;
|
||||
md5 = "5730c8c0c7484494cca7a7e2d7459c64";
|
||||
};
|
||||
inherit stdenv ncurses;
|
||||
}
|
@ -159,6 +159,19 @@
|
||||
inherit fetchurl stdenv;
|
||||
};
|
||||
|
||||
texinfo = (import ../development/tools/misc/texinfo) {
|
||||
inherit fetchurl stdenv ncurses;
|
||||
};
|
||||
|
||||
gperf = (import ../development/tools/misc/gperf) {
|
||||
inherit fetchurl stdenv;
|
||||
};
|
||||
|
||||
octavefront = (import ../development/tools/misc/octavefront) {
|
||||
inherit fetchurl stdenv autoconf g77 texinfo flex gperf rna aterm;
|
||||
bison = bisonnew;
|
||||
};
|
||||
|
||||
gnumake = (import ../development/tools/build-managers/gnumake) {
|
||||
inherit fetchurl stdenv;
|
||||
};
|
||||
@ -188,6 +201,15 @@
|
||||
inherit fetchurl stdenv binutils;
|
||||
};
|
||||
|
||||
g77 = (import ../development/compilers/gcc-wrapper) {
|
||||
inherit stdenv;
|
||||
gcc = (import ../development/compilers/gcc-new) {
|
||||
inherit fetchurl stdenv;
|
||||
langF77 = true;
|
||||
langCC = false;
|
||||
};
|
||||
};
|
||||
|
||||
jikes = (import ../development/compilers/jikes) {
|
||||
inherit fetchurl stdenv;
|
||||
};
|
||||
@ -526,6 +548,14 @@
|
||||
libpng = libpng;
|
||||
};
|
||||
|
||||
ncurses = (import ../development/libraries/ncurses) {
|
||||
inherit fetchurl stdenv;
|
||||
};
|
||||
|
||||
rna = (import ../development/libraries/rna) {
|
||||
inherit fetchurl stdenv zlib;
|
||||
};
|
||||
|
||||
perlBerkeleyDB = (import ../development/perl-modules/BerkeleyDB) {
|
||||
inherit fetchurl stdenv perl db4;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user