1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-22 04:17:44 +00:00
freebsd-ports/Mk/Uses/groff.mk
Baptiste Daroussin fe08db243a In preparation for removal of groff from base add USES=groff
it will handle the dependencies on groff by using groff from ports if not
available in base

Reviewed by:	swills
Approved by:	swills
Differential Revision:	https://reviews.freebsd.org/D9084
2017-05-25 14:04:48 +00:00

32 lines
655 B
Makefile

# $FreeBSD$
#
# handle dependency on groff
#
# Feature: groff
# Usage: USES=groff
# Valid ARGS: build (default, implicit), run, both
.if !defined(_INCLUDE_USES_GROFF_MK)
_INCLUDE_USES_GROFF_MK= yes
. if !exists(/usr/bin/groff)
. if empty(groff_ARGS)
groff_ARGS= build
. endif
_GROFF_DEPENDS= groff:textproc/groff
. if ${groff_ARGS} == "build"
BUILD_DEPENDS+= ${_GROFF_DEPENDS}
. elif ${groff_ARGS} == "run"
RUN_DEPENDS+= ${_GROFF_DEPENDS}
. elif ${groff_ARGS} == "both"
BUILD_DEPENDS+= ${_GROFF_DEPENDS}
RUN_DEPENDS+= ${_GROFF_DEPENDS}
. else
IGNORE= USES=groff - invalid args: [${groff_ARGS}] specified
. endif
. endif
.endif