--- share/mk/doc.commands.mk.orig 2020-03-21 12:09:18 UTC +++ share/mk/doc.commands.mk @@ -141,10 +141,8 @@ EPSTOPDFOPTS?= ${EPSTOPDFFLAGS} # PIC2PS?= ${GROFF} -p -S -Wall -mtty-char -man # -PS2EPS?= ${PREFIX}/bin/gs -PS2EPSOPTS?= -q -dNOPAUSE -dSAFER -dDELAYSAFER \ - -sPAPERSIZE=letter -r72 -sDEVICE=bit \ - -sOutputFile=/dev/null ${PS2EPSFLAGS} ps2epsi.ps +PS2EPS?= ${PREFIX}/bin/ps2eps +PS2EPSOPTS?= -q -F -l -s a4 -r 72 -f PS2BBOX?= ${PREFIX}/bin/gs PS2BBOXOPTS?= -q -dNOPAUSE -dBATCH -dSAFER -dDELAYSAFER \ -sPAPERSIZE=letter -r72 -sDEVICE=bbox \ --- share/mk/doc.images.mk.orig 2020-03-21 12:09:18 UTC +++ share/mk/doc.images.mk @@ -144,24 +144,7 @@ EPS2PNM_RES?= 100 # must contain %%BoundingBox line which the "gs -sDEVICE=bbox" outputs # (the older versions calculated BBox directly in ps2epsi.ps). .ps.eps: - tmpfile=$$(mktemp ${.TARGET}.XXXXXXXX); \ - ${PS2BBOX} ${PS2BBOXOPTS} ${.ALLSRC} > $$tmpfile 2>&1; \ - ${SETENV} outfile=$$tmpfile ${PS2EPS} ${PS2EPSOPTS} < ${.ALLSRC} 1>&2; \ - (echo "save countdictstack mark newpath /showpage {} def /setpagedevice {pop} def";\ - echo "%%EndProlog";\ - echo "%%Page: 1 1";\ - echo "%%BeginDocument: ${.ALLSRC}";\ - ) >> $$tmpfile; \ - ${SED} -e '/^%%BeginPreview:/,/^%%EndPreview[^!-~]*$$/d' \ - -e '/^%!PS-Adobe/d' \ - -e '/^%%[A-Za-z][A-Za-z]*[^!-~]*$$/d'\ - -e '/^%%[A-Za-z][A-Za-z]*: /d' < ${.ALLSRC} >> $$tmpfile; \ - (echo "%%EndDocument";\ - echo "%%Trailer";\ - echo "cleartomark countdictstack exch sub { end } repeat restore";\ - echo "%%EOF";\ - ) >> $$tmpfile; \ - ${MV} -f $$tmpfile ${.TARGET} + ${PS2EPS} ${PS2EPSOPTS} ${.ALLSRC} # We can't use suffix rules to generate the rules to convert EPS to PNG and # PNG to EPS. This is because a .png file can depend on a .eps file, and