* Merge libjpeg and libjpeg-static.

svn path=/nixpkgs/branches/stdenv-updates/; revision=15275
This commit is contained in:
Eelco Dolstra 2009-04-23 13:26:14 +00:00
parent 6e32a4cea8
commit 0f10222e4e
5 changed files with 8 additions and 62 deletions

View File

@ -1,28 +0,0 @@
source $stdenv/setup
preConfigure=preConfigure
preConfigure() {
# Workarounds for the ancient libtool shipped by libjpeg.
ln -s $libtool/bin/libtool .
cp $libtool/share/libtool/config.guess .
cp $libtool/share/libtool/config.sub .
}
preInstall=preInstall
preInstall() {
mkdir $out
mkdir $out/bin
mkdir $out/lib
mkdir $out/include
mkdir $out/man
mkdir $out/man/man1
}
patchPhase=patchPhase
patchPhase() {
for i in $patches; do
patch < $i
done
}
genericBuild

View File

@ -1,27 +0,0 @@
{stdenv, fetchurl, libtool, static ? false}:
stdenv.mkDerivation {
name = "libjpeg-6b";
builder = ./builder.sh;
src = fetchurl {
url = http://nixos.org/tarballs/jpegsrc.v6b.tar.gz;
md5 = "dbd5f3b47ed13132f04c685d608a7547";
};
inherit libtool;
configureFlags = "--enable-shared" +
(if static then " --enable-static" else "");
# Required for building of dynamic libraries on Darwin.
patches = [
(fetchurl {
url = http://nixos.org/tarballs/patch-ltconfig;
md5 = "e6725fa4a09aa1de4ca75343fd0f61d5";
})
(fetchurl {
url = http://nixos.org/tarballs/patch-ltmain.sh;
#md5 = "489986ad8e7a93aef036766b25f321d5";
md5 = "092a12aeb0c386dd7dae059109d950ba";
})
];
}

View File

@ -1,7 +1,5 @@
source $stdenv/setup
configureFlags="--enable-shared"
preConfigure=preConfigure
preConfigure() {
# Workarounds for the ancient libtool shipped by libjpeg.

View File

@ -1,14 +1,19 @@
{stdenv, fetchurl, libtool}:
{stdenv, fetchurl, libtool, static ? false}:
stdenv.mkDerivation {
name = "libjpeg-6b";
builder = ./builder.sh;
src = fetchurl {
url = http://www.ijg.org/files/jpegsrc.v6b.tar.gz;
md5 = "dbd5f3b47ed13132f04c685d608a7547";
};
inherit libtool;
configureFlags = "--enable-shared ${if static then " --enable-static" else ""}";
# Required for building of dynamic libraries on Darwin.
patches = [
(fetchurl {

View File

@ -3409,14 +3409,12 @@ let
inherit fetchurl stdenv mediastreamer;
};
libjpeg = import ../development/libraries/libjpeg {
libjpeg = makeOverridable (import ../development/libraries/libjpeg) {
inherit fetchurl stdenv;
libtool = libtool_1_5;
};
libjpegStatic = lowPrio (appendToName "static" (import ../development/libraries/libjpeg-static {
inherit fetchurl stdenv;
libtool = libtool_1_5;
libjpegStatic = lowPrio (appendToName "static" (libjpeg.override {
static = true;
}));