From dd4bad98c06a75c40014621d3be2a9af92a1708c Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 8 Dec 2016 23:14:25 -0500 Subject: sys-apps/groff: handle missing pdf examples #602020 If ghostscript isn't available, groff won't build its pdf examples. --- sys-apps/groff/groff-1.22.2.ebuild | 9 ++++++--- sys-apps/groff/groff-1.22.3.ebuild | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) (limited to 'sys-apps') diff --git a/sys-apps/groff/groff-1.22.2.ebuild b/sys-apps/groff/groff-1.22.2.ebuild index e731d95545ce..de668f383538 100644 --- a/sys-apps/groff/groff-1.22.2.ebuild +++ b/sys-apps/groff/groff-1.22.2.ebuild @@ -84,9 +84,12 @@ src_install() { dosym tbl /usr/bin/gtbl if ! use examples ; then - # Keep mom-pdf.pdf since it's more of a manual than an example. #454196 #516732 - rm -f "${ED}"/usr/share/doc/${PF}/pdf/mom-pdf.pdf - mv "${ED}"/usr/share/doc/${PF}/{examples/mom,pdf}/mom-pdf.pdf || die + # The pdf files might not be generated if ghostscript is unavailable. #602020 + local pdf="${ED}/usr/share/doc/${PF}/examples/mom/mom-pdf.pdf" + if [[ -e ${pdf} ]] ; then + # Keep mom-pdf.pdf since it's more of a manual than an example. #454196 #516732 + mv "${pdf}" "${ED}"/usr/share/doc/${PF}/pdf/ || die + fi rm -rf "${ED}"/usr/share/doc/${PF}/examples fi } diff --git a/sys-apps/groff/groff-1.22.3.ebuild b/sys-apps/groff/groff-1.22.3.ebuild index 712f51ff7945..4007d84cf458 100644 --- a/sys-apps/groff/groff-1.22.3.ebuild +++ b/sys-apps/groff/groff-1.22.3.ebuild @@ -75,9 +75,12 @@ src_install() { dosym tbl /usr/bin/gtbl if ! use examples ; then - # Keep mom-pdf.pdf since it's more of a manual than an example. #454196 #516732 - rm -f "${ED}"/usr/share/doc/${PF}/pdf/mom-pdf.pdf - mv "${ED}"/usr/share/doc/${PF}/{examples/mom,pdf}/mom-pdf.pdf || die + # The pdf files might not be generated if ghostscript is unavailable. #602020 + local pdf="${ED}/usr/share/doc/${PF}/examples/mom/mom-pdf.pdf" + if [[ -e ${pdf} ]] ; then + # Keep mom-pdf.pdf since it's more of a manual than an example. #454196 #516732 + mv "${pdf}" "${ED}"/usr/share/doc/${PF}/pdf/ || die + fi rm -rf "${ED}"/usr/share/doc/${PF}/examples fi } -- cgit v1.2.3-65-gdbad