FreeBSD Bugzilla – Attachment 186377 Details for
Bug 222327
race condition in doc build
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
image build patch
patch.parallel (text/plain), 3.04 KB, created by
Wolfram Schneider
on 2017-09-14 12:03:22 UTC
(
hide
)
Description:
image build patch
Filename:
MIME Type:
Creator:
Wolfram Schneider
Created:
2017-09-14 12:03:22 UTC
Size:
3.04 KB
patch
obsolete
>diff --git a/share/mk/doc.images.mk b/share/mk/doc.images.mk >index f72e948469..977429a005 100644 >--- a/share/mk/doc.images.mk >+++ b/share/mk/doc.images.mk >@@ -74,7 +74,7 @@ _IMAGES_PIC+= ${LOCAL_IMAGES_EN:M*.pic} > IMAGES_GEN_PNG= ${_IMAGES_EPS:S/.eps$/.png/} ${_IMAGES_SCR:S/.scr$/.png/} ${_IMAGES_PIC:S/.pic$/.png/} > IMAGES_GEN_EPS= ${_IMAGES_PNG:S/.png$/.eps/} ${_IMAGES_SCR:S/.scr$/.eps/} ${_IMAGES_PIC:S/.pic$/.eps/} > >-CLEANFILES+= ${IMAGES_GEN_PNG} ${IMAGES_GEN_EPS} >+CLEANFILES+= ${IMAGES_GEN_PNG} ${IMAGES_GEN_EPS} ${_IMAGES_PIC:S/.pic$/.ps/} > > IMAGES_PNG= ${_IMAGES_PNG} ${IMAGES_GEN_PNG} > IMAGES_EPS= ${_IMAGES_EPS} ${IMAGES_GEN_EPS} >@@ -102,15 +102,19 @@ EPS2PNM_RES?= 100 > ## If we want grayscale, convert with ppmtopgm before running through pnmtops > .if defined(GREYSCALE_IMAGES) > .scr.eps: >+ tmpfile=$$(mktemp ${.TARGET}.XXXXXXXX); \ > ${SCR2PNG} ${SCR2PNGOPTS} < ${.ALLSRC} | \ > ${PNGTOPNM} ${PNGTOPNMOPTS} | \ > ${PPMTOPGM} ${PPMTOPGMOPTS} | \ >- ${PNMTOPS} ${PNMTOPSOPTS} > ${.TARGET} >+ ${PNMTOPS} ${PNMTOPSOPTS} > $$tmpfile && \ >+ ${MV} -f $$tmpfile ${.TARGET} > .else > .scr.eps: >+ tmpfile=$$(mktemp ${.TARGET}.XXXXXXXX); \ > ${SCR2PNG} ${SCR2PNGOPTS} < ${.ALLSRC} | \ > ${PNGTOPNM} ${PNGTOPNMOPTS} | \ >- ${PNMTOPS} ${PNMTOPSOPTS} > ${.TARGET} >+ ${PNMTOPS} ${PNMTOPSOPTS} > $$tmpfile && \ >+ ${MV} -f $$tmpfile ${.TARGET} > .endif > > # The .txt files need to have any trailing spaces trimmed from >@@ -126,7 +130,8 @@ EPS2PNM_RES?= 100 > | ${PNMTOPNG} > ${.TARGET} > > .pic.ps: >- ${PIC2PS} ${.ALLSRC} > ${.TARGET} >+ tmpfile=$$(mktemp ${.TARGET}.XXXXXXXX); \ >+ ${PIC2PS} ${.ALLSRC} > $$tmpfile && ${MV} -f $$tmpfile ${.TARGET} > > # When ghostscript built with A4=yes is used, ps2epsi's paper size also > # becomes the A4 size. However, the ps2epsi fails to convert grops(1) >@@ -139,22 +144,24 @@ EPS2PNM_RES?= 100 > # must contain %%BoundingBox line which the "gs -sDEVICE=bbox" outputs > # (the older versions calculated BBox directly in ps2epsi.ps). > .ps.eps: >- ${PS2BBOX} ${PS2BBOXOPTS} ${.ALLSRC} > ${.TARGET} 2>&1 >- ${SETENV} outfile=${.TARGET} ${PS2EPS} ${PS2EPSOPTS} < ${.ALLSRC} 1>&2 >+ 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}";\ >- ) >> ${.TARGET} >+ ) >> $$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} >> ${.TARGET} >+ -e '/^%%[A-Za-z][A-Za-z]*: /d' < ${.ALLSRC} >> $$tmpfile; \ > (echo "%%EndDocument";\ > echo "%%Trailer";\ > echo "cleartomark countdictstack exch sub { end } repeat restore";\ > echo "%%EOF";\ >- ) >> ${.TARGET} >+ ) >> $$tmpfile; \ >+ ${MV} -f $$tmpfile ${.TARGET} > > # 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
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 222327
: 186377