Compare commits

...

12 Commits
0.2 ... 0.3

Author SHA1 Message Date
Eelco Dolstra
d7d58daff4 * Let gtk use lib{png, tiff, jpeg}.
* Fix gtkspell.

svn path=/nixpkgs/trunk/; revision=371
2003-08-28 11:15:48 +00:00
Eelco Dolstra
8a2a4aee40 * Fixed a silly bug in fontconfig (it generates a broken `fonts.conf' file
if no timezone is set).

svn path=/nixpkgs/trunk/; revision=367
2003-08-27 15:35:07 +00:00
Eelco Dolstra
9f91684adb * A bunch of image file format libraries required by gtk.
svn path=/nixpkgs/trunk/; revision=366
2003-08-27 15:17:15 +00:00
Eelco Dolstra
a291f2a94e * Oops.
svn path=/nixpkgs/trunk/; revision=365
2003-08-27 12:38:36 +00:00
Eelco Dolstra
fe43aeafdc * Upgraded to 0.91.
svn path=/nixpkgs/trunk/; revision=364
2003-08-27 12:37:58 +00:00
Eelco Dolstra
6b66d16116 * Provide an ld-wrapper that sets the linker search path correctly (just like
gcc-wrapper).  Useful for builds that call ld directly.

svn path=/nixpkgs/trunk/; revision=363
2003-08-27 12:37:38 +00:00
Eelco Dolstra
1edcca4322 * Build version.h before installing the header files.
svn path=/nixpkgs/trunk/; revision=362
2003-08-26 20:05:56 +00:00
Eelco Dolstra
e83fe5ee78 * Patched gcc so that it doesn't search the standard include directories
(/usr/include, /usr/local/include, etc.).

* Immediate pay-off: we see that the glibc header files depend on the Linux
  kernel header files.  So I've added a package that extracts the appropriate
  headers from Linux 2.4.22.

svn path=/nixpkgs/trunk/; revision=361
2003-08-26 15:25:26 +00:00
Eelco Dolstra
3638af3cab * gcc: ensure that the compilers past stage-1 and the libraries are linked
against our glibc.

svn path=/nixpkgs/trunk/; revision=360
2003-08-26 13:55:30 +00:00
Eelco Dolstra
d6cbd38bfb * Patched Perl's configure script to stop it from scanning well-known system
directories for libraries.  (Fortunately, the build would still fail because
  Perl's idea of "standard" library directories no longer matched that of the
  linker.)

* `stdenv-linux/setup.sh' now puts the path of glibc in an environment
  variable so that it can be used by other packages (for example, we need to
  pass it to Perl's configure, because otherwise it will think that, e.g.,
  libm.so doesn't exist).

svn path=/nixpkgs/trunk/; revision=359
2003-08-26 10:34:51 +00:00
Eelco Dolstra
0de9e19de7 * Added zlib.
* Use zlib in libxml2.

svn path=/nixpkgs/trunk/; revision=358
2003-08-25 19:41:37 +00:00
Eelco Dolstra
23d90c2324 * Patched binutils so that ld no longer searches any of the "default" directories
(/lib, ...).  So unless a directory is explicitly added using `-L' it won't we 
  searched.  This has already revealed that libxml has a hidden dependance on libz.

svn path=/nixpkgs/trunk/; revision=357
2003-08-25 19:26:46 +00:00
32 changed files with 285 additions and 42 deletions

View File

@@ -1,11 +1,11 @@
Package(
[ ("name", "MPlayer-0.90")
[ ("name", "MPlayer-0.91")
, ("build", Relative("MPlayer/MPlayer-build.sh"))
, ("src", App(IncludeFix("fetchurl/fetchurl.fix"),
[ ("url", "http://www2.mplayerhq.hu/MPlayer/releases/MPlayer-0.90.tar.bz2")
, ("md5", "9a9f294bbaab2071ecbc327f4e870be8")
[ ("url", "http://www1.mplayerhq.hu/MPlayer/releases/MPlayer-0.91.tar.bz2")
, ("md5", "bb09138564ddf954392d20dbc4b88ebd")
]))
, ("fonts", App(IncludeFix("fetchurl/fetchurl.fix"),

View File

@@ -9,20 +9,17 @@ sed \
-e s^@OUT\@^$out^g \
< $setup > $out/setup || exit 1
gcc='$NIX_CC'
sed \
-e s^@GCC\@^$gcc^g \
-e 's^@GCC\@^$NIX_CC^g' \
< $gccwrapper > $out/bin/gcc || exit 1
chmod +x $out/bin/gcc || exit 1
ln -s gcc $out/bin/cc
gcc='$NIX_CXX'
ln -s gcc $out/bin/cc || exit 1
sed \
-e s^@GCC\@^$gcc^g \
-e 's^@GCC\@^$NIX_CXX^g' \
< $gccwrapper > $out/bin/g++ || exit 1
chmod +x $out/bin/g++ || exit 1
ln -s g++ $out/bin/c++ || exit 1
ln -s g++ $out/bin/c++
cp $ldwrapper $out/bin/ld || exit 1
chmod +x $out/bin/ld || exit 1

View File

@@ -1,8 +1,9 @@
Package(
[ ("name", "stdenv-native")
[ ("name", "baseenv")
, ("build", Relative("baseenv/baseenv-build.sh"))
, ("setup", Relative("baseenv/setup.sh"))
, ("gccwrapper", Relative("baseenv/gcc-wrapper.sh"))
, ("ldwrapper", Relative("baseenv/ld-wrapper.sh"))
]
)

View File

@@ -6,26 +6,33 @@ justcompile=0
for i in $@; do
if test "$i" == "-c"; then
justcompile=1
fi
if test "$i" == "-S"; then
elif test "$i" == "-S"; then
justcompile=1
fi
if test "$i" == "-E"; then
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
IFS=" "
extra=($NIX_CFLAGS)
extra=($NIX_CFLAGS_COMPILE)
if test "$justcompile" != "1"; then
extra=(${extra[@]} $NIX_LDFLAGS)
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[@]} -Wl,-s)
extra=(${extra[@]} -g0 -Wl,-s)
fi
fi
if test "$NIX_DEBUG" == "1"; then
echo "extra gcc flags:" >&2
echo "extra flags to @GCC@:" >&2
for i in ${extra[@]}; do
echo " $i" >&2
done

View File

@@ -0,0 +1,17 @@
#! /bin/sh
IFS=" "
extra=($NIX_CFLAGS_LINK $NIX_LDFLAGS)
if test "$NIX_STRIP_DEBUG" == "1"; then
extra=(${extra[@]} -s)
fi
if test "$NIX_DEBUG" == "1"; then
echo "extra flags to @LD@:" >&2
for i in ${extra[@]}; do
echo " $i" >&2
done
fi
IFS=
exec $NIX_LD $@ ${extra[@]}

View File

@@ -11,7 +11,8 @@ addtoenv()
fi
if test -d $1/lib; then
export NIX_LDFLAGS="-L $1/lib -Wl,-rpath,$1/lib $NIX_LDFLAGS"
export NIX_CFLAGS_LINK="-L$1/lib $NIX_CFLAGS_LINK"
export NIX_LDFLAGS="-rpath $1/lib $NIX_LDFLAGS"
fi
if test -d $1/lib/pkgconfig; then
@@ -33,7 +34,7 @@ for i in $oldenvpkgs; do
done
# Add the output as an rpath.
export NIX_LDFLAGS="-Wl,-rpath,$out/lib $NIX_LDFLAGS"
export NIX_LDFLAGS="-rpath $out/lib $NIX_LDFLAGS"
# Strip debug information by default.
export NIX_STRIP_DEBUG=1

View File

@@ -4,6 +4,12 @@
tar xvfj $src || exit 1
cd binutils-* || exit 1
# Clear the default library search path.
echo 'NATIVE_LIB_DIRS=' >> ld/configure.tgt || exit 1
./configure --prefix=$out || exit 1
make || exit 1
make install || exit 1
strip -S $out/lib/*.a || exit 1

View File

@@ -4,6 +4,10 @@ envpkgs="$freetype $expat"
. $stdenv/setup || exit 1
export PATH=$ed/bin:$PATH
# Fontconfig generates a bad `fonts.conf' file is the timezone is not known
# (because it calls `date').
export TZ=UTC
tar xvfz $src || exit 1
cd fcpackage*/fontconfig || exit 1
./configure --prefix=$out --with-confdir=$out/etc/fonts \

View File

@@ -1,10 +1,50 @@
#! /bin/sh
. $stdenv/setup || exit 1
export PATH=$binutils/bin:$PATH
tar xvfj $src || exit 1
# Disable the standard include directories.
cd gcc-* || exit 1
cat >> ./gcc/cppdefault.h <<EOF
#undef LOCAL_INCLUDE_DIR
#undef SYSTEM_INCLUDE_DIR
#undef STANDARD_INCLUDE_DIR
EOF
cd .. || exit 1
# Configure.
mkdir build || exit 1
cd build || exit 1
../gcc-*/configure --prefix=$out --enable-languages=c,c++ || exit 1
# Patch some of the makefiles to force linking against our own glibc.
extraflags="-Wl,-s -isystem $linux/include $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 || exit 1
mv $mf.tmp $mf
mf=gcc/Makefile
sed \
-e "s^X_CFLAGS =\(.*\)^X_CFLAGS = \1 $extraflags^" \
< $mf > $mf.tmp || exit 1
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 || exit 1
mv $mf.tmp $mf
# Build and install.
make bootstrap || exit 1
make install || exit 1

View File

@@ -9,5 +9,7 @@ Package(
]))
, ("stdenv", IncludeFix("stdenv-linux/stdenv-nativetools.fix"))
, ("binutils", IncludeFix("binutils/binutils.fix"))
, ("linux", IncludeFix("linux-headers/linux-headers.fix"))
]
)

View File

@@ -1,12 +1,17 @@
#! /bin/sh
envpkgs="$glib $atk $pango"
envpkgs="$glib $atk $pango $tiff $jpeg $png"
. $stdenv/setup || exit 1
export PATH=$pkgconfig/bin:$perl/bin:$PATH
# !!! abstraction problem: libtiff optionally needs libjpeg's headers.
# idem for libpng depending on zlib
export NIX_CFLAGS_COMPILE="-I$tiff/include -I$jpeg/include -I$png/include -I$zlib/include $NIX_CFLAGS_COMPILE"
tar xvfj $src || exit 1
cd gtk+-* || exit 1
./configure --prefix=$out --x-includes=/usr/X11/include --x-libraries=/usr/X11/lib || exit 1
./configure --prefix=$out --x-includes=/usr/X11/include --x-libraries=/usr/X11/lib \
--with-libtiff=$tiff || exit 1
make || exit 1
make install || exit 1

View File

@@ -14,5 +14,9 @@ Package(
, ("atk", IncludeFix("atk/atk.fix"))
, ("pango", IncludeFix("pango/pango.fix"))
, ("perl", IncludeFix("perl/perl.fix"))
, ("tiff", IncludeFix("libtiff/libtiff.fix"))
, ("jpeg", IncludeFix("libjpeg/libjpeg.fix"))
, ("png", IncludeFix("libpng/libpng.fix"))
, ("zlib", IncludeFix("zlib/zlib.fix"))
]
)

View File

@@ -3,8 +3,7 @@
envpkgs="$gtk $pspell"
. $stdenv/setup || exit 1
export PATH=$pkgconfig/bin:$PATH
export C_INCLUDE_PATH=$pspell/include:$C_INCLUDE_PATH
export NIX_CFLAGS_COMPILE="-I$pspell/include $NIX_CFLAGS_COMPILE"
tar xvfz $src || exit 1
cd gtkspell-* || exit 1

15
pkgs/libjpeg/libjpeg-build.sh Executable file
View File

@@ -0,0 +1,15 @@
#! /bin/sh
. $stdenv/setup || exit 1
tar xvfz $src || exit 1
cd jpeg-* || exit 1
./configure --prefix=$out --enable-shared || exit 1
make || exit 1
mkdir $out || exit 1
mkdir $out/bin || exit 1
mkdir $out/lib || exit 1
mkdir $out/include || exit 1
mkdir $out/man || exit 1
mkdir $out/man/man1 || exit 1
make install || exit 1

13
pkgs/libjpeg/libjpeg.fix Normal file
View File

@@ -0,0 +1,13 @@
Package(
[ ("name", "libjpeg-6b")
, ("build", Relative("libjpeg/libjpeg-build.sh"))
, ("src", Call(IncludeFix("fetchurl/fetchurl.fix"),
[ ("url", "http://www.ijg.org/files/jpegsrc.v6b.tar.gz")
, ("md5", "dbd5f3b47ed13132f04c685d608a7547")
]))
, ("stdenv", IncludeFix("stdenv/stdenv.fix"))
]
)

18
pkgs/libpng/libpng-build.sh Executable file
View File

@@ -0,0 +1,18 @@
#! /bin/sh
envpkgs="$zlib"
. $stdenv/setup || exit 1
export NIX_CFLAGS_COMPILE="-I$zlib/include $NIX_CFLAGS_COMPILE"
tar xvfj $src || exit 1
cd libpng-* || exit 1
make -f scripts/makefile.linux || exit 1
mkdir $out || exit 1
mkdir $out/bin || exit 1
mkdir $out/lib || exit 1
mkdir $out/include || exit 1
make -f scripts/makefile.linux install prefix=$out || exit 1
strip -S $out/lib/*.a || exit 1
echo $envpkgs > $out/envpkgs || exit 1

14
pkgs/libpng/libpng.fix Normal file
View File

@@ -0,0 +1,14 @@
Package(
[ ("name", "libpng-1.2.5")
, ("build", Relative("libpng/libpng-build.sh"))
, ("src", Call(IncludeFix("fetchurl/fetchurl.fix"),
[ ("url", "http://heanet.dl.sourceforge.net/sourceforge/png-mng/libpng-1.2.5.tar.bz2")
, ("md5", "3fc28af730f12ace49b14568de4ad934")
]))
, ("stdenv", IncludeFix("stdenv/stdenv.fix"))
, ("zlib", IncludeFix("zlib/zlib.fix"))
]
)

16
pkgs/libtiff/libtiff-build.sh Executable file
View File

@@ -0,0 +1,16 @@
#! /bin/sh
envpkgs="$zlib $jpeg"
. $stdenv/setup || exit 1
tar xvfz $src || exit 1
cd tiff-* || exit 1
./configure --prefix=$out --with-DIR_MAN=$out/man \
--with-ZIP --with-JPEG \
--with-DIRS_LIBINC="$zlib/include $jpeg/include" || exit 1
make || exit 1
mkdir $out || exit 1
make install || exit 1
strip -S $out/lib/*.a || exit 1
echo $envpkgs > $out/envpkgs || exit 1

15
pkgs/libtiff/libtiff.fix Normal file
View File

@@ -0,0 +1,15 @@
Package(
[ ("name", "libtiff-3.5.7")
, ("build", Relative("libtiff/libtiff-build.sh"))
, ("src", Call(IncludeFix("fetchurl/fetchurl.fix"),
[ ("url", "ftp://ftp.remotesensing.org/pub/libtiff/tiff-v3.5.7.tar.gz")
, ("md5", "82243b5ae9b7c9e492aeebc501680990")
]))
, ("stdenv", IncludeFix("stdenv/stdenv.fix"))
, ("zlib", IncludeFix("zlib/zlib.fix"))
, ("jpeg", IncludeFix("libjpeg/libjpeg.fix"))
]
)

View File

@@ -1,5 +1,6 @@
#! /bin/sh
envpkgs="$zlib"
. $stdenv/setup || exit 1
tar xvfz $src || exit 1
@@ -8,3 +9,5 @@ cd libxml2-* || exit 1
make || exit 1
make install || exit 1
strip -S $out/lib/*.a || exit 1
echo $envpkgs > $out/envpkgs || exit 1

View File

@@ -8,5 +8,6 @@ Package(
]))
, ("stdenv", IncludeFix("stdenv/stdenv.fix"))
, ("zlib", IncludeFix("zlib/zlib.fix"))
]
)

View File

@@ -0,0 +1,12 @@
#! /bin/sh
. $stdenv/setup || exit 1
tar xvfj $src || exit 1
cd linux-* || exit 1
make include/linux/version.h || exit 1
mkdir $out || exit 1
mkdir $out/include || exit 1
cp -prvd include/linux include/asm-i386 $out/include || exit 1
cd $out/include || exit 1
ln -s asm-i386 asm || exit 1

View File

@@ -0,0 +1,13 @@
Package(
[ ("name", "linux-headers-2.4.22-i386")
, ("build", Relative("linux-headers/linux-headers-build.sh"))
, ("src", Call(IncludeFix("fetchurl/fetchurl.fix"),
[ ("url", "ftp://ftp.nl.kernel.org/pub/linux/kernel/v2.4/linux-2.4.22.tar.bz2")
, ("md5", "75dc85149b06ac9432106b8941eb9f7b")
]))
, ("stdenv", IncludeFix("stdenv-linux/stdenv-nativetools.fix"))
]
)

View File

@@ -7,10 +7,20 @@ cd perl-* || exit 1
# Perl's Configure messes with PATH. We can't have that, so we patch it.
# Yeah, this is an ugly hack.
grep -v '^paths=' Configure > Configure.tmp || exit 1
cat Configure | \
grep -v '^paths=' | \
grep -v '^locincpth=' | \
grep -v '^xlibpth=' | \
grep -v '^glibpth=' | \
grep -v '^loclibpth=' | \
grep -v '^locincpth=' | \
cat > Configure.tmp || exit 1
mv Configure.tmp Configure || exit 1
chmod +x Configure || exit 1
./Configure -de -Dcc=gcc -Dprefix=$out -Uinstallusrbinperl || exit 1
./Configure -de -Dcc=gcc -Dprefix=$out -Uinstallusrbinperl \
-Dlocincpth="$NIX_LIBC_INCLUDES" \
-Dloclibpth="$NIX_LIBC_LIBS" \
|| exit 1
make || exit 1
make install || exit 1

View File

@@ -3,7 +3,9 @@ export SHELL=/bin/sh
. @BASEENV@/setup
export NIX_CFLAGS="-isystem @GLIBC@/include $NIX_CFLAGS"
export NIX_LDFLAGS="-L@GLIBC@/lib -Wl,-dynamic-linker,@GLIBC@/lib/ld-linux.so.2,-rpath,@GLIBC@/lib $NIX_LDFLAGS"
export NIX_CFLAGS_COMPILE="-isystem @GLIBC@/include $NIX_CFLAGS_COMPILE"
export NIX_CFLAGS_LINK="-L@GLIBC@/lib $NIX_CFLAGS_LINK"
export NIX_LDFLAGS="-dynamic-linker @GLIBC@/lib/ld-linux.so.2 -rpath @GLIBC@/lib $NIX_LDFLAGS"
export NIX_CC=/usr/bin/gcc
export NIX_CXX=/usr/bin/g++
export NIX_LD=/usr/bin/ld

View File

@@ -3,7 +3,12 @@ export SHELL=@SHELL@
. @BASEENV@/setup
export NIX_CFLAGS="-isystem @GLIBC@/include $NIX_CFLAGS"
export NIX_LDFLAGS="-L@GLIBC@/lib -Wl,-dynamic-linker,@GLIBC@/lib/ld-linux.so.2,-rpath,@GLIBC@/lib $NIX_LDFLAGS -L@GCC@/lib -Wl,-rpath,@GCC@/lib"
export NIX_CFLAGS_COMPILE="-isystem @GLIBC@/include -isystem @LINUX@/include $NIX_CFLAGS_COMPILE"
export NIX_CFLAGS_LINK="-L@GLIBC@/lib -L@GCC@/lib $NIX_CFLAGS_LINK"
export NIX_LDFLAGS="-dynamic-linker @GLIBC@/lib/ld-linux.so.2 -rpath @GLIBC@/lib -rpath @GCC@/lib $NIX_LDFLAGS"
export NIX_CC=@CC@
export NIX_CXX=@CXX@
export NIX_LD=@LD@
export NIX_LIBC_INCLUDES="@GLIBC@/include"
export NIX_LIBC_LIBS="@GLIBC@/lib"

View File

@@ -6,7 +6,7 @@ mkdir $out || exit 1
p=
first=1
for i in $tools; do
for i in $tools $gcc $binutils $shell; do
if test "$first" == 1; then
first=
else
@@ -17,15 +17,18 @@ done
cc=$gcc/bin/gcc
cxx=$gcc/bin/g++
ld=$binutils/bin/ld
shell=$shell/bin/sh
echo "########## $p"
sed \
-e s^@GLIBC\@^$glibc^g \
-e s^@LINUX\@^$linux^g \
-e s^@GCC\@^$gcc^g \
-e s^@CC\@^$cc^g \
-e s^@CXX\@^$cxx^g \
-e s^@LD\@^$ld^g \
-e s^@BASEENV\@^$baseenv^g \
-e s^@PATH\@^$p^g \
-e s^@SHELL\@^$shell^g \

View File

@@ -6,9 +6,5 @@ mkdir $out || exit 1
sed \
-e s^@GLIBC\@^$glibc^g \
-e s^@CC\@^$cc^g \
-e s^@CXX\@^$cxx^g \
-e s^@BASEENV\@^$baseenv^g \
-e s^@PATH\@^$p^g \
-e s^@SHELL\@^$shell^g \
< $setup > $out/setup || exit 1

View File

@@ -1,5 +1,5 @@
Package(
[ ("name", "stdenv-linux")
[ ("name", "stdenv-nativetools")
, ("build", Relative("stdenv-linux/stdenv-nativetools-build.sh"))
, ("setup", Relative("stdenv-linux/setup-nativetools.sh"))

View File

@@ -5,6 +5,7 @@ Package(
, ("setup", Relative("stdenv-linux/setup.sh"))
, ("baseenv", IncludeFix("baseenv/baseenv.fix"))
, ("glibc", IncludeFix("glibc/glibc.fix"))
, ("linux", IncludeFix("linux-headers/linux-headers.fix"))
, ("tools",
[ IncludeFix("coreutils/coreutils.fix")
@@ -17,11 +18,11 @@ Package(
, IncludeFix("gzip/gzip.fix")
, IncludeFix("bzip2/bzip2.fix")
, IncludeFix("gnumake/gnumake.fix")
, IncludeFix("binutils/binutils.fix")
, IncludeFix("bash/bash.fix")
])
, ("gcc", IncludeFix("gcc/gcc.fix"))
, ("shell", IncludeFix("bash/bash.fix"))
, ("gcc", IncludeFix("gcc/gcc.fix"))
, ("binutils", IncludeFix("binutils/binutils.fix"))
, ("shell", IncludeFix("bash/bash.fix"))
]
)

10
pkgs/zlib/zlib-build.sh Executable file
View File

@@ -0,0 +1,10 @@
#! /bin/sh
. $stdenv/setup || exit 1
tar xvfz $src || exit 1
cd zlib-* || exit 1
./configure --prefix=$out --shared || exit 1
make || exit 1
mkdir $out || exit 1
make install || exit 1

13
pkgs/zlib/zlib.fix Normal file
View File

@@ -0,0 +1,13 @@
Package(
[ ("name", "zlib-1.1.4")
, ("build", Relative("zlib/zlib-build.sh"))
, ("src", Call(IncludeFix("fetchurl/fetchurl.fix"),
[ ("url", "http://www.gzip.org/zlib/zlib-1.1.4.tar.gz")
, ("md5", "abc405d0bdd3ee22782d7aa20e440f08")
]))
, ("stdenv", IncludeFix("stdenv/stdenv.fix"))
]
)