forked from mirrors/nixpkgs
Merge pull request #2087 into cross-win-osx.
Thanks to @offlinehacker for the fixes. * 'crossdev' of github.com:offlinehacker/nixpkgs: gifsicle: add optional static builds, make gifview optional libjpeg_original: add optional static builds optipng: use system libpng & zlib, fix cross builds and add ... xcode: fix hash libarchive: *permanently* fix patch source and hash
This commit is contained in:
commit
2d3376e84e
|
@ -13,8 +13,8 @@ stdenv.mkDerivation rec {
|
|||
};
|
||||
|
||||
patches = [(fetchurl {
|
||||
url = "https://github.com/libarchive/libarchive/commit/22531545514043e04633e1c015c7540b9de9dbe4.patch";
|
||||
sha256 = "0c1a0prlpq5nn7zgs7cqvw9xnmhkkc8l0mpsip86k1lafircqhzh";
|
||||
url = "https://github.com/libarchive/libarchive/commit/22531545514043e04633e1c015c7540b9de9dbe4.diff";
|
||||
sha256 = "1466ddrkdh2r8idmj3v7fk2gwnhc1kdxvyczdpnqms0qlmas6fj5";
|
||||
name = "CVE-2013-0211.patch";
|
||||
})];
|
||||
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
{ stdenv, fetchurl }:
|
||||
{ stdenv, fetchurl, static ? false }:
|
||||
|
||||
with stdenv.lib;
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "libjpeg-8d";
|
||||
|
@ -7,6 +9,8 @@ stdenv.mkDerivation {
|
|||
url = http://www.ijg.org/files/jpegsrc.v8d.tar.gz;
|
||||
sha256 = "1cz0dy05mgxqdgjf52p54yxpyy95rgl30cnazdrfmw7hfca9n0h0";
|
||||
};
|
||||
|
||||
configureFlags = optional static "--enable-static --disable-shared";
|
||||
|
||||
meta = {
|
||||
homepage = http://www.ijg.org/;
|
||||
|
|
|
@ -21,6 +21,8 @@ stdenv.mkDerivation rec {
|
|||
passthru = {};
|
||||
};
|
||||
|
||||
configureFlags = "--enable-static";
|
||||
|
||||
meta = {
|
||||
description = "The official reference implementation for the PNG file format";
|
||||
homepage = http://www.libpng.org/pub/png/libpng.html;
|
||||
|
|
|
@ -11,7 +11,7 @@ in stdenv.mkDerivation rec {
|
|||
src = requireFile {
|
||||
name = "xcode_${version}.dmg";
|
||||
url = meta.homepage;
|
||||
sha256 = "0zkggbmsfc5w53j1ncbpayvnn1vzpyzyjjjzhawq1jjfq465bfvh";
|
||||
sha256 = "70bb550cc14eca80b9825f4ae9bfbf7f076bb75777311be428bc30a7eb7a6f7e";
|
||||
};
|
||||
|
||||
phases = [ "unpackPhase" "patchPhase" "installPhase" "fixupPhase" ];
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
{ stdenv, fetchurl, xproto, libXt, libX11 }:
|
||||
{ stdenv, fetchurl, xproto, libXt, libX11, gifview ? false, static ? false }:
|
||||
|
||||
with stdenv.lib;
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "gifsicle-1.78";
|
||||
|
@ -8,7 +10,9 @@ stdenv.mkDerivation {
|
|||
sha256 = "0dzp5sg82klji4lbj1m4cyg9fb3l837gkipdx657clib97klyv53";
|
||||
};
|
||||
|
||||
buildInputs = [ xproto libXt libX11 ];
|
||||
buildInputs = optional gifview [ xproto libXt libX11 ];
|
||||
|
||||
LDFLAGS = optional static "-static";
|
||||
|
||||
meta = {
|
||||
description = "Command-line tool for creating, editing, and getting information about GIF images and animations";
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
{ stdenv, fetchurl }:
|
||||
{ stdenv, fetchurl, libpng, static ? false }:
|
||||
|
||||
# This package comes with its own copy of zlib, libpng and pngxtern
|
||||
|
||||
with stdenv.lib;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "optipng-0.7.4";
|
||||
|
||||
|
@ -10,6 +12,24 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "1zrphbz17rhhfl1l95q5s979rrhifbwczl2xj1fdrnq5jid5s2sj";
|
||||
};
|
||||
|
||||
buildInputs = [ libpng ];
|
||||
|
||||
LDFLAGS = optional static "-static";
|
||||
configureFlags = "--with-system-zlib --with-system-libpng";
|
||||
|
||||
crossAttrs = {
|
||||
CC="${stdenv.cross.config}-gcc";
|
||||
LD="${stdenv.cross.config}-gcc";
|
||||
AR="${stdenv.cross.config}-ar";
|
||||
RANLIB="${stdenv.cross.config}-ranlib";
|
||||
configurePhase = ''
|
||||
./configure -prefix="$out" --with-system-zlib --with-system-libpng
|
||||
'';
|
||||
postInstall = optional (stdenv.cross.libc == "msvcrt") ''
|
||||
mv "$out"/bin/optipng "$out"/bin/optipng.exe
|
||||
'';
|
||||
};
|
||||
|
||||
meta = {
|
||||
homepage = http://optipng.sourceforge.net/;
|
||||
description = "A PNG optimizer";
|
||||
|
|
|
@ -1596,7 +1596,9 @@ let
|
|||
|
||||
openvpn = callPackage ../tools/networking/openvpn { };
|
||||
|
||||
optipng = callPackage ../tools/graphics/optipng { };
|
||||
optipng = callPackage ../tools/graphics/optipng {
|
||||
libpng = libpng12;
|
||||
};
|
||||
|
||||
oslrd = callPackage ../tools/networking/oslrd { };
|
||||
|
||||
|
|
Loading…
Reference in a new issue