pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk If a package Makefile sets USE_TBL to "yes", then a...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/c61582ab175c
branches:  trunk
changeset: 478303:c61582ab175c
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Wed Jul 21 19:55:11 2004 +0000

description:
If a package Makefile sets USE_TBL to "yes", then add "tbl" to
${TOOLS_DIR}/bin.  It will either point to /usr/bin/tbl or will depend
on groff otherwise.

This should allow removing dependencies on groff just for the sake of
forcing the existence of tbl.

diffstat:

 mk/tools.mk |  23 ++++++++++++++++++++++-
 1 files changed, 22 insertions(+), 1 deletions(-)

diffs (35 lines):

diff -r aba344d17e80 -r c61582ab175c mk/tools.mk
--- a/mk/tools.mk       Wed Jul 21 17:55:13 2004 +0000
+++ b/mk/tools.mk       Wed Jul 21 19:55:11 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: tools.mk,v 1.35 2004/06/15 13:41:43 grant Exp $
+# $NetBSD: tools.mk,v 1.36 2004/07/21 19:55:11 jlam Exp $
 #
 # This Makefile creates a ${TOOLS_DIR} directory and populates the bin
 # subdir with tools that hide the ones outside of ${TOOLS_DIR}.
@@ -384,4 +384,25 @@
        fi
 .endif
 
+.if defined(USE_TBL) && !empty(USE_TBL:M[yY][eE][sS])
+.  if exists(/usr/bin/tbl)
+_TOOLS_PROGNAME.tbl=   /usr/bin/tbl
+.  else
+BUILD_DEPENDS+=                groff>=1.19nb4:../../textproc/groff
+_TOOLS_PROGNAME.tbl=   ${LOCALBASE}/bin/tbl
+.  endif
+.  if exists(_TOOLS_PROGNAME.tbl)
+TBL:=                  ${_TOOLS_PROGNAME.tbl}
+.  endif
+
+override-tools: ${TOOLS_DIR}/bin/tbl
+${TOOLS_DIR}/bin/tbl:
+       ${_PKG_SILENT}${_PKG_DEBUG}                                     \
+       src="${_TOOLS_PROGNAME.tbl}";                                   \
+       if [ -x $$src -a ! -f ${.TARGET} ]; then                        \
+               ${MKDIR} ${.TARGET:H};                                  \
+               ${LN} -sf $$src ${.TARGET};                             \
+       fi
+.endif # USE_TBL
+
 .endif # TOOLS_MK



Home | Main Index | Thread Index | Old Index