pkgsrc/graphics/librsvg/tool.mk
leot 284dcb54c5 librsvg: Add available.mk and tool.mk mk fragments
Rename LIBRSVG_USE_RUST to LIBRSVG_TYPE.

Isolate the LIBRSVG_TYPE logic in available.mk mk fragments in
order that can be used by other librsvg mk (e.g. tool.mk) or by
other package to check the preferred librsvg implementation to be
used. (e.g. devel/pango, fonts/harfbuzz and misc/libreoffice).

Add a tool.mk mk fragment in order to be able to specify librsvg
as a tool dependency honoring user's LIBRSVG_TYPE.
Thanks to <wiz> for suggesting that!

Discussed on tech-pkg@:

 <https://mail-index.NetBSD.org/tech-pkg/2019/06/05/msg021393.html>
2019-06-08 19:51:38 +00:00

18 lines
459 B
Makefile

# $NetBSD: tool.mk,v 1.1 2019/06/08 19:51:38 leot Exp $
#
# This mk fragment can be included by all packages that need librsvg as a tool
# dependency (e.g. for rsvg-convert).
#
.if !defined(LIBRSVG_TOOL_MK)
LIBRSVG_TOOL_MK= defined
.include "../../graphics/librsvg/available.mk"
.if ${LIBRSVG_TYPE} == "rust"
TOOL_DEPENDS+= librsvg-[0-9]*:../../graphics/librsvg
.else
TOOL_DEPENDS+= librsvg-[0-9]*:../../graphics/librsvg-c
.endif
.endif # LIBRSVG_TOOL_MK