Compare commits

..

2 Commits

Author SHA1 Message Date
Martin Bravenboer
5f1c91cf16 Added aterm 2.1
svn path=/nixpkgs/branches/martin2/; revision=1008
2004-05-12 13:38:23 +00:00
Martin Bravenboer
ad12abfb3d Added j2sdk 1.5.0 beta. You need to download the file by hand to /tmp
svn path=/nixpkgs/branches/martin2/; revision=831
2004-03-11 20:17:51 +00:00
606 changed files with 3203 additions and 10409 deletions

View File

@@ -1,66 +0,0 @@
* If NIX_DEBUG is turned on (set to "1"), autoconf configure scripts
may fail to find the correct preprocessor:
checking how to run the C preprocessor... /lib/cpp
* When building gcc using a Nix gcc, generated libraries link against
the libraries of the latter:
$ ldd /nix/store/3b1d3995c4edbf026be5c73f66f69245-gcc-3.3.3/lib/libstdc++.so
...
libgcc_s.so.1 => /nix/store/1f19e61d1b7051f1131f78b41b2a0e7e-gcc-3.3.2/lib/libgcc_s.so.1 (0x400de000)
(wrong! should be .../3b1d.../lib/libgcc_s...)
...
* In libXt:
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -DXTHREADS -DXUSE_MTSAFE_API -I/nix/store/aadf0bd4a908da11d14f6538503b8408-libX11-6.2.1/include -I/nix/store/ba366e3b944ead64ec9b0490bb615874-xproto-6.6.1/include -I./include/X11 -g -O2 -c -o ActionHook.lo `test -f 'ActionHook.c' || echo './'`ActionHook.c
mkdir .libs
gcc -DHAVE_CONFIG_H -I. -I. -I. -DXTHREADS -DXUSE_MTSAFE_API -I/nix/store/aadf0bd4a908da11d14f6538503b8408-libX11-6.2.1/include -I/nix/store/ba366e3b944ead64ec9b0490bb615874-xproto-6.6.1/include -I./include/X11 -g -O2 -c ActionHook.c -fPIC -DPIC -o .libs/ActionHook.o
In file included from IntrinsicI.h:55,
from ActionHook.c:69:
include/X11/IntrinsicP.h:54:27: X11/Intrinsic.h: No such file or directory
* Then:
gcc -DHAVE_CONFIG_H -I. -I. -I. -DXTHREADS -DXUSE_MTSAFE_API -I/nix/store/aadf0bd4a908da11d14f6538503b8408-libX11-6.2.1/include -I/nix/store/ba366e3b944ead64ec9b0490bb615874-xproto-6.6.1/include -I./include -I./include/X11 -g -O2 -c ActionHook.c -fPIC -DPIC -o .libs/ActionHook.o
In file included from IntrinsicI.h:55,
from ActionHook.c:69:
include/X11/IntrinsicP.h:202:25: X11/ObjectP.h: No such file or directory
(moved to include/X11; should edit include/Makefile.am)
* Doesn't parse:
{stdenv, fetchurl /* pkgconfig, libX11 */ }:
stdenv.mkDerivation {
name = "libXi-6.0.1";
src = fetchurl {
url = http://freedesktop.org/~xlibs/release/libXi-6.0.1.tar.bz2;
md5 = "7e935a42428d63a387b3c048be0f2756";
};
/* buildInputs = [pkgconfig];
propagatedBuildInputs = [libX11]; */
}
* Add "exit 0" at the end of configure of rte package.
* Starting at gcc 3.4, all C programs incur a retained dependency on
gcc through the rpath stored in the executable, even though the
executable doesn't use against any library in gcc. The reason is
that the gcc passes a `-lgcc_s' switch to the linker. Solution:
patch the linker so that rpaths are only added for libraries that we
actually use.
* Perl has retained dependencies on gcc, binutils, coreutils, sed.

View File

@@ -104,10 +104,6 @@ ELSE IF it's DATA (i.e., doe not have a straight-forward executable semantics):
ELSE IF it's an XSLT stylesheet (okay, these are executable...):
./data/sgml+xml/stylesheets/xslt
ELSE IF it's a GAME:
./games
ELSE:
./misc

View File

@@ -1 +0,0 @@
0

View File

@@ -1,12 +0,0 @@
* Bump freetype to 2.1.7 (but it breaks Pango 1.2.5).
* Patch development/tools/misc/libtool not to search standard
directories for libraries (like setup.sh does now). [do we want
this?]
* In setup.sh: add configureFlagsArray or something
* Inform freedesktop people that Xaw requires Xpm.
* After building gcc, filter out references to /tmp/nix... in
.../lib/libsupc++.la and .../lib/libstdc++.la

View File

@@ -1 +1 @@
0.6
0.5

View File

@@ -1,7 +0,0 @@
set -e
. $stdenv/setup
$unzip/bin/unzip $src
mkdir $out
mv eclipse $out/

View File

@@ -1,17 +0,0 @@
{fetchurl, stdenv, unzip}:
let {
body =
stdenv.mkDerivation {
name = "eclipse-sdk-3.0.1";
builder = ./builder.sh;
src = bindist;
inherit unzip;
};
bindist =
fetchurl {
url = http://ftp-stud.fht-esslingen.de/pub/Mirrors/eclipse/R-3.0.1-200409161125/eclipse-SDK-3.0.1-linux-gtk.zip;
md5 = "d0f743c972adf13e71a43b2dc6c9c55b";
};
}

View File

@@ -1,13 +0,0 @@
. $stdenv/setup
myglibc=`cat ${NIX_GCC}/nix-support/orig-glibc`
echo "glibc: $myglibc"
postConfigure() {
cp $myglibc/lib/crt1.o src
cp $myglibc/lib/crti.o src
cp $myglibc/lib/crtn.o src
}
postConfigure=postConfigure
genericBuild

View File

@@ -1,14 +0,0 @@
{stdenv, fetchurl, xlibs}:
stdenv.mkDerivation {
name = "emacs-21.3";
builder = ./builder.sh;
src = fetchurl {
url = http://ftp.gnu.org/pub/gnu/emacs/emacs-21.3.tar.gz;
md5 = "a0bab457cbf5b4f8eb99d1d0a3ada420";
};
patches = [./patchfile];
inherit (xlibs) libXaw libX11;
buildInputs = [xlibs.libXaw xlibs.libX11];
}

View File

@@ -1,4 +0,0 @@
. $stdenv/setup
mkdir -p $out/emacs/site-lisp
cp $src $out/emacs/site-lisp/cua.el

View File

@@ -1,8 +0,0 @@
{stdenv, fetchurl}: stdenv.mkDerivation {
name = "cua-mode-2.10";
builder = ./builder.sh;
src = fetchurl {
url = http://www.cua.dk/cua.el;
md5 = "5bf5e43f5f38c8383868c7c6c5baca09";
};
}

14
pkgs/applications/editors/emacs/modes/nxml/builder.sh Normal file → Executable file
View File

@@ -1,7 +1,11 @@
. $stdenv/setup
#! /bin/sh
mkdir -p $out/emacs/site-lisp
cd $out/emacs/site-lisp
tar xvfz $src
mv nxml-mode-*/* .
. $stdenv/setup || exit 1
mkdir -p $out/emacs/site-lisp || exit 1
cd $out/emacs/site-lisp || exit 1
tar xvfz $src || exit 1
mv nxml-mode-*/* . || exit 1
rmdir nxml-mode-*
exit 0

View File

@@ -1,8 +1,10 @@
{stdenv, fetchurl}: stdenv.mkDerivation {
name = "nxml-mode-20041004";
{stdenv, fetchurl}: derivation {
name = "nxml-mode-20031031";
system = stdenv.system;
builder = ./builder.sh;
src = fetchurl {
url = http://www.thaiopensource.com/download/nxml-mode-20041004.tar.gz;
md5 = "ac137024cf337d6f11d8ab278d39b4db";
url = http://www.thaiopensource.com/download/nxml-mode-20031031.tar.gz;
md5 = "4cbc32047183e6cc1b7a2757d1078bd2";
};
stdenv = stdenv;
}

View File

@@ -1,41 +0,0 @@
Only in emacs-21.3: configure.in~
Only in emacs-21.3: patchfile
Only in emacs-21.3/src: Makefile.in~
diff -rc emacs-orig/src/s/gnu-linux.h emacs-21.3/src/s/gnu-linux.h
*** emacs-orig/src/s/gnu-linux.h 2001-09-28 17:50:04.000000000 +0200
--- emacs-21.3/src/s/gnu-linux.h 2004-10-06 13:13:19.000000000 +0200
***************
*** 173,179 ****
/* GNU/Linux usually has crt0.o in a non-standard place */
#define START_FILES pre-crt0.o /usr/lib/crt0.o
#else
! #define START_FILES pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o
#endif
#ifdef __ELF__
--- 173,179 ----
/* GNU/Linux usually has crt0.o in a non-standard place */
#define START_FILES pre-crt0.o /usr/lib/crt0.o
#else
! #define START_FILES pre-crt0.o crt1.o crti.o
#endif
#ifdef __ELF__
***************
*** 225,231 ****
#else
#undef LIB_GCC
#define LIB_GCC
! #define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtn.o
#endif
/* Don't use -g in test compiles in configure.
--- 225,231 ----
#else
#undef LIB_GCC
#define LIB_GCC
! #define LIB_STANDARD -lgcc -lc -lgcc crtn.o
#endif
/* Don't use -g in test compiles in configure.
Only in emacs-21.3/src/s: gnu-linux.h~

View File

@@ -1,4 +0,0 @@
. $stdenv/setup
export CFLAGS="$CFLAGS -I$ncurses/include/ncurses"
genericBuild

View File

@@ -1,13 +0,0 @@
{stdenv, fetchurl, ncurses}:
stdenv.mkDerivation {
name = "nano-1.2.4";
builder = ./builder.sh;
src = fetchurl {
url = http://www.nano-editor.org/dist/v1.2/nano-1.2.4.tar.gz;
md5 = "2c513310ec5e8b63abaecaf48670ac7a";
};
inherit ncurses;
buildInputs = [ncurses];
}

View File

@@ -1,3 +0,0 @@
. $stdenv/setup
genericBuild

View File

@@ -1,14 +0,0 @@
{stdenv, fetchurl, ncurses}:
stdenv.mkDerivation {
name = "vim-6.3";
builder = ./builder.sh;
src = fetchurl {
url = ftp://ftp.vim.org/mirror/vim/unix/vim-6.3.tar.bz2;
md5 = "821fda8f14d674346b87e3ef9cb96389";
};
inherit ncurses;
buildInputs = [ncurses];
}

View File

@@ -0,0 +1,10 @@
#! /bin/sh
buildinputs="$pkgconfig $gtk $libpng"
. $stdenv/setup || exit 1
tar xvfz $src || exit 1
cd gqview-* || exit 1
./configure --prefix=$out || exit 1
make || exit 1
make install || exit 1

View File

@@ -1,17 +1,22 @@
{stdenv, fetchurl, pkgconfig, gtk, libpng}:
assert pkgconfig != null && gtk != null && libpng != null;
assert !isNull pkgconfig && !isNull gtk && !isNull libpng;
# Note that we cannot just copy gtk's png attribute, since gtk might
# not be linked against png.
# !!! assert libpng == gtk.libpng;
assert libpng == gtk.libpng;
stdenv.mkDerivation {
name = "gqview-1.4.4";
derivation {
name = "gqview-1.3.5";
system = stdenv.system;
builder = ./builder.sh;
src = fetchurl {
url = http://heanet.dl.sourceforge.net/sourceforge/gqview/gqview-1.4.4.tar.gz;
md5 = "b3f1e1ca830c9cc0b484966fac9e6f28";
url = http://heanet.dl.sourceforge.net/sourceforge/gqview/gqview-1.3.5.tar.gz;
md5 = "c44687bdd636ea6e5133fb936abf880a";
};
buildInputs = [pkgconfig gtk libpng];
stdenv = stdenv;
pkgconfig = pkgconfig;
gtk = gtk;
libpng = libpng;
}

View File

@@ -1,21 +0,0 @@
. $stdenv/setup
echo "unpacking $src..."
tar xvfz $src
mkdir $out
echo "unpacking reader..."
tar xvf ./COMMON.TAR -C $out
tar xvf ./LINUXRDR.TAR -C $out
glibc=$(cat $NIX_GCC/nix-support/orig-glibc)
patchelf --interpreter $glibc/lib/ld-linux.so.* $out/Reader/intellinux/bin/acroread
sed "s^REPLACE_ME^$out/Reader^" $out/bin/acroread.sh > $out/bin/acroread.sh.tmp
echo "#! /bin/sh" > $out/bin/acroread.sh
echo "LD_LIBRARY_PATH=$libXt/lib:$libXp/lib:$libXext/lib:$libX11/lib" >> $out/bin/acroread.sh
cat $out/bin/acroread.sh.tmp >> $out/bin/acroread.sh
chmod 755 $out/bin/acroread.sh
mv $out/bin/acroread.sh $out/bin/acroread

View File

@@ -1,12 +0,0 @@
{stdenv, fetchurl, patchelf, libXt, libXp, libXext, libX11}:
stdenv.mkDerivation {
name = "acrobat-reader-5.0.9";
builder = ./builder.sh;
src = fetchurl {
url = http://ardownload.adobe.com/pub/adobe/acrobatreader/unix/5.x/linux-509.tar.gz;
md5 = "53b7ca0fc83ab81214ba82050ce89c64";
};
buildInputs = [patchelf];
inherit libXt libXp libXext libX11;
}

2
pkgs/applications/misc/hello/builder.sh Normal file → Executable file
View File

@@ -1,3 +1,5 @@
#! /bin/sh
buildinputs="$perl"
. $stdenv/setup || exit 1

View File

@@ -1,11 +1,13 @@
{stdenv, fetchurl, perl}:
stdenv.mkDerivation {
derivation {
name = "hello-2.1.1";
system = stdenv.system;
builder = ./builder.sh;
src = fetchurl {
url = ftp://ftp.nluug.nl/pub/gnu/hello/hello-2.1.1.tar.gz;
md5 = "70c9ccf9fac07f762c24f2df2290784d";
};
stdenv = stdenv;
perl = perl;
}

View File

@@ -1,10 +0,0 @@
{stdenv, fetchurl, wxGTK, chmlib}:
stdenv.mkDerivation {
name = "xchm-0.9.1";
src = fetchurl {
url = http://belnet.dl.sourceforge.net/sourceforge/xchm/xchm-0.9.1.tar.gz;
md5 = "5ba671e09e4c3ac46ffb5ce9d2c985eb";
};
buildInputs = [wxGTK chmlib];
}

View File

@@ -1,27 +0,0 @@
. $stdenv/setup
shopt -s nullglob
mkdir -p $out/bin
pluginPath=
extraLibPath=
for i in $plugins; do
for p in $i/lib/mozilla/plugins $i/jre/plugin/*/mozilla; do
if test -e $p; then
pluginPath=$pluginPath${pluginPath:+:}$p
if test -e $p/extra-library-path; then
extraLibPath=$extraLibPath${extraLibPath:+:}$(cat $p/extra-library-path)
fi
fi
done
done
cat > $out/bin/firefox <<EOF
#! $SHELL
export LD_LIBRARY_PATH=$extraLibPath
export MOZ_PLUGIN_PATH=$pluginPath
exec $firefox/bin/firefox "\$@"
EOF
chmod +x $out/bin/firefox

View File

@@ -1,9 +0,0 @@
{stdenv, firefox, plugins}:
stdenv.mkDerivation {
name = firefox.name;
builder = ./builder.sh;
inherit firefox plugins;
}

View File

@@ -1,52 +1,30 @@
. $stdenv/setup
#! /bin/sh
preConfigure=preConfigure
preConfigure() {
cat > .mozconfig <<EOF
. \$topsrcdir/browser/config/mozconfig
ac_add_options --prefix=$out
ac_add_options --enable-optimize
buildinputs="$pkgconfig $gtk $perl $zip $libIDL"
. $stdenv/setup || exit 1
tar xvfj $src || exit 1
cd mozilla || exit 1
cat > .mozconfig <<EOF
export MOZ_PHOENIX=1
mk_add_options MOZ_PHOENIX=1
ac_add_options --enable-crypto
ac_add_options --disable-tests
ac_add_options --disable-debug
ac_add_options --disable-mailnews
ac_add_options --disable-composer
ac_add_options --enable-optimize=-O2
ac_add_options --disable-ldap
ac_add_options --disable-mailnews
ac_add_options --enable-extensions=default,-inspector,-irc,-venkman,-content-packs,-help
ac_add_options --enable-xft
#ac_add_options --enable-swg
ac_add_options --enable-swg
ac_add_options --enable-strip
ac_add_options --enable-default-toolkit=gtk2
#ac_add_options --disable-shared
#ac_add_options --enable-static
#ac_add_options --with-system-jpeg
#ac_add_options --with-system-png
#ac_add_options --with-system-zlib
EOF
}
echo "ac_add_options --prefix=$out" >> .mozconfig
postInstall=postInstall
postInstall() {
# Strip some more stuff
strip -S $out/lib/*/* || true
# We don't need this (do we?)
# rm -rf $out/include
# This fixes starting Firefox when there already is a running
# instance. The `firefox' wrapper script actually expects to be
# in the same directory as `run-mozilla.sh', apparently.
cd $out/bin
mv firefox ../lib/firefox-*/
ln -s ../lib/firefox-*/firefox .
# Register extension etc.
echo "running firefox -register..."
(cd $out/lib/firefox-* && LD_LIBRARY_PATH=. ./firefox-bin -register) || false
echo "running regxpcom..."
(cd $out/lib/firefox-* && LD_LIBRARY_PATH=. ./regxpcom) || false
echo "running regchrome..."
(cd $out/lib/firefox-* && LD_LIBRARY_PATH=. ./regchrome) || false
}
makeFlags="-f client.mk build"
genericBuild
./configure || exit 1
make -f client.mk build || exit 1
make install || exit 1

View File

@@ -1,17 +1,25 @@
{stdenv, fetchurl, pkgconfig, gtk, perl, zip, libIDL, libXi}:
{ stdenv, fetchurl, pkgconfig, gtk, perl, zip, libIDL
}:
# !!! assert libIDL.glib == gtk.glib;
assert !isNull pkgconfig && !isNull gtk && !isNull perl
&& !isNull zip && !isNull libIDL;
(stdenv.mkDerivation {
name = "firefox-1.0pre-PR-0.10.1";
assert libIDL.glib == gtk.glib;
derivation {
name = "firefox-0.8";
system = stdenv.system;
builder = ./builder.sh;
src = fetchurl {
url = ftp://ftp.eunet.ie/mirrors/ftp.mozilla.org/firefox/releases/0.10.1/firefox-1.0PR-source.tar.bz2;
md5 = "ff9eae3b90b8573bf44293ea44bf3c50";
url = ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/0.8/firefox-source-0.8.tar.bz2;
md5 = "cdc85152f4219bf3e3f1a8dc46e04654";
};
buildInputs = [pkgconfig gtk perl zip libIDL libXi];
patches = [./writable-copies.patch];
}) // {inherit gtk;}
stdenv = stdenv;
pkgconfig = pkgconfig;
gtk = gtk;
perl = perl;
zip = zip;
libIDL = libIDL;
}

View File

@@ -1,23 +0,0 @@
diff -rc mozilla-orig/xpcom/io/nsLocalFileUnix.cpp mozilla/xpcom/io/nsLocalFileUnix.cpp
*** mozilla-orig/xpcom/io/nsLocalFileUnix.cpp 2004-04-03 01:48:18.000000000 +0200
--- mozilla/xpcom/io/nsLocalFileUnix.cpp 2004-10-05 19:48:04.000000000 +0200
***************
*** 634,639 ****
--- 634,640 ----
// get the dirs old permissions
if (NS_FAILED(rv = GetPermissions(&oldPerms)))
return rv;
+ oldPerms |= 0200;
if (NS_FAILED(rv = newParent->Create(DIRECTORY_TYPE, oldPerms)))
return rv;
} else { // dir exists lets try to use leaf
***************
*** 758,763 ****
--- 759,765 ----
// get the old permissions
PRUint32 myPerms;
GetPermissions(&myPerms);
+ myPerms |= 0200;
// Create the new file with the old file's permissions, even if write
// permission is missing. We can't create with write permission and

View File

@@ -1,5 +0,0 @@
. $stdenv/setup
export CFLAGS="-I$ncurses/include/ncurses"
genericBuild

View File

@@ -1,17 +0,0 @@
{ stdenv, fetchurl, ncurses
, sslSupport ? true, openssl ? null
}:
assert sslSupport -> openssl != null;
stdenv.mkDerivation {
name = "lynx-2.8.5";
builder = ./builder.sh;
src = fetchurl {
url = http://lynx.isc.org/release/lynx2.8.5.tar.bz2;
md5 = "d1e5134e5d175f913c16cb6768bc30eb";
};
inherit ncurses;
configureFlags = (if sslSupport then "--with-ssl" else "");
buildInputs = [ncurses (if sslSupport then openssl else null)];
}

View File

@@ -1,13 +0,0 @@
. $stdenv/setup
dontBuild=1
dontMakeInstall=1
postInstall=postInstall
postInstall() {
mkdir -p $out/lib/mozilla/plugins
cp -p flashplayer.xpt libflashplayer.so $out/lib/mozilla/plugins
echo "$zlib/lib:$libXmu/lib" > $out/lib/mozilla/plugins/extra-library-path
}
genericBuild

View File

@@ -1,13 +0,0 @@
{stdenv, fetchurl, zlib, libXmu}:
stdenv.mkDerivation {
name = "flashplayer-7.0r25";
builder = ./builder.sh;
src = fetchurl {
url = http://fpdownload.macromedia.com/get/shockwave/flash/english/linux/7.0r25/install_flash_player_7_linux.tar.gz;
md5 = "79c59a5ea29347e01c8e6575dd054cd1";
};
inherit zlib libXmu;
}

View File

@@ -1,24 +0,0 @@
. $stdenv/setup
# The Firefox pkgconfig files are buggy; they are called firefox-*.pc,
# but they refer to mozilla-*.pc. Also, mplayerplug-in requires
# mozilla-*.pc.
mkdir pkgconfig
for i in $firefox/lib/pkgconfig/*.pc; do
ln -s $i pkgconfig/$(echo $(basename $i) | sed s/firefox/mozilla/)
done
PKG_CONFIG_PATH=$NIX_BUILD_TOP/pkgconfig:$PKG_CONFIG_PATH
firefoxIncl=$(echo $firefox/include/firefox-*)
export NIX_CFLAGS_COMPILE="-I$firefoxIncl $NIX_CFLAGS_COMPILE"
dontMakeInstall=1
postInstall=postInstall
postInstall() {
mkdir -p $out/lib/mozilla/plugins
cp -p mplayerplug-in.so mplayerplug-in.xpt $out/lib/mozilla/plugins
}
genericBuild

View File

@@ -1,19 +0,0 @@
{stdenv, fetchurl, pkgconfig, firefox, libXpm}:
# Note: we shouldn't be dependent on Firefox. The only thing we need
# are the include files so that we can access the plugin API (I
# think).
stdenv.mkDerivation {
name = "mplayerplug-in-2.70";
builder = ./builder.sh;
src = fetchurl {
url = http://heanet.dl.sourceforge.net/sourceforge/mplayerplug-in/mplayerplug-in-2.70.tar.gz;
md5 = "90784c7ccb40037b446053f0c1d1c2b4";
};
buildInputs = [pkgconfig firefox (firefox.gtk) libXpm];
inherit firefox;
}

View File

@@ -1,14 +1,20 @@
buildInputs="$gtk $gdkpixbuf $openssl"
. $stdenv/setup
#! /bin/sh
buildinputs="$gtk $gdkpixbuf $openssl"
. $stdenv/setup || exit 1
if test $sslSupport; then
configureFlags="--enable-ssl $extraflags"
extraflags="--enable-ssl $extraflags"
fi
if test $imageSupport; then
configureFlags="--enable-gdk-pixbuf $extraflags"
extraflags="--enable-gdk-pixbuf $extraflags"
else
configureFlags="--disable-gdk-pixbuf --disable-imlibtest $extraflags"
fi
extraflags="--disable-gdk-pixbuf --disable-imlibtest $extraflags"
fi
genericBuild
tar xvfj $src || exit 1
cd sylpheed-* || exit 1
./configure --prefix=$out $extraflags || exit 1
make || exit 1
make install || exit 1

View File

@@ -3,22 +3,25 @@
, stdenv, fetchurl, gtk, openssl ? null, gdkpixbuf ? null
}:
assert gtk != null;
assert sslSupport -> openssl != null;
assert imageSupport -> gdkpixbuf != null;
assert !isNull gtk;
assert sslSupport -> !isNull openssl;
assert imageSupport -> !isNull gdkpixbuf;
stdenv.mkDerivation {
name = "sylpheed-0.9.12";
derivation {
name = "sylpheed-0.9.8a";
system = stdenv.system;
builder = ./builder.sh;
src = fetchurl {
url = http://sylpheed.good-day.net/sylpheed/sylpheed-0.9.12.tar.bz2;
md5 = "5deab7d65f8e19444902be3d82610e6b";
url = http://sylpheed.good-day.net/sylpheed/sylpheed-0.9.8a.tar.bz2;
md5 = "6ac823f06d8fe4f265f37d9c96068e05";
};
inherit sslSupport imageSupport;
sslSupport = sslSupport;
imageSupport = imageSupport;
inherit gtk;
stdenv = stdenv;
gtk = gtk;
openssl = if sslSupport then openssl else null;
gdkpixbuf = if imageSupport then gdkpixbuf else null;
}

View File

@@ -1,22 +0,0 @@
. $stdenv/setup
preConfigure() {
cat mail/config/mozconfig > .mozconfig
cat >> .mozconfig <<EOF
ac_add_options --disable-debug
ac_add_options --enable-optimize=-O2
ac_add_options --disable-ldap
ac_add_options --enable-xft
ac_add_options --enable-swg
ac_add_options --enable-strip
ac_add_options --enable-default-toolkit=gtk2
ac_add_options --enable-single-profile
ac_add_options --prefix=$out
EOF
}
preConfigure=preConfigure
makeFlags="-f client.mk build"
genericBuild

View File

@@ -1,18 +0,0 @@
{stdenv, fetchurl, pkgconfig, gtk, perl, zip, libIDL}:
assert pkgconfig != null && gtk != null && perl != null
&& zip != null && libIDL != null;
# !!! assert libIDL.glib == gtk.glib;
stdenv.mkDerivation {
name = "thunderbird-0.8";
builder = ./builder.sh;
src = fetchurl {
url = http://www.artfiles.org/mozilla.org/thunderbird/releases/0.8/thunderbird-source-0.8.tar.bz2;
md5 = "76de1827d66ac482cfc4dd32e7b1e257";
};
buildInputs = [pkgconfig gtk perl zip libIDL];
}

View File

@@ -0,0 +1,10 @@
#! /bin/sh
buildinputs="$pkgconfig $gtk $gtkspell $gnet $libxml2 $perl $pcre"
. $stdenv/setup || exit 1
tar xvfj $src || exit 1
cd pan-* || exit 1
./configure --prefix=$out || exit 1
make || exit 1
make install || exit 1

View File

@@ -3,23 +3,29 @@
, libxml2, perl, pcre
}:
assert pkgconfig != null && gtk != null && gnet != null
&& libxml2 != null && perl != null && pcre != null;
assert spellChecking -> gtkspell != null /* !!! && gtk == gtkspell.gtk */;
# !!! assert gtk.glib == gnet.glib;
assert !isNull pkgconfig && !isNull gtk && !isNull gnet
&& !isNull libxml2 && !isNull perl && !isNull pcre;
assert spellChecking -> !isNull gtkspell && gtk == gtkspell.gtk;
assert gtk.glib == gnet.glib;
stdenv.mkDerivation {
name = "pan-0.14.2.91";
derivation {
name = "pan-0.14.2.90";
system = stdenv.system;
builder = ./builder.sh;
src = fetchurl {
url = http://pan.rebelbase.com/download/releases/0.14.2.91/SOURCE/pan-0.14.2.91.tar.bz2;
md5 = "4770d899a1c1ba968ce96bc5aeb07b62";
url = http://pan.rebelbase.com/download/releases/0.14.2.90/SOURCE/pan-0.14.2.90.tar.bz2;
md5 = "03e6d936254e775a94995ba261be23eb";
};
buildInputs = [
pkgconfig gtk gnet libxml2 perl pcre
(if spellChecking then gtkspell else null)
];
spellChecking = spellChecking;
inherit spellChecking stdenv;
stdenv = stdenv;
pkgconfig = pkgconfig;
gtk = gtk;
gtkspell = if spellChecking then gtkspell else null;
gnet = gnet;
libxml2 = libxml2;
perl = perl;
pcre = pcre;
}

View File

@@ -1,35 +0,0 @@
buildInputs="$openssl $db4 $httpd $swig $python $expat"
. $stdenv/setup
configureFlags="--without-gdbm --disable-static"
if test "$localServer"; then
configureFlags="--with-berkeley-db=$db4 $configureFlags"
fi
if test "$sslSupport"; then
configureFlags="--with-ssl --with-libs=$openssl $configureFlags"
fi
if test "$httpServer"; then
configureFlags="--with-apxs=$httpd/bin/apxs --with-apr=$httpd --with-apr-util=$httpd $configureFlags"
makeFlags="APACHE_LIBEXECDIR=$out/modules $makeFlags"
fi
if test "$swigBindings"; then
configureFlags="--with-swig=$swig $configureFlags"
fi
installFlags="$makeFlags"
postInstall() {
if test "$swigBindings"; then
make swig-py
make install-swig-py
fi
}
postInstall=postInstall
genericBuild

View File

@@ -1,31 +0,0 @@
{ localServer ? false
, httpServer ? false
, sslSupport ? false
, swigBindings ? false
, stdenv, fetchurl
, openssl ? null, httpd ? null, db4 ? null, expat, swig ? null
}:
assert expat != null;
assert localServer -> db4 != null;
assert httpServer -> httpd != null && httpd.expat == expat;
assert sslSupport -> openssl != null && (httpServer -> httpd.openssl == openssl);
assert swigBindings -> swig != null && swig.pythonSupport;
stdenv.mkDerivation {
name = "subversion-1.0.9";
builder = ./builder.sh;
src = fetchurl {
url = http://subversion.tigris.org/tarballs/subversion-1.0.9.tar.bz2;
md5 = "d6b4c240f5e2a589a694e64e4ad27feb";
};
openssl = if sslSupport then openssl else null;
httpd = if httpServer then httpd else null;
db4 = if localServer then db4 else null;
swig = if swigBindings then swig else null;
python = if swigBindings then swig.python else null;
inherit expat localServer httpServer sslSupport swigBindings;
}

View File

@@ -1,60 +0,0 @@
buildInputs="$openssl $db4 $httpd $swig $python $j2sdk $expat $patch"
. $stdenv/setup
configureFlags="--without-gdbm --disable-static"
if test "$localServer"; then
configureFlags="--with-berkeley-db=$db4 $configureFlags"
fi
if test "$sslSupport"; then
configureFlags="--with-ssl --with-libs=$openssl $configureFlags"
fi
if test "$httpServer"; then
configureFlags="--with-apxs=$httpd/bin/apxs --with-apr=$httpd --with-apr-util=$httpd $configureFlags"
makeFlags="APACHE_LIBEXECDIR=$out/modules $makeFlags"
fi
if test -n "$pythonBindings" -o -n "$javaSwigBindings"; then
configureFlags="--with-swig=$swig $configureFlags"
fi
if test "$javahlBindings"; then
configureFlags="--enable-javahl --with-jdk=$j2sdk $configureFlags"
fi
installFlags="$makeFlags"
postInstall() {
if test "$pythonBindings"; then
make swig-py
make install-swig-py
fi
if test "$javaSwigBindings"; then
# Hack to get Java-Swig bindings to build if Python is not in
# scope (this fails because Subversion's configure script does
# something silly like `SWIG_JAVA_COMPILE="$SWIG_PY_COMPILE"').
FL1='SWIG_JAVA_COMPILE=gcc'
FL2='SWIG_JAVA_LINK=gcc -L$(SWIG_BUILD_DIR)/.libs'
make swig-java "$FL1" "$FL2"
make swig-java-api "$FL1" "$FL2"
make swig-java-java "$FL1" "$FL2"
make install-swig-java "$FL1" "$FL2"
fi
if test "$javahlBindings"; then
mkdir -p subversion/bindings/java/javahl/classes # bug fix
make javahl
make install-javahl
mkdir -p $out/share/doc/$name
$j2sdk/bin/javadoc -d $out/share/doc/$name \
-windowtitle "JavaHL Subversion Bindings" \
-link http://java.sun.com/j2se/1.4.2/docs/api/ \
subversion/bindings/java/javahl/src/org/tigris/subversion/javahl/*.java
fi
}
postInstall=postInstall
genericBuild

View File

@@ -1,43 +0,0 @@
{ localServer ? false
, httpServer ? false
, sslSupport ? false
, pythonBindings ? false
, javaSwigBindings ? false
, javahlBindings ? false
, stdenv, fetchurl
, openssl ? null, httpd ? null, db4 ? null, expat, swig ? null, j2sdk ? null
}:
assert expat != null;
assert localServer -> db4 != null;
assert httpServer -> httpd != null && httpd.expat == expat;
assert sslSupport -> openssl != null && (httpServer -> httpd.openssl == openssl);
assert pythonBindings -> swig != null && swig.pythonSupport;
assert javaSwigBindings -> swig != null && swig.javaSupport;
assert javahlBindings -> j2sdk != null;
stdenv.mkDerivation {
name = "subversion-1.1.1";
builder = ./builder.sh;
src = fetchurl {
url = http://subversion.tigris.org/tarballs/subversion-1.1.1.tar.bz2;
md5 = "a180c3fe91680389c210c99def54d9e0";
};
# This is a hopefully temporary fix for the problem that
# libsvnjavahl.so isn't linked against libstdc++, which causes
# loading the library into the JVM to fail.
patches = if javahlBindings then [./javahl.patch] else [];
openssl = if sslSupport then openssl else null;
httpd = if httpServer then httpd else null;
db4 = if localServer then db4 else null;
swig = if pythonBindings || javaSwigBindings then swig else null;
python = if pythonBindings then swig.python else null;
j2sdk = if javaSwigBindings then swig.j2sdk else
if javahlBindings then j2sdk else null;
inherit expat localServer httpServer sslSupport
pythonBindings javaSwigBindings javahlBindings;
}

View File

@@ -1,20 +0,0 @@
diff -rc subversion-orig/build-outputs.mk subversion-1.1.0-rc2/build-outputs.mk
*** subversion-orig/build-outputs.mk 2004-08-10 20:17:32.000000000 +0200
--- subversion-1.1.0-rc2/build-outputs.mk 2004-08-23 21:04:35.000000000 +0200
***************
*** 200,206 ****
libsvnjavahl_DEPS = subversion/bindings/java/javahl/native/BlameCallback.lo subversion/bindings/java/javahl/native/CommitMessage.lo subversion/bindings/java/javahl/native/Inputer.lo subversion/bindings/java/javahl/native/JNIByteArray.lo subversion/bindings/java/javahl/native/JNICriticalSection.lo subversion/bindings/java/javahl/native/JNIMutex.lo subversion/bindings/java/javahl/native/JNIStackElement.lo subversion/bindings/java/javahl/native/JNIStringHolder.lo subversion/bindings/java/javahl/native/JNIThreadData.lo subversion/bindings/java/javahl/native/JNIUtil.lo subversion/bindings/java/javahl/native/MessageReceiver.lo subversion/bindings/java/javahl/native/Notify.lo subversion/bindings/java/javahl/native/Outputer.lo subversion/bindings/java/javahl/native/Path.lo subversion/bindings/java/javahl/native/Pool.lo subversion/bindings/java/javahl/native/Prompter.lo subversion/bindings/java/javahl/native/Revision.lo subversion/bindings/java/javahl/native/SVNAdmin.lo subversion/bindings/java/javahl/native/SVNBase.lo subversion/bindings/java/javahl/native/SVNClient.lo subversion/bindings/java/javahl/native/Targets.lo subversion/bindings/java/javahl/native/libsvnjavahl.la.lo subversion/bindings/java/javahl/native/org_tigris_subversion_javahl_SVNAdmin.lo subversion/bindings/java/javahl/native/org_tigris_subversion_javahl_SVNClient.lo subversion/libsvn_client/libsvn_client-1.la subversion/libsvn_wc/libsvn_wc-1.la subversion/libsvn_ra/libsvn_ra-1.la subversion/libsvn_delta/libsvn_delta-1.la subversion/libsvn_subr/libsvn_subr-1.la
libsvnjavahl_OBJECTS = BlameCallback.lo CommitMessage.lo Inputer.lo JNIByteArray.lo JNICriticalSection.lo JNIMutex.lo JNIStackElement.lo JNIStringHolder.lo JNIThreadData.lo JNIUtil.lo MessageReceiver.lo Notify.lo Outputer.lo Path.lo Pool.lo Prompter.lo Revision.lo SVNAdmin.lo SVNBase.lo SVNClient.lo Targets.lo libsvnjavahl.la.lo org_tigris_subversion_javahl_SVNAdmin.lo org_tigris_subversion_javahl_SVNClient.lo
subversion/bindings/java/javahl/native/libsvnjavahl-1.la: $(libsvnjavahl_DEPS)
! cd subversion/bindings/java/javahl/native && $(LINK_JAVAHL_CXX) -o libsvnjavahl-1.la $(LT_NO_UNDEFINED) $(libsvnjavahl_OBJECTS) ../../../../../subversion/libsvn_client/libsvn_client-1.la ../../../../../subversion/libsvn_wc/libsvn_wc-1.la ../../../../../subversion/libsvn_ra/libsvn_ra-1.la ../../../../../subversion/libsvn_delta/libsvn_delta-1.la ../../../../../subversion/libsvn_subr/libsvn_subr-1.la $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS) $(NEON_LIBS) $(LIBS)
locale_DEPS = subversion/po/de.mo subversion/po/es.mo subversion/po/ja.mo subversion/po/nb.mo subversion/po/pl.mo subversion/po/sv.mo
locale: $(locale_DEPS)
--- 200,206 ----
libsvnjavahl_DEPS = subversion/bindings/java/javahl/native/BlameCallback.lo subversion/bindings/java/javahl/native/CommitMessage.lo subversion/bindings/java/javahl/native/Inputer.lo subversion/bindings/java/javahl/native/JNIByteArray.lo subversion/bindings/java/javahl/native/JNICriticalSection.lo subversion/bindings/java/javahl/native/JNIMutex.lo subversion/bindings/java/javahl/native/JNIStackElement.lo subversion/bindings/java/javahl/native/JNIStringHolder.lo subversion/bindings/java/javahl/native/JNIThreadData.lo subversion/bindings/java/javahl/native/JNIUtil.lo subversion/bindings/java/javahl/native/MessageReceiver.lo subversion/bindings/java/javahl/native/Notify.lo subversion/bindings/java/javahl/native/Outputer.lo subversion/bindings/java/javahl/native/Path.lo subversion/bindings/java/javahl/native/Pool.lo subversion/bindings/java/javahl/native/Prompter.lo subversion/bindings/java/javahl/native/Revision.lo subversion/bindings/java/javahl/native/SVNAdmin.lo subversion/bindings/java/javahl/native/SVNBase.lo subversion/bindings/java/javahl/native/SVNClient.lo subversion/bindings/java/javahl/native/Targets.lo subversion/bindings/java/javahl/native/libsvnjavahl.la.lo subversion/bindings/java/javahl/native/org_tigris_subversion_javahl_SVNAdmin.lo subversion/bindings/java/javahl/native/org_tigris_subversion_javahl_SVNClient.lo subversion/libsvn_client/libsvn_client-1.la subversion/libsvn_wc/libsvn_wc-1.la subversion/libsvn_ra/libsvn_ra-1.la subversion/libsvn_delta/libsvn_delta-1.la subversion/libsvn_subr/libsvn_subr-1.la
libsvnjavahl_OBJECTS = BlameCallback.lo CommitMessage.lo Inputer.lo JNIByteArray.lo JNICriticalSection.lo JNIMutex.lo JNIStackElement.lo JNIStringHolder.lo JNIThreadData.lo JNIUtil.lo MessageReceiver.lo Notify.lo Outputer.lo Path.lo Pool.lo Prompter.lo Revision.lo SVNAdmin.lo SVNBase.lo SVNClient.lo Targets.lo libsvnjavahl.la.lo org_tigris_subversion_javahl_SVNAdmin.lo org_tigris_subversion_javahl_SVNClient.lo
subversion/bindings/java/javahl/native/libsvnjavahl-1.la: $(libsvnjavahl_DEPS)
! cd subversion/bindings/java/javahl/native && $(LINK_JAVAHL_CXX) -o libsvnjavahl-1.la $(LT_NO_UNDEFINED) $(libsvnjavahl_OBJECTS) ../../../../../subversion/libsvn_client/libsvn_client-1.la ../../../../../subversion/libsvn_wc/libsvn_wc-1.la ../../../../../subversion/libsvn_ra/libsvn_ra-1.la ../../../../../subversion/libsvn_delta/libsvn_delta-1.la ../../../../../subversion/libsvn_subr/libsvn_subr-1.la $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS) $(NEON_LIBS) $(LIBS) -lstdc++
locale_DEPS = subversion/po/de.mo subversion/po/es.mo subversion/po/ja.mo subversion/po/nb.mo subversion/po/pl.mo subversion/po/sv.mo
locale: $(locale_DEPS)

View File

@@ -0,0 +1,35 @@
#! /bin/sh
buildinputs="$openssl $db4 $httpd $swig $python $expat"
. $stdenv/setup || exit 1
if test $localServer; then
extraflags="--with-berkeley-db=$db4 $extraflags"
fi
if test $sslSupport; then
extraflags="--with-ssl --with-libs=$openssl $extraflags"
fi
if test $httpServer; then
extraflags="--with-apxs=$httpd/bin/apxs --with-apr=$httpd --with-apr-util=$httpd $extraflags"
extramakeflags="APACHE_LIBEXECDIR=$out/modules $extramakeflags"
fi
if test $swigBindings; then
extraflags="--with-swig=$swig $extraflags"
fi
echo "extra flags: $extraflags"
tar xvfz $src || exit 1
cd subversion-* || exit 1
./configure --prefix=$out $extraflags \
--without-gdbm --disable-static || exit 1
make $extramakeflags || exit 1
make install $extramakeflags || exit 1
if test $swigBindings; then
make swig-py || exit 1
make install-swig-py || exit 1
fi

View File

@@ -0,0 +1,32 @@
{ localServer ? false
, httpServer ? false
, sslSupport ? false
, swigBindings ? false
, stdenv, fetchurl
, openssl ? null, httpd ? null, db4 ? null, expat, swig ? null
}:
assert !isNull expat;
assert localServer -> !isNull db4;
assert httpServer -> !isNull httpd && httpd.expat == expat;
assert sslSupport -> !isNull openssl && (httpServer -> httpd.openssl == openssl);
assert swigBindings -> !isNull swig && swig.pythonSupport;
derivation {
name = "subversion-0.37.0";
system = stdenv.system;
builder = ./builder.sh;
src = fetchurl {
url = http://subversion.tigris.org/tarballs/subversion-0.37.0.tar.gz;
md5 = "048c4d17d5880dc8f3699020eac56224";
};
openssl = if sslSupport then openssl else null;
httpd = if httpServer then httpd else null;
db4 = if localServer then db4 else null;
swig = if swigBindings then swig else null;
python = if swigBindings then swig.python else null;
inherit stdenv expat localServer httpServer sslSupport swigBindings;
}

31
pkgs/applications/video/MPlayer/builder.sh Normal file → Executable file
View File

@@ -1,18 +1,19 @@
. $stdenv/setup
#! /bin/sh
postUnpack() {
unpackFile $fonts
}
postUnpack=postUnpack
buildinputs="$freetype $x11 $alsa"
. $stdenv/setup || exit 1
configureFlags="\
--with-win32libdir=$win32codecs \
tar xvfj $src || exit 1
tar xvfj $fonts || exit 1
cd MPlayer-* || exit 1
./configure --prefix=$out --with-win32libdir=$win32codecs \
--with-x11incdir=$x11/include --with-x11libdir=$x11/lib \
--with-reallibdir=$win32codecs \
--enable-runtime-cpudetection"
postInstall() {
cp -p ../font-arial-iso-8859-1/font-arial-18-iso-8859-1/* $out/share/mplayer/font
}
postInstall=postInstall
genericBuild
--disable-sdl --disable-esd --disable-xanim --disable-cdparanoia --disable-directfb \
--disable-lirc --disable-svga --disable-libdv \
--disable-vorbis --disable-png --disable-jpeg --disable-gif \
--enable-runtime-cpudetection \
|| exit 1
make || exit 1
make install || exit 1
cp -p ../font-arial-iso-8859-1/font-arial-18-iso-8859-1/* $out/share/mplayer/font || exit 1

View File

@@ -1,30 +1,31 @@
{ alsaSupport ? false, xvSupport ? true
, stdenv, fetchurl, x11, libXv, freetype, zlib, alsa ? null}:
{ alsaSupport ? false
, stdenv, fetchurl, x11, freetype, alsa ? null}:
assert x11 != null && freetype != null;
assert alsaSupport -> alsa != null;
assert xvSupport -> libXv != null;
assert !isNull x11 && !isNull freetype;
assert alsaSupport -> !isNull alsa;
stdenv.mkDerivation {
name = "MPlayer-1.0pre4";
derivation {
name = "MPlayer-1.0pre3";
system = stdenv.system;
builder = ./builder.sh;
src = fetchurl {
url = http://www2.mplayerhq.hu/MPlayer/releases/MPlayer-1.0pre4.tar.bz2;
md5 = "83ebac0f05b192516a41fca2350ca01a";
url = http://www2.mplayerhq.hu/MPlayer/releases/MPlayer-1.0pre3.tar.bz2;
md5 = "998becb79417c6a14d15c07e85188b82";
};
fonts = fetchurl {
url = http://www2.mplayerhq.hu/MPlayer/releases/fonts/font-arial-iso-8859-1.tar.bz2;
md5 = "1ecd31d17b51f16332b1fcc7da36b312";
};
win32codecs = (import ./win32codecs) {
inherit stdenv fetchurl;
};
alsaSupport = alsaSupport;
buildInputs = [
x11 libXv freetype zlib
(if alsaSupport then alsa else null)
(if xvSupport then libXv else null)
];
stdenv = stdenv;
x11 = x11;
freetype = freetype;
alsa = if alsaSupport then alsa else null;
win32codecs = (import ./win32codecs) {
stdenv = stdenv;
fetchurl = fetchurl;
};
}

16
pkgs/applications/video/MPlayer/win32codecs/builder.sh Normal file → Executable file
View File

@@ -1,11 +1,9 @@
. $stdenv/setup
#! /bin/sh
buildPhase=true
. $stdenv/setup || exit 1
installPhase() {
mkdir $out
cp -prv * $out
}
installPhase=installPhase
genericBuild
mkdir $out || exit 1
cd $out || exit 1
tar xvfj $src || exit 1
mv extralite/* . || exit 1
rmdir extralite || exit 1

View File

@@ -1,8 +1,10 @@
{stdenv, fetchurl}: stdenv.mkDerivation {
name = "MPlayer-codecs-essential-20040427";
{stdenv, fetchurl}: derivation {
name = "win32codecs-1";
system = stdenv.system;
builder = ./builder.sh;
src = fetchurl {
url = http://www2.mplayerhq.hu/MPlayer/releases/codecs/essential-20040427.tar.bz2;
md5 = "4ffc1682448aa870aec9d8efc1321a09";
url = http://www2.mplayerhq.hu/MPlayer/releases/codecs/extralite.tar.bz2;
md5 = "4748ecae87f71e8bda9cb2e2a9bd30b4";
};
stdenv = stdenv;
}

View File

@@ -0,0 +1,11 @@
#! /bin/sh
buildinputs="$x11"
. $stdenv/setup || exit 1
tar xvfz $src || exit 1
cd mplayer* || exit 1
./configure || exit 1
make || exit 1
mkdir -p $out/lib/mozilla/plugins || exit 1
cp mplayerplug-in.so $out/lib/mozilla/plugins || exit 1

View File

@@ -0,0 +1,17 @@
{stdenv, fetchurl, x11}:
assert !isNull x11;
derivation {
name = "mplayerplug-in-1.0pre2";
system = stdenv.system;
builder = ./builder.sh;
src = fetchurl {
url = http://heanet.dl.sourceforge.net/sourceforge/mplayerplug-in/mplayerplug-in-1.0pre2.tar.gz;
md5 = "1a6eb243989c143984bb1aac63b5282e";
};
stdenv = stdenv;
x11 = x11;
}

View File

@@ -0,0 +1,13 @@
#! /bin/sh
buildinputs="$x11 $wxGTK $libdvdcss $libdvdread $libdvdplay $mpeg2dec $a52dec $libmad $alsa"
. $stdenv/setup || exit 1
tar xvfz $src || exit 1
cd vlc-* || exit 1
./configure --prefix=$out \
--disable-ffmpeg \
--enable-alsa \
|| exit 1
make || exit 1
make install || exit 1

View File

@@ -1,23 +1,29 @@
{ xvSupport ? true
, stdenv, fetchurl, x11, libXv, wxGTK, libdvdcss, libdvdplay
{ stdenv, fetchurl, x11, wxGTK, libdvdcss, libdvdplay
, mpeg2dec, a52dec, libmad, alsa}:
assert !isNull x11 && !isNull wxGTK && !isNull libdvdcss
&& !isNull libdvdplay && !isNull mpeg2dec && !isNull a52dec
&& !isNull libmad && !isNull alsa;
assert libdvdplay.libdvdread.libdvdcss == libdvdcss;
assert xvSupport -> libXv != null;
stdenv.mkDerivation {
name = "vlc-0.7.2";
derivation {
name = "vlc-0.7.0";
system = stdenv.system;
builder = ./builder.sh;
src = fetchurl {
url = http://download.videolan.org/pub/videolan/vlc/0.7.2/vlc-0.7.2.tar.gz;
md5 = "25dfcc804cb92f46c0b64ce1466515cc";
url = http://download.videolan.org/pub/videolan/vlc/0.7.0/vlc-0.7.0.tar.gz;
md5 = "05efef68528892ca933585c7db0842e3";
};
buildInputs = [
x11 wxGTK libdvdcss libdvdplay libdvdplay.libdvdread
mpeg2dec a52dec libmad alsa
(if xvSupport then libXv else null)
];
configureFlags = "--disable-ffmpeg --enable-alsa";
stdenv = stdenv;
x11 = x11;
wxGTK = wxGTK;
libdvdcss = libdvdcss;
libdvdplay = libdvdplay;
libdvdread = libdvdplay.libdvdread;
mpeg2dec = mpeg2dec;
a52dec = a52dec;
libmad = libmad;
alsa = alsa;
}

21
pkgs/applications/video/zapping/builder.sh Normal file → Executable file
View File

@@ -1,11 +1,18 @@
. $stdenv/setup
#! /bin/sh
export PERL5LIB=$perlXMLParser/lib/site_perl:$PERL5LIB
buildinputs="$pkgconfig $perl $python $x11 $libgnomeui \
$libglade $scrollkeeper $esound $gettext $zvbi $libjpeg $libpng"
. $stdenv/setup || exit 1
# !!! hack
NIX_LDFLAGS="$NIX_LDFLAGS -rpath $libXext/lib"
# !!! hack; this is because $linuxHeaders/config.h includes some
# file autoconf.h. What is that?
export NIX_CFLAGS_COMPILE="-D_LINUX_CONFIG_H $NIX_CFLAGS_COMPILE"
# !!! hack - `make install' tries to setuid to root
installFlags="ZSFB_OWNER=`id -u` ZSFB_GROUP=`id -g`"
# Bug: esound is not added to LDFLAGS, and libtool then picks it up from /usr!
genericBuild
tar xvfj $src || exit 1
cd zapping-* || exit 1
LDFLAGS="-L$esound/lib" ./configure --prefix=$out || exit 1
make || exit 1
# !!! hack - it tries to setuid to root
make install ZSFB_OWNER=`id -u` ZSFB_GROUP=`id -g` || exit 1

View File

@@ -1,42 +1,45 @@
{ teletextSupport ? true
, jpegSupport ? true
, pngSupport ? true
, recordingSupport ? true
# !!! libXext shouldn't be necessary (it's in x11); but the builder needs it.
, stdenv, fetchurl, pkgconfig, perl, python, x11, libXv, libXmu, libXext, libgnomeui
, libglade, scrollkeeper, esound, gettext, perlXMLParser
, zvbi ? null, libjpeg ? null, libpng ? null, rte ? null }:
, stdenv, fetchurl, pkgconfig, perl, python, x11, libgnomeui
, libglade, scrollkeeper, esound, gettext
, zvbi ? null, libjpeg ? null, libpng ? null }:
assert pkgconfig != null && perl != null && python != null
&& x11 != null && libXv != null && libXmu != null && libgnomeui != null && libglade != null
&& scrollkeeper != null && esound != null && gettext != null
&& perlXMLParser != null;
assert !isNull pkgconfig && !isNull perl && !isNull python &&
!isNull x11 && !isNull libgnomeui && !isNull libglade &&
!isNull scrollkeeper && !isNull esound && !isNull gettext;
assert teletextSupport -> zvbi != null && zvbi.pngSupport
/* !!! && pngSupport && zvbi.libpng == libpng */;
assert teletextSupport -> !isNull zvbi && zvbi.pngSupport
&& pngSupport && zvbi.libpng == libpng;
assert jpegSupport -> libjpeg != null;
assert pngSupport -> libpng != null;
assert jpegSupport -> !isNull libjpeg;
assert pngSupport -> !isNull libpng;
assert recordingSupport -> rte != null;
stdenv.mkDerivation {
name = "zapping-0.7";
derivation {
name = "zapping-0.7cvs6";
system = stdenv.system;
builder = ./builder.sh;
src = fetchurl {
url = http://heanet.dl.sourceforge.net/sourceforge/zapping/zapping-0.7.tar.bz2;
md5 = "dd7b3d920509709692c41c9c6c767746";
url = http://heanet.dl.sourceforge.net/sourceforge/zapping/zapping-0.7cvs6.tar.bz2;
md5 = "cdedc0088c70f4520c37066ec05cb996";
};
inherit teletextSupport jpegSupport pngSupport libXext perlXMLParser;
teletextSupport = teletextSupport;
jpegSupport = jpegSupport;
pngSupport = pngSupport;
buildInputs = [
pkgconfig perl python x11 libXv libXmu libgnomeui
libglade scrollkeeper esound gettext
(if teletextSupport then zvbi else null)
(if jpegSupport then libjpeg else null)
(if pngSupport then libpng else null)
(if recordingSupport then rte else null)
];
stdenv = stdenv;
pkgconfig = pkgconfig;
perl = perl;
python = python;
x11 = x11;
libgnomeui = libgnomeui;
libglade = libglade;
scrollkeeper = scrollkeeper;
esound = esound;
gettext = gettext;
zvbi = if teletextSupport then zvbi else null;
libjpeg = if jpegSupport then libjpeg else null;
libpng = if pngSupport then libpng else null;
}

2
pkgs/build-support/fetchfile/builder.sh Normal file → Executable file
View File

@@ -1,3 +1,5 @@
#! /bin/sh
. $stdenv/setup
echo "copying $url into $out..."

View File

@@ -1,6 +1,8 @@
{stdenv}: {pathname, md5}: stdenv.mkDerivation {
{stdenv}: {pathname, md5}: derivation {
name = baseNameOf (toString url);
system = stdenv.system;
builder = ./builder.sh;
stdenv = stdenv;
pathname = pathname;
md5 = md5;
id = md5;

21
pkgs/build-support/fetchsvn/builder.sh Normal file → Executable file
View File

@@ -1,19 +1,10 @@
#! /bin/sh
buildinputs="$subversion"
. $stdenv/setup
header "exporting $url (r$rev) into $out"
echo "exporting $url (r$rev) into $out..."
prefetch=$(dirname $out)/svn-checkout-tmp-$md5
echo $prefetch
if test -e "$prefetch"; then
mv $prefetch $out
else
svn export -r "$rev" "$url" $out
fi
svn export -r $rev "$url" $out || exit 1
actual=$(nix-hash $out)
if test "$actual" != "$md5"; then
echo "hash is $actual, expected $md5" >&2
exit 1
fi
stopNest
echo $rev > $out/svn-revision || exit 1

View File

@@ -1,9 +1,9 @@
{stdenv, subversion, nix}: {url, rev ? "HEAD", md5}:
stdenv.mkDerivation {
name = "svn-export";
{stdenv, subversion}: {url, rev}: derivation {
name = "svn-checkout";
system = stdenv.system;
builder = ./builder.sh;
buildInputs = [subversion nix];
id = md5;
inherit url rev md5;
stdenv = stdenv;
subversion = subversion;
url = url;
rev = rev;
}

View File

@@ -1,47 +0,0 @@
#! /bin/sh -e
url=$1
rev=$2
if test -z "$url"; then
echo "syntax: nix-prefetch-svn URL [REVISION]" >&2
exit 1
fi
test -n "$rev" || rev="HEAD"
# !!! hacky; we should have a way to query the location of the store.
if storeDir=$(which nix-store); then
storeDir=$(dirname $(dirname "$storeDir"))/store
else
storeDir=/nix/store
fi
# !!! race? should be relatively safe, `svn export' barfs if $tmpPath exists.
tmpPath1=$storeDir/svn-checkout-tmp-$$
# Perform the checkout.
svn export -r "$rev" "$url" $tmpPath1 >&2
# Compute the hash.
hash=$(nix-hash $tmpPath1)
echo "hash is $hash" >&2
# Rename it so that the fetchsvn builder can find it.
tmpPath2=$storeDir/svn-checkout-tmp-$hash
test -e $tmpPath2 || mv $tmpPath1 $tmpPath2 # !!! race
# Create a Nix expression that does a fetchsvn.
nixExpr=$(dirname $(readlink -f $0))/../../system/i686-linux.nix
storeExpr=$( \
echo "(import $nixExpr).fetchsvn {url=\"$url\"; rev=\"$rev\"; md5=\"$hash\";}" \
| nix-instantiate -)
# Realise it.
finalPath=$(nix-store -qnB --force-realise $storeExpr)
echo "path is $finalPath" >&2
rm -rf $tmpPath2 || true
echo $hash

10
pkgs/build-support/fetchurl/builder.sh Normal file → Executable file
View File

@@ -1,13 +1,13 @@
#! /bin/sh
. $stdenv/setup
header "downloading $out from $url"
echo "downloading $url into $out..."
curl --fail --location --max-redirs 20 "$url" > "$out"
wget --passive-ftp "$url" -O "$out" || exit 1
actual=$(md5sum -b "$out" | cut -c1-32)
actual=$(md5sum -b $out | cut -c1-32)
if test "$actual" != "$md5"; then
echo "hash is $actual, expected $md5"
exit 1
fi
stopNest

View File

@@ -1,11 +1,9 @@
{stdenv, curl}: {url, md5}:
# Note that `curl' may be `null', in case of the native stdenv.
stdenv.mkDerivation {
{stdenv}: {url, md5}: derivation {
name = baseNameOf (toString url);
system = stdenv.system;
builder = ./builder.sh;
buildInputs = [curl];
stdenv = stdenv;
url = url;
md5 = md5;
id = md5;
inherit url md5;
}

View File

@@ -1,89 +0,0 @@
. $stdenv/setup
# Force gcc to use ld-wrapper.sh when calling ld.
cflagsCompile="-B$out/bin"
if test -z "$nativeGlibc"; then
# The "-B$glibc/lib" flag is a quick hack to force gcc to link
# against the crt1.o from our own glibc, rather than the one in
# /usr/lib. The real solution is of course to prevent those paths
# from being used by gcc in the first place.
# The dynamic linker is passed in `ldflagsBefore' to allow
# explicit overrides of the dynamic linker by callers to gcc/ld
# (the *last* value counts, so ours should come first).
cflagsCompile="$cflagsCompile -B$glibc/lib -isystem $glibc/include"
ldflags="$ldflags -L$glibc/lib"
ldflagsBefore="-dynamic-linker $glibc/lib/ld-linux.so.2"
fi
if test -n "$nativeTools"; then
gccPath="$nativePrefix/bin"
ldPath="$nativePrefix/bin"
else
ldflags="$ldflags -L$gcc/lib"
gccPath="$gcc/bin"
ldPath="$binutils/bin"
fi
mkdir $out
mkdir $out/bin
mkGccWrapper () {
local dst=$1
local src=$2
if ! test -f "$src"; then
echo "$src does not exist (skipping)"
return
fi
sed \
-e "s^@gcc@^$src^g" \
-e "s^@out@^$out^g" \
-e "s^@shell@^$shell^g" \
< $gccWrapper > $dst
chmod +x $dst
}
mkGccWrapper $out/bin/gcc $gccPath/gcc
ln -s gcc $out/bin/cc
mkGccWrapper $out/bin/g++ $gccPath/g++
ln -s g++ $out/bin/c++
mkGccWrapper $out/bin/g77 $gccPath/g77
ln -s g77 $out/bin/f77
sed \
-e "s^@out@^$out^g" \
-e "s^@ldflags@^$ldflags^g" \
-e "s^@ldflagsBefore@^$ldflagsBefore^g" \
-e "s^@ld@^$ldPath/ld^g" \
-e "s^@shell@^$shell^g" \
< $ldWrapper > $out/bin/ld
chmod +x $out/bin/ld
mkdir $out/nix-support
test -n "$gcc" && echo $gcc > $out/nix-support/orig-gcc
test -n "$glibc" && echo $glibc > $out/nix-support/orig-glibc
cat > $out/nix-support/add-flags <<EOF
export NIX_CFLAGS_COMPILE="$cflagsCompile \$NIX_CFLAGS_COMPILE"
export NIX_CFLAGS_LINK="$cflagsLink \$NIX_CFLAGS_LINK"
export NIX_LDFLAGS="$ldflags \$NIX_LDFLAGS"
export NIX_LDFLAGS_BEFORE="$ldflagsBefore \$NIX_LDFLAGS_BEFORE"
export NIX_GLIBC_FLAGS_SET=1
EOF
sed \
-e "s^@gcc@^$gcc^g" \
-e "s^@binutils@^$binutils^g" \
-e "s^@glibc@^$glibc^g" \
< $setupHook > $out/nix-support/setup-hook
cp -p $utils $out/nix-support/utils

View File

@@ -1,28 +0,0 @@
# The Nix `gcc' stdenv.mkDerivation 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
# stdenv.mkDerivation provides a wrapper that sets up the right environment
# variables so that the compiler and the linker just "work".
{ name ? "", stdenv, nativeTools, nativeGlibc, nativePrefix ? ""
, gcc ? null, glibc ? null, binutils ? null, shell ? ""
}:
assert nativeTools -> nativePrefix != "";
assert !nativeTools -> gcc != null && binutils != null;
#assert !nativeGlibc -> glibc != null;
stdenv.mkDerivation {
builder = ./builder.sh;
setupHook = ./setup-hook.sh;
gccWrapper = ./gcc-wrapper.sh;
ldWrapper = ./ld-wrapper.sh;
utils = ./utils.sh;
inherit nativeTools nativeGlibc nativePrefix gcc glibc binutils;
name = if name == "" then gcc.name else name;
langC = if nativeTools then true else gcc.langC;
langCC = if nativeTools then true else gcc.langCC;
langF77 = if nativeTools then false else gcc.langF77;
shell = if shell == "" then stdenv.shell else shell;
}

View File

@@ -1,111 +0,0 @@
#! @shell@ -e
if test -n "$NIX_GCC_WRAPPER_START_HOOK"; then
. "$NIX_GCC_WRAPPER_START_HOOK"
fi
if test -z "$NIX_GLIBC_FLAGS_SET"; then
. @out@/nix-support/add-flags
fi
. @out@/nix-support/utils
# Figure out if linker flags should be passed. GCC prints annoying
# warnings when they are not needed.
dontLink=0
if test "$*" = "-v" -o -z "$*"; then
dontLink=1
else
for i in "$@"; do
if test "$i" = "-c"; then
dontLink=1
elif test "$i" = "-S"; then
dontLink=1
elif test "$i" = "-E"; then
dontLink=1
elif test "$i" = "-E"; then
dontLink=1
elif test "$i" = "-M"; then
dontLink=1
elif test "$i" = "-MM"; then
dontLink=1
fi
done
fi
# Optionally filter out paths not refering to the store.
params=("$@")
if test "$NIX_ENFORCE_PURITY" = "1" -a -n "$NIX_STORE"; then
rest=()
n=0
while test $n -lt ${#params[*]}; do
p=${params[n]}
p2=${params[$((n+1))]}
if test "${p:0:3}" = "-L/" && badPath "${p:2}"; then
skip $p
elif test "$p" = "-L" && badPath "$p2"; then
n=$((n + 1)); skip $p2
elif test "${p:0:3}" = "-I/" && badPath "${p:2}"; then
skip $p
elif test "$p" = "-I" && badPath "$p2"; then
n=$((n + 1)); skip $p2
elif test "$p" = "-isystem" && badPath "$p2"; then
n=$((n + 1)); skip $p2
else
rest=("${rest[@]}" "$p")
fi
n=$((n + 1))
done
params=("${rest[@]}")
fi
# Add the flags for the C compiler proper.
extraAfter=($NIX_CFLAGS_COMPILE)
extraBefore=()
if test "$dontLink" != "1"; then
# Add the flags that should only be passed to the compiler when
# linking.
extraAfter=(${extraAfter[@]} $NIX_CFLAGS_LINK)
# Add the flags that should be passed to the linker (and prevent
# `ld-wrapper' from adding NIX_LDFLAGS again).
for i in $NIX_LDFLAGS_BEFORE; do
extraBefore=(${extraBefore[@]} "-Wl,$i")
done
for i in $NIX_LDFLAGS; do
extraAfter=(${extraAfter[@]} "-Wl,$i")
done
export NIX_LDFLAGS_SET=1
if test "$NIX_STRIP_DEBUG" = "1"; then
# Add executable-stripping flags.
extraAfter=(${extraAfter[@]} $NIX_CFLAGS_STRIP)
fi
fi
# Optionally print debug info.
if test "$NIX_DEBUG" = "1"; then
echo "original flags to @gcc@:" >&2
for i in "${params[@]}"; do
echo " $i" >&2
done
echo "extraBefore flags to @gcc@:" >&2
for i in ${extraBefore[@]}; do
echo " $i" >&2
done
echo "extraAfter flags to @gcc@:" >&2
for i in ${extraAfter[@]}; do
echo " $i" >&2
done
fi
if test -n "$NIX_GCC_WRAPPER_EXEC_HOOK"; then
. "$NIX_GCC_WRAPPER_EXEC_HOOK"
fi
exec @gcc@ ${extraBefore[@]} "${params[@]}" ${extraAfter[@]}

View File

@@ -1,146 +0,0 @@
#! @shell@ -e
if test -n "$NIX_LD_WRAPPER_START_HOOK"; then
. "$NIX_LD_WRAPPER_START_HOOK"
fi
if test -z "$NIX_GLIBC_FLAGS_SET"; then
. @out@/nix-support/add-flags
fi
. @out@/nix-support/utils
# Optionally filter out paths not refering to the store.
params=("$@")
if test "$NIX_ENFORCE_PURITY" = "1" -a -n "$NIX_STORE" \
-a \( -z "$NIX_IGNORE_LD_THROUGH_GCC" -o -z "$NIX_LDFLAGS_SET" \); then
rest=()
n=0
while test $n -lt ${#params[*]}; do
p=${params[n]}
p2=${params[$((n+1))]}
if test "${p:0:3}" = "-L/" && badPath "${p:2}"; then
skip $p
elif test "$p" = "-L" && badPath "$p2"; then
n=$((n + 1)); skip $p2
elif test "$p" = "-rpath" && badPath "$p2"; then
n=$((n + 1)); skip $p2
elif test "$p" = "-dynamic-linker" && badPath "$p2"; then
n=$((n + 1)); skip $p2
elif test "${p:0:1}" = "/" && badPath "$p"; then
# We cannot skip this; barf.
echo "impure path \`$p' used in link" >&2
exit 1
else
rest=("${rest[@]}" "$p")
fi
n=$((n + 1))
done
params=("${rest[@]}")
fi
extra=()
extraBefore=()
if test -z "$NIX_LDFLAGS_SET"; then
extra=(${extra[@]} $NIX_LDFLAGS)
extraBefore=(${extraBefore[@]} $NIX_LDFLAGS_BEFORE)
fi
# Add all used dynamic libraries to the rpath.
if test "$NIX_DONT_SET_RPATH" != "1"; then
# First, find all -L... switches.
allParams=("${params[@]}" ${extra[@]})
libPath=""
addToLibPath() {
local path="$1"
if test "${path:0:1}" != "/"; then return 0; fi
case "$path" in
*..*|*./*|*/.*|*//*)
local path2
if path2=$(readlink -f "$path"); then
path="$path2"
fi
;;
esac
case $libPath in
*\ $path\ *) return 0 ;;
esac
libPath="$libPath $path "
}
n=0
while test $n -lt ${#allParams[*]}; do
p=${allParams[n]}
p2=${allParams[$((n+1))]}
if test "${p:0:3}" = "-L/"; then
addToLibPath ${p:2}
elif test "$p" = "-L"; then
addToLibPath ${p2}
n=$((n + 1))
fi
n=$((n + 1))
done
# Second, for each -l... switch, find the directory containing the
# library and add it to the rpath.
rpath=""
addToRPath() {
# If the path is not in the store, don't add it to the rpath.
# This typically happens for libraries in /tmp that are later
# copied to $out/lib. If not, we're screwed.
if test "${1:0:${#NIX_STORE}}" != "$NIX_STORE"; then return 0; fi
case $rpath in
*\ $1\ *) return 0 ;;
esac
rpath="$rpath $1 "
}
findLib() {
for i in $libPath; do
if test -f $i/lib$1.so; then
addToRPath $i
fi
done
}
n=0
while test $n -lt ${#allParams[*]}; do
p=${allParams[n]}
p2=${allParams[$((n+1))]}
if test "${p:0:2}" = "-l"; then
findLib ${p:2}
elif test "$p" = "-l"; then
# I haven't seen `-l foo', but you never know...
findLib ${p2}
n=$((n + 1))
fi
n=$((n + 1))
done
# Finally, add `-rpath' switches.
for i in $rpath; do
extra=(${extra[@]} -rpath $i)
done
fi
# Optionally print debug info.
if test "$NIX_DEBUG" = "1"; then
echo "original flags to @ld@:" >&2
for i in "${params[@]}"; do
echo " $i" >&2
done
echo "extra flags to @ld@:" >&2
for i in ${extra[@]}; do
echo " $i" >&2
done
fi
if test -n "$NIX_LD_WRAPPER_EXEC_HOOK"; then
. "$NIX_LD_WRAPPER_EXEC_HOOK"
fi
echo "ld command: " @ld@ ${extraBefore[@]} "${params[@]}" ${extra[@]}
exec @ld@ ${extraBefore[@]} "${params[@]}" ${extra[@]}

View File

@@ -1,25 +0,0 @@
addCVars () {
if test -d $1/include; then
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I$1/include"
fi
if test -d $1/lib; then
export NIX_LDFLAGS="$NIX_LDFLAGS -L$1/lib"
fi
}
envHooks=(${envHooks[@]} addCVars)
# Note: these come *after* $out in the PATH (see setup.sh).
if test -n "@gcc@"; then
PATH=$PATH:@gcc@/bin
fi
if test -n "@binutils@"; then
PATH=$PATH:@binutils@/bin
fi
if test -n "@glibc@"; then
PATH=$PATH:@glibc@/bin
fi

View File

@@ -1,23 +0,0 @@
skip () {
if test "$NIX_DEBUG" = "1"; then
echo "skipping impure path $1" >&2
fi
}
# Checks whether a path is impure. E.g., `/lib/foo.so' is impure, but
# `/nix/store/.../lib/foo.so' isn't.
badPath() {
local p=$1
# Relative paths are okay (since they're presumably relative to
# the temporary build directory).
if test "${p:0:1}" != "/"; then return 1; fi
# Otherwise, the path should refer to the store or some temporary
# directory (including the build directory).
test \
"${p:0:${#NIX_STORE}}" != "$NIX_STORE" -a \
"${p:0:4}" != "/tmp" -a \
"${p:0:${#NIX_BUILD_TOP}}" != "$NIX_BUILD_TOP"
}

View File

@@ -1,9 +0,0 @@
. $stdenv/setup
mkdir $out
for file in $files
do
subdir=`dirname $file`
mkdir -p $out/$subdir
ln -s $dir/$file $out/$file
done

View File

@@ -1,7 +0,0 @@
{name ? "", stdenv, dir, files}:
stdenv.mkDerivation {
inherit dir files;
name = if name == "" then dir.name else name;
builder = ./builder.sh;
}

View File

@@ -1,5 +0,0 @@
. $stdenv/setup
mkdir -p $out/xml/dtd/docbook
cd $out/xml/dtd/docbook
unpackFile $src

View File

@@ -1,13 +0,0 @@
{stdenv, fetchurl, unzip}:
assert unzip != null;
stdenv.mkDerivation {
name = "docbook-xml-4.2";
builder = ./builder.sh;
src = fetchurl {
url = http://www.docbook.org/xml/4.2/docbook-xml-4.2.zip;
md5 = "73fe50dfe74ca631c1602f558ed8961f";
};
buildInputs = [unzip];
}

View File

@@ -1,5 +0,0 @@
. $stdenv/setup
mkdir -p $out/xml/dtd/docbook
cd $out/xml/dtd/docbook
unpackFile $src

View File

@@ -1,13 +0,0 @@
{stdenv, fetchurl, unzip}:
assert unzip != null;
stdenv.mkDerivation {
name = "docbook-xml-4.3";
builder = ./builder.sh;
src = fetchurl {
url = http://www.docbook.org/xml/4.3/docbook-xml-4.3.zip;
md5 = "ab200202b9e136a144db1e0864c45074";
};
buildInputs = [unzip];
}

View File

@@ -1,8 +0,0 @@
. $stdenv/setup
mkdir -p $out/xml/dtd/docbook-ebnf
cd $out/xml/dtd/docbook-ebnf
stripHash $dtd
cp -p $dtd $strippedName
stripHash $catalog
cp -p $catalog $strippedName

View File

@@ -1,13 +0,0 @@
{stdenv, fetchurl, unzip}:
assert unzip != null;
stdenv.mkDerivation {
name = "docbook-xml-ebnf-1.2b1";
builder = ./builder.sh;
dtd = fetchurl {
url = http://www.docbook.org/xml/ebnf/1.2b1/dbebnf.dtd;
md5 = "e50f7d38caf4285965c7a247e026fa7c";
};
catalog = ./docbook-ebnf.cat;
}

View File

@@ -1,2 +0,0 @@
PUBLIC "-//OASIS//DTD DocBook EBNF Module V1.0//EN"
"dbebnf.dtd"

View File

@@ -0,0 +1,7 @@
#! /bin/sh
. $stdenv/setup || exit 1
mkdir -p $out/xml/dtd/docbook || exit 1
cd $out/xml/dtd/docbook || exit 1
$unzip/bin/unzip $src || exit 1

View File

@@ -0,0 +1,15 @@
{stdenv, fetchurl, unzip}:
assert !isNull unzip;
derivation {
name = "docbook-xml-4.2";
system = stdenv.system;
builder = ./builder.sh;
src = fetchurl {
url = http://www.oasis-open.org/docbook/xml/4.2/docbook-xml-4.2.zip;
md5 = "73fe50dfe74ca631c1602f558ed8961f";
};
stdenv = stdenv;
unzip = unzip;
}

16
pkgs/data/sgml+xml/stylesheets/xslt/docbook/builder.sh Normal file → Executable file
View File

@@ -1,8 +1,10 @@
. $stdenv/setup
#! /bin/sh
mkdir $out
cd $out
unpackFile $src
mkdir xml
mkdir xml/xsl
mv docbook-xsl-* xml/xsl/docbook
. $stdenv/setup || exit 1
mkdir $out || exit 1
cd $out || exit 1
tar xvfz $src || exit 1
mkdir xml || exit 1
mkdir xml/xsl || exit 1
mv docbook-xsl-* xml/xsl/docbook || exit 1

View File

@@ -1,10 +1,12 @@
{stdenv, fetchurl}:
stdenv.mkDerivation {
name = "docbook-xsl-1.65.1";
derivation {
name = "docbook-xsl-1.64.1";
system = stdenv.system;
builder = ./builder.sh;
src = fetchurl {
url = http://heanet.dl.sourceforge.net/sourceforge/docbook/docbook-xsl-1.65.1.tar.gz;
md5 = "2f7d446de5523ec34a19ccbe8caf387f";
url = http://cesnet.dl.sourceforge.net/sourceforge/docbook/docbook-xsl-1.64.1.tar.gz;
md5 = "ed766902e8381f6206d12f5c326fbd47";
};
stdenv = stdenv;
}

View File

@@ -1,13 +0,0 @@
{stdenv, fetchurl}:
assert stdenv.system == "i686-linux";
stdenv.mkDerivation {
name = "blackdown-1.4.2";
dirname = "j2sdk1.4.2";
builder = ./builder.sh;
src = fetchurl {
url = ftp://ftp.nluug.nl/pub/os/Linux/java/jdk/JDK-1.4.2/i386/rc1/j2sdk-1.4.2-rc1-linux-i586-gcc3.2.bin;
md5 = "52ff3a059845ee8487faeaa7b0c157c8";
};
}

View File

@@ -1,26 +0,0 @@
set -e
. $stdenv/setup
cp $src .
bin=`basename $src`
chmod u+x $bin
# This is required because those GNU coreutils fuckers suddenly
# removed the `+N' syntax (due to a misguided desire for "standards
# compliance"), which the Blackdown installer uses.
export _POSIX2_VERSION=199209
alias more=cat
yes yes | ./$bin
mkdir $out
mv $dirname/* $out/
# remove crap in the root directory
for file in $out/*
do
if test -f $file ; then
rm $file
fi
done

View File

@@ -1,9 +0,0 @@
{stdenv, fetchurl}:
if stdenv.system == "i686-linux"
then
(import ./blackdown-i686.nix) {
inherit stdenv fetchurl;
}
else
false

View File

@@ -1,73 +0,0 @@
. $stdenv/setup
export NIX_FIXINC_DUMMY=$NIX_BUILD_TOP/dummy
mkdir $NIX_FIXINC_DUMMY
if test "$noSysDirs" = "1"; then
if test "$noSysDirs" = "1"; then
# Figure out what extra flags to pass to the gcc compilers
# being generated to make sure that they use our glibc.
if test -e $NIX_GCC/nix-support/orig-glibc; then
glibc=$(cat $NIX_GCC/nix-support/orig-glibc)
# Ugh. Copied from gcc-wrapper/builder.sh. We can't just
# source in $NIX_GCC/nix-support/add-flags, since that
# would cause *this* GCC to be linked against the
# *previous* GCC. Need some more modularity there.
extraCFlags="-B$glibc/lib -isystem $glibc/include"
extraLDFlags="-B$glibc/lib -L$glibc/lib -Wl,-s \
-Wl,-dynamic-linker,$glibc/lib/ld-linux.so.2"
# Oh, what a hack. I should be shot for this.
# In stage 1, we should link against the previous GCC, but
# not afterwards. Otherwise we retain a dependency.
# However, ld-wrapper, which adds the linker flags for the
# previous GCC, is also used in stage 2/3. We can prevent
# it from adding them by NIX_GLIBC_FLAGS_SET, but then
# gcc-wrapper will also not add them, thereby causing
# stage 1 to fail. So we use a trick to only set the
# flags in gcc-wrapper.
hook=$(pwd)/ld-wrapper-hook
echo "NIX_GLIBC_FLAGS_SET=1" > $hook
export NIX_LD_WRAPPER_START_HOOK=$hook
fi
export NIX_EXTRA_CFLAGS=$extraCFlags
export NIX_EXTRA_LDFLAGS=$extraLDFlags
export CFLAGS=$extraCFlags
export CXXFLAGS=$extraCFlags
export LDFLAGS=$extraLDFlags
export BOOT_LDFLAGS=$extraLDFlags
fi
else
patches=""
fi
preConfigure=preConfigure
preConfigure() {
# Determine the frontends to build.
langs="c"
if test -n "$langCC"; then
langs="$langs,c++"
fi
if test -n "$langF77"; then
langs="$langs,f77"
fi
# Perform the build in a different directory.
mkdir ../build
cd ../build
configureScript=../$sourceRoot/configure
configureFlags="--enable-languages=$langs"
}
makeFlags="bootstrap"
genericBuild

View File

@@ -1,17 +0,0 @@
{ stdenv, fetchurl, noSysDirs
, langC ? true, langCC ? true, langF77 ? false
}:
assert langC;
stdenv.mkDerivation {
name = "gcc-2.95.3";
builder = ./builder.sh;
src = fetchurl {
url = ftp://ftp.gnu.org/pub/gnu/gcc/gcc-2.95.3.tar.gz;
md5 = "f3ad4f32c2296fad758ed051b5ac8e28";
};
# !!! apply only if noSysDirs is set
patches = [./no-sys-dirs.patch];
inherit noSysDirs langC langCC langF77;
}

View File

@@ -1,231 +0,0 @@
diff -rc gcc-orig/config.if gcc-2.95.3/config.if
*** gcc-orig/config.if 1998-10-18 19:37:10.000000000 +0200
--- gcc-2.95.3/config.if 2004-08-03 12:29:32.000000000 +0200
***************
*** 64,70 ****
return 0;
}
EOF
! ${CC-cc} $dummy.c -o $dummy 2>/dev/null
if [ "$?" = 0 ]
then
libc_interface=-libc6.`./$dummy`-
--- 64,70 ----
return 0;
}
EOF
! ${CC-cc} $NIX_EXTRA_CFLAGS $NIX_EXTRA_LDFLAGS $dummy.c -o $dummy 2>/dev/null
if [ "$?" = 0 ]
then
libc_interface=-libc6.`./$dummy`-
diff -rc gcc-orig/gcc/cccp.c gcc-2.95.3/gcc/cccp.c
*** gcc-orig/gcc/cccp.c 2001-01-25 15:03:00.000000000 +0100
--- gcc-2.95.3/gcc/cccp.c 2004-08-03 10:54:39.000000000 +0200
***************
*** 373,378 ****
--- 373,382 ----
char fname[1];
};
+ #undef LOCAL_INCLUDE_DIR
+ #undef SYSTEM_INCLUDE_DIR
+ #undef STANDARD_INCLUDE_DIR
+
/* #include "file" looks in source file dir, then stack. */
/* #include <file> just looks in the stack. */
/* -I directories are added to the end, then the defaults are added. */
***************
*** 424,430 ****
--- 428,436 ----
#ifndef STANDARD_INCLUDE_COMPONENT
#define STANDARD_INCLUDE_COMPONENT 0
#endif
+ #ifdef STANDARD_INCLUDE_DIR
{ STANDARD_INCLUDE_DIR, STANDARD_INCLUDE_COMPONENT, 0, 0, 0 },
+ #endif
#endif /* not CROSS_COMPILE */
{ 0, 0, 0, 0, 0 }
};
diff -rc gcc-orig/gcc/gcc.c gcc-2.95.3/gcc/gcc.c
*** gcc-orig/gcc/gcc.c 2001-01-25 15:03:16.000000000 +0100
--- gcc-2.95.3/gcc/gcc.c 2004-08-03 11:48:09.000000000 +0200
***************
*** 1369,1388 ****
#undef MD_STARTFILE_PREFIX_1
#endif
- #ifndef STANDARD_EXEC_PREFIX
- #define STANDARD_EXEC_PREFIX "/usr/local/lib/gcc-lib/"
- #endif /* !defined STANDARD_EXEC_PREFIX */
-
static const char *standard_exec_prefix = STANDARD_EXEC_PREFIX;
- static const char *standard_exec_prefix_1 = "/usr/lib/gcc/";
#ifdef MD_EXEC_PREFIX
static const char *md_exec_prefix = MD_EXEC_PREFIX;
#endif
- #ifndef STANDARD_STARTFILE_PREFIX
- #define STANDARD_STARTFILE_PREFIX "/usr/local/lib/"
- #endif /* !defined STANDARD_STARTFILE_PREFIX */
-
#ifdef MD_STARTFILE_PREFIX
static const char *md_startfile_prefix = MD_STARTFILE_PREFIX;
#endif
--- 1369,1379 ----
***************
*** 1390,1401 ****
static const char *md_startfile_prefix_1 = MD_STARTFILE_PREFIX_1;
#endif
static const char *standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
- static const char *standard_startfile_prefix_1 = "/lib/";
- static const char *standard_startfile_prefix_2 = "/usr/lib/";
- #ifndef TOOLDIR_BASE_PREFIX
- #define TOOLDIR_BASE_PREFIX "/usr/local/"
- #endif
static const char *tooldir_base_prefix = TOOLDIR_BASE_PREFIX;
static const char *tooldir_prefix;
--- 1381,1387 ----
***************
*** 2896,2908 ****
value = argv[++i];
else
value = p + 1;
add_prefix (&exec_prefixes, value, NULL_PTR, 1, 0, &warn_B);
add_prefix (&startfile_prefixes, value, NULL_PTR,
1, 0, &warn_B);
add_prefix (&include_prefixes, concat (value, "include",
NULL_PTR),
NULL_PTR, 1, 0, NULL_PTR);
!
/* As a kludge, if the arg is "[foo/]stageN/", just add
"[foo/]include" to the include prefix. */
{
--- 2882,2897 ----
value = argv[++i];
else
value = p + 1;
+ if (strlen(value) > 0 && value[strlen(value) - 1] != '/')
+ value = concat (value, "/", NULL_PTR);
+ add_prefix (&startfile_prefixes, value, "BINUTILS", 0, 0, NULL_PTR);
add_prefix (&exec_prefixes, value, NULL_PTR, 1, 0, &warn_B);
add_prefix (&startfile_prefixes, value, NULL_PTR,
1, 0, &warn_B);
add_prefix (&include_prefixes, concat (value, "include",
NULL_PTR),
NULL_PTR, 1, 0, NULL_PTR);
!
/* As a kludge, if the arg is "[foo/]stageN/", just add
"[foo/]include" to the include prefix. */
{
***************
*** 3060,3073 ****
#ifndef OS2
add_prefix (&exec_prefixes, standard_exec_prefix, "BINUTILS",
0, 2, warn_std_ptr);
- add_prefix (&exec_prefixes, standard_exec_prefix_1, "BINUTILS",
- 0, 2, warn_std_ptr);
#endif
add_prefix (&startfile_prefixes, standard_exec_prefix, "BINUTILS",
0, 1, warn_std_ptr);
- add_prefix (&startfile_prefixes, standard_exec_prefix_1, "BINUTILS",
- 0, 1, warn_std_ptr);
tooldir_prefix = concat (tooldir_base_prefix, spec_machine,
dir_separator_str, NULL_PTR);
--- 3049,3058 ----
***************
*** 4865,4874 ****
NULL_PTR, 0, 0, NULL_PTR);
}
- add_prefix (&startfile_prefixes, standard_startfile_prefix_1,
- "BINUTILS", 0, 0, NULL_PTR);
- add_prefix (&startfile_prefixes, standard_startfile_prefix_2,
- "BINUTILS", 0, 0, NULL_PTR);
#if 0 /* Can cause surprises, and one can use -B./ instead. */
add_prefix (&startfile_prefixes, "./", NULL_PTR, 0, 1, NULL_PTR);
#endif
--- 4850,4855 ----
diff -rc gcc-orig/gcc/Makefile.in gcc-2.95.3/gcc/Makefile.in
*** gcc-orig/gcc/Makefile.in 2001-01-25 15:02:58.000000000 +0100
--- gcc-2.95.3/gcc/Makefile.in 2004-08-03 12:24:39.000000000 +0200
***************
*** 74,80 ****
BOOT_CFLAGS = -O2 $(CFLAGS)
#WARN_CFLAGS = -W -Wall
# These exists to be overridden by the x-* and t-* files, respectively.
! X_CFLAGS =
T_CFLAGS =
X_CPPFLAGS =
--- 74,80 ----
BOOT_CFLAGS = -O2 $(CFLAGS)
#WARN_CFLAGS = -W -Wall
# These exists to be overridden by the x-* and t-* files, respectively.
! X_CFLAGS = $(NIX_EXTRA_CFLAGS) $(NIX_EXTRA_LDFLAGS)
T_CFLAGS =
X_CPPFLAGS =
***************
*** 218,224 ****
&& [ -f /usr/bin/ranlib -o -f /bin/ranlib ] )
# Dir to search for system headers. Overridden by cross-make.
! SYSTEM_HEADER_DIR = /usr/include
# Control whether to run fixproto.
STMP_FIXPROTO = stmp-fixproto
--- 218,228 ----
&& [ -f /usr/bin/ranlib -o -f /bin/ranlib ] )
# Dir to search for system headers. Overridden by cross-make.
! # Nix: we override NATIVE_SYSTEM_HEADER_DIR in order to prevent
! # `fixinc' from fixing header files in /usr/include. However,
! # NATIVE_SYSTEM_HEADER_DIR must point to an existing directory, so set
! # it to some dummy directory.
! SYSTEM_HEADER_DIR = $(NIX_FIXINC_DUMMY)
# Control whether to run fixproto.
STMP_FIXPROTO = stmp-fixproto
diff -rc gcc-orig/Makefile.in gcc-2.95.3/Makefile.in
*** gcc-orig/Makefile.in 1999-06-23 00:44:42.000000000 +0200
--- gcc-2.95.3/Makefile.in 2004-08-03 10:46:42.000000000 +0200
***************
*** 87,94 ****
CXXFLAGS = -g -O2
LIBCFLAGS = $(CFLAGS)
! CFLAGS_FOR_TARGET = $(CFLAGS)
! LDFLAGS_FOR_TARGET =
LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
PICFLAG =
PICFLAG_FOR_TARGET =
--- 87,94 ----
CXXFLAGS = -g -O2
LIBCFLAGS = $(CFLAGS)
! CFLAGS_FOR_TARGET = $(CFLAGS) $(NIX_EXTRA_CFLAGS)
! LDFLAGS_FOR_TARGET = $(NIX_EXTRA_LDFLAGS)
LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
PICFLAG =
PICFLAG_FOR_TARGET =
***************
*** 99,105 ****
# Use -O2 to stress test the compiler.
LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
! CXXFLAGS_FOR_TARGET = $(CXXFLAGS)
LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
RANLIB = ranlib
--- 99,105 ----
# Use -O2 to stress test the compiler.
LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
! CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(NIX_EXTRA_CFLAGS)
LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
RANLIB = ranlib

View File

@@ -1,93 +0,0 @@
. $stdenv/setup
FIXINC_DUMMY=$NIX_BUILD_TOP/dummy
mkdir $FIXINC_DUMMY
preConfigure() {
if test "$noSysDirs" = "1"; then
# Disable the standard include directories.
cat >> ./gcc/cppdefault.h <<EOF
#undef LOCAL_INCLUDE_DIR
#undef SYSTEM_INCLUDE_DIR
#undef STANDARD_INCLUDE_DIR
EOF
fi
# Determine the frontends to build.
langs="c"
if test -n "$langCC"; then
langs="$langs,c++"
fi
if test -n "$langF77"; then
langs="$langs,f77"
fi
# Perform the build in a different directory.
mkdir ../build
cd ../build
configureScript=../$sourceRoot/configure
configureFlags="--enable-languages=$langs"
}
preConfigure=preConfigure
postConfigure() {
if test "$noSysDirs" = "1"; then
# Patch some of the makefiles to force linking against our own
# glibc.
if test -e $NIX_GCC/nix-support/orig-glibc; then
glibc=$(cat $NIX_GCC/nix-support/orig-glibc)
# Ugh. Copied from gcc-wrapper/builder.sh. We can't just
# source in $NIX_GCC/nix-support/add-flags, since that
# would cause *this* GCC to be linked against the
# *previous* GCC. Need some more modularity there.
extraFlags="-Wl,-s -B$glibc/lib -isystem $glibc/include \
-L$glibc/lib -Wl,-dynamic-linker -Wl,$glibc/lib/ld-linux.so.2"
# Oh, what a hack. I should be shot for this.
# In stage 1, we should link against the previous GCC, but
# not afterwards. Otherwise we retain a dependency.
# However, ld-wrapper, which adds the linker flags for the
# previous GCC, is also used in stage 2/3. We can prevent
# it from adding them by NIX_GLIBC_FLAGS_SET, but then
# gcc-wrapper will also not add them, thereby causing
# stage 1 to fail. So we use a trick to only set the
# flags in gcc-wrapper.
hook=$(pwd)/ld-wrapper-hook
echo "NIX_GLIBC_FLAGS_SET=1" > $hook
export NIX_LD_WRAPPER_START_HOOK=$hook
fi
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_DUMMY^" \
< $mf > $mf.tmp
mv $mf.tmp $mf
fi
}
postConfigure=postConfigure
makeFlags="bootstrap"
genericBuild

View File

@@ -1,15 +0,0 @@
{ stdenv, fetchurl, noSysDirs
, langC ? true, langCC ? true, langF77 ? false
}:
assert langC;
stdenv.mkDerivation {
name = "gcc-3.3.3";
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";
};
inherit noSysDirs langC langCC langF77;
}

View File

@@ -1,87 +0,0 @@
. $stdenv/setup
export NIX_FIXINC_DUMMY=$NIX_BUILD_TOP/dummy
mkdir $NIX_FIXINC_DUMMY
if test "$noSysDirs" = "1"; then
if test "$noSysDirs" = "1"; then
# Figure out what extra flags to pass to the gcc compilers
# being generated to make sure that they use our glibc.
if test -e $NIX_GCC/nix-support/orig-glibc; then
glibc=$(cat $NIX_GCC/nix-support/orig-glibc)
# Ugh. Copied from gcc-wrapper/builder.sh. We can't just
# source in $NIX_GCC/nix-support/add-flags, since that
# would cause *this* GCC to be linked against the
# *previous* GCC. Need some more modularity there.
extraCFlags="-B$glibc/lib -isystem $glibc/include"
extraLDFlags="-B$glibc/lib -L$glibc/lib -Wl,-s \
-Wl,-dynamic-linker,$glibc/lib/ld-linux.so.2"
# Oh, what a hack. I should be shot for this.
# In stage 1, we should link against the previous GCC, but
# not afterwards. Otherwise we retain a dependency.
# However, ld-wrapper, which adds the linker flags for the
# previous GCC, is also used in stage 2/3. We can prevent
# it from adding them by NIX_GLIBC_FLAGS_SET, but then
# gcc-wrapper will also not add them, thereby causing
# stage 1 to fail. So we use a trick to only set the
# flags in gcc-wrapper.
hook=$(pwd)/ld-wrapper-hook
echo "NIX_GLIBC_FLAGS_SET=1" > $hook
export NIX_LD_WRAPPER_START_HOOK=$hook
fi
export NIX_EXTRA_CFLAGS=$extraCFlags
export NIX_EXTRA_LDFLAGS=$extraLDFlags
export CFLAGS=$extraCFlags
export LDFLAGS=$extraLDFlags
fi
else
patches=""
fi
preConfigure=preConfigure
preConfigure() {
# Determine the frontends to build.
langs="c"
if test -n "$langCC"; then
langs="$langs,c++"
fi
if test -n "$langF77"; then
langs="$langs,f77"
fi
# Perform the build in a different directory.
mkdir ../build
cd ../build
configureScript=../$sourceRoot/configure
configureFlags="--enable-languages=$langs"
}
postInstall=postInstall
postInstall() {
# Remove precompiled headers for now. They are very big and
# probably not very useful yet.
find $out/include -name "*.gch" -exec rm -rf {} \; -prune
# Remove `fixincl' to prevent a retained dependency on the
# previous gcc.
rm -rf $out/libexec/gcc/*/*/install-tools
}
if test -z "$profiledCompiler"; then
makeFlags="bootstrap"
else
makeFlags="profiledbootstrap"
fi
genericBuild

View File

@@ -1,18 +0,0 @@
{ stdenv, fetchurl, noSysDirs
, langC ? true, langCC ? true, langF77 ? false
, profiledCompiler ? false
}:
assert langC;
stdenv.mkDerivation {
name = "gcc-3.4.2";
builder = ./builder.sh;
src = fetchurl {
url = ftp://ftp.nluug.nl/mirror/languages/gcc/releases/gcc-3.4.2/gcc-3.4.2.tar.bz2;
md5 = "2fada3a3effd2fd791df09df1f1534b3";
};
# !!! apply only if noSysDirs is set
patches = [./no-sys-dirs.patch];
inherit noSysDirs langC langCC langF77 profiledCompiler;
}

View File

@@ -1,170 +0,0 @@
diff -rc gcc-orig/gcc/cppdefault.c gcc-patched/gcc/cppdefault.c
*** gcc-orig/gcc/cppdefault.c 2003-03-01 15:31:12.000000000 +0100
--- gcc-patched/gcc/cppdefault.c 2004-06-29 10:08:45.000000000 +0200
***************
*** 41,46 ****
--- 41,50 ----
# undef CROSS_INCLUDE_DIR
#endif
+ #undef LOCAL_INCLUDE_DIR
+ #undef SYSTEM_INCLUDE_DIR
+ #undef STANDARD_INCLUDE_DIR
+
const struct default_include cpp_include_defaults[]
#ifdef INCLUDE_DEFAULTS
= INCLUDE_DEFAULTS;
diff -rc gcc-orig/gcc/Makefile.in gcc-patched/gcc/Makefile.in
*** gcc-orig/gcc/Makefile.in 2004-04-01 18:47:54.000000000 +0200
--- gcc-patched/gcc/Makefile.in 2004-06-29 13:50:45.000000000 +0200
***************
*** 199,205 ****
CPPFLAGS = @CPPFLAGS@
# These exists to be overridden by the x-* and t-* files, respectively.
! X_CFLAGS =
T_CFLAGS =
X_CPPFLAGS =
--- 199,205 ----
CPPFLAGS = @CPPFLAGS@
# These exists to be overridden by the x-* and t-* files, respectively.
! X_CFLAGS = $(NIX_EXTRA_CFLAGS) $(NIX_EXTRA_LDFLAGS)
T_CFLAGS =
X_CPPFLAGS =
***************
*** 345,351 ****
PARTITION_H = $(srcdir)/../include/partition.h
# Default native SYSTEM_HEADER_DIR, to be overridden by targets.
! NATIVE_SYSTEM_HEADER_DIR = /usr/include
# Default cross SYSTEM_HEADER_DIR, to be overridden by targets.
CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
--- 345,355 ----
PARTITION_H = $(srcdir)/../include/partition.h
# Default native SYSTEM_HEADER_DIR, to be overridden by targets.
! # Nix: we override NATIVE_SYSTEM_HEADER_DIR in order to prevent
! # `fixinc' from fixing header files in /usr/include. However,
! # NATIVE_SYSTEM_HEADER_DIR must point to an existing directory, so set
! # it to some dummy directory.
! NATIVE_SYSTEM_HEADER_DIR = $(NIX_FIXINC_DUMMY)
# Default cross SYSTEM_HEADER_DIR, to be overridden by targets.
CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
diff -rc gcc-orig/libstdc++-v3/include/Makefile.in gcc-patched/libstdc++-v3/include/Makefile.in
*** gcc-orig/libstdc++-v3/include/Makefile.in 2004-03-18 18:36:43.000000000 +0100
--- gcc-patched/libstdc++-v3/include/Makefile.in 2004-06-29 19:01:33.000000000 +0200
***************
*** 896,903 ****
if [ ! -d "${pch_output_builddir}" ]; then \
mkdir -p ${pch_output_builddir}; \
fi; \
! $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) ${pch_source} -O0 -g -o ${pch_output_builddir}/O0g; \
! $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) ${pch_source} -O2 -g -o ${pch_output_builddir}/O2g;
# For robustness sake (in light of junk files or in-source
# configuration), copy from the build or source tree to the install
--- 896,903 ----
if [ ! -d "${pch_output_builddir}" ]; then \
mkdir -p ${pch_output_builddir}; \
fi; \
! $(CXX) $(CFLAGS) $(PCHFLAGS) $(AM_CPPFLAGS) ${pch_source} -O0 -g -o ${pch_output_builddir}/O0g; \
! $(CXX) $(CFLAGS) $(PCHFLAGS) $(AM_CPPFLAGS) ${pch_source} -O2 -g -o ${pch_output_builddir}/O2g;
# For robustness sake (in light of junk files or in-source
# configuration), copy from the build or source tree to the install
diff -rc gcc-orig/ltcf-cxx.sh gcc-patched/ltcf-cxx.sh
*** gcc-orig/ltcf-cxx.sh 2003-11-19 06:29:32.000000000 +0100
--- gcc-patched/ltcf-cxx.sh 2004-06-29 15:26:01.000000000 +0200
***************
*** 985,991 ****
# the conftest object file.
pre_test_object_deps_done=no
! for p in `eval $output_verbose_link_cmd`; do
case $p in
--- 985,991 ----
# the conftest object file.
pre_test_object_deps_done=no
! for p in `true`; do
case $p in
diff -rc gcc-orig/Makefile.in gcc-patched/Makefile.in
*** gcc-orig/Makefile.in 2004-01-14 21:09:37.000000000 +0100
--- gcc-patched/Makefile.in 2004-06-29 16:21:36.000000000 +0200
***************
*** 228,234 ****
NM = @NM@
LD = @LD@
! LDFLAGS =
RANLIB = @RANLIB@
--- 228,234 ----
NM = @NM@
LD = @LD@
! LDFLAGS = $(NIX_EXTRA_LDFLAGS)
RANLIB = @RANLIB@
***************
*** 277,283 ****
# CFLAGS will be just -g. We want to ensure that TARGET libraries
# (which we know are built with gcc) are built with optimizations so
# prepend -O2 when setting CFLAGS_FOR_TARGET.
! CFLAGS_FOR_TARGET = -O2 $(CFLAGS)
# If GCC_FOR_TARGET is not overriden on the command line, then this
# variable is passed down to the gcc Makefile, where it is used to
# build libgcc2.a. We define it here so that it can itself be
--- 277,283 ----
# CFLAGS will be just -g. We want to ensure that TARGET libraries
# (which we know are built with gcc) are built with optimizations so
# prepend -O2 when setting CFLAGS_FOR_TARGET.
! CFLAGS_FOR_TARGET = -O2 $(CFLAGS) $(NIX_EXTRA_CFLAGS)
# If GCC_FOR_TARGET is not overriden on the command line, then this
# variable is passed down to the gcc Makefile, where it is used to
# build libgcc2.a. We define it here so that it can itself be
***************
*** 290,296 ****
RAW_CXX_FOR_TARGET = @RAW_CXX_FOR_TARGET@
CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = @CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@
RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = @RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@
! CXXFLAGS_FOR_TARGET = $(CXXFLAGS)
LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@
--- 290,296 ----
RAW_CXX_FOR_TARGET = @RAW_CXX_FOR_TARGET@
CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = @CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@
RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = @RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@
! CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(NIX_EXTRA_CFLAGS)
LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@
***************
*** 321,327 ****
fi; \
fi`
! LDFLAGS_FOR_TARGET =
NM_FOR_TARGET=@NM_FOR_TARGET@
USUAL_NM_FOR_TARGET = ` \
--- 321,327 ----
fi; \
fi`
! LDFLAGS_FOR_TARGET = $(NIX_EXTRA_LDFLAGS)
NM_FOR_TARGET=@NM_FOR_TARGET@
USUAL_NM_FOR_TARGET = ` \

View File

@@ -1,73 +0,0 @@
. $stdenv/setup
export LDFLAGS="-static"
export NIX_FIXINC_DUMMY=$NIX_BUILD_TOP/dummy
mkdir $NIX_FIXINC_DUMMY
if test "$noSysDirs" = "1"; then
if test "$noSysDirs" = "1"; then
# Figure out what extra flags to pass to the gcc compilers
# being generated to make sure that they use our glibc.
if test -e $NIX_GCC/nix-support/orig-glibc; then
glibc=$(cat $NIX_GCC/nix-support/orig-glibc)
# Ugh. Copied from gcc-wrapper/builder.sh. We can't just
# source in $NIX_GCC/nix-support/add-flags, since that
# would cause *this* GCC to be linked against the
# *previous* GCC. Need some more modularity there.
extraCFlags="-B$glibc/lib -isystem $glibc/include"
extraLDFlags="-B$glibc/lib -L$glibc/lib -Wl,-s \
-Wl,-dynamic-linker,$glibc/lib/ld-linux.so.2 -static"
# Oh, what a hack. I should be shot for this.
# In stage 1, we should link against the previous GCC, but
# not afterwards. Otherwise we retain a dependency.
# However, ld-wrapper, which adds the linker flags for the
# previous GCC, is also used in stage 2/3. We can prevent
# it from adding them by NIX_GLIBC_FLAGS_SET, but then
# gcc-wrapper will also not add them, thereby causing
# stage 1 to fail. So we use a trick to only set the
# flags in gcc-wrapper.
hook=$(pwd)/ld-wrapper-hook
echo "NIX_GLIBC_FLAGS_SET=1" > $hook
export NIX_LD_WRAPPER_START_HOOK=$hook
fi
export NIX_EXTRA_CFLAGS=$extraCFlags
export NIX_EXTRA_LDFLAGS=$extraLDFlags
export CFLAGS=$extraCFlags
export LDFLAGS=$extraLDFlags
fi
else
patches=""
fi
preConfigure=preConfigure
preConfigure() {
# Perform the build in a different directory.
mkdir ../build
cd ../build
export LDFLAGS="-static"
configureScript=../$sourceRoot/configure
configureFlags="--enable-languages=c"
}
postInstall=postInstall
postInstall() {
# Remove precompiled headers for now. They are very big and
# probably not very useful yet.
find $out/include -name "*.gch" -exec rm -rf {} \; -prune
# Remove `fixincl' to prevent a retained dependency on the
# previous gcc.
rm -rf $out/libexec/gcc/*/*/install-tools
}
genericBuild

View File

@@ -1,29 +0,0 @@
. $stdenv/setup
echo $PATH
export LDFLAGS="-static"
preConfigure=preConfigure
preConfigure() {
# Perform the build in a different directory.
mkdir ../build
cd ../build
configureScript=../$sourceRoot/configure
configureFlags="--enable-languages=c"
}
postInstall=postInstall
postInstall() {
# Remove precompiled headers for now. They are very big and
# probably not very useful yet.
find $out/include -name "*.gch" -exec rm -rf {} \; -prune
# Remove `fixincl' to prevent a retained dependency on the
# previous gcc.
rm -rf $out/libexec/gcc/*/*/install-tools
}
genericBuild

View File

@@ -1,13 +0,0 @@
{ stdenv, fetchurl }:
stdenv.mkDerivation {
name = "gcc-static-3.4.2";
builder = ./builder.sh;
src = fetchurl {
url = ftp://ftp.nluug.nl/mirror/languages/gcc/releases/gcc-3.4.2/gcc-3.4.2.tar.bz2;
md5 = "2fada3a3effd2fd791df09df1f1534b3";
};
# !!! apply only if noSysDirs is set
patches = [./no-sys-dirs.patch];
noSysDirs = 1;
}

View File

@@ -1,20 +0,0 @@
diff -rc gcc-3.4.2-orig/Makefile.in gcc-3.4.2-patched/Makefile.in
*** gcc-3.4.2-orig/Makefile.in 2004-07-09 00:16:02.000000000 +0200
--- gcc-3.4.2-patched/Makefile.in 2004-10-21 13:57:41.000000000 +0200
***************
*** 228,234 ****
NM = @NM@
LD = @LD@
! LDFLAGS =
RANLIB = @RANLIB@
--- 228,234 ----
NM = @NM@
LD = @LD@
! LDFLAGS = @LDFLAGS@
RANLIB = @RANLIB@

Some files were not shown because too many files have changed in this diff Show More