mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 13:41:26 +00:00
imagemagick: Use --with-gcc-arch
Without this, ImageMagick's configure script will generate code specific to the machine building the package. This code may then fail on other CPU types. http://hydra.nixos.org/build/16564129 Signed-off-by: Domen Kožar <domen@dev.si>
This commit is contained in:
parent
782a12e450
commit
6f53886360
|
@ -1,4 +1,5 @@
|
||||||
{ stdenv
|
{ lib
|
||||||
|
, stdenv
|
||||||
, fetchurl
|
, fetchurl
|
||||||
, pkgconfig
|
, pkgconfig
|
||||||
, bzip2
|
, bzip2
|
||||||
|
@ -18,8 +19,16 @@
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
version = "6.8.9-8";
|
version = "6.8.9-8";
|
||||||
|
|
||||||
|
arch =
|
||||||
|
if stdenv.system == "i686-linux" then "i686"
|
||||||
|
else if stdenv.system == "x86_64-linux" || stdenv.system == "x86_64-darwin" then "x86-64"
|
||||||
|
else throw "ImageMagick is not supported on this platform.";
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "ImageMagick-${version}";
|
name = "ImageMagick-${version}";
|
||||||
|
|
||||||
|
@ -35,18 +44,19 @@ stdenv.mkDerivation rec {
|
||||||
export DVIDecodeDelegate=${tetex}/bin/dvips
|
export DVIDecodeDelegate=${tetex}/bin/dvips
|
||||||
'' else "";
|
'' else "";
|
||||||
|
|
||||||
configureFlags = "" + stdenv.lib.optionalString (stdenv.system != "x86_64-darwin") ''
|
configureFlags =
|
||||||
--with-gs-font-dir=${ghostscript}/share/ghostscript/fonts
|
[ "--with-frozenpaths" ]
|
||||||
--with-gslib
|
++ [ "--with-gcc-arch=${arch}" ]
|
||||||
'' + ''
|
++ lib.optional (librsvg != null) "--with-rsvg"
|
||||||
--with-frozenpaths
|
++ lib.optionals (stdenv.system != "x86_64-darwin")
|
||||||
${if librsvg != null then "--with-rsvg" else ""}
|
[ "--with-gs-font-dir=${ghostscript}/share/ghostscript/fonts"
|
||||||
'';
|
"--with-gslib"
|
||||||
|
];
|
||||||
|
|
||||||
propagatedBuildInputs =
|
propagatedBuildInputs =
|
||||||
[ bzip2 fontconfig freetype libjpeg libpng libtiff libxml2 zlib librsvg
|
[ bzip2 fontconfig freetype libjpeg libpng libtiff libxml2 zlib librsvg
|
||||||
libtool jasper libX11
|
libtool jasper libX11
|
||||||
] ++ stdenv.lib.optional (stdenv.system != "x86_64-darwin") ghostscript;
|
] ++ lib.optional (stdenv.system != "x86_64-darwin") ghostscript;
|
||||||
|
|
||||||
buildInputs = [ tetex pkgconfig ];
|
buildInputs = [ tetex pkgconfig ];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue