freebsd-ports/textproc/groff/Makefile
Kubilay Kocak 6c76240c45 textproc/groff: Fix build/packaging with URWFONTS disabled
With URWFONTS disabled, the groff build fails:

pdfroff: installation problem: cannot find GhostScript interpreter

*** FATAL INSTALLATION ERROR ***

'pdfroff' requires a GhostScript interpreter to convert PostScript to PDF.
Since you do not appear to have one installed, 'pdfroff' connot continue.

This change provides configure with a more explicit argument to disable
ghostscript, vs the CONFIGURE_ENV method [1] introduced in ports 499077
after ports r499075 introduced the option.

Update pkg-plist to mark files not conditional on this option.

PR:		237615
Submitted by:	<fullermd over-yonder net> [1]
Approved by:	portmgr (blanket: build fix, just fix it)
MFH:		no (not affected)
2019-05-22 09:34:50 +00:00

85 lines
2.1 KiB
Makefile

# Created by: Ulrich Spoerlein <uqs@FreeBSD.org>
# $FreeBSD$
PORTNAME= groff
PORTVERSION= 1.22.4
PORTREVISION= 2
CATEGORIES= textproc
MASTER_SITES= GNU
MAINTAINER= bapt@FreeBSD.org
COMMENT= Software typesetting package
LICENSE= GPLv3
BUILD_DEPENDS= psselect:print/psutils
RUN_DEPENDS:= psselect:print/psutils
MAKE_JOBS_UNSAFE= yes
USES= cpe gmake perl5 shebangfix makeinfo
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --with-awk=/usr/bin/awk
CONFIGURE_ENV+= PERLPATH=${perl_CMD} # shebangfix
CPE_VENDOR= gnu
SHEBANG_FILES= src/utils/afmtodit/afmtodit.pl \
contrib/mm/mmroff.pl \
font/devps/generate/symbol.sed
SHEBANG_LANG= sed
sed_OLD_CMD= /bin/sed
sed_CMD= /usr/bin/sed
.ifdef QEMU_EMULATING
# XXX bug 224740: configure hangs: GSlice: failed to allocate 496 bytes (alignment: 512)
CONFIGURE_ENV+= gl_cv_func_printf_enomem=no
.endif
# Canonicalize to A4 if set.
.if defined(A4) || (defined(PAPERSIZE) && ${PAPERSIZE:tu} == "A4")
PAPERSIZE=A4
.endif
.if defined(PAPERSIZE)
CONFIGURE_ENV+= PAGE=${PAPERSIZE}
.endif
OPTIONS_DEFINE= X11 URWFONTS
X11_DESC= X11 devices (-TX*) and gxditview
URWFONTS_DESC= URW fonts support (needed for growpdf)
OPTIONS_DEFAULT= X11 URWFONTS
CONFLICTS= ja-groff-[0-9]*
INFO= groff
DATADIR= ${PREFIX}/share/${PORTNAME}/${PORTVERSION}
DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}-${PORTVERSION}
EXAMPLESDIR= ${DOCSDIR}/examples
URWFONTS_CONFIGURE_OFF= --without-urw-fonts-dir --without-gs
URWFONTS_USES= ghostscript:build
URWFONTS_BUILD_DEPENDS= gsfonts>=0:print/gsfonts
OPTIONS_SUB= yes
.include <bsd.port.options.mk>
.if ! ${PORT_OPTIONS:MX11}
CONFIGURE_ARGS+=--without-x
.if exists(${LOCALBASE}/bin/pnmcut) && exists(${LOCALBASE}/bin/pnmcrop) && \
exists(${LOCALBASE}/bin/pnmtops) && exists(${LOCALBASE}/bin/pnmtopng)
PLIST_SUB+= HTMLDOCS=""
.else
PLIST_SUB+= HTMLDOCS="@comment "
.endif
.else
USE_XORG= x11 xaw xmu
BUILD_DEPENDS+= ${LOCALBASE}/bin/pnmtops:graphics/netpbm
RUN_DEPENDS+= ${LOCALBASE}/bin/pnmtops:graphics/netpbm
CONFIGURE_ARGS+=--with-x --with-appresdir=${PREFIX}/lib/X11/app-defaults
PLIST_SUB+= HTMLDOCS=""
.endif
post-install:
${INSTALL_DATA} ${FILESDIR}/mdoc.local ${STAGEDIR}/${PREFIX}/share/groff/site-tmac
.include <bsd.port.mk>