* 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:
parent
7474f5713f
commit
128a5bd522
22
pkgs/development/libraries/zlib-mac-fix/darwin.patch
Normal file
22
pkgs/development/libraries/zlib-mac-fix/darwin.patch
Normal 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
|
12
pkgs/development/libraries/zlib-mac-fix/default.nix
Normal file
12
pkgs/development/libraries/zlib-mac-fix/default.nix
Normal 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];
|
||||||
|
}
|
19
pkgs/stdenv/darwin-branch/default.nix
Normal file
19
pkgs/stdenv/darwin-branch/default.nix
Normal 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";
|
||||||
|
}
|
6
pkgs/stdenv/darwin-branch/prehook.sh
Normal file
6
pkgs/stdenv/darwin-branch/prehook.sh
Normal 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
|
@ -450,8 +450,16 @@ buildW() {
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test -n "$preBuild"; then
|
||||||
|
$preBuild
|
||||||
|
fi
|
||||||
|
|
||||||
echo "make flags: $makeFlags"
|
echo "make flags: $makeFlags"
|
||||||
make $makeFlags || fail
|
make $makeFlags || fail
|
||||||
|
|
||||||
|
if test -n "$postBuild"; then
|
||||||
|
$postBuild
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -545,6 +553,10 @@ distW() {
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test -n "$preDist"; then
|
||||||
|
$preDist
|
||||||
|
fi
|
||||||
|
|
||||||
if test -z "$distTarget"; then
|
if test -z "$distTarget"; then
|
||||||
distTarget="dist"
|
distTarget="dist"
|
||||||
fi
|
fi
|
||||||
@ -563,6 +575,10 @@ distW() {
|
|||||||
# wildcards in there.
|
# wildcards in there.
|
||||||
cp -pvd $tarballs $out/tarballs
|
cp -pvd $tarballs $out/tarballs
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test -n "$postDist"; then
|
||||||
|
$postDist
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -48,6 +48,8 @@ rec {
|
|||||||
inherit fetchurl stdenv;
|
inherit fetchurl stdenv;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patch = if stdenv.system == "powerpc-darwin" then null else gnupatch;
|
||||||
|
|
||||||
gnused = (import ../tools/text/gnused) {
|
gnused = (import ../tools/text/gnused) {
|
||||||
inherit fetchurl stdenv;
|
inherit fetchurl stdenv;
|
||||||
};
|
};
|
||||||
@ -204,8 +206,7 @@ rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
gnumake = (import ../development/tools/build-managers/gnumake) {
|
gnumake = (import ../development/tools/build-managers/gnumake) {
|
||||||
inherit fetchurl stdenv;
|
inherit fetchurl stdenv patch;
|
||||||
patch = gnupatch;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
bison = (import ../development/tools/parsing/bison) {
|
bison = (import ../development/tools/parsing/bison) {
|
||||||
@ -237,8 +238,7 @@ rec {
|
|||||||
nativeTools = false;
|
nativeTools = false;
|
||||||
nativeGlibc = false;
|
nativeGlibc = false;
|
||||||
gcc = (import ../development/compilers/gcc-3.4) {
|
gcc = (import ../development/compilers/gcc-3.4) {
|
||||||
inherit fetchurl stdenv noSysDirs;
|
inherit fetchurl stdenv patch noSysDirs;
|
||||||
patch = gnupatch;
|
|
||||||
profiledCompiler = true;
|
profiledCompiler = true;
|
||||||
};
|
};
|
||||||
binutils = stdenv.gcc.binutils;
|
binutils = stdenv.gcc.binutils;
|
||||||
@ -250,8 +250,7 @@ rec {
|
|||||||
nativeTools = false;
|
nativeTools = false;
|
||||||
nativeGlibc = false;
|
nativeGlibc = false;
|
||||||
gcc = (import ../development/compilers/gcc-2.95) {
|
gcc = (import ../development/compilers/gcc-2.95) {
|
||||||
inherit fetchurl stdenv noSysDirs;
|
inherit fetchurl stdenv patch noSysDirs;
|
||||||
patch = gnupatch;
|
|
||||||
};
|
};
|
||||||
binutils = stdenv.gcc.binutils;
|
binutils = stdenv.gcc.binutils;
|
||||||
glibc = stdenv.gcc.glibc;
|
glibc = stdenv.gcc.glibc;
|
||||||
@ -331,15 +330,14 @@ rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
realPerl = (import ../development/interpreters/perl) {
|
realPerl = (import ../development/interpreters/perl) {
|
||||||
inherit fetchurl stdenv;
|
inherit fetchurl stdenv patch;
|
||||||
patch = gnupatch;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
sysPerl = (import ../development/interpreters/sys-perl) {
|
sysPerl = (import ../development/interpreters/sys-perl) {
|
||||||
inherit stdenv;
|
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) {
|
python = (import ../development/interpreters/python) {
|
||||||
inherit fetchurl stdenv zlib;
|
inherit fetchurl stdenv zlib;
|
||||||
@ -359,8 +357,7 @@ rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
glibc = (import ../development/libraries/glibc) {
|
glibc = (import ../development/libraries/glibc) {
|
||||||
inherit fetchurl stdenv kernelHeaders;
|
inherit fetchurl stdenv kernelHeaders patch;
|
||||||
patch = gnupatch;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
aterm = (import ../development/libraries/aterm) {
|
aterm = (import ../development/libraries/aterm) {
|
||||||
@ -411,9 +408,14 @@ rec {
|
|||||||
inherit fetchurl stdenv;
|
inherit fetchurl stdenv;
|
||||||
};
|
};
|
||||||
|
|
||||||
zlib = (import ../development/libraries/zlib) {
|
zlib = if stdenv.system == "powerpc-darwin" then
|
||||||
inherit fetchurl stdenv;
|
(import ../development/libraries/zlib-mac-fix) {
|
||||||
};
|
inherit fetchurl stdenv patch;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
(import ../development/libraries/zlib) {
|
||||||
|
inherit fetchurl stdenv;
|
||||||
|
};
|
||||||
|
|
||||||
libjpeg = (import ../development/libraries/libjpeg) {
|
libjpeg = (import ../development/libraries/libjpeg) {
|
||||||
inherit fetchurl stdenv;
|
inherit fetchurl stdenv;
|
||||||
@ -509,8 +511,7 @@ rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
xlibs = (import ../development/libraries/xlibs) {
|
xlibs = (import ../development/libraries/xlibs) {
|
||||||
inherit fetchurl stdenv pkgconfig freetype expat;
|
inherit fetchurl stdenv pkgconfig freetype expat patch;
|
||||||
patch = gnupatch;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
mesa = (import ../development/libraries/mesa) {
|
mesa = (import ../development/libraries/mesa) {
|
||||||
@ -564,13 +565,11 @@ rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
utillinux = (import ../os-specific/linux/util-linux) {
|
utillinux = (import ../os-specific/linux/util-linux) {
|
||||||
inherit fetchurl stdenv;
|
inherit fetchurl stdenv patch;
|
||||||
patch = gnupatch;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
sysvinit = (import ../os-specific/linux/sysvinit) {
|
sysvinit = (import ../os-specific/linux/sysvinit) {
|
||||||
inherit fetchurl stdenv;
|
inherit fetchurl stdenv patch;
|
||||||
patch = gnupatch;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
e2fsprogs = (import ../os-specific/linux/e2fsprogs) {
|
e2fsprogs = (import ../os-specific/linux/e2fsprogs) {
|
||||||
@ -710,9 +709,8 @@ rec {
|
|||||||
### MISC
|
### MISC
|
||||||
|
|
||||||
uml = (import ../misc/uml) {
|
uml = (import ../misc/uml) {
|
||||||
inherit fetchurl stdenv perl;
|
inherit fetchurl stdenv perl patch;
|
||||||
m4 = gnum4;
|
m4 = gnum4;
|
||||||
patch = gnupatch;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
umlutilities = (import ../misc/uml-utilities) {
|
umlutilities = (import ../misc/uml-utilities) {
|
||||||
|
@ -12,6 +12,6 @@
|
|||||||
# Select the right instantiation.
|
# Select the right instantiation.
|
||||||
body =
|
body =
|
||||||
if system == "i686-linux" then stdenvs.stdenvLinuxPkgs
|
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;
|
else stdenvs.stdenvNativePkgs;
|
||||||
}
|
}
|
||||||
|
@ -1 +1 @@
|
|||||||
(import ./all-packages.nix) {system = "powerpc-darwin7.3.0";}
|
(import ./all-packages.nix) {system = "powerpc-darwin";}
|
||||||
|
@ -157,10 +157,11 @@
|
|||||||
genericStdenv = import ../stdenv/generic-branch;
|
genericStdenv = import ../stdenv/generic-branch;
|
||||||
inherit gccWrapper;
|
inherit gccWrapper;
|
||||||
};
|
};
|
||||||
|
|
||||||
stdenvLinuxTestPkgs = allPackages {
|
stdenvDarwinTest = (import ../stdenv/darwin-branch) {
|
||||||
stdenv = stdenvLinuxTest;
|
stdenv = stdenvInitial;
|
||||||
bootCurl = stdenvLinuxBoot2Pkgs.curl;
|
genericStdenv = import ../stdenv/generic-branch;
|
||||||
|
inherit gccWrapper;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user