mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 09:53:10 +00:00
Merge pull request #75335 from veprbl/pr/texlive-bin-dvisvgm_fix
texlive.bin.dvisvgm: fix
This commit is contained in:
commit
9e58ecd4ad
@ -261,9 +261,24 @@ dvisvgm = stdenv.mkDerivation {
|
||||
|
||||
inherit (common) src;
|
||||
|
||||
patches = [
|
||||
# Fix for ghostscript>=9.27
|
||||
# Backport of
|
||||
# https://github.com/mgieseki/dvisvgm/commit/bc51951bc90b700c28ea018993bdb058e5271e9b
|
||||
./dvisvgm-fix.patch
|
||||
|
||||
# Needed for ghostscript>=9.50
|
||||
(fetchpatch {
|
||||
url = "https://github.com/mgieseki/dvisvgm/commit/7b93a9197b69305429183affd24fa40ee04a663a.patch";
|
||||
sha256 = "1gmj76ja9xng39wxckhs9q140abixgb8rkrcfv2cdgq786wm3vag";
|
||||
stripLen = 1;
|
||||
extraPrefix = "texk/dvisvgm/dvisvgm-src/";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
# TODO: dvisvgm still uses vendored dependencies
|
||||
buildInputs = [ core/*kpathsea*/ ghostscript zlib freetype potrace xxHash ];
|
||||
buildInputs = [ core/*kpathsea*/ ghostscript zlib freetype /*potrace xxHash*/ ];
|
||||
|
||||
preConfigure = "cd texk/dvisvgm";
|
||||
|
||||
|
16
pkgs/tools/typesetting/tex/texlive/dvisvgm-fix.patch
Normal file
16
pkgs/tools/typesetting/tex/texlive/dvisvgm-fix.patch
Normal file
@ -0,0 +1,16 @@
|
||||
diff a/texk/dvisvgm/dvisvgm-src/src/psdefs.cpp b/texk/dvisvgm/dvisvgm-src/src/psdefs.cpp
|
||||
--- a/texk/dvisvgm/dvisvgm-src/src/psdefs.cpp
|
||||
+++ b/texk/dvisvgm/dvisvgm-src/src/psdefs.cpp
|
||||
@@ -107,8 +107,7 @@ const char *PSInterpreter::PSDEFS =
|
||||
"dmode sysexec<</Normal 0/Compatible 0/Multiply 1/Screen 2/Overlay 3/SoftLight "
|
||||
"4/HardLight 5/ColorDodge 6/ColorBurn 7/Darken 8/Lighten 9/Difference 10/Exclus"
|
||||
"ion 11/Hue 12/Saturation 13/Color 14/Luminosity 15/CompatibleOverprint 16>>exc"
|
||||
-"h get 1(setblendmode)prcmd}def/@pdfpagecount{GS_PDF_ProcSet begin pdfdict begi"
|
||||
-"n(r)file pdfopen begin pdfpagecount currentdict pdfclose end end end}def/@pdfp"
|
||||
-"agebox{GS_PDF_ProcSet begin pdfdict begin(r)file pdfopen begin dup dup 1 lt ex"
|
||||
-"ch pdfpagecount gt or{pop}{pdfgetpage/MediaBox pget pop aload pop}ifelse curre"
|
||||
-"ntdict pdfclose end end end}def DELAYBIND{.bindnow}if ";
|
||||
+"h get 1(setblendmode)prcmd}def/@pdfpagecount{(r)file runpdfbegin pdfpagecount "
|
||||
+"runpdfend}def/@pdfpagebox{(r)file runpdfbegin dup dup 1 lt exch pdfpagecount g"
|
||||
+"t or{pop}{pdfgetpage/MediaBox pget pop aload pop}ifelse runpdfend}def DELAYBIN"
|
||||
+"D{.bindnow}if ";
|
Loading…
Reference in New Issue
Block a user