summary refs log tree commit diff
path: root/pkgs/misc/ghostscript
diff options
context:
space:
mode:
authorPierre Bourdon <delroth@gmail.com>2019-03-11 00:07:18 +0100
committerPierre Bourdon <delroth@gmail.com>2019-03-11 00:07:18 +0100
commit128bb7be2a97e3e5c5b5e1295a17323fb7d34587 (patch)
treea926978fb0cac77e4e0df62e9b105d708d3fc920 /pkgs/misc/ghostscript
parentb854767dac6c4ae2877734efcc9699daaebecaa4 (diff)
downloadnixpkgs-128bb7be2a97e3e5c5b5e1295a17323fb7d34587.tar
nixpkgs-128bb7be2a97e3e5c5b5e1295a17323fb7d34587.tar.gz
nixpkgs-128bb7be2a97e3e5c5b5e1295a17323fb7d34587.tar.bz2
nixpkgs-128bb7be2a97e3e5c5b5e1295a17323fb7d34587.tar.lz
nixpkgs-128bb7be2a97e3e5c5b5e1295a17323fb7d34587.tar.xz
nixpkgs-128bb7be2a97e3e5c5b5e1295a17323fb7d34587.tar.zst
nixpkgs-128bb7be2a97e3e5c5b5e1295a17323fb7d34587.zip
ghostscript: link against "systemwide" liblcms2
GS ships with a fork of lcms2 ("lcms2mt"), but the ABI separation
between the fork and the original seems insufficient. If libgs is linked
alongside liblcms2 (for example, this is the case with imagemagick) then
it will call into the original library instead of the fork, causing
segfaults.

Follow the example of both Arch and Debian in this regard -- they both
use the systemwide lib instead of the fork.
Diffstat (limited to 'pkgs/misc/ghostscript')
-rw-r--r--pkgs/misc/ghostscript/default.nix7
1 files changed, 3 insertions, 4 deletions
diff --git a/pkgs/misc/ghostscript/default.nix b/pkgs/misc/ghostscript/default.nix
index cd944a6788f..10481c21785 100644
--- a/pkgs/misc/ghostscript/default.nix
+++ b/pkgs/misc/ghostscript/default.nix
@@ -1,6 +1,6 @@
 { config, stdenv, lib, fetchurl, pkgconfig, zlib, expat, openssl, autoconf
 , libjpeg, libpng, libtiff, freetype, fontconfig, libpaper, jbig2dec
-, libiconv, ijs
+, libiconv, ijs, lcms2
 , cupsSupport ? config.ghostscript.cups or (!stdenv.isDarwin), cups ? null
 , x11Support ? cupsSupport, xlibsWrapper ? null # with CUPS, X11 only adds very little
 }:
@@ -56,16 +56,15 @@ stdenv.mkDerivation rec {
   buildInputs =
     [ zlib expat openssl
       libjpeg libpng libtiff freetype fontconfig libpaper jbig2dec
-      libiconv ijs
+      libiconv ijs lcms2
     ]
     ++ lib.optional x11Support xlibsWrapper
     ++ lib.optional cupsSupport cups
     ;
-  # No lcms2; upstream "is in process of forking it" and thus won't use one from a library.
 
   preConfigure = ''
     # requires in-tree (heavily patched) openjpeg
-    rm -rf jpeg libpng zlib jasper expat tiff lcms{,2} jbig2dec freetype cups/libs ijs
+    rm -rf jpeg libpng zlib jasper expat tiff lcms2mt jbig2dec freetype cups/libs ijs
 
     sed "s@if ( test -f \$(INCLUDE)[^ ]* )@if ( true )@; s@INCLUDE=/usr/include@INCLUDE=/no-such-path@" -i base/unix-aux.mak
     sed "s@^ZLIBDIR=.*@ZLIBDIR=${zlib.dev}/include@" -i configure.ac