Merge #46047: ghostscript: 9.22 -> 9.24 (security)
This commit is contained in:
commit
281a629c2a
@ -1,5 +1,5 @@
|
|||||||
{ stdenv, lib, fetchurl, pkgconfig, zlib, expat, openssl, autoconf
|
{ stdenv, lib, fetchurl, pkgconfig, zlib, expat, openssl, autoconf
|
||||||
, libjpeg, libpng, libtiff, freetype, fontconfig, lcms2, libpaper, jbig2dec
|
, libjpeg, libpng, libtiff, freetype, fontconfig, libpaper, jbig2dec
|
||||||
, libiconv, ijs
|
, libiconv, ijs
|
||||||
, x11Support ? false, xlibsWrapper ? null
|
, x11Support ? false, xlibsWrapper ? null
|
||||||
, cupsSupport ? false, cups ? null
|
, cupsSupport ? false, cups ? null
|
||||||
@ -9,8 +9,9 @@ assert x11Support -> xlibsWrapper != null;
|
|||||||
assert cupsSupport -> cups != null;
|
assert cupsSupport -> cups != null;
|
||||||
let
|
let
|
||||||
version = "9.${ver_min}";
|
version = "9.${ver_min}";
|
||||||
ver_min = "22";
|
ver_min = "24";
|
||||||
sha256 = "1fyi4yvdj39bjgs10klr31cda1fbx1ar7a7b7yz7v68gykk65y61";
|
# ghostscript*.tar.xz in https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs9xx/SHA512SUMS
|
||||||
|
sha512 = "dcbeeb5d3dd5ccaf949dc4be68363c50b1d35e647be4790a50b1bbf5f259f1d9181f705be27bfca708c4d270f945ff4b24e3db10b57800c1ee0ea7a40931c547";
|
||||||
|
|
||||||
fonts = stdenv.mkDerivation {
|
fonts = stdenv.mkDerivation {
|
||||||
name = "ghostscript-fonts";
|
name = "ghostscript-fonts";
|
||||||
@ -39,9 +40,14 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs9${ver_min}/${name}.tar.xz";
|
url = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs9${ver_min}/${name}.tar.xz";
|
||||||
inherit sha256;
|
inherit sha512;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
./urw-font-files.patch
|
||||||
|
./doc-no-ref.diff
|
||||||
|
];
|
||||||
|
|
||||||
outputs = [ "out" "man" "doc" ];
|
outputs = [ "out" "man" "doc" ];
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
@ -49,16 +55,13 @@ stdenv.mkDerivation rec {
|
|||||||
nativeBuildInputs = [ pkgconfig autoconf ];
|
nativeBuildInputs = [ pkgconfig autoconf ];
|
||||||
buildInputs =
|
buildInputs =
|
||||||
[ zlib expat openssl
|
[ zlib expat openssl
|
||||||
libjpeg libpng libtiff freetype fontconfig lcms2 libpaper jbig2dec
|
libjpeg libpng libtiff freetype fontconfig libpaper jbig2dec
|
||||||
libiconv ijs
|
libiconv ijs
|
||||||
]
|
]
|
||||||
++ lib.optional x11Support xlibsWrapper
|
++ lib.optional x11Support xlibsWrapper
|
||||||
++ lib.optional cupsSupport cups
|
++ lib.optional cupsSupport cups
|
||||||
;
|
;
|
||||||
|
# No lcms2; upstream "is in process of forking it" and thus won't use one from a library.
|
||||||
patches = [
|
|
||||||
./urw-font-files.patch
|
|
||||||
];
|
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
# requires in-tree (heavily patched) openjpeg
|
# requires in-tree (heavily patched) openjpeg
|
||||||
@ -89,8 +92,8 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
cp -r Resource "$out/share/ghostscript/${version}"
|
cp -r Resource "$out/share/ghostscript/${version}"
|
||||||
|
|
||||||
mkdir -p "$doc/share/ghostscript/${version}"
|
mkdir -p "$doc/share/doc/ghostscript"
|
||||||
mv "$out/share/ghostscript/${version}"/{doc,examples} "$doc/share/ghostscript/${version}/"
|
mv "$doc/share/doc/${version}" "$doc/share/doc/ghostscript/"
|
||||||
|
|
||||||
ln -s "${fonts}" "$out/share/ghostscript/fonts"
|
ln -s "${fonts}" "$out/share/ghostscript/fonts"
|
||||||
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
||||||
|
7
pkgs/misc/ghostscript/doc-no-ref.diff
Normal file
7
pkgs/misc/ghostscript/doc-no-ref.diff
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
Kill the reference from libgc.so to the documentation directory.
|
||||||
|
It's bad for closure, and probably not really good for anything.
|
||||||
|
--- a/base/gs.mak
|
||||||
|
+++ b/base/gs.mak
|
||||||
|
@@ -538,1 +538,1 @@
|
||||||
|
- $(EXP)$(ECHOGS_XE) -a $(gconfigd_h) -x 23 define -s -u GS_DOCDIR -x 2022 $(GS_DOCDIR) -x 22
|
||||||
|
+ $(EXP)$(ECHOGS_XE) -a $(gconfigd_h) -x 23 define -s -u GS_DOCDIR -x 2022 /no-path-to-docs -x 22
|
Loading…
Reference in New Issue
Block a user