pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk/tools Allow for USE_TOOLS+=coreutils and USE_TOOLS+...
details: https://anonhg.NetBSD.org/pkgsrc/rev/8f09a65b81d9
branches: trunk
changeset: 492543:8f09a65b81d9
user: jlam <jlam%pkgsrc.org@localhost>
date: Fri Apr 15 07:33:43 2005 +0000
description:
Allow for USE_TOOLS+=coreutils and USE_TOOLS+=findutils to use pkgsrc
replacements for "core" and "find" utilities, e.g. basename, cat, find,
etc.
diffstat:
mk/tools/bsd.tools.mk | 4 +++-
mk/tools/coreutils.mk | 36 ++++++++++++++++++++++++++++++++++++
mk/tools/findutils.mk | 31 +++++++++++++++++++++++++++++++
3 files changed, 70 insertions(+), 1 deletions(-)
diffs (93 lines):
diff -r da83f6fe0ee3 -r 8f09a65b81d9 mk/tools/bsd.tools.mk
--- a/mk/tools/bsd.tools.mk Fri Apr 15 06:59:16 2005 +0000
+++ b/mk/tools/bsd.tools.mk Fri Apr 15 07:33:43 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.tools.mk,v 1.1 2005/04/15 00:00:21 jlam Exp $
+# $NetBSD: bsd.tools.mk,v 1.2 2005/04/15 07:33:43 jlam Exp $
#
# This Makefile fragment creates tools under ${TOOLS_DIR} that are
# found before similarly-named tools in the system path.
@@ -68,6 +68,8 @@
.include "../../mk/tools/automake.mk"
.include "../../mk/tools/autoconf.mk"
+.include "../../mk/tools/coreutils.mk"
+.include "../../mk/tools/findutils.mk"
.include "../../mk/tools/texinfo.mk"
.include "../../mk/tools/rpcgen.mk"
.include "../../mk/tools/replace.mk"
diff -r da83f6fe0ee3 -r 8f09a65b81d9 mk/tools/coreutils.mk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mk/tools/coreutils.mk Fri Apr 15 07:33:43 2005 +0000
@@ -0,0 +1,36 @@
+# $NetBSD: coreutils.mk,v 1.1 2005/04/15 07:33:43 jlam Exp $
+#
+# This Makefile fragment unconditionally replaces the system-supplied
+# "core" utilities with the ones from the GNU coreutils package when
+# "coreutils" is added to USE_TOOLS.
+#
+# Set TOOLS_DEPENDS.coreutils to "DEPENDS" to get a run-time dependency
+# on coreutils.
+#
+
+.if !defined(TOOLS_IGNORE.coreutils) && !empty(USE_TOOLS:Mcoreutils)
+. if !empty(PKGPATH:Msysutils/coreutils)
+MAKEFLAGS+= TOOLS_IGNORE.coreutils=
+. else
+TOOLS_DEPENDS.coreutils?= BUILD_DEPENDS
+${TOOLS_DEPENDS.coreutils}+= coreutils>=5.2.1:../../sysutils/coreutils
+
+# List of core utilities for which we'll create symlinks under
+# ${TOOLS_DIR}. This isn't every utility provided by coreutils, but
+# is instead restricted to just the ones that are also listed in
+# mk/platform/*.mk.
+#
+_TOOLS_COREUTILS+= [ basename cat chgrp chmod chown cp cut date \
+ dirname echo env expr false head hostname id ln \
+ ls mkdir mv nice pwd rm rmdir sort tail tee \
+ test touch tr true tsort wc
+
+# Create symlinks for each of the coreutils under ${TOOLS_DIR}.
+. for _t_ in ${_TOOLS_COREUTILS}
+TOOLS_SYMLINK+= ${_t_}
+TOOLS_CMD.${_t_}= ${TOOLS_DIR}/bin/${_t_}
+TOOLS_REAL_CMD.${_t_}= ${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}${_t_}
+. endfor
+. undef _t_
+. endif
+.endif
diff -r da83f6fe0ee3 -r 8f09a65b81d9 mk/tools/findutils.mk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mk/tools/findutils.mk Fri Apr 15 07:33:43 2005 +0000
@@ -0,0 +1,31 @@
+# $NetBSD: findutils.mk,v 1.1 2005/04/15 07:33:43 jlam Exp $
+#
+# This Makefile fragment unconditionally replaces the system-supplied
+# "find" utilities with the ones from the GNU findutils package when
+# "findutils" is added to USE_TOOLS.
+#
+# Set TOOLS_DEPENDS.findutils to "DEPENDS" to get a run-time dependency
+# on findutils.
+#
+
+.if !defined(TOOLS_IGNORE.findutils) && !empty(USE_TOOLS:Mfindutils)
+. if !empty(PKGPATH:Msysutils/findutils)
+MAKEFLAGS+= TOOLS_IGNORE.findutils=
+. else
+TOOLS_DEPENDS.findutils?= BUILD_DEPENDS
+${TOOLS_DEPENDS.findutils}+= findutils>=4.1:../../sysutils/findutils
+
+# List of find utilities for which we'll create symlinks under
+# ${TOOLS_DIR}.
+#
+_TOOLS_FINDUTILS+= find xargs
+
+# Create symlinks for each of the findutils under ${TOOLS_DIR}.
+. for _t_ in ${_TOOLS_FINDUTILS}
+TOOLS_SYMLINK+= ${_t_}
+TOOLS_CMD.${_t_}= ${TOOLS_DIR}/bin/${_t_}
+TOOLS_REAL_CMD.${_t_}= ${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}${_t_}
+. endfor
+. undef _t_
+. endif
+.endif
Home |
Main Index |
Thread Index |
Old Index