* Fix for zlib on Darwin (it always wants to install in /usr/lib,

despite the prefix).
* Indirections in all-packages-generic for patch.
* Darwin: removed version number.

svn path=/nixpkgs/trunk/; revision=1247
This commit is contained in:
Eelco Dolstra 2004-08-09 14:33:14 +00:00
parent 7474f5713f
commit 128a5bd522
9 changed files with 103 additions and 29 deletions

View File

@ -0,0 +1,22 @@
diff -rc zlib-1.2.1/configure zlib-patched/configure
*** zlib-1.2.1/configure 2003-11-17 04:50:39.000000000 +0100
--- zlib-patched/configure 2004-08-05 19:18:59.000000000 +0200
***************
*** 89,97 ****
SHAREDLIB=libz$shared_ext
SHAREDLIBV=libz.$VER$shared_ext
SHAREDLIBM=libz.$VER1$shared_ext
! LDSHARED=${LDSHARED-"$cc -dynamiclib -install_name /usr/lib/$SHAREDLIBV -compatibility_version $VER2 -current_version $VER"}
! libdir='/usr/lib'
! includedir='/usr/include';;
*) LDSHARED=${LDSHARED-"$cc -shared"};;
esac
else
--- 89,95 ----
SHAREDLIB=libz$shared_ext
SHAREDLIBV=libz.$VER$shared_ext
SHAREDLIBM=libz.$VER1$shared_ext
! LDSHARED=${LDSHARED-"$cc -dynamiclib -install_name \${libdir}/$SHAREDLIBV -compatibility_version $VER2 -current_version $VER"};;
*) LDSHARED=${LDSHARED-"$cc -shared"};;
esac
else

View File

@ -0,0 +1,12 @@
{stdenv, fetchurl, patch}:
stdenv.mkDerivation {
name = "zlib-1.2.1";
src = fetchurl {
url = http://www.gzip.org/zlib/zlib-1.2.1.tar.gz;
md5 = "ef1cb003448b4a53517b8f25adb12452";
};
configureFlags = "--shared";
patches = [./darwin.patch];
buildInputs = [patch];
}

View File

@ -0,0 +1,19 @@
{stdenv, genericStdenv, gccWrapper}:
genericStdenv {
name = "stdenv-darwin";
preHook = ./prehook.sh;
initialPath = "/usr/local /usr /";
inherit stdenv;
gcc = gccWrapper {
name = "gcc-darwin";
nativeTools = true;
nativeGlibc = true;
nativePrefix = "/usr";
inherit stdenv;
};
shell = "/bin/bash";
}

View File

@ -0,0 +1,6 @@
export NIX_ENFORCE_PURITY=
export NIX_DONT_SET_RPATH=1
export NIX_NO_SELF_RPATH=1
dontFixLibtool=1
NIX_STRIP_DEBUG=0
echo XXX $NIX_DONT_SET_RPATH

View File

@ -450,8 +450,16 @@ buildW() {
return
fi
if test -n "$preBuild"; then
$preBuild
fi
echo "make flags: $makeFlags"
make $makeFlags || fail
if test -n "$postBuild"; then
$postBuild
fi
}
@ -545,6 +553,10 @@ distW() {
return
fi
if test -n "$preDist"; then
$preDist
fi
if test -z "$distTarget"; then
distTarget="dist"
fi
@ -563,6 +575,10 @@ distW() {
# wildcards in there.
cp -pvd $tarballs $out/tarballs
fi
if test -n "$postDist"; then
$postDist
fi
}

View File

@ -48,6 +48,8 @@ rec {
inherit fetchurl stdenv;
};
patch = if stdenv.system == "powerpc-darwin" then null else gnupatch;
gnused = (import ../tools/text/gnused) {
inherit fetchurl stdenv;
};
@ -204,8 +206,7 @@ rec {
};
gnumake = (import ../development/tools/build-managers/gnumake) {
inherit fetchurl stdenv;
patch = gnupatch;
inherit fetchurl stdenv patch;
};
bison = (import ../development/tools/parsing/bison) {
@ -237,8 +238,7 @@ rec {
nativeTools = false;
nativeGlibc = false;
gcc = (import ../development/compilers/gcc-3.4) {
inherit fetchurl stdenv noSysDirs;
patch = gnupatch;
inherit fetchurl stdenv patch noSysDirs;
profiledCompiler = true;
};
binutils = stdenv.gcc.binutils;
@ -250,8 +250,7 @@ rec {
nativeTools = false;
nativeGlibc = false;
gcc = (import ../development/compilers/gcc-2.95) {
inherit fetchurl stdenv noSysDirs;
patch = gnupatch;
inherit fetchurl stdenv patch noSysDirs;
};
binutils = stdenv.gcc.binutils;
glibc = stdenv.gcc.glibc;
@ -331,15 +330,14 @@ rec {
};
realPerl = (import ../development/interpreters/perl) {
inherit fetchurl stdenv;
patch = gnupatch;
inherit fetchurl stdenv patch;
};
sysPerl = (import ../development/interpreters/sys-perl) {
inherit stdenv;
};
perl = if stdenv.system == "powerpc-darwin7.3.0" then sysPerl else realPerl;
perl = if stdenv.system == "powerpc-darwin" then sysPerl else realPerl;
python = (import ../development/interpreters/python) {
inherit fetchurl stdenv zlib;
@ -359,8 +357,7 @@ rec {
};
glibc = (import ../development/libraries/glibc) {
inherit fetchurl stdenv kernelHeaders;
patch = gnupatch;
inherit fetchurl stdenv kernelHeaders patch;
};
aterm = (import ../development/libraries/aterm) {
@ -411,9 +408,14 @@ rec {
inherit fetchurl stdenv;
};
zlib = (import ../development/libraries/zlib) {
inherit fetchurl stdenv;
};
zlib = if stdenv.system == "powerpc-darwin" then
(import ../development/libraries/zlib-mac-fix) {
inherit fetchurl stdenv patch;
}
else
(import ../development/libraries/zlib) {
inherit fetchurl stdenv;
};
libjpeg = (import ../development/libraries/libjpeg) {
inherit fetchurl stdenv;
@ -509,8 +511,7 @@ rec {
};
xlibs = (import ../development/libraries/xlibs) {
inherit fetchurl stdenv pkgconfig freetype expat;
patch = gnupatch;
inherit fetchurl stdenv pkgconfig freetype expat patch;
};
mesa = (import ../development/libraries/mesa) {
@ -564,13 +565,11 @@ rec {
};
utillinux = (import ../os-specific/linux/util-linux) {
inherit fetchurl stdenv;
patch = gnupatch;
inherit fetchurl stdenv patch;
};
sysvinit = (import ../os-specific/linux/sysvinit) {
inherit fetchurl stdenv;
patch = gnupatch;
inherit fetchurl stdenv patch;
};
e2fsprogs = (import ../os-specific/linux/e2fsprogs) {
@ -710,9 +709,8 @@ rec {
### MISC
uml = (import ../misc/uml) {
inherit fetchurl stdenv perl;
inherit fetchurl stdenv perl patch;
m4 = gnum4;
patch = gnupatch;
};
umlutilities = (import ../misc/uml-utilities) {

View File

@ -12,6 +12,6 @@
# Select the right instantiation.
body =
if system == "i686-linux" then stdenvs.stdenvLinuxPkgs
else if system == "powerpc-darwin7.3.0" then stdenvs.stdenvDarwinPkgs
else if system == "powerpc-darwin" then stdenvs.stdenvDarwinPkgs
else stdenvs.stdenvNativePkgs;
}

View File

@ -1 +1 @@
(import ./all-packages.nix) {system = "powerpc-darwin7.3.0";}
(import ./all-packages.nix) {system = "powerpc-darwin";}

View File

@ -157,10 +157,11 @@
genericStdenv = import ../stdenv/generic-branch;
inherit gccWrapper;
};
stdenvLinuxTestPkgs = allPackages {
stdenv = stdenvLinuxTest;
bootCurl = stdenvLinuxBoot2Pkgs.curl;
stdenvDarwinTest = (import ../stdenv/darwin-branch) {
stdenv = stdenvInitial;
genericStdenv = import ../stdenv/generic-branch;
inherit gccWrapper;
};
}