2005-12-28 23:41:27 +01:00
|
|
|
# $NetBSD: replace.mk,v 1.150 2005/12/28 22:41:27 jlam Exp $
|
2005-05-21 06:46:52 +02:00
|
|
|
#
|
|
|
|
# Copyright (c) 2005 The NetBSD Foundation, Inc.
|
|
|
|
# All rights reserved.
|
|
|
|
#
|
|
|
|
# This code is derived from software contributed to The NetBSD Foundation
|
2005-05-21 06:53:17 +02:00
|
|
|
# by Johnny C. Lam.
|
2005-05-21 06:46:52 +02:00
|
|
|
#
|
|
|
|
# Redistribution and use in source and binary forms, with or without
|
|
|
|
# modification, are permitted provided that the following conditions
|
|
|
|
# are met:
|
|
|
|
# 1. Redistributions of source code must retain the above copyright
|
|
|
|
# notice, this list of conditions and the following disclaimer.
|
|
|
|
# 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
# notice, this list of conditions and the following disclaimer in the
|
|
|
|
# documentation and/or other materials provided with the distribution.
|
|
|
|
# 3. All advertising materials mentioning features or use of this software
|
|
|
|
# must display the following acknowledgement:
|
|
|
|
# This product includes software developed by the NetBSD
|
|
|
|
# Foundation, Inc. and its contributors.
|
|
|
|
# 4. Neither the name of The NetBSD Foundation nor the names of its
|
|
|
|
# contributors may be used to endorse or promote products derived
|
|
|
|
# from this software without specific prior written permission.
|
|
|
|
#
|
|
|
|
# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
|
|
|
# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
|
|
|
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
|
|
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
|
|
|
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
|
|
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
|
|
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
|
|
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
|
|
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
|
|
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
|
# POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
#
|
|
|
|
|
Initial commit of the new tools framework. This is currently designed
to be a drop-in replacement for mk/tools.mk, but isn't yet enabled
pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk
instead of tools.mk.
The major changes from the old tools framework are:
(1) The new interface to using the tools framework is through setting
USE_TOOLS in the package Makefile, e.g.,
USE_TOOLS+= autoconf gmake yacc
(2) Bison/yacc handling is improved. Instead of adding checks for
/usr/bin/yacc to the package Makefile and explicitly setting YACC,
e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS.
If bison is explicitly required, then add "bison" to USE_TOOLS
instead.
(3) GNU auto* tools are handled differently. "autoconf", "aclocal",
"automake", etc. will be tools in ${TOOLS_DIR} that point to the
correct versions of the auto* tools. Instead of patching Makefiles
or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct
versions of the tools will be called if they are invoked simply
by their bare names. This is selected by adding either "autoconf"
or "autoconf213", or "automake" or "automake14" to USE_TOOLS.
The new tools framework will deprecate the following variables:
ACLOCAL AUTORECONF
AUTOCONF BUILD_USES_GETTEXT_M4
AUTOHEADER USE_GNU_TOOLS
AUTOMAKE USE_TBL
The new tools framework will deprecate the following *.mk files:
mk/autoconf.mk
mk/automake.mk
mk/tools.mk
Additional documentation on how to use bsd.tools.mk to create new tools
under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
|
|
|
#
|
2005-04-24 05:07:36 +02:00
|
|
|
# This Makefile fragment handles "replacements" of system-supplied
|
Make a distinction between the tools that pkgsrc needs and the tools
that a package needs. Tools that pkgsrc needs are listed in
PKGSRC_USE_TOOLS, and tools that a package needs on top of that are
listed in USE_TOOLS.
Define "TOOL" variables, e.g. SED, AWK, MKDIR, etc. for each of the
tools that pkgsrc needs, and "TOOLS_TOOL" variables, e.g. TOOLS_SED,
TOOLS_AWK, TOOLS_MKDIR, etc. for each of the tools that a package
needs. These variables contain the full command line to the real
command and arguments needed to invoke the tool.
2005-05-10 21:06:58 +02:00
|
|
|
# tools with pkgsrc versions.
|
|
|
|
#
|
|
|
|
# The replacement tools are placed under ${TOOLS_DIR} so that they
|
|
|
|
# appear earlier in the search path when invoked using the bare name
|
|
|
|
# of the tool.
|
|
|
|
#
|
2005-07-18 04:33:27 +02:00
|
|
|
# "TOOLS_TOOLS" variables, e.g. TOOLS_AWK, TOOLS_SED, etc. are set to
|
|
|
|
# the full paths to the real tools on the filesystem, and represent
|
|
|
|
# tools required by the package.
|
|
|
|
#
|
|
|
|
# "TOOLS_CMDLINE_TOOL" variables, e.g. TOOLS_CMDLINE_AWK,
|
|
|
|
# TOOLS_CMDLINE_SED, etc. are set to the full command lines (path and
|
|
|
|
# arguments) necessary to invoke the real tools on the filesystem
|
Make a distinction between the tools that pkgsrc needs and the tools
that a package needs. Tools that pkgsrc needs are listed in
PKGSRC_USE_TOOLS, and tools that a package needs on top of that are
listed in USE_TOOLS.
Define "TOOL" variables, e.g. SED, AWK, MKDIR, etc. for each of the
tools that pkgsrc needs, and "TOOLS_TOOL" variables, e.g. TOOLS_SED,
TOOLS_AWK, TOOLS_MKDIR, etc. for each of the tools that a package
needs. These variables contain the full command line to the real
command and arguments needed to invoke the tool.
2005-05-10 21:06:58 +02:00
|
|
|
#
|
|
|
|
# "TOOL" variables, e.g. AWK, SED, etc. are set to the full command
|
|
|
|
# lines necessary to invoke the real tools on the filesystem, and
|
|
|
|
# represent the tools required by pkgsrc itself.
|
Initial commit of the new tools framework. This is currently designed
to be a drop-in replacement for mk/tools.mk, but isn't yet enabled
pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk
instead of tools.mk.
The major changes from the old tools framework are:
(1) The new interface to using the tools framework is through setting
USE_TOOLS in the package Makefile, e.g.,
USE_TOOLS+= autoconf gmake yacc
(2) Bison/yacc handling is improved. Instead of adding checks for
/usr/bin/yacc to the package Makefile and explicitly setting YACC,
e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS.
If bison is explicitly required, then add "bison" to USE_TOOLS
instead.
(3) GNU auto* tools are handled differently. "autoconf", "aclocal",
"automake", etc. will be tools in ${TOOLS_DIR} that point to the
correct versions of the auto* tools. Instead of patching Makefiles
or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct
versions of the tools will be called if they are invoked simply
by their bare names. This is selected by adding either "autoconf"
or "autoconf213", or "automake" or "automake14" to USE_TOOLS.
The new tools framework will deprecate the following variables:
ACLOCAL AUTORECONF
AUTOCONF BUILD_USES_GETTEXT_M4
AUTOHEADER USE_GNU_TOOLS
AUTOMAKE USE_TBL
The new tools framework will deprecate the following *.mk files:
mk/autoconf.mk
mk/automake.mk
mk/tools.mk
Additional documentation on how to use bsd.tools.mk to create new tools
under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
|
|
|
#
|
|
|
|
# The tools that could be replaced with pkgsrc counterparts (usually
|
Make a distinction between the tools that pkgsrc needs and the tools
that a package needs. Tools that pkgsrc needs are listed in
PKGSRC_USE_TOOLS, and tools that a package needs on top of that are
listed in USE_TOOLS.
Define "TOOL" variables, e.g. SED, AWK, MKDIR, etc. for each of the
tools that pkgsrc needs, and "TOOLS_TOOL" variables, e.g. TOOLS_SED,
TOOLS_AWK, TOOLS_MKDIR, etc. for each of the tools that a package
needs. These variables contain the full command line to the real
command and arguments needed to invoke the tool.
2005-05-10 21:06:58 +02:00
|
|
|
# GNU versions of the tools) that are required by pkgsrc itself, i.e.
|
|
|
|
# in targets that are part of pkgsrc infrastructure or part of the
|
2005-07-15 20:27:48 +02:00
|
|
|
# package Makefile, or by the package itself, i.e. within the
|
Make a distinction between the tools that pkgsrc needs and the tools
that a package needs. Tools that pkgsrc needs are listed in
PKGSRC_USE_TOOLS, and tools that a package needs on top of that are
listed in USE_TOOLS.
Define "TOOL" variables, e.g. SED, AWK, MKDIR, etc. for each of the
tools that pkgsrc needs, and "TOOLS_TOOL" variables, e.g. TOOLS_SED,
TOOLS_AWK, TOOLS_MKDIR, etc. for each of the tools that a package
needs. These variables contain the full command line to the real
command and arguments needed to invoke the tool.
2005-05-10 21:06:58 +02:00
|
|
|
# software's own build system, should be listed as:
|
Initial commit of the new tools framework. This is currently designed
to be a drop-in replacement for mk/tools.mk, but isn't yet enabled
pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk
instead of tools.mk.
The major changes from the old tools framework are:
(1) The new interface to using the tools framework is through setting
USE_TOOLS in the package Makefile, e.g.,
USE_TOOLS+= autoconf gmake yacc
(2) Bison/yacc handling is improved. Instead of adding checks for
/usr/bin/yacc to the package Makefile and explicitly setting YACC,
e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS.
If bison is explicitly required, then add "bison" to USE_TOOLS
instead.
(3) GNU auto* tools are handled differently. "autoconf", "aclocal",
"automake", etc. will be tools in ${TOOLS_DIR} that point to the
correct versions of the auto* tools. Instead of patching Makefiles
or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct
versions of the tools will be called if they are invoked simply
by their bare names. This is selected by adding either "autoconf"
or "autoconf213", or "automake" or "automake14" to USE_TOOLS.
The new tools framework will deprecate the following variables:
ACLOCAL AUTORECONF
AUTOCONF BUILD_USES_GETTEXT_M4
AUTOHEADER USE_GNU_TOOLS
AUTOMAKE USE_TBL
The new tools framework will deprecate the following *.mk files:
mk/autoconf.mk
mk/automake.mk
mk/tools.mk
Additional documentation on how to use bsd.tools.mk to create new tools
under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
|
|
|
#
|
2005-07-15 20:27:48 +02:00
|
|
|
# USE_TOOLS+= awk gmake lex sed
|
Initial commit of the new tools framework. This is currently designed
to be a drop-in replacement for mk/tools.mk, but isn't yet enabled
pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk
instead of tools.mk.
The major changes from the old tools framework are:
(1) The new interface to using the tools framework is through setting
USE_TOOLS in the package Makefile, e.g.,
USE_TOOLS+= autoconf gmake yacc
(2) Bison/yacc handling is improved. Instead of adding checks for
/usr/bin/yacc to the package Makefile and explicitly setting YACC,
e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS.
If bison is explicitly required, then add "bison" to USE_TOOLS
instead.
(3) GNU auto* tools are handled differently. "autoconf", "aclocal",
"automake", etc. will be tools in ${TOOLS_DIR} that point to the
correct versions of the auto* tools. Instead of patching Makefiles
or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct
versions of the tools will be called if they are invoked simply
by their bare names. This is selected by adding either "autoconf"
or "autoconf213", or "automake" or "automake14" to USE_TOOLS.
The new tools framework will deprecate the following variables:
ACLOCAL AUTORECONF
AUTOCONF BUILD_USES_GETTEXT_M4
AUTOHEADER USE_GNU_TOOLS
AUTOMAKE USE_TBL
The new tools framework will deprecate the following *.mk files:
mk/autoconf.mk
mk/automake.mk
mk/tools.mk
Additional documentation on how to use bsd.tools.mk to create new tools
under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
|
|
|
#
|
|
|
|
# If a package requires yacc to generate a parser, then the package
|
|
|
|
# Makefile should contain one of the following two lines:
|
|
|
|
#
|
|
|
|
# USE_TOOLS+= yacc # any yacc will do
|
|
|
|
# USE_TOOLS+= bison # requires bison-specific features
|
|
|
|
#
|
|
|
|
# Adding either "yacc" or "bison" to USE_TOOLS will cause a "yacc" tool
|
|
|
|
# to be generated that may be used as a yacc-replacement.
|
|
|
|
#
|
2005-04-15 08:52:25 +02:00
|
|
|
# By default, any dependencies on the pkgsrc tools are build dependencies,
|
2005-07-15 22:14:02 +02:00
|
|
|
# but this may be changed by adding a :run modifier to the tool name,
|
2005-04-15 08:52:25 +02:00
|
|
|
# e.g.:
|
|
|
|
#
|
2005-07-15 22:14:02 +02:00
|
|
|
# USE_TOOLS+= perl:run
|
2005-04-15 08:52:25 +02:00
|
|
|
#
|
Initial commit of the new tools framework. This is currently designed
to be a drop-in replacement for mk/tools.mk, but isn't yet enabled
pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk
instead of tools.mk.
The major changes from the old tools framework are:
(1) The new interface to using the tools framework is through setting
USE_TOOLS in the package Makefile, e.g.,
USE_TOOLS+= autoconf gmake yacc
(2) Bison/yacc handling is improved. Instead of adding checks for
/usr/bin/yacc to the package Makefile and explicitly setting YACC,
e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS.
If bison is explicitly required, then add "bison" to USE_TOOLS
instead.
(3) GNU auto* tools are handled differently. "autoconf", "aclocal",
"automake", etc. will be tools in ${TOOLS_DIR} that point to the
correct versions of the auto* tools. Instead of patching Makefiles
or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct
versions of the tools will be called if they are invoked simply
by their bare names. This is selected by adding either "autoconf"
or "autoconf213", or "automake" or "automake14" to USE_TOOLS.
The new tools framework will deprecate the following variables:
ACLOCAL AUTORECONF
AUTOCONF BUILD_USES_GETTEXT_M4
AUTOHEADER USE_GNU_TOOLS
AUTOMAKE USE_TBL
The new tools framework will deprecate the following *.mk files:
mk/autoconf.mk
mk/automake.mk
mk/tools.mk
Additional documentation on how to use bsd.tools.mk to create new tools
under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
|
|
|
|
2005-05-19 22:08:44 +02:00
|
|
|
# XXX Keep this hack here until the day that msgfmt and msgfmt-plurals
|
|
|
|
# XXX is handled directly by the tools framework.
|
|
|
|
# XXX
|
|
|
|
.if defined(USE_MSGFMT_PLURALS) && !empty(USE_MSGFMT_PLURALS:M[yY][eE][sS])
|
|
|
|
USE_TOOLS+= perl
|
|
|
|
.endif
|
|
|
|
|
2005-05-16 01:20:38 +02:00
|
|
|
# bison implies "bison-yacc"
|
2005-07-15 22:14:02 +02:00
|
|
|
.if !empty(USE_TOOLS:Mbison) || !empty(USE_TOOLS:Mbison\:*)
|
2005-05-16 01:20:38 +02:00
|
|
|
USE_TOOLS+= bison-yacc
|
|
|
|
.endif
|
|
|
|
|
Initial commit of the new tools framework. This is currently designed
to be a drop-in replacement for mk/tools.mk, but isn't yet enabled
pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk
instead of tools.mk.
The major changes from the old tools framework are:
(1) The new interface to using the tools framework is through setting
USE_TOOLS in the package Makefile, e.g.,
USE_TOOLS+= autoconf gmake yacc
(2) Bison/yacc handling is improved. Instead of adding checks for
/usr/bin/yacc to the package Makefile and explicitly setting YACC,
e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS.
If bison is explicitly required, then add "bison" to USE_TOOLS
instead.
(3) GNU auto* tools are handled differently. "autoconf", "aclocal",
"automake", etc. will be tools in ${TOOLS_DIR} that point to the
correct versions of the auto* tools. Instead of patching Makefiles
or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct
versions of the tools will be called if they are invoked simply
by their bare names. This is selected by adding either "autoconf"
or "autoconf213", or "automake" or "automake14" to USE_TOOLS.
The new tools framework will deprecate the following variables:
ACLOCAL AUTORECONF
AUTOCONF BUILD_USES_GETTEXT_M4
AUTOHEADER USE_GNU_TOOLS
AUTOMAKE USE_TBL
The new tools framework will deprecate the following *.mk files:
mk/autoconf.mk
mk/automake.mk
mk/tools.mk
Additional documentation on how to use bsd.tools.mk to create new tools
under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
|
|
|
######################################################################
|
|
|
|
|
2005-07-15 20:27:48 +02:00
|
|
|
# Create _USE_TOOLS, a sanitized version of USE_TOOLS that removes the
|
|
|
|
# ones that are overridden by superseding ones.
|
Make a distinction between the tools that pkgsrc needs and the tools
that a package needs. Tools that pkgsrc needs are listed in
PKGSRC_USE_TOOLS, and tools that a package needs on top of that are
listed in USE_TOOLS.
Define "TOOL" variables, e.g. SED, AWK, MKDIR, etc. for each of the
tools that pkgsrc needs, and "TOOLS_TOOL" variables, e.g. TOOLS_SED,
TOOLS_AWK, TOOLS_MKDIR, etc. for each of the tools that a package
needs. These variables contain the full command line to the real
command and arguments needed to invoke the tool.
2005-05-10 21:06:58 +02:00
|
|
|
#
|
|
|
|
.if !defined(_USE_TOOLS)
|
2005-07-17 22:51:04 +02:00
|
|
|
. for _t_ in ${USE_TOOLS:C/:.*//:O:u}
|
|
|
|
_USE_TOOLS+= ${_t_}
|
|
|
|
. endfor
|
2005-07-15 22:14:02 +02:00
|
|
|
. if !empty(_USE_TOOLS:Mbison-yacc) # bison-yacc > yacc
|
2005-04-28 17:47:43 +02:00
|
|
|
_USE_TOOLS:= ${_USE_TOOLS:Nyacc}
|
Make a distinction between the tools that pkgsrc needs and the tools
that a package needs. Tools that pkgsrc needs are listed in
PKGSRC_USE_TOOLS, and tools that a package needs on top of that are
listed in USE_TOOLS.
Define "TOOL" variables, e.g. SED, AWK, MKDIR, etc. for each of the
tools that pkgsrc needs, and "TOOLS_TOOL" variables, e.g. TOOLS_SED,
TOOLS_AWK, TOOLS_MKDIR, etc. for each of the tools that a package
needs. These variables contain the full command line to the real
command and arguments needed to invoke the tool.
2005-05-10 21:06:58 +02:00
|
|
|
. endif
|
2005-09-20 05:50:18 +02:00
|
|
|
. if !empty(_USE_TOOLS:Mbyacc) # byacc > yacc
|
|
|
|
_USE_TOOLS:= ${_USE_TOOLS:Nyacc}
|
|
|
|
. endif
|
2005-07-15 22:14:02 +02:00
|
|
|
. if !empty(_USE_TOOLS:Mflex) # flex > lex
|
2005-05-23 03:20:50 +02:00
|
|
|
_USE_TOOLS:= ${_USE_TOOLS:Nlex}
|
|
|
|
. endif
|
2005-07-15 22:14:02 +02:00
|
|
|
. if !empty(_USE_TOOLS:Mgawk) # gawk > awk
|
2005-04-28 17:47:43 +02:00
|
|
|
_USE_TOOLS:= ${_USE_TOOLS:Nawk}
|
Make a distinction between the tools that pkgsrc needs and the tools
that a package needs. Tools that pkgsrc needs are listed in
PKGSRC_USE_TOOLS, and tools that a package needs on top of that are
listed in USE_TOOLS.
Define "TOOL" variables, e.g. SED, AWK, MKDIR, etc. for each of the
tools that pkgsrc needs, and "TOOLS_TOOL" variables, e.g. TOOLS_SED,
TOOLS_AWK, TOOLS_MKDIR, etc. for each of the tools that a package
needs. These variables contain the full command line to the real
command and arguments needed to invoke the tool.
2005-05-10 21:06:58 +02:00
|
|
|
. endif
|
2005-07-15 22:14:02 +02:00
|
|
|
. if !empty(_USE_TOOLS:Mgm4) # gm4 > m4
|
2005-04-28 17:47:43 +02:00
|
|
|
_USE_TOOLS:= ${_USE_TOOLS:Nm4}
|
Make a distinction between the tools that pkgsrc needs and the tools
that a package needs. Tools that pkgsrc needs are listed in
PKGSRC_USE_TOOLS, and tools that a package needs on top of that are
listed in USE_TOOLS.
Define "TOOL" variables, e.g. SED, AWK, MKDIR, etc. for each of the
tools that pkgsrc needs, and "TOOLS_TOOL" variables, e.g. TOOLS_SED,
TOOLS_AWK, TOOLS_MKDIR, etc. for each of the tools that a package
needs. These variables contain the full command line to the real
command and arguments needed to invoke the tool.
2005-05-10 21:06:58 +02:00
|
|
|
. endif
|
2005-07-15 22:14:02 +02:00
|
|
|
. if !empty(_USE_TOOLS:Mgsed) # gsed > sed
|
2005-04-28 17:47:43 +02:00
|
|
|
_USE_TOOLS:= ${_USE_TOOLS:Nsed}
|
Make a distinction between the tools that pkgsrc needs and the tools
that a package needs. Tools that pkgsrc needs are listed in
PKGSRC_USE_TOOLS, and tools that a package needs on top of that are
listed in USE_TOOLS.
Define "TOOL" variables, e.g. SED, AWK, MKDIR, etc. for each of the
tools that pkgsrc needs, and "TOOLS_TOOL" variables, e.g. TOOLS_SED,
TOOLS_AWK, TOOLS_MKDIR, etc. for each of the tools that a package
needs. These variables contain the full command line to the real
command and arguments needed to invoke the tool.
2005-05-10 21:06:58 +02:00
|
|
|
. endif
|
2005-04-28 17:47:43 +02:00
|
|
|
.endif
|
2005-05-12 00:08:18 +02:00
|
|
|
MAKEVARS+= _USE_TOOLS
|
2005-04-28 17:47:43 +02:00
|
|
|
|
2005-09-20 05:50:18 +02:00
|
|
|
# Catch conflicting tools.
|
|
|
|
.if !empty(_USE_TOOLS:Mbison) && !empty(_USE_TOOLS:Mbyacc)
|
|
|
|
PKG_FAIL_REASON+= "\`\`bison'' and \`\`byacc'' conflict in USE_TOOLS."
|
|
|
|
.endif
|
|
|
|
|
2005-04-28 17:47:43 +02:00
|
|
|
######################################################################
|
|
|
|
|
2005-07-17 00:33:18 +02:00
|
|
|
# Set the type of dependency requested for the tool. The type of
|
|
|
|
# dependency is determined by the modifier specified for each tool:
|
2005-07-15 22:14:02 +02:00
|
|
|
#
|
2005-07-17 00:33:18 +02:00
|
|
|
# BUILD_DEPENDS: :build (default), :pkgsrc
|
|
|
|
# DEPENDS: :run
|
|
|
|
#
|
|
|
|
.for _t_ in ${USE_TOOLS:N*\:*} ${USE_TOOLS:M*\:build} ${USE_TOOLS:M*\:pkgsrc}
|
2005-07-15 22:14:02 +02:00
|
|
|
_TOOLS_DEPMETHOD.${_t_:C/:.*//}= BUILD_DEPENDS
|
|
|
|
.endfor
|
|
|
|
.for _t_ in ${USE_TOOLS:M*\:run}
|
|
|
|
_TOOLS_DEPMETHOD.${_t_:C/:.*//}= DEPENDS
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
.if !empty(_USE_TOOLS:Mbison-yacc) # bison-yacc > yacc
|
|
|
|
. if (${_TOOLS_DEPMETHOD.bison-yacc} == "BUILD_DEPENDS") && \
|
|
|
|
defined(_TOOLS_DEPMETHOD.yacc)
|
|
|
|
_TOOLS_DEPMETHOD.bison-yacc= ${_TOOLS_DEPMETHOD.yacc}
|
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
.if !empty(_USE_TOOLS:Mflex) # flex > lex
|
|
|
|
. if (${_TOOLS_DEPMETHOD.flex} == "BUILD_DEPENDS") && \
|
|
|
|
defined(_TOOLS_DEPMETHOD.lex)
|
|
|
|
_TOOLS_DEPMETHOD.flex= ${_TOOLS_DEPMETHOD.lex}
|
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
.if !empty(_USE_TOOLS:Mgawk) # gawk > awk
|
|
|
|
. if (${_TOOLS_DEPMETHOD.gawk} == "BUILD_DEPENDS") && \
|
|
|
|
defined(_TOOLS_DEPMETHOD.awk)
|
|
|
|
_TOOLS_DEPMETHOD.gawk= ${_TOOLS_DEPMETHOD.awk}
|
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
.if !empty(_USE_TOOLS:Mgm4) # gm4 > m4
|
|
|
|
. if (${_TOOLS_DEPMETHOD.gm4} == "BUILD_DEPENDS") && \
|
|
|
|
defined(_TOOLS_DEPMETHOD.m4)
|
|
|
|
_TOOLS_DEPMETHOD.gm4= ${_TOOLS_DEPMETHOD.m4}
|
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
.if !empty(_USE_TOOLS:Mgsed) # gsed > sed
|
|
|
|
. if (${_TOOLS_DEPMETHOD.gsed} == "BUILD_DEPENDS") && \
|
|
|
|
defined(_TOOLS_DEPMETHOD.sed)
|
|
|
|
_TOOLS_DEPMETHOD.gsed= ${_TOOLS_DEPMETHOD.sed}
|
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
|
|
|
|
######################################################################
|
|
|
|
|
2005-04-25 08:16:38 +02:00
|
|
|
# _TOOLS_USE_PKGSRC.<tool> is "yes" or "no" depending on whether we're
|
|
|
|
# using a pkgsrc-supplied tool to replace the system-supplied one. We
|
2005-04-27 18:52:28 +02:00
|
|
|
# use the system-supplied one if TOOLS_PLATFORM.<tool> is non-empty, or
|
2005-04-25 08:16:38 +02:00
|
|
|
# otherwise if this is a particular ${MACHINE_PLATFORM} listed above.
|
Initial commit of the new tools framework. This is currently designed
to be a drop-in replacement for mk/tools.mk, but isn't yet enabled
pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk
instead of tools.mk.
The major changes from the old tools framework are:
(1) The new interface to using the tools framework is through setting
USE_TOOLS in the package Makefile, e.g.,
USE_TOOLS+= autoconf gmake yacc
(2) Bison/yacc handling is improved. Instead of adding checks for
/usr/bin/yacc to the package Makefile and explicitly setting YACC,
e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS.
If bison is explicitly required, then add "bison" to USE_TOOLS
instead.
(3) GNU auto* tools are handled differently. "autoconf", "aclocal",
"automake", etc. will be tools in ${TOOLS_DIR} that point to the
correct versions of the auto* tools. Instead of patching Makefiles
or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct
versions of the tools will be called if they are invoked simply
by their bare names. This is selected by adding either "autoconf"
or "autoconf213", or "automake" or "automake14" to USE_TOOLS.
The new tools framework will deprecate the following variables:
ACLOCAL AUTORECONF
AUTOCONF BUILD_USES_GETTEXT_M4
AUTOHEADER USE_GNU_TOOLS
AUTOMAKE USE_TBL
The new tools framework will deprecate the following *.mk files:
mk/autoconf.mk
mk/automake.mk
mk/tools.mk
Additional documentation on how to use bsd.tools.mk to create new tools
under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
|
|
|
#
|
2005-04-28 17:51:10 +02:00
|
|
|
.for _t_ in ${_USE_TOOLS}
|
2005-04-27 18:52:28 +02:00
|
|
|
. if defined(TOOLS_PLATFORM.${_t_}) && !empty(TOOLS_PLATFORM.${_t_})
|
Initial commit of the new tools framework. This is currently designed
to be a drop-in replacement for mk/tools.mk, but isn't yet enabled
pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk
instead of tools.mk.
The major changes from the old tools framework are:
(1) The new interface to using the tools framework is through setting
USE_TOOLS in the package Makefile, e.g.,
USE_TOOLS+= autoconf gmake yacc
(2) Bison/yacc handling is improved. Instead of adding checks for
/usr/bin/yacc to the package Makefile and explicitly setting YACC,
e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS.
If bison is explicitly required, then add "bison" to USE_TOOLS
instead.
(3) GNU auto* tools are handled differently. "autoconf", "aclocal",
"automake", etc. will be tools in ${TOOLS_DIR} that point to the
correct versions of the auto* tools. Instead of patching Makefiles
or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct
versions of the tools will be called if they are invoked simply
by their bare names. This is selected by adding either "autoconf"
or "autoconf213", or "automake" or "automake14" to USE_TOOLS.
The new tools framework will deprecate the following variables:
ACLOCAL AUTORECONF
AUTOCONF BUILD_USES_GETTEXT_M4
AUTOHEADER USE_GNU_TOOLS
AUTOMAKE USE_TBL
The new tools framework will deprecate the following *.mk files:
mk/autoconf.mk
mk/automake.mk
mk/tools.mk
Additional documentation on how to use bsd.tools.mk to create new tools
under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
|
|
|
_TOOLS_USE_PKGSRC.${_t_}?= no
|
2005-04-27 18:02:08 +02:00
|
|
|
. endif
|
Initial commit of the new tools framework. This is currently designed
to be a drop-in replacement for mk/tools.mk, but isn't yet enabled
pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk
instead of tools.mk.
The major changes from the old tools framework are:
(1) The new interface to using the tools framework is through setting
USE_TOOLS in the package Makefile, e.g.,
USE_TOOLS+= autoconf gmake yacc
(2) Bison/yacc handling is improved. Instead of adding checks for
/usr/bin/yacc to the package Makefile and explicitly setting YACC,
e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS.
If bison is explicitly required, then add "bison" to USE_TOOLS
instead.
(3) GNU auto* tools are handled differently. "autoconf", "aclocal",
"automake", etc. will be tools in ${TOOLS_DIR} that point to the
correct versions of the auto* tools. Instead of patching Makefiles
or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct
versions of the tools will be called if they are invoked simply
by their bare names. This is selected by adding either "autoconf"
or "autoconf213", or "automake" or "automake14" to USE_TOOLS.
The new tools framework will deprecate the following variables:
ACLOCAL AUTORECONF
AUTOCONF BUILD_USES_GETTEXT_M4
AUTOHEADER USE_GNU_TOOLS
AUTOMAKE USE_TBL
The new tools framework will deprecate the following *.mk files:
mk/autoconf.mk
mk/automake.mk
mk/tools.mk
Additional documentation on how to use bsd.tools.mk to create new tools
under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
|
|
|
_TOOLS_USE_PKGSRC.${_t_}?= yes
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
######################################################################
|
|
|
|
|
|
|
|
# For each of the blocks below, we create either symlinks or wrappers
|
|
|
|
# for each of the tools requested. We need to be careful that we don't
|
|
|
|
# get into dependency loops; do this by setting and checking the value
|
Make a distinction between the tools that pkgsrc needs and the tools
that a package needs. Tools that pkgsrc needs are listed in
PKGSRC_USE_TOOLS, and tools that a package needs on top of that are
listed in USE_TOOLS.
Define "TOOL" variables, e.g. SED, AWK, MKDIR, etc. for each of the
tools that pkgsrc needs, and "TOOLS_TOOL" variables, e.g. TOOLS_SED,
TOOLS_AWK, TOOLS_MKDIR, etc. for each of the tools that a package
needs. These variables contain the full command line to the real
command and arguments needed to invoke the tool.
2005-05-10 21:06:58 +02:00
|
|
|
# of TOOLS_IGNORE.<tool>. These blocks handle the case where we are
|
|
|
|
# using the pkgsrc-supplied tool.
|
|
|
|
#
|
|
|
|
# Always set the "TOOLS_TOOL" name for each tool to point to the real
|
|
|
|
# command, e.g., TOOLS_TBL, TOOLS_YACC, etc., provided that "TOOL" has
|
|
|
|
# been associated with <tool>.
|
|
|
|
#
|
2005-04-28 17:47:43 +02:00
|
|
|
.if !defined(TOOLS_IGNORE.awk) && !empty(_USE_TOOLS:Mawk)
|
2005-05-18 07:31:55 +02:00
|
|
|
. if !empty(PKGPATH:Mlang/nawk)
|
2005-04-27 18:28:19 +02:00
|
|
|
MAKEFLAGS+= TOOLS_IGNORE.awk=
|
|
|
|
. elif !empty(_TOOLS_USE_PKGSRC.awk:M[yY][eE][sS])
|
2005-05-18 07:31:55 +02:00
|
|
|
TOOLS_DEPENDS.awk?= nawk>=20040207:../../lang/nawk
|
2005-05-09 03:11:58 +02:00
|
|
|
TOOLS_CREATE+= awk
|
2005-05-18 07:31:55 +02:00
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.awk=nawk
|
2005-07-17 23:36:24 +02:00
|
|
|
TOOLS_PATH.awk= ${TOOLS_PREFIX.awk}/bin/nawk
|
2005-04-27 18:28:19 +02:00
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
|
2005-06-24 21:39:10 +02:00
|
|
|
.if !defined(TOOLS_IGNORE.bash) && !empty(_USE_TOOLS:Mbash)
|
|
|
|
. if !empty(PKGPATH:Mshells/bash)
|
|
|
|
MAKEFLAGS+= TOOLS_IGNORE.bash=
|
|
|
|
. elif !empty(_TOOLS_USE_PKGSRC.bash:M[yY][eE][sS])
|
|
|
|
TOOLS_DEPENDS.bash?= bash-[0-9]*:../../shells/bash
|
|
|
|
TOOLS_CREATE+= bash
|
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.bash=bash
|
2005-07-17 23:36:24 +02:00
|
|
|
TOOLS_PATH.bash= ${TOOLS_PREFIX.bash}/bin/bash
|
2005-06-24 21:39:10 +02:00
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
|
2005-04-28 17:47:43 +02:00
|
|
|
.if !defined(TOOLS_IGNORE.bison) && !empty(_USE_TOOLS:Mbison)
|
Initial commit of the new tools framework. This is currently designed
to be a drop-in replacement for mk/tools.mk, but isn't yet enabled
pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk
instead of tools.mk.
The major changes from the old tools framework are:
(1) The new interface to using the tools framework is through setting
USE_TOOLS in the package Makefile, e.g.,
USE_TOOLS+= autoconf gmake yacc
(2) Bison/yacc handling is improved. Instead of adding checks for
/usr/bin/yacc to the package Makefile and explicitly setting YACC,
e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS.
If bison is explicitly required, then add "bison" to USE_TOOLS
instead.
(3) GNU auto* tools are handled differently. "autoconf", "aclocal",
"automake", etc. will be tools in ${TOOLS_DIR} that point to the
correct versions of the auto* tools. Instead of patching Makefiles
or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct
versions of the tools will be called if they are invoked simply
by their bare names. This is selected by adding either "autoconf"
or "autoconf213", or "automake" or "automake14" to USE_TOOLS.
The new tools framework will deprecate the following variables:
ACLOCAL AUTORECONF
AUTOCONF BUILD_USES_GETTEXT_M4
AUTOHEADER USE_GNU_TOOLS
AUTOMAKE USE_TBL
The new tools framework will deprecate the following *.mk files:
mk/autoconf.mk
mk/automake.mk
mk/tools.mk
Additional documentation on how to use bsd.tools.mk to create new tools
under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
|
|
|
. if !empty(PKGPATH:Mdevel/bison)
|
|
|
|
MAKEFLAGS+= TOOLS_IGNORE.bison=
|
2005-04-24 05:07:36 +02:00
|
|
|
. elif !empty(_TOOLS_USE_PKGSRC.bison:M[yY][eE][sS])
|
2005-04-28 05:01:11 +02:00
|
|
|
TOOLS_DEPENDS.bison?= bison>=1.0:../../devel/bison
|
2005-05-09 03:11:58 +02:00
|
|
|
TOOLS_CREATE+= bison
|
2005-05-14 07:57:43 +02:00
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.bison=bison
|
2005-07-17 23:36:24 +02:00
|
|
|
TOOLS_PATH.bison= ${TOOLS_PREFIX.bison}/bin/bison
|
Initial commit of the new tools framework. This is currently designed
to be a drop-in replacement for mk/tools.mk, but isn't yet enabled
pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk
instead of tools.mk.
The major changes from the old tools framework are:
(1) The new interface to using the tools framework is through setting
USE_TOOLS in the package Makefile, e.g.,
USE_TOOLS+= autoconf gmake yacc
(2) Bison/yacc handling is improved. Instead of adding checks for
/usr/bin/yacc to the package Makefile and explicitly setting YACC,
e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS.
If bison is explicitly required, then add "bison" to USE_TOOLS
instead.
(3) GNU auto* tools are handled differently. "autoconf", "aclocal",
"automake", etc. will be tools in ${TOOLS_DIR} that point to the
correct versions of the auto* tools. Instead of patching Makefiles
or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct
versions of the tools will be called if they are invoked simply
by their bare names. This is selected by adding either "autoconf"
or "autoconf213", or "automake" or "automake14" to USE_TOOLS.
The new tools framework will deprecate the following variables:
ACLOCAL AUTORECONF
AUTOCONF BUILD_USES_GETTEXT_M4
AUTOHEADER USE_GNU_TOOLS
AUTOMAKE USE_TBL
The new tools framework will deprecate the following *.mk files:
mk/autoconf.mk
mk/automake.mk
mk/tools.mk
Additional documentation on how to use bsd.tools.mk to create new tools
under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
|
|
|
. endif
|
2005-05-16 01:20:38 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if !defined(TOOLS_IGNORE.bison-yacc) && !empty(_USE_TOOLS:Mbison-yacc)
|
|
|
|
. if !empty(PKGPATH:Mdevel/bison)
|
|
|
|
MAKEFLAGS+= TOOLS_IGNORE.bison-yacc=
|
|
|
|
. elif !empty(_TOOLS_USE_PKGSRC.bison-yacc:M[yY][eE][sS])
|
|
|
|
TOOLS_DEPENDS.bison-yacc?= bison>=1.0:../../devel/bison
|
|
|
|
TOOLS_CREATE+= bison-yacc
|
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.bison-yacc=bison
|
2005-07-17 23:36:24 +02:00
|
|
|
TOOLS_PATH.bison-yacc= ${TOOLS_PREFIX.bison-yacc}/bin/bison
|
2005-07-19 05:01:13 +02:00
|
|
|
TOOLS_ARGS.bison-yacc= -y
|
2005-05-16 01:20:38 +02:00
|
|
|
. endif
|
|
|
|
TOOLS_CMD.bison-yacc= ${TOOLS_DIR}/bin/yacc
|
2005-07-19 06:18:51 +02:00
|
|
|
#
|
|
|
|
# bison/yacc is typically a build tool whose path is not embedded in
|
|
|
|
# any scripts or config files. In this case, pass the full command
|
|
|
|
# line (path and arguments) of the tool to the GNU configure script
|
|
|
|
# so that bison will be correctly invoked in yacc-compatilility mode.
|
|
|
|
#
|
|
|
|
TOOLS_VALUE_GNU.bison-yacc= ${TOOLS_CMDLINE.bison-yacc}
|
Initial commit of the new tools framework. This is currently designed
to be a drop-in replacement for mk/tools.mk, but isn't yet enabled
pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk
instead of tools.mk.
The major changes from the old tools framework are:
(1) The new interface to using the tools framework is through setting
USE_TOOLS in the package Makefile, e.g.,
USE_TOOLS+= autoconf gmake yacc
(2) Bison/yacc handling is improved. Instead of adding checks for
/usr/bin/yacc to the package Makefile and explicitly setting YACC,
e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS.
If bison is explicitly required, then add "bison" to USE_TOOLS
instead.
(3) GNU auto* tools are handled differently. "autoconf", "aclocal",
"automake", etc. will be tools in ${TOOLS_DIR} that point to the
correct versions of the auto* tools. Instead of patching Makefiles
or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct
versions of the tools will be called if they are invoked simply
by their bare names. This is selected by adding either "autoconf"
or "autoconf213", or "automake" or "automake14" to USE_TOOLS.
The new tools framework will deprecate the following variables:
ACLOCAL AUTORECONF
AUTOCONF BUILD_USES_GETTEXT_M4
AUTOHEADER USE_GNU_TOOLS
AUTOMAKE USE_TBL
The new tools framework will deprecate the following *.mk files:
mk/autoconf.mk
mk/automake.mk
mk/tools.mk
Additional documentation on how to use bsd.tools.mk to create new tools
under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
|
|
|
.endif
|
|
|
|
|
2005-09-20 05:50:18 +02:00
|
|
|
.if !defined(TOOLS_IGNORE.byacc) && !empty(_USE_TOOLS:Mbyacc)
|
|
|
|
. if !empty(PKGPATH:Mdevel/byacc)
|
|
|
|
MAKEFLAGS+= TOOLS_IGNORE.byacc=
|
|
|
|
. elif !empty(_TOOLS_USE_PKGSRC.byacc:M[yY][eE][sS])
|
|
|
|
TOOLS_DEPENDS.byacc?= byacc>=20040328:../../devel/byacc
|
|
|
|
TOOLS_CREATE+= byacc
|
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.byacc=byacc
|
|
|
|
TOOLS_PATH.byacc= ${TOOLS_PREFIX.byacc}/bin/yacc
|
|
|
|
TOOLS_CMD.byacc= ${TOOLS_DIR}/bin/yacc
|
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
|
2005-05-02 04:50:33 +02:00
|
|
|
.if !defined(TOOLS_IGNORE.bzcat) && !empty(_USE_TOOLS:Mbzcat)
|
|
|
|
. if !empty(PKGPATH:Marchivers/bzip2)
|
|
|
|
MAKEFLAGS+= TOOLS_IGNORE.bzcat=
|
|
|
|
. elif !empty(_TOOLS_USE_PKGSRC.bzcat:M[yY][eE][sS])
|
|
|
|
TOOLS_DEPENDS.bzcat?= bzip2>=0.9.0b:../../archivers/bzip2
|
2005-05-09 03:11:58 +02:00
|
|
|
TOOLS_CREATE+= bzcat
|
2005-05-14 07:57:43 +02:00
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.bzcat=bzip2
|
2005-07-17 23:36:24 +02:00
|
|
|
TOOLS_PATH.bzcat= ${TOOLS_PREFIX.bzcat}/bin/bzcat
|
2005-05-02 04:50:33 +02:00
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
|
2005-06-24 22:59:59 +02:00
|
|
|
.if !defined(TOOLS_IGNORE.csh) && !empty(_USE_TOOLS:Mcsh)
|
|
|
|
. if !empty(PKGPATH:Mshells/tcsh)
|
|
|
|
MAKEFLAGS+= TOOLS_IGNORE.csh=
|
|
|
|
. elif !empty(_TOOLS_USE_PKGSRC.csh:M[yY][eE][sS])
|
|
|
|
TOOLS_DEPENDS.csh?= tcsh-[0-9]*:../../shells/tcsh
|
|
|
|
TOOLS_CREATE+= csh
|
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.csh=tcsh
|
2005-07-17 23:36:24 +02:00
|
|
|
TOOLS_PATH.csh= ${TOOLS_PREFIX.csh}/bin/tcsh
|
2005-06-24 22:59:59 +02:00
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
|
2005-04-28 17:47:43 +02:00
|
|
|
.if !defined(TOOLS_IGNORE.file) && !empty(_USE_TOOLS:Mfile)
|
2005-04-15 18:01:23 +02:00
|
|
|
. if !empty(PKGPATH:Msysutils/file)
|
|
|
|
MAKEFLAGS+= TOOLS_IGNORE.file=
|
2005-04-24 05:07:36 +02:00
|
|
|
. elif !empty(_TOOLS_USE_PKGSRC.file:M[yY][eE][sS])
|
2005-04-28 05:01:11 +02:00
|
|
|
TOOLS_DEPENDS.file?= file>=4.13:../../sysutils/file
|
2005-05-09 03:11:58 +02:00
|
|
|
TOOLS_CREATE+= file
|
2005-05-14 07:57:43 +02:00
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.file=file
|
2005-07-17 23:36:24 +02:00
|
|
|
TOOLS_PATH.file= ${TOOLS_PREFIX.file}/bin/file
|
2005-04-15 18:01:23 +02:00
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
|
2005-04-28 17:47:43 +02:00
|
|
|
.if !defined(TOOLS_IGNORE.find) && !empty(_USE_TOOLS:Mfind)
|
2005-04-27 00:28:03 +02:00
|
|
|
. if !empty(PKGPATH:Msysutils/findutils)
|
2005-04-28 05:57:39 +02:00
|
|
|
MAKEFLAGS+= TOOLS_IGNORE.find=
|
|
|
|
. elif !empty(_TOOLS_USE_PKGSRC.find:M[yY][eE][sS])
|
2005-04-28 05:01:11 +02:00
|
|
|
TOOLS_DEPENDS.find?= findutils>=4.1:../../sysutils/findutils
|
2005-05-09 03:11:58 +02:00
|
|
|
TOOLS_CREATE+= find
|
2005-05-14 07:57:43 +02:00
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.find=findutils
|
2005-07-17 23:36:24 +02:00
|
|
|
TOOLS_PATH.find= ${TOOLS_PREFIX.find}/bin/${GNU_PROGRAM_PREFIX}find
|
2005-04-27 00:28:03 +02:00
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
|
2005-05-23 03:20:50 +02:00
|
|
|
.if !defined(TOOLS_IGNORE.flex) && !empty(_USE_TOOLS:Mflex)
|
|
|
|
. if !empty(PKGPATH:Mdevel/flex)
|
|
|
|
MAKEFLAGS+= TOOLS_IGNORE.flex=
|
|
|
|
. elif !empty(_TOOLS_USE_PKGSRC.flex:M[yY][eE][sS])
|
|
|
|
. include "../../devel/flex/buildlink3.mk"
|
|
|
|
_TOOLS_DEPENDS.flex= # empty
|
|
|
|
. for _dep_ in ${BUILDLINK_DEPENDS.flex}
|
|
|
|
_TOOLS_DEPENDS.flex+= ${_dep_}:${BUILDLINK_PKGSRCDIR.flex}
|
|
|
|
. endfor
|
|
|
|
TOOLS_DEPENDS.flex?= ${_TOOLS_DEPENDS.flex}
|
|
|
|
TOOLS_CREATE+= flex
|
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.flex=flex
|
2005-07-17 23:36:24 +02:00
|
|
|
TOOLS_PATH.flex= ${TOOLS_PREFIX.flex}/bin/flex
|
2005-05-23 03:20:50 +02:00
|
|
|
. endif
|
|
|
|
TOOLS_ALIASES.flex= lex
|
|
|
|
.endif
|
|
|
|
|
2005-04-28 17:47:43 +02:00
|
|
|
.if !defined(TOOLS_IGNORE.gawk) && !empty(_USE_TOOLS:Mgawk)
|
2005-04-25 00:34:35 +02:00
|
|
|
. if !empty(PKGPATH:Mlang/gawk)
|
|
|
|
MAKEFLAGS+= TOOLS_IGNORE.gawk=
|
|
|
|
. elif !empty(_TOOLS_USE_PKGSRC.gawk:M[yY][eE][sS])
|
2005-04-28 05:01:11 +02:00
|
|
|
TOOLS_DEPENDS.gawk?= gawk>=3.1.1:../../lang/gawk
|
2005-05-09 03:11:58 +02:00
|
|
|
TOOLS_CREATE+= gawk
|
2005-05-14 07:57:43 +02:00
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.gawk=gawk
|
2005-07-17 23:36:24 +02:00
|
|
|
TOOLS_PATH.gawk= ${TOOLS_PREFIX.gawk}/bin/${GNU_PROGRAM_PREFIX}awk
|
2005-04-25 00:34:35 +02:00
|
|
|
. endif
|
Make a distinction between the tools that pkgsrc needs and the tools
that a package needs. Tools that pkgsrc needs are listed in
PKGSRC_USE_TOOLS, and tools that a package needs on top of that are
listed in USE_TOOLS.
Define "TOOL" variables, e.g. SED, AWK, MKDIR, etc. for each of the
tools that pkgsrc needs, and "TOOLS_TOOL" variables, e.g. TOOLS_SED,
TOOLS_AWK, TOOLS_MKDIR, etc. for each of the tools that a package
needs. These variables contain the full command line to the real
command and arguments needed to invoke the tool.
2005-05-10 21:06:58 +02:00
|
|
|
TOOLS_ALIASES.gawk= awk
|
2005-04-25 00:34:35 +02:00
|
|
|
.endif
|
|
|
|
|
2005-04-28 17:47:43 +02:00
|
|
|
.if !defined(TOOLS_IGNORE.gm4) && !empty(_USE_TOOLS:Mgm4)
|
2005-04-25 00:42:00 +02:00
|
|
|
. if !empty(PKGPATH:Mdevel/m4)
|
|
|
|
MAKEFLAGS+= TOOLS_IGNORE.gm4=
|
|
|
|
. elif !empty(_TOOLS_USE_PKGSRC.gm4:M[yY][eE][sS])
|
2005-04-28 05:01:11 +02:00
|
|
|
TOOLS_DEPENDS.gm4?= m4>=1.4:../../devel/m4
|
2005-05-09 03:11:58 +02:00
|
|
|
TOOLS_CREATE+= gm4
|
2005-05-14 07:57:43 +02:00
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.gm4=m4
|
2005-07-17 23:36:24 +02:00
|
|
|
TOOLS_PATH.gm4= ${TOOLS_PREFIX.gm4}/bin/gm4
|
2005-04-25 00:42:00 +02:00
|
|
|
. endif
|
Make a distinction between the tools that pkgsrc needs and the tools
that a package needs. Tools that pkgsrc needs are listed in
PKGSRC_USE_TOOLS, and tools that a package needs on top of that are
listed in USE_TOOLS.
Define "TOOL" variables, e.g. SED, AWK, MKDIR, etc. for each of the
tools that pkgsrc needs, and "TOOLS_TOOL" variables, e.g. TOOLS_SED,
TOOLS_AWK, TOOLS_MKDIR, etc. for each of the tools that a package
needs. These variables contain the full command line to the real
command and arguments needed to invoke the tool.
2005-05-10 21:06:58 +02:00
|
|
|
TOOLS_ALIASES.gm4= m4
|
2005-04-25 00:42:00 +02:00
|
|
|
.endif
|
|
|
|
|
2005-04-28 17:47:43 +02:00
|
|
|
.if !defined(TOOLS_IGNORE.gmake) && !empty(_USE_TOOLS:Mgmake)
|
Initial commit of the new tools framework. This is currently designed
to be a drop-in replacement for mk/tools.mk, but isn't yet enabled
pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk
instead of tools.mk.
The major changes from the old tools framework are:
(1) The new interface to using the tools framework is through setting
USE_TOOLS in the package Makefile, e.g.,
USE_TOOLS+= autoconf gmake yacc
(2) Bison/yacc handling is improved. Instead of adding checks for
/usr/bin/yacc to the package Makefile and explicitly setting YACC,
e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS.
If bison is explicitly required, then add "bison" to USE_TOOLS
instead.
(3) GNU auto* tools are handled differently. "autoconf", "aclocal",
"automake", etc. will be tools in ${TOOLS_DIR} that point to the
correct versions of the auto* tools. Instead of patching Makefiles
or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct
versions of the tools will be called if they are invoked simply
by their bare names. This is selected by adding either "autoconf"
or "autoconf213", or "automake" or "automake14" to USE_TOOLS.
The new tools framework will deprecate the following variables:
ACLOCAL AUTORECONF
AUTOCONF BUILD_USES_GETTEXT_M4
AUTOHEADER USE_GNU_TOOLS
AUTOMAKE USE_TBL
The new tools framework will deprecate the following *.mk files:
mk/autoconf.mk
mk/automake.mk
mk/tools.mk
Additional documentation on how to use bsd.tools.mk to create new tools
under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
|
|
|
. if !empty(PKGPATH:Mdevel/gmake)
|
|
|
|
MAKEFLAGS+= TOOLS_IGNORE.gmake=
|
2005-04-24 05:07:36 +02:00
|
|
|
. elif !empty(_TOOLS_USE_PKGSRC.gmake:M[yY][eE][sS])
|
2005-04-28 05:01:11 +02:00
|
|
|
TOOLS_DEPENDS.gmake?= gmake>=3.78:../../devel/gmake
|
2005-05-09 03:11:58 +02:00
|
|
|
TOOLS_CREATE+= gmake
|
2005-05-14 07:57:43 +02:00
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.gmake=gmake
|
2005-07-17 23:36:24 +02:00
|
|
|
TOOLS_PATH.gmake= ${TOOLS_PREFIX.gmake}/bin/gmake
|
Initial commit of the new tools framework. This is currently designed
to be a drop-in replacement for mk/tools.mk, but isn't yet enabled
pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk
instead of tools.mk.
The major changes from the old tools framework are:
(1) The new interface to using the tools framework is through setting
USE_TOOLS in the package Makefile, e.g.,
USE_TOOLS+= autoconf gmake yacc
(2) Bison/yacc handling is improved. Instead of adding checks for
/usr/bin/yacc to the package Makefile and explicitly setting YACC,
e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS.
If bison is explicitly required, then add "bison" to USE_TOOLS
instead.
(3) GNU auto* tools are handled differently. "autoconf", "aclocal",
"automake", etc. will be tools in ${TOOLS_DIR} that point to the
correct versions of the auto* tools. Instead of patching Makefiles
or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct
versions of the tools will be called if they are invoked simply
by their bare names. This is selected by adding either "autoconf"
or "autoconf213", or "automake" or "automake14" to USE_TOOLS.
The new tools framework will deprecate the following variables:
ACLOCAL AUTORECONF
AUTOCONF BUILD_USES_GETTEXT_M4
AUTOHEADER USE_GNU_TOOLS
AUTOMAKE USE_TBL
The new tools framework will deprecate the following *.mk files:
mk/autoconf.mk
mk/automake.mk
mk/tools.mk
Additional documentation on how to use bsd.tools.mk to create new tools
under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
|
2005-04-28 17:47:43 +02:00
|
|
|
.if !defined(TOOLS_IGNORE.gsed) && !empty(_USE_TOOLS:Mgsed)
|
2005-04-28 06:00:15 +02:00
|
|
|
. if !empty(PKGPATH:Mtextproc/gsed)
|
2005-04-26 21:15:38 +02:00
|
|
|
MAKEFLAGS+= TOOLS_IGNORE.gsed=
|
|
|
|
. elif !empty(_TOOLS_USE_PKGSRC.gsed:M[yY][eE][sS])
|
2005-04-28 05:01:11 +02:00
|
|
|
TOOLS_DEPENDS.gsed?= gsed>=3.0.2:../../textproc/gsed
|
2005-05-09 03:11:58 +02:00
|
|
|
TOOLS_CREATE+= gsed
|
2005-05-14 07:57:43 +02:00
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.gsed=gsed
|
2005-07-17 23:36:24 +02:00
|
|
|
TOOLS_PATH.gsed= ${TOOLS_PREFIX.gsed}/bin/${GNU_PROGRAM_PREFIX}sed
|
2005-04-24 05:07:36 +02:00
|
|
|
. endif
|
Make a distinction between the tools that pkgsrc needs and the tools
that a package needs. Tools that pkgsrc needs are listed in
PKGSRC_USE_TOOLS, and tools that a package needs on top of that are
listed in USE_TOOLS.
Define "TOOL" variables, e.g. SED, AWK, MKDIR, etc. for each of the
tools that pkgsrc needs, and "TOOLS_TOOL" variables, e.g. TOOLS_SED,
TOOLS_AWK, TOOLS_MKDIR, etc. for each of the tools that a package
needs. These variables contain the full command line to the real
command and arguments needed to invoke the tool.
2005-05-10 21:06:58 +02:00
|
|
|
TOOLS_ALIASES.gsed= sed
|
Initial commit of the new tools framework. This is currently designed
to be a drop-in replacement for mk/tools.mk, but isn't yet enabled
pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk
instead of tools.mk.
The major changes from the old tools framework are:
(1) The new interface to using the tools framework is through setting
USE_TOOLS in the package Makefile, e.g.,
USE_TOOLS+= autoconf gmake yacc
(2) Bison/yacc handling is improved. Instead of adding checks for
/usr/bin/yacc to the package Makefile and explicitly setting YACC,
e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS.
If bison is explicitly required, then add "bison" to USE_TOOLS
instead.
(3) GNU auto* tools are handled differently. "autoconf", "aclocal",
"automake", etc. will be tools in ${TOOLS_DIR} that point to the
correct versions of the auto* tools. Instead of patching Makefiles
or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct
versions of the tools will be called if they are invoked simply
by their bare names. This is selected by adding either "autoconf"
or "autoconf213", or "automake" or "automake14" to USE_TOOLS.
The new tools framework will deprecate the following variables:
ACLOCAL AUTORECONF
AUTOCONF BUILD_USES_GETTEXT_M4
AUTOHEADER USE_GNU_TOOLS
AUTOMAKE USE_TBL
The new tools framework will deprecate the following *.mk files:
mk/autoconf.mk
mk/automake.mk
mk/tools.mk
Additional documentation on how to use bsd.tools.mk to create new tools
under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
|
|
|
.endif
|
|
|
|
|
2005-04-28 17:47:43 +02:00
|
|
|
.if !defined(TOOLS_IGNORE.gtar) && !empty(_USE_TOOLS:Mgtar)
|
2005-05-14 23:15:07 +02:00
|
|
|
. if !empty(PKGPATH:Marchivers/gtar-base)
|
2005-04-28 05:57:39 +02:00
|
|
|
MAKEFLAGS+= TOOLS_IGNORE.gtar=
|
|
|
|
. elif !empty(_TOOLS_USE_PKGSRC.gtar:M[yY][eE][sS])
|
2005-05-14 23:15:07 +02:00
|
|
|
TOOLS_DEPENDS.gtar?= gtar-base>=1.13.25:../../archivers/gtar-base
|
2005-05-09 03:11:58 +02:00
|
|
|
TOOLS_CREATE+= gtar
|
2005-05-14 23:15:07 +02:00
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.gtar=gtar-base
|
2005-07-17 23:36:24 +02:00
|
|
|
TOOLS_PATH.gtar= ${TOOLS_PREFIX.gtar}/bin/${GNU_PROGRAM_PREFIX}tar
|
2005-04-27 05:41:17 +02:00
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
|
2005-04-28 17:47:43 +02:00
|
|
|
.if !defined(TOOLS_IGNORE.gunzip) && !empty(_USE_TOOLS:Mgunzip)
|
2005-05-16 00:33:08 +02:00
|
|
|
. if !empty(PKGPATH:Marchivers/gzip-base)
|
2005-04-28 05:57:39 +02:00
|
|
|
MAKEFLAGS+= TOOLS_IGNORE.gunzip=
|
|
|
|
. elif !empty(_TOOLS_USE_PKGSRC.gunzip:M[yY][eE][sS])
|
|
|
|
TOOLS_DEPENDS.gunzip?= gzip-base>=1.2.4b:../../archivers/gzip-base
|
2005-05-09 03:11:58 +02:00
|
|
|
TOOLS_CREATE+= gunzip
|
2005-05-14 07:57:43 +02:00
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.gunzip=gzip-base
|
2005-07-17 23:36:24 +02:00
|
|
|
TOOLS_PATH.gunzip= ${TOOLS_PREFIX.gunzip}/bin/gunzip
|
|
|
|
TOOLS_ARGS.gunzip= -f
|
2005-04-28 05:57:39 +02:00
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
|
2005-04-28 17:47:43 +02:00
|
|
|
.if !defined(TOOLS_IGNORE.gzcat) && !empty(_USE_TOOLS:Mgzcat)
|
2005-05-16 00:33:08 +02:00
|
|
|
. if !empty(PKGPATH:Marchivers/gzip-base)
|
2005-04-28 05:57:39 +02:00
|
|
|
MAKEFLAGS+= TOOLS_IGNORE.gzcat=
|
|
|
|
. elif !empty(_TOOLS_USE_PKGSRC.gzcat:M[yY][eE][sS])
|
|
|
|
TOOLS_DEPENDS.gzcat?= gzip-base>=1.2.4b:../../archivers/gzip-base
|
2005-05-09 03:11:58 +02:00
|
|
|
TOOLS_CREATE+= gzcat
|
2005-05-14 07:57:43 +02:00
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.gzcat=gzip-base
|
2005-07-17 23:36:24 +02:00
|
|
|
TOOLS_PATH.gzcat= ${TOOLS_PREFIX.gzcat}/bin/zcat
|
2005-04-28 05:57:39 +02:00
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
|
2005-04-28 17:47:43 +02:00
|
|
|
.if !defined(TOOLS_IGNORE.gzip) && !empty(_USE_TOOLS:Mgzip)
|
2005-05-16 00:33:08 +02:00
|
|
|
. if !empty(PKGPATH:Marchivers/gzip-base)
|
2005-04-28 05:57:39 +02:00
|
|
|
MAKEFLAGS+= TOOLS_IGNORE.gzip=
|
|
|
|
. elif !empty(_TOOLS_USE_PKGSRC.gzip:M[yY][eE][sS])
|
2005-04-28 05:01:11 +02:00
|
|
|
TOOLS_DEPENDS.gzip?= gzip-base>=1.2.4b:../../archivers/gzip-base
|
2005-05-09 03:11:58 +02:00
|
|
|
TOOLS_CREATE+= gzip
|
2005-05-14 07:57:43 +02:00
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.gzip=gzip-base
|
2005-07-17 23:36:24 +02:00
|
|
|
TOOLS_PATH.gzip= ${TOOLS_PREFIX.gzip}/bin/gzip
|
|
|
|
TOOLS_ARGS.gzip= -nf ${GZIP}
|
2005-04-24 05:59:44 +02:00
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
|
2005-04-28 17:47:43 +02:00
|
|
|
.if !defined(TOOLS_IGNORE.lex) && !empty(_USE_TOOLS:Mlex)
|
Initial commit of the new tools framework. This is currently designed
to be a drop-in replacement for mk/tools.mk, but isn't yet enabled
pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk
instead of tools.mk.
The major changes from the old tools framework are:
(1) The new interface to using the tools framework is through setting
USE_TOOLS in the package Makefile, e.g.,
USE_TOOLS+= autoconf gmake yacc
(2) Bison/yacc handling is improved. Instead of adding checks for
/usr/bin/yacc to the package Makefile and explicitly setting YACC,
e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS.
If bison is explicitly required, then add "bison" to USE_TOOLS
instead.
(3) GNU auto* tools are handled differently. "autoconf", "aclocal",
"automake", etc. will be tools in ${TOOLS_DIR} that point to the
correct versions of the auto* tools. Instead of patching Makefiles
or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct
versions of the tools will be called if they are invoked simply
by their bare names. This is selected by adding either "autoconf"
or "autoconf213", or "automake" or "automake14" to USE_TOOLS.
The new tools framework will deprecate the following variables:
ACLOCAL AUTORECONF
AUTOCONF BUILD_USES_GETTEXT_M4
AUTOHEADER USE_GNU_TOOLS
AUTOMAKE USE_TBL
The new tools framework will deprecate the following *.mk files:
mk/autoconf.mk
mk/automake.mk
mk/tools.mk
Additional documentation on how to use bsd.tools.mk to create new tools
under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
|
|
|
. if !empty(PKGPATH:Mdevel/flex)
|
|
|
|
MAKEFLAGS+= TOOLS_IGNORE.lex=
|
2005-04-24 05:07:36 +02:00
|
|
|
. elif !empty(_TOOLS_USE_PKGSRC.lex:M[yY][eE][sS])
|
|
|
|
. include "../../devel/flex/buildlink3.mk"
|
2005-05-14 23:38:18 +02:00
|
|
|
_TOOLS_DEPENDS.lex= # empty
|
|
|
|
. for _dep_ in ${BUILDLINK_DEPENDS.flex}
|
|
|
|
_TOOLS_DEPENDS.lex+= ${_dep_}:${BUILDLINK_PKGSRCDIR.flex}
|
|
|
|
. endfor
|
|
|
|
TOOLS_DEPENDS.lex?= ${_TOOLS_DEPENDS.lex}
|
2005-05-09 03:11:58 +02:00
|
|
|
TOOLS_CREATE+= lex
|
2005-05-14 07:57:43 +02:00
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.lex=flex
|
2005-07-17 23:36:24 +02:00
|
|
|
TOOLS_PATH.lex= ${TOOLS_PREFIX.lex}/bin/flex
|
Initial commit of the new tools framework. This is currently designed
to be a drop-in replacement for mk/tools.mk, but isn't yet enabled
pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk
instead of tools.mk.
The major changes from the old tools framework are:
(1) The new interface to using the tools framework is through setting
USE_TOOLS in the package Makefile, e.g.,
USE_TOOLS+= autoconf gmake yacc
(2) Bison/yacc handling is improved. Instead of adding checks for
/usr/bin/yacc to the package Makefile and explicitly setting YACC,
e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS.
If bison is explicitly required, then add "bison" to USE_TOOLS
instead.
(3) GNU auto* tools are handled differently. "autoconf", "aclocal",
"automake", etc. will be tools in ${TOOLS_DIR} that point to the
correct versions of the auto* tools. Instead of patching Makefiles
or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct
versions of the tools will be called if they are invoked simply
by their bare names. This is selected by adding either "autoconf"
or "autoconf213", or "automake" or "automake14" to USE_TOOLS.
The new tools framework will deprecate the following variables:
ACLOCAL AUTORECONF
AUTOCONF BUILD_USES_GETTEXT_M4
AUTOHEADER USE_GNU_TOOLS
AUTOMAKE USE_TBL
The new tools framework will deprecate the following *.mk files:
mk/autoconf.mk
mk/automake.mk
mk/tools.mk
Additional documentation on how to use bsd.tools.mk to create new tools
under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
|
2005-05-14 00:08:20 +02:00
|
|
|
.if !defined(TOOLS_IGNORE.lha) && !empty(_USE_TOOLS:Mlha)
|
|
|
|
. if !empty(PKGPATH:Marchivers/lha)
|
|
|
|
MAKEFLAGS+= TOOLS_IGNORE.lha=
|
|
|
|
. elif !empty(_TOOLS_USE_PKGSRC.lha:M[yY][eE][sS])
|
|
|
|
TOOLS_DEPENDS.lha?= lha>=114.9:../../archivers/lha
|
|
|
|
TOOLS_CREATE+= lha
|
2005-05-14 07:57:43 +02:00
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.lha=lha
|
2005-07-17 23:36:24 +02:00
|
|
|
TOOLS_PATH.lha= ${TOOLS_PREFIX.lha}/bin/lha
|
2005-05-14 00:08:20 +02:00
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
|
2005-04-28 17:47:43 +02:00
|
|
|
.if !defined(TOOLS_IGNORE.m4) && !empty(_USE_TOOLS:Mm4)
|
2005-04-27 18:28:19 +02:00
|
|
|
. if !empty(PKGPATH:Mdevel/m4)
|
|
|
|
MAKEFLAGS+= TOOLS_IGNORE.m4=
|
|
|
|
. elif !empty(_TOOLS_USE_PKGSRC.m4:M[yY][eE][sS])
|
2005-04-28 05:01:11 +02:00
|
|
|
TOOLS_DEPENDS.m4?= m4>=1.4:../../devel/m4
|
2005-05-09 03:11:58 +02:00
|
|
|
TOOLS_CREATE+= m4
|
2005-05-14 07:57:43 +02:00
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.m4=m4
|
2005-07-17 23:36:24 +02:00
|
|
|
TOOLS_PATH.m4= ${TOOLS_PREFIX.m4}/bin/gm4
|
2005-04-27 18:28:19 +02:00
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
|
2005-05-03 18:30:34 +02:00
|
|
|
.if !defined(TOOLS_IGNORE.mail) && !empty(_USE_TOOLS:Mmail)
|
|
|
|
. if !empty(PKGPATH:Mmail/nail)
|
|
|
|
MAKEFLAGS+= TOOLS_IGNORE.mail=
|
|
|
|
. elif !empty(_TOOLS_USE_PKGSRC.mail:M[yY][eE][sS])
|
|
|
|
TOOLS_DEPENDS.mail?= nail>=11.22:../../mail/nail
|
2005-05-09 03:11:58 +02:00
|
|
|
TOOLS_CREATE+= mail
|
2005-05-14 07:57:43 +02:00
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.mail=nail
|
2005-07-17 23:36:24 +02:00
|
|
|
TOOLS_PATH.mail= ${TOOLS_PREFIX.mail}/bin/nail
|
2005-05-03 18:30:34 +02:00
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
|
2005-06-04 00:54:44 +02:00
|
|
|
.if !defined(TOOLS_IGNORE.mktemp) && !empty(_USE_TOOLS:Mmktemp)
|
|
|
|
. if !empty(PKGPATH:Msysutils/mktemp)
|
|
|
|
MAKEFLAGS+= TOOLS_IGNORE.mktemp=
|
|
|
|
. elif !empty(_TOOLS_USE_PKGSRC.mktemp:M[yY][eE][sS])
|
|
|
|
TOOLS_DEPENDS.mktemp?= mktemp>=1.5:../../sysutils/mktemp
|
|
|
|
TOOLS_CREATE+= mktemp
|
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.mktemp=mktemp
|
2005-07-17 23:36:24 +02:00
|
|
|
TOOLS_PATH.mktemp= ${TOOLS_PREFIX.mktemp}/bin/mktemp
|
2005-06-04 00:54:44 +02:00
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
|
2005-04-28 17:47:43 +02:00
|
|
|
.if !defined(TOOLS_IGNORE.mtree) && !empty(_USE_TOOLS:Mmtree)
|
2005-04-27 08:15:53 +02:00
|
|
|
. if !empty(PKGPATH:Mpkgtools/mtree)
|
|
|
|
MAKEFLAGS+= TOOLS_IGNORE.mtree=
|
|
|
|
. elif !empty(_TOOLS_USE_PKGSRC.mtree:M[yY][eE][sS])
|
2005-04-27 17:21:50 +02:00
|
|
|
#
|
|
|
|
# This is installed by pkgsrc bootstrap, and is never registered, so
|
|
|
|
# comment out the dependency on it.
|
|
|
|
#
|
2005-04-28 05:01:11 +02:00
|
|
|
#TOOLS_DEPENDS.mtree?= mtree>=20040722:../../pkgtools/mtree
|
2005-05-09 03:11:58 +02:00
|
|
|
TOOLS_CREATE+= mtree
|
2005-05-14 07:57:43 +02:00
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.mtree=mtree
|
2005-07-17 23:36:24 +02:00
|
|
|
TOOLS_PATH.mtree= ${TOOLS_PREFIX.mtree}/bin/mtree
|
2005-04-27 08:15:53 +02:00
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
|
2005-05-26 23:46:13 +02:00
|
|
|
.if !defined(TOOLS_IGNORE.nroff) && !empty(_USE_TOOLS:Mnroff)
|
|
|
|
. if !empty(PKGPATH:Mtextproc/groff)
|
|
|
|
MAKEFLAGS+= TOOLS_IGNORE.nroff=
|
|
|
|
. elif !empty(_TOOLS_USE_PKGSRC.nroff:M[yY][eE][sS])
|
|
|
|
TOOLS_DEPENDS.nroff?= groff>=1.19nb4:../../textproc/groff
|
|
|
|
TOOLS_CREATE+= nroff
|
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.nroff=groff
|
2005-07-17 23:36:24 +02:00
|
|
|
TOOLS_PATH.nroff= ${TOOLS_PREFIX.nroff}/bin/nroff
|
2005-05-26 23:46:13 +02:00
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
|
2005-04-28 17:47:43 +02:00
|
|
|
.if !defined(TOOLS_IGNORE.patch) && !empty(_USE_TOOLS:Mpatch)
|
Initial commit of the new tools framework. This is currently designed
to be a drop-in replacement for mk/tools.mk, but isn't yet enabled
pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk
instead of tools.mk.
The major changes from the old tools framework are:
(1) The new interface to using the tools framework is through setting
USE_TOOLS in the package Makefile, e.g.,
USE_TOOLS+= autoconf gmake yacc
(2) Bison/yacc handling is improved. Instead of adding checks for
/usr/bin/yacc to the package Makefile and explicitly setting YACC,
e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS.
If bison is explicitly required, then add "bison" to USE_TOOLS
instead.
(3) GNU auto* tools are handled differently. "autoconf", "aclocal",
"automake", etc. will be tools in ${TOOLS_DIR} that point to the
correct versions of the auto* tools. Instead of patching Makefiles
or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct
versions of the tools will be called if they are invoked simply
by their bare names. This is selected by adding either "autoconf"
or "autoconf213", or "automake" or "automake14" to USE_TOOLS.
The new tools framework will deprecate the following variables:
ACLOCAL AUTORECONF
AUTOCONF BUILD_USES_GETTEXT_M4
AUTOHEADER USE_GNU_TOOLS
AUTOMAKE USE_TBL
The new tools framework will deprecate the following *.mk files:
mk/autoconf.mk
mk/automake.mk
mk/tools.mk
Additional documentation on how to use bsd.tools.mk to create new tools
under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
|
|
|
. if !empty(PKGPATH:Mdevel/patch)
|
|
|
|
MAKEFLAGS+= TOOLS_IGNORE.patch=
|
2005-04-24 05:07:36 +02:00
|
|
|
. elif !empty(_TOOLS_USE_PKGSRC.patch:M[yY][eE][sS])
|
2005-04-28 05:01:11 +02:00
|
|
|
TOOLS_DEPENDS.patch?= patch>=2.2:../../devel/patch
|
2005-05-09 03:11:58 +02:00
|
|
|
TOOLS_CREATE+= patch
|
2005-05-14 07:57:43 +02:00
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.patch=patch
|
2005-07-17 23:36:24 +02:00
|
|
|
TOOLS_PATH.patch= ${TOOLS_PREFIX.patch}/bin/gpatch
|
2005-10-30 18:32:07 +01:00
|
|
|
_PATCH_CAN_BACKUP= yes
|
|
|
|
_PATCH_BACKUP_ARG?= -b -V simple -z
|
Initial commit of the new tools framework. This is currently designed
to be a drop-in replacement for mk/tools.mk, but isn't yet enabled
pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk
instead of tools.mk.
The major changes from the old tools framework are:
(1) The new interface to using the tools framework is through setting
USE_TOOLS in the package Makefile, e.g.,
USE_TOOLS+= autoconf gmake yacc
(2) Bison/yacc handling is improved. Instead of adding checks for
/usr/bin/yacc to the package Makefile and explicitly setting YACC,
e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS.
If bison is explicitly required, then add "bison" to USE_TOOLS
instead.
(3) GNU auto* tools are handled differently. "autoconf", "aclocal",
"automake", etc. will be tools in ${TOOLS_DIR} that point to the
correct versions of the auto* tools. Instead of patching Makefiles
or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct
versions of the tools will be called if they are invoked simply
by their bare names. This is selected by adding either "autoconf"
or "autoconf213", or "automake" or "automake14" to USE_TOOLS.
The new tools framework will deprecate the following variables:
ACLOCAL AUTORECONF
AUTOCONF BUILD_USES_GETTEXT_M4
AUTOHEADER USE_GNU_TOOLS
AUTOMAKE USE_TBL
The new tools framework will deprecate the following *.mk files:
mk/autoconf.mk
mk/automake.mk
mk/tools.mk
Additional documentation on how to use bsd.tools.mk to create new tools
under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
|
2005-04-28 17:47:43 +02:00
|
|
|
.if !defined(TOOLS_IGNORE.pax) && !empty(_USE_TOOLS:Mpax)
|
2005-04-28 05:57:39 +02:00
|
|
|
. if !empty(PKGPATH:Marchivers/pax)
|
|
|
|
MAKEFLAGS+= TOOLS_IGNORE.pax=
|
|
|
|
. elif !empty(_TOOLS_USE_PKGSRC.pax:M[yY][eE][sS])
|
|
|
|
#
|
|
|
|
# This is installed by pkgsrc bootstrap, and is never registered, so
|
|
|
|
# comment out the dependency on it.
|
|
|
|
#
|
|
|
|
#TOOLS_DEPENDS.pax?= pax>=20040802:../../archivers/pax
|
2005-05-09 03:11:58 +02:00
|
|
|
TOOLS_CREATE+= pax
|
2005-05-14 07:57:43 +02:00
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.pax=pax
|
2005-07-17 23:36:24 +02:00
|
|
|
TOOLS_PATH.pax= ${TOOLS_PREFIX.pax}/bin/pax
|
2005-04-28 05:57:39 +02:00
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
|
2005-06-02 23:03:32 +02:00
|
|
|
.if !defined(TOOLS_IGNORE.perl) && !empty(_USE_TOOLS:Mperl)
|
2005-06-24 08:43:43 +02:00
|
|
|
. if !empty(PKGPATH:Mlang/perl5)
|
2005-05-19 05:52:23 +02:00
|
|
|
MAKEFLAGS+= TOOLS_IGNORE.perl=
|
2005-06-02 23:03:32 +02:00
|
|
|
. elif !empty(_TOOLS_USE_PKGSRC.perl:M[yY][eE][sS])
|
2005-05-19 05:52:23 +02:00
|
|
|
. include "../../lang/perl5/version.mk"
|
Update lang/perl5 to 5.8.7. Changes from version 5.8.6 include updates
for many "core" modules, UTF-8 and Unicode bugfixes, and ithreads
bugfixes.
The major changes are in the pkgsrc infrastructure to handle Perl and
Perl modules. All pkgsrc-installed Perl modules are now installed in
"vendor" directories, and the perl interpreter has been modifed to
search for libraries in the following order: site, vendor, perl. The
Perl library is stored in a directory that is named for the Perl ABI
version associated with the Perl release, so any updates of Perl to
newer versions can be done "in-place" as long as Perl ABI version
remains the same. All Perl scripts and man pages are stored in
locations that won't conflict between site, vendor, and perl modules,
and a new utility perllink(1) now manages symlinks to those scripts
and man pages under the usual ${LOCALBASE}/bin and ${LOCALBASE}/man/man1.
PERL5_SITEPREFIX may be set to the prefix where local, site-specific
modules will be installed, e.g. PERL5_SITEPREFIX=/usr/local. Note
that modules installed here are completely unmanaged by pkgsrc.
Update the buildlink and tool dependencies on perl to require perl>=5.8.7
to reflect the new locations for Perl modules and the Perl shared
library.
2005-08-06 08:18:44 +02:00
|
|
|
TOOLS_DEPENDS.perl?= perl>=${PERL5_REQD}:../../lang/perl5
|
2005-05-19 05:52:23 +02:00
|
|
|
TOOLS_CREATE+= perl
|
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.perl=perl
|
2005-07-17 23:36:24 +02:00
|
|
|
TOOLS_PATH.perl= ${TOOLS_PREFIX.perl}/bin/perl
|
2005-05-19 05:52:23 +02:00
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
|
2005-08-10 22:56:10 +02:00
|
|
|
.if !defined(TOOLS_IGNORE.pkg-config) && !empty(_USE_TOOLS:Mpkg-config)
|
|
|
|
. if !empty(PKGPATH:Mdevel/pkg-config)
|
|
|
|
MAKEFLAGS+= TOOLS_IGNORE.pkg-config=
|
|
|
|
. elif !empty(_TOOLS_USE_PKGSRC.pkg-config:M[yY][eE][sS])
|
|
|
|
TOOLS_DEPENDS.pkg-config?= pkg-config>=0.19:../../devel/pkg-config
|
|
|
|
TOOLS_CREATE+= pkg-config
|
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.pkg-config=pkg-config
|
|
|
|
TOOLS_PATH.pkg-config= ${TOOLS_PREFIX.pkg-config}/bin/pkg-config
|
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
|
2005-07-26 22:00:50 +02:00
|
|
|
.if !defined(TOOLS_IGNORE.pod2man) && !empty(_USE_TOOLS:Mpod2man)
|
|
|
|
. if !empty(PKGPATH:Mlang/perl5)
|
|
|
|
MAKEFLAGS+= TOOLS_IGNORE.pod2man=
|
|
|
|
. elif !empty(_TOOLS_USE_PKGSRC.pod2man:M[yY][eE][sS])
|
|
|
|
. include "../../lang/perl5/version.mk"
|
2005-08-10 08:08:48 +02:00
|
|
|
TOOLS_DEPENDS.pod2man?= perl>=${PERL5_REQD}:../../lang/perl5
|
2005-07-26 22:00:50 +02:00
|
|
|
TOOLS_CREATE+= pod2man
|
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.pod2man=perl
|
|
|
|
TOOLS_PATH.pod2man= ${TOOLS_PREFIX.pod2man}/bin/pod2man
|
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
|
2005-04-28 17:47:43 +02:00
|
|
|
.if !defined(TOOLS_IGNORE.sed) && !empty(_USE_TOOLS:Msed)
|
2005-04-27 18:28:19 +02:00
|
|
|
. if !empty(PKGPATH:Mtextproc/nbsed)
|
|
|
|
MAKEFLAGS+= TOOLS_IGNORE.sed=
|
|
|
|
. elif !empty(_TOOLS_USE_PKGSRC.sed:M[yY][eE][sS])
|
2005-04-28 05:01:11 +02:00
|
|
|
TOOLS_DEPENDS.sed?= nbsed>=20040821:../../textproc/nbsed
|
2005-05-09 03:11:58 +02:00
|
|
|
TOOLS_CREATE+= sed
|
2005-05-14 07:57:43 +02:00
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.sed=nbsed
|
2005-07-17 23:36:24 +02:00
|
|
|
TOOLS_PATH.sed= ${TOOLS_PREFIX.nbsed}/bin/nbsed
|
2005-04-27 18:28:19 +02:00
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
|
2005-04-28 17:47:43 +02:00
|
|
|
.if !defined(TOOLS_IGNORE.sh) && !empty(_USE_TOOLS:Msh)
|
2005-04-27 06:47:41 +02:00
|
|
|
. if !empty(PKGPATH:Mshells/pdksh)
|
|
|
|
MAKEFLAGS+= TOOLS_IGNORE.sh=
|
|
|
|
. elif !empty(_TOOLS_USE_PKGSRC.sh:M[yY][eE][sS])
|
2005-04-28 05:01:11 +02:00
|
|
|
TOOLS_DEPENDS.sh?= pdksh>=5.2.14:../../shells/pdksh
|
2005-05-09 03:11:58 +02:00
|
|
|
TOOLS_CREATE+= sh
|
2005-05-14 07:57:43 +02:00
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.sh=pdksh
|
2005-07-17 23:36:24 +02:00
|
|
|
TOOLS_PATH.sh= ${TOOLS_PREFIX.sh}/bin/pdksh
|
2005-04-27 06:47:41 +02:00
|
|
|
. endif
|
|
|
|
TOOLS_CMD.sh= ${TOOLS_DIR}/bin/sh
|
|
|
|
.endif
|
|
|
|
|
2005-04-28 17:47:43 +02:00
|
|
|
.if !defined(TOOLS_IGNORE.shlock) && !empty(_USE_TOOLS:Mshlock)
|
2005-04-27 06:47:41 +02:00
|
|
|
. if !empty(PKGPATH:Mpkgtools/shlock)
|
|
|
|
MAKEFLAGS+= TOOLS_IGNORE.shlock=
|
|
|
|
. elif !empty(_TOOLS_USE_PKGSRC.shlock:M[yY][eE][sS])
|
2005-04-28 05:01:11 +02:00
|
|
|
TOOLS_DEPENDS.shlock?= shlock>=20020114:../../pkgtools/shlock
|
2005-05-09 03:11:58 +02:00
|
|
|
TOOLS_CREATE+= shlock
|
2005-05-14 07:57:43 +02:00
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.shlock=shlock
|
2005-07-17 23:36:24 +02:00
|
|
|
TOOLS_PATH.shlock= ${TOOLS_PREFIX.shlock}/bin/shlock
|
2005-04-27 06:47:41 +02:00
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
|
2005-11-08 04:36:13 +01:00
|
|
|
.if !defined(TOOLS_IGNORE.soelim) && !empty(_USE_TOOLS:Msoelim)
|
|
|
|
. if !empty(PKGPATH:Mtextproc/groff)
|
|
|
|
MAKEFLAGS+= TOOLS_IGNORE.soelim=
|
|
|
|
. elif !empty(_TOOLS_USE_PKGSRC.soelim:M[yY][eE][sS])
|
|
|
|
TOOLS_DEPENDS.soelim?= groff>=1.19nb4:../../textproc/groff
|
|
|
|
TOOLS_CREATE+= soelim
|
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.soelim=groff
|
|
|
|
TOOLS_PATH.soelim= ${TOOLS_PREFIX.soelim}/bin/soelim
|
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
|
2005-05-14 23:15:07 +02:00
|
|
|
.if !defined(TOOLS_IGNORE.tar) && !empty(_USE_TOOLS:Mtar)
|
|
|
|
. if !empty(PKGPATH:Marchivers/pax)
|
|
|
|
MAKEFLAGS+= TOOLS_IGNORE.tar=
|
|
|
|
. elif !empty(_TOOLS_USE_PKGSRC.tar:M[yY][eE][sS])
|
|
|
|
#
|
|
|
|
# This is installed by pkgsrc bootstrap, and is never registered, so
|
|
|
|
# comment out the dependency on it.
|
|
|
|
#
|
|
|
|
#TOOLS_DEPENDS.tar?= pax>=20040802:../../archivers/pax
|
|
|
|
TOOLS_CREATE+= tar
|
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.tar=pax
|
2005-07-17 23:36:24 +02:00
|
|
|
TOOLS_PATH.tar= ${TOOLS_PREFIX.tar}/bin/tar
|
2005-05-14 23:15:07 +02:00
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
|
2005-04-28 17:47:43 +02:00
|
|
|
.if !defined(TOOLS_IGNORE.tbl) && !empty(_USE_TOOLS:Mtbl)
|
Initial commit of the new tools framework. This is currently designed
to be a drop-in replacement for mk/tools.mk, but isn't yet enabled
pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk
instead of tools.mk.
The major changes from the old tools framework are:
(1) The new interface to using the tools framework is through setting
USE_TOOLS in the package Makefile, e.g.,
USE_TOOLS+= autoconf gmake yacc
(2) Bison/yacc handling is improved. Instead of adding checks for
/usr/bin/yacc to the package Makefile and explicitly setting YACC,
e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS.
If bison is explicitly required, then add "bison" to USE_TOOLS
instead.
(3) GNU auto* tools are handled differently. "autoconf", "aclocal",
"automake", etc. will be tools in ${TOOLS_DIR} that point to the
correct versions of the auto* tools. Instead of patching Makefiles
or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct
versions of the tools will be called if they are invoked simply
by their bare names. This is selected by adding either "autoconf"
or "autoconf213", or "automake" or "automake14" to USE_TOOLS.
The new tools framework will deprecate the following variables:
ACLOCAL AUTORECONF
AUTOCONF BUILD_USES_GETTEXT_M4
AUTOHEADER USE_GNU_TOOLS
AUTOMAKE USE_TBL
The new tools framework will deprecate the following *.mk files:
mk/autoconf.mk
mk/automake.mk
mk/tools.mk
Additional documentation on how to use bsd.tools.mk to create new tools
under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
|
|
|
. if !empty(PKGPATH:Mtextproc/groff)
|
|
|
|
MAKEFLAGS+= TOOLS_IGNORE.tbl=
|
2005-04-24 05:07:36 +02:00
|
|
|
. elif !empty(_TOOLS_USE_PKGSRC.tbl:M[yY][eE][sS])
|
2005-04-28 05:01:11 +02:00
|
|
|
TOOLS_DEPENDS.tbl?= groff>=1.19nb4:../../textproc/groff
|
2005-05-09 03:11:58 +02:00
|
|
|
TOOLS_CREATE+= tbl
|
2005-05-14 07:57:43 +02:00
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.tbl=groff
|
2005-07-17 23:36:24 +02:00
|
|
|
TOOLS_PATH.tbl= ${TOOLS_PREFIX.tbl}/bin/tbl
|
Initial commit of the new tools framework. This is currently designed
to be a drop-in replacement for mk/tools.mk, but isn't yet enabled
pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk
instead of tools.mk.
The major changes from the old tools framework are:
(1) The new interface to using the tools framework is through setting
USE_TOOLS in the package Makefile, e.g.,
USE_TOOLS+= autoconf gmake yacc
(2) Bison/yacc handling is improved. Instead of adding checks for
/usr/bin/yacc to the package Makefile and explicitly setting YACC,
e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS.
If bison is explicitly required, then add "bison" to USE_TOOLS
instead.
(3) GNU auto* tools are handled differently. "autoconf", "aclocal",
"automake", etc. will be tools in ${TOOLS_DIR} that point to the
correct versions of the auto* tools. Instead of patching Makefiles
or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct
versions of the tools will be called if they are invoked simply
by their bare names. This is selected by adding either "autoconf"
or "autoconf213", or "automake" or "automake14" to USE_TOOLS.
The new tools framework will deprecate the following variables:
ACLOCAL AUTORECONF
AUTOCONF BUILD_USES_GETTEXT_M4
AUTOHEADER USE_GNU_TOOLS
AUTOMAKE USE_TBL
The new tools framework will deprecate the following *.mk files:
mk/autoconf.mk
mk/automake.mk
mk/tools.mk
Additional documentation on how to use bsd.tools.mk to create new tools
under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
|
2005-11-09 00:06:38 +01:00
|
|
|
.if !defined(TOOLS_IGNORE.tclsh) && !empty(_USE_TOOLS:Mtclsh)
|
|
|
|
. if !empty(PKGPATH:Mlang/tcl)
|
|
|
|
MAKEFLAGS+= TOOLS_IGNORE.tclsh=
|
|
|
|
. elif !empty(_TOOLS_USE_PKGSRC.tclsh:M[yY][eE][sS])
|
|
|
|
TOOLS_DEPENDS.tclsh?= tcl>=8.4:../../lang/tcl
|
|
|
|
TOOLS_CREATE+= tclsh
|
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.tclsh=tcl
|
|
|
|
TOOLS_PATH.tclsh= ${TOOLS_PREFIX.tclsh}/bin/tclsh
|
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
|
2005-12-28 23:41:27 +01:00
|
|
|
.if !defined(TOOLS_IGNORE.ttmkfdir) && !empty(_USE_TOOLS:Mttmkfdir)
|
|
|
|
. if !empty(PKGPATH:Mfonts/ttmkfdir2)
|
|
|
|
MAKEFLAGS+= TOOLS_IGNORE.ttmkfdir=
|
|
|
|
. elif !empty(_TOOLS_USE_PKGSRC.ttmkfdir:M[yY][eE][sS])
|
|
|
|
TOOLS_DEPENDS.ttmkfdir?= ttmkfdir2>=20021109:../../fonts/ttmkfdir2
|
|
|
|
TOOLS_CREATE+= ttmkfdir
|
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.ttmkfdir=ttmkfdir2
|
|
|
|
TOOLS_PATH.ttmkfdir= ${TOOLS_PREFIX.ttmkfdir}/bin/ttmkfdir
|
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if !defined(TOOLS_IGNORE.type1inst) && !empty(_USE_TOOLS:Mtype1inst)
|
|
|
|
. if !empty(PKGPATH:Mfonts/type1inst)
|
|
|
|
MAKEFLAGS+= TOOLS_IGNORE.type1inst=
|
|
|
|
. elif !empty(_TOOLS_USE_PKGSRC.type1inst:M[yY][eE][sS])
|
|
|
|
TOOLS_DEPENDS.type1inst?= type1inst2>=0.6.1:../../fonts/type1inst
|
|
|
|
TOOLS_CREATE+= type1inst
|
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.type1inst=type1inst
|
|
|
|
TOOLS_PATH.type1inst= ${TOOLS_PREFIX.type1inst}/bin/type1inst
|
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
|
2005-05-14 00:08:20 +02:00
|
|
|
.if !defined(TOOLS_IGNORE.unrar) && !empty(_USE_TOOLS:Munrar)
|
|
|
|
. if !empty(PKGPATH:Marchivers/unrar)
|
|
|
|
MAKEFLAGS+= TOOLS_IGNORE.unrar=
|
|
|
|
. elif !empty(_TOOLS_USE_PKGSRC.unrar:M[yY][eE][sS])
|
|
|
|
TOOLS_DEPENDS.unrar?= unrar>=3.3.4:../../archivers/unrar
|
|
|
|
TOOLS_CREATE+= unrar
|
2005-05-14 07:57:43 +02:00
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.unrar=unrar
|
2005-07-17 23:36:24 +02:00
|
|
|
TOOLS_PATH.unrar= ${TOOLS_PREFIX.unrar}/bin/unrar
|
2005-05-14 00:08:20 +02:00
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if !defined(TOOLS_IGNORE.unzip) && !empty(_USE_TOOLS:Munzip)
|
|
|
|
. if !empty(PKGPATH:Marchivers/unzip)
|
|
|
|
MAKEFLAGS+= TOOLS_IGNORE.unzip=
|
|
|
|
. elif !empty(_TOOLS_USE_PKGSRC.unzip:M[yY][eE][sS])
|
|
|
|
TOOLS_DEPENDS.unzip?= unzip-[0-9]*:../../archivers/unzip
|
|
|
|
TOOLS_CREATE+= unzip
|
2005-05-14 07:57:43 +02:00
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.unzip=unzip
|
2005-07-17 23:36:24 +02:00
|
|
|
TOOLS_PATH.unzip= ${TOOLS_PREFIX.unzip}/bin/unzip
|
2005-05-14 00:08:20 +02:00
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if !defined(TOOLS_IGNORE.unzoo) && !empty(_USE_TOOLS:Munzoo)
|
|
|
|
. if !empty(PKGPATH:Marchivers/unzoo)
|
|
|
|
MAKEFLAGS+= TOOLS_IGNORE.unzoo=
|
|
|
|
. elif !empty(_TOOLS_USE_PKGSRC.unzoo:M[yY][eE][sS])
|
|
|
|
TOOLS_DEPENDS.unzoo?= unzoo-[0-9]*:../../archivers/unzoo
|
|
|
|
TOOLS_CREATE+= unzoo
|
2005-05-14 07:57:43 +02:00
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.unzoo=unzoo
|
2005-07-17 23:36:24 +02:00
|
|
|
TOOLS_PATH.unzoo= ${TOOLS_PREFIX.unzoo}/bin/unzoo
|
2005-05-14 00:08:20 +02:00
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
|
2005-11-09 00:06:38 +01:00
|
|
|
.if !defined(TOOLS_IGNORE.wish) && !empty(_USE_TOOLS:Mwish)
|
|
|
|
. if !empty(PKGPATH:Mx11/tk)
|
|
|
|
MAKEFLAGS+= TOOLS_IGNORE.wish=
|
|
|
|
. elif !empty(_TOOLS_USE_PKGSRC.wish:M[yY][eE][sS])
|
|
|
|
TOOLS_DEPENDS.wish?= tk>=8.4:../../x11/tk
|
|
|
|
TOOLS_CREATE+= wish
|
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.wish=tk
|
|
|
|
TOOLS_PATH.wish= ${TOOLS_PREFIX.wish}/bin/wish
|
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
|
2005-04-28 17:47:43 +02:00
|
|
|
.if !defined(TOOLS_IGNORE.xargs) && !empty(_USE_TOOLS:Mxargs)
|
2005-04-28 05:57:39 +02:00
|
|
|
. if !empty(PKGPATH:Msysutils/findutils)
|
|
|
|
MAKEFLAGS+= TOOLS_IGNORE.xargs=
|
|
|
|
. elif !empty(_TOOLS_USE_PKGSRC.xargs:M[yY][eE][sS])
|
|
|
|
TOOLS_DEPENDS.xargs?= findutils>=4.1:../../sysutils/findutils
|
2005-05-09 03:11:58 +02:00
|
|
|
TOOLS_CREATE+= xargs
|
2005-05-14 07:57:43 +02:00
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.xargs=findutils
|
2005-07-17 23:36:24 +02:00
|
|
|
TOOLS_PATH.xargs= ${TOOLS_PREFIX.xargs}/bin/${GNU_PROGRAM_PREFIX}xargs
|
|
|
|
TOOLS_ARGS.xargs= -r # don't run command if stdin is empty
|
2005-04-28 05:57:39 +02:00
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
|
2005-04-28 17:47:43 +02:00
|
|
|
.if !defined(TOOLS_IGNORE.yacc) && !empty(_USE_TOOLS:Myacc)
|
Initial commit of the new tools framework. This is currently designed
to be a drop-in replacement for mk/tools.mk, but isn't yet enabled
pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk
instead of tools.mk.
The major changes from the old tools framework are:
(1) The new interface to using the tools framework is through setting
USE_TOOLS in the package Makefile, e.g.,
USE_TOOLS+= autoconf gmake yacc
(2) Bison/yacc handling is improved. Instead of adding checks for
/usr/bin/yacc to the package Makefile and explicitly setting YACC,
e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS.
If bison is explicitly required, then add "bison" to USE_TOOLS
instead.
(3) GNU auto* tools are handled differently. "autoconf", "aclocal",
"automake", etc. will be tools in ${TOOLS_DIR} that point to the
correct versions of the auto* tools. Instead of patching Makefiles
or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct
versions of the tools will be called if they are invoked simply
by their bare names. This is selected by adding either "autoconf"
or "autoconf213", or "automake" or "automake14" to USE_TOOLS.
The new tools framework will deprecate the following variables:
ACLOCAL AUTORECONF
AUTOCONF BUILD_USES_GETTEXT_M4
AUTOHEADER USE_GNU_TOOLS
AUTOMAKE USE_TBL
The new tools framework will deprecate the following *.mk files:
mk/autoconf.mk
mk/automake.mk
mk/tools.mk
Additional documentation on how to use bsd.tools.mk to create new tools
under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
|
|
|
. if !empty(PKGPATH:Mdevel/bison)
|
|
|
|
MAKEFLAGS+= TOOLS_IGNORE.yacc=
|
2005-04-24 05:07:36 +02:00
|
|
|
. elif !empty(_TOOLS_USE_PKGSRC.yacc:M[yY][eE][sS])
|
2005-04-28 05:01:11 +02:00
|
|
|
TOOLS_DEPENDS.yacc?= bison>=1.0:../../devel/bison
|
2005-05-09 03:11:58 +02:00
|
|
|
TOOLS_CREATE+= yacc
|
2005-05-14 07:57:43 +02:00
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.yacc=bison
|
2005-07-17 23:36:24 +02:00
|
|
|
TOOLS_PATH.yacc= ${TOOLS_PREFIX.yacc}/bin/bison
|
|
|
|
TOOLS_ARGS.yacc= -y
|
2005-12-22 19:55:41 +01:00
|
|
|
#
|
|
|
|
# bison/yacc is typically a build tool whose path is not embedded in
|
|
|
|
# any scripts or config files. In this case, pass the full command
|
|
|
|
# line (path and arguments) of the tool to the GNU configure script
|
|
|
|
# so that bison will be correctly invoked in yacc-compatilility mode.
|
|
|
|
#
|
|
|
|
TOOLS_VALUE_GNU.yacc= ${TOOLS_CMDLINE.yacc}
|
Initial commit of the new tools framework. This is currently designed
to be a drop-in replacement for mk/tools.mk, but isn't yet enabled
pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk
instead of tools.mk.
The major changes from the old tools framework are:
(1) The new interface to using the tools framework is through setting
USE_TOOLS in the package Makefile, e.g.,
USE_TOOLS+= autoconf gmake yacc
(2) Bison/yacc handling is improved. Instead of adding checks for
/usr/bin/yacc to the package Makefile and explicitly setting YACC,
e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS.
If bison is explicitly required, then add "bison" to USE_TOOLS
instead.
(3) GNU auto* tools are handled differently. "autoconf", "aclocal",
"automake", etc. will be tools in ${TOOLS_DIR} that point to the
correct versions of the auto* tools. Instead of patching Makefiles
or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct
versions of the tools will be called if they are invoked simply
by their bare names. This is selected by adding either "autoconf"
or "autoconf213", or "automake" or "automake14" to USE_TOOLS.
The new tools framework will deprecate the following variables:
ACLOCAL AUTORECONF
AUTOCONF BUILD_USES_GETTEXT_M4
AUTOHEADER USE_GNU_TOOLS
AUTOMAKE USE_TBL
The new tools framework will deprecate the following *.mk files:
mk/autoconf.mk
mk/automake.mk
mk/tools.mk
Additional documentation on how to use bsd.tools.mk to create new tools
under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
|
2005-11-08 18:38:52 +01:00
|
|
|
######################################################################
|
|
|
|
|
|
|
|
# These tools are all supplied by the sysutuils/coreutils package if
|
|
|
|
# there is no native tool available.
|
|
|
|
#
|
|
|
|
_TOOLS.coreutils= basename cat chgrp chmod chown cp cut date \
|
|
|
|
dirname echo env expr false head hostname id \
|
|
|
|
install ln ls mkdir mv nice printf pwd rm rmdir \
|
|
|
|
sleep sort tail tee test touch tr true tsort wc
|
|
|
|
|
|
|
|
.for _t_ in ${_TOOLS.coreutils}
|
|
|
|
. if !defined(TOOLS_IGNORE.${_t_}) && !empty(_USE_TOOLS:M${_t_})
|
|
|
|
. if !empty(PKGPATH:Msysutils/coreutils)
|
|
|
|
MAKEFLAGS+= TOOLS_IGNORE.${_t_}=
|
2005-11-28 06:39:20 +01:00
|
|
|
. elif !empty(_TOOLS_USE_PKGSRC.${_t_}:M[yY][eE][sS])
|
2005-11-08 18:38:52 +01:00
|
|
|
TOOLS_DEPENDS.${_t_}?= coreutils>=5.2.1:../../sysutils/coreutils
|
|
|
|
TOOLS_CREATE+= ${_t_}
|
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.${_t_}=coreutils
|
|
|
|
TOOLS_PATH.${_t_}= ${TOOLS_PREFIX.${_t_}}/bin/${GNU_PROGRAM_PREFIX}${_t_}
|
|
|
|
. endif
|
|
|
|
. endif
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
# The ``['' tool is special because it matches a token that's interpreted
|
|
|
|
# by bmake.
|
|
|
|
#
|
|
|
|
.if !defined(TOOLS_IGNORE.[) && !empty(_USE_TOOLS:M\[)
|
|
|
|
. if !empty(PKGPATH:Msysutils/coreutils)
|
|
|
|
MAKEFLAGS+= TOOLS_IGNORE.[=
|
|
|
|
. elif !empty(_TOOLS_USE_PKGSRC.[:M[yY][eE][sS])
|
|
|
|
TOOLS_DEPENDS.[?= coreutils>=5.2.1:../../sysutils/coreutils
|
|
|
|
TOOLS_CREATE+= [
|
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.[=coreutils
|
|
|
|
TOOLS_PATH.[= ${TOOLS_PREFIX.[}/bin/${GNU_PROGRAM_PREFIX}[
|
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
|
|
|
|
######################################################################
|
|
|
|
|
|
|
|
# These tools are all supplied by the textproc/grep package if there is
|
|
|
|
# no native tool available.
|
|
|
|
#
|
|
|
|
_TOOLS.grep= egrep fgrep grep
|
|
|
|
|
|
|
|
.for _t_ in ${_TOOLS.grep}
|
|
|
|
. if !defined(TOOLS_IGNORE.${_t_}) && !empty(_USE_TOOLS:M${_t_})
|
|
|
|
. if !empty(PKGPATH:Mtextproc/grep)
|
|
|
|
MAKEFLAGS+= TOOLS_IGNORE.${_t_}=
|
2005-11-28 06:39:20 +01:00
|
|
|
. elif !empty(_TOOLS_USE_PKGSRC.${_t_}:M[yY][eE][sS])
|
2005-11-08 18:38:52 +01:00
|
|
|
TOOLS_DEPENDS.${_t_}?= grep>=2.5.1:../../textproc/grep
|
|
|
|
TOOLS_CREATE+= ${_t_}
|
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.${_t_}=grep
|
|
|
|
TOOLS_PATH.${_t_}= ${TOOLS_PREFIX.${_t_}}/bin/${GNU_PROGRAM_PREFIX}${_t_}
|
|
|
|
. endif
|
|
|
|
. endif
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
######################################################################
|
|
|
|
|
|
|
|
# These tools are all supplied by the devel/diffutils package if there is
|
|
|
|
# no native tool available.
|
|
|
|
#
|
|
|
|
_TOOLS.diffutils= cmp diff
|
|
|
|
|
|
|
|
.for _t_ in ${_TOOLS.diffutils}
|
|
|
|
. if !defined(TOOLS_IGNORE.${_t_}) && !empty(_USE_TOOLS:M${_t_})
|
|
|
|
. if !empty(PKGPATH:Mdevel/diffutils)
|
|
|
|
MAKEFLAGS+= TOOLS_IGNORE.${_t_}=
|
2005-11-28 06:39:20 +01:00
|
|
|
. elif !empty(_TOOLS_USE_PKGSRC.${_t_}:M[yY][eE][sS])
|
2005-11-08 18:38:52 +01:00
|
|
|
TOOLS_DEPENDS.${_t_}?= diffutils>=2.8.1:../../devel/diffutils
|
|
|
|
TOOLS_CREATE+= ${_t_}
|
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.${_t_}=diffutils
|
|
|
|
TOOLS_PATH.${_t_}= ${TOOLS_PREFIX.${_t_}}/bin/${GNU_PROGRAM_PREFIX}${_t_}
|
|
|
|
. endif
|
|
|
|
. endif
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
######################################################################
|
|
|
|
|
2005-11-28 07:06:16 +01:00
|
|
|
# These tools are all supplied by a Ghostscript package if there is no
|
|
|
|
# native tool available.
|
|
|
|
#
|
|
|
|
_TOOLS.ghostscript= gs pdf2ps ps2pdf
|
|
|
|
|
|
|
|
# This is the minimum version of Ghostscript required by the current
|
|
|
|
# package.
|
|
|
|
#
|
|
|
|
GHOSTSCRIPT_REQD?= 6.01
|
|
|
|
|
|
|
|
# Set TOOLS_DEPENDS.ghostscript to an appropriate dependency based on
|
|
|
|
# various package options.
|
|
|
|
#
|
|
|
|
.if !defined(TOOLS_DEPENDS.ghostscript)
|
|
|
|
_TOOLS_DEP.ghostscript:= ghostscript
|
|
|
|
_TOOLS_DEP.ghostscript:= ${_TOOLS_DEP.ghostscript},ghostscript-afpl
|
|
|
|
_TOOLS_DEP.ghostscript:= ${_TOOLS_DEP.ghostscript},ghostscript-esp
|
|
|
|
_TOOLS_DEP.ghostscript:= ${_TOOLS_DEP.ghostscript},ghostscript-gnu
|
|
|
|
#
|
|
|
|
# Determine the default Ghostscript package to build based on the
|
|
|
|
# PKG_OPTIONS for the current package.
|
|
|
|
#
|
2005-12-01 19:38:45 +01:00
|
|
|
. if (defined(PKG_OPTIONS) && !empty(PKG_OPTIONS:Mcups))
|
2005-12-01 10:24:09 +01:00
|
|
|
_TOOLS_PKGSRCDIR.ghostscript= ../../print/ghostscript-esp
|
2005-12-01 19:38:45 +01:00
|
|
|
. else
|
2005-11-28 07:06:16 +01:00
|
|
|
_TOOLS_PKGSRCDIR.ghostscript= ../../print/ghostscript-gnu
|
|
|
|
. endif
|
|
|
|
TOOLS_DEPENDS.ghostscript= {${_TOOLS_DEP.ghostscript}}>=${GHOSTSCRIPT_REQD}:${_TOOLS_PKGSRCDIR.ghostscript}
|
|
|
|
MAKEVARS+= ${TOOLS_DEPENDS.ghostscript}
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.for _t_ in ${_TOOLS.ghostscript}
|
|
|
|
. if !defined(TOOLS_IGNORE.${_t_}) && !empty(_USE_TOOLS:M${_t_})
|
|
|
|
. if !empty(PKGPATH:Mprint/ghostscript) || \
|
|
|
|
!empty(PKGPATH:Mprint/ghostscript-afpl) || \
|
|
|
|
!empty(PKGPATH:Mprint/ghostscript-esp) || \
|
2005-12-09 21:32:22 +01:00
|
|
|
!empty(PKGPATH:Mprint/ghostscript-gnu)
|
2005-11-28 07:06:16 +01:00
|
|
|
MAKEFLAGS+= TOOLS_IGNORE.${_t_}=
|
|
|
|
. elif !empty(_TOOLS_USE_PKGSRC.${_t_}:M[yY][eE][sS])
|
|
|
|
TOOLS_DEPENDS.${_t_}?= ${TOOLS_DEPENDS.ghostscript}
|
|
|
|
TOOLS_CREATE+= ${_t_}
|
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.${_t_}=${TOOLS_DEPENDS.ghostscript:C/:.*//}
|
|
|
|
TOOLS_PATH.${_t_}= ${TOOLS_PREFIX.${_t_}}/bin/${_t_}
|
|
|
|
. endif
|
|
|
|
. endif
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
######################################################################
|
|
|
|
|
2005-11-08 18:38:52 +01:00
|
|
|
# These tools are all supplied by an X11 clients package if there is no
|
|
|
|
# native tool available.
|
|
|
|
#
|
2005-12-28 05:24:37 +01:00
|
|
|
_TOOLS.x11-clients= bdftopcf iceauth mkfontdir mkfontscale \
|
|
|
|
makepsres xmessage
|
2005-11-08 18:38:52 +01:00
|
|
|
|
|
|
|
.for _t_ in ${_TOOLS.x11-clients}
|
|
|
|
. if !defined(TOOLS_IGNORE.${_t_}) && !empty(_USE_TOOLS:M${_t_})
|
|
|
|
. if !empty(PKGPATH:Mx11/XFree86-clients) || \
|
|
|
|
!empty(PKGPATH:Mx11/xorg-clients)
|
|
|
|
MAKEFLAGS+= TOOLS_IGNORE.${_t_}=
|
|
|
|
. elif !empty(_TOOLS_USE_PKGSRC.${_t_}:M[yY][eE][sS])
|
|
|
|
TOOLS_CREATE+= ${_t_}
|
|
|
|
. if defined(X11_TYPE) && !empty(X11_TYPE:MXFree86)
|
|
|
|
TOOLS_DEPENDS.${_t_}?= XFree86-clients>=4.4.0:../../x11/XFree86-clients
|
2005-12-28 17:46:38 +01:00
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.${_t_}=XFree86-clients
|
2005-11-08 18:38:52 +01:00
|
|
|
TOOLS_PATH.${_t_}= ${TOOLS_PREFIX.${_t_}}/${X11ROOT_PREFIX}/bin/${_t_}
|
|
|
|
. elif defined(X11_TYPE) && !empty(X11_TYPE:Mxorg)
|
|
|
|
TOOLS_DEPENDS.${_t_}?= xorg-clients>=6.8:../../x11/xorg-clients
|
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.${_t_}=xorg-clients
|
|
|
|
TOOLS_PATH.${_t_}= ${TOOLS_PREFIX.${_t_}}/${X11ROOT_PREFIX}/bin/${_t_}
|
|
|
|
. else # !empty(X11_TYPE:Mnative)
|
|
|
|
TOOLS_PATH.${_t_}= ${X11BASE}/bin/${_t_}
|
|
|
|
. endif
|
|
|
|
. endif
|
|
|
|
. endif
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
######################################################################
|
|
|
|
|
2005-12-22 15:49:10 +01:00
|
|
|
# These tools are all supplied by an X11 imake package if there is no
|
|
|
|
# native tool available.
|
|
|
|
#
|
2005-12-28 23:21:19 +01:00
|
|
|
_TOOLS.x11-imake= imake mkdirhier xmkmf
|
2005-12-22 15:49:10 +01:00
|
|
|
|
|
|
|
.for _t_ in ${_TOOLS.x11-imake}
|
|
|
|
. if !defined(TOOLS_IGNORE.${_t_}) && !empty(_USE_TOOLS:M${_t_})
|
|
|
|
. if !empty(PKGPATH:Mx11/XFree86-imake) || !empty(PKGPATH:Mx11/xorg-imake)
|
2005-12-28 23:26:50 +01:00
|
|
|
MAKEFLAGS+= TOOLS_IGNORE.${_t_}=
|
2005-12-22 15:49:10 +01:00
|
|
|
. elif !empty(_TOOLS_USE_PKGSRC.${_t_}:M[yY][eE][sS])
|
2005-12-28 23:26:50 +01:00
|
|
|
TOOLS_CREATE+= ${_t}
|
2005-12-22 15:49:10 +01:00
|
|
|
. if defined(X11_TYPE) && !empty(X11_TYPE:MXFree86)
|
2005-12-28 23:26:50 +01:00
|
|
|
TOOLS_DEPENDS.${_t_}?= XFree86-imake>=4.4.0:../../x11/XFree86-imake
|
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.${_t_}=imake
|
|
|
|
TOOLS_PATH.${_t_}= ${TOOLS_PREFIX.${_t_}}/${X11ROOT_PREFIX}/bin/${_t_}
|
2005-12-22 15:49:10 +01:00
|
|
|
. elif defined(X11_TYPE) && !empty(X11_TYPE:Mxorg)
|
2005-12-28 23:26:50 +01:00
|
|
|
TOOLS_DEPENDS.${_t_}?= xorg-imake>=6.8:../../x11/xorg-imake
|
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.${_t_}=xorg-imake
|
|
|
|
TOOLS_PATH.${_t_}= ${TOOLS_PREFIX.${_t_}}/${X11ROOT_PREFIX}/bin/${_t_}
|
|
|
|
. else # !empty(X11_TYPE:Mnative)
|
|
|
|
TOOLS_PATH.${_t_}= ${X11BASE}/bin/${_t_}
|
2005-12-22 15:49:10 +01:00
|
|
|
. endif
|
|
|
|
. endif
|
|
|
|
. endif
|
|
|
|
.endfor
|
2005-12-28 23:21:19 +01:00
|
|
|
#
|
|
|
|
# If we're using xpkgwedge, then we need to invoke the special xmkmf
|
|
|
|
# script that will find imake config files in both ${PREFIX} and in
|
|
|
|
# ${X11BASE}.
|
|
|
|
#
|
|
|
|
.if !defined(TOOLS_IGNORE.xmkmf) && !empty(_USE_TOOLS:Mxmkmf)
|
|
|
|
. if !empty(USE_XPKGWEDGE:M[yY][eE][sS])
|
|
|
|
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.xpkgwedge=xpkgwedge
|
|
|
|
TOOLS_PATH.xmkmf= ${TOOLS_PREFIX.xpkgwedge}/bin/pkgxmkmf
|
|
|
|
. endif
|
|
|
|
.endif
|
2005-12-22 15:49:10 +01:00
|
|
|
|
|
|
|
######################################################################
|
|
|
|
|
2005-05-14 07:57:43 +02:00
|
|
|
# Compute the locations of the pkgsrc-supplied tools.
|
|
|
|
FIND_PREFIX:= ${TOOLS_FIND_PREFIX}
|
|
|
|
.include "../../mk/find-prefix.mk"
|
|
|
|
|
Make a distinction between the tools that pkgsrc needs and the tools
that a package needs. Tools that pkgsrc needs are listed in
PKGSRC_USE_TOOLS, and tools that a package needs on top of that are
listed in USE_TOOLS.
Define "TOOL" variables, e.g. SED, AWK, MKDIR, etc. for each of the
tools that pkgsrc needs, and "TOOLS_TOOL" variables, e.g. TOOLS_SED,
TOOLS_AWK, TOOLS_MKDIR, etc. for each of the tools that a package
needs. These variables contain the full command line to the real
command and arguments needed to invoke the tool.
2005-05-10 21:06:58 +02:00
|
|
|
######################################################################
|
|
|
|
|
2005-04-28 17:51:10 +02:00
|
|
|
.for _t_ in ${_USE_TOOLS}
|
2005-07-25 23:51:19 +02:00
|
|
|
. if !empty(_TOOLS_USE_PKGSRC.${_t_}:M[yY][eE][sS]) && \
|
|
|
|
!defined(TOOLS_IGNORE.${_t_})
|
2005-07-18 04:33:27 +02:00
|
|
|
#####
|
|
|
|
##### Add the dependencies for each pkgsrc-supplied tool.
|
|
|
|
#####
|
|
|
|
. if defined(_TOOLS_DEPMETHOD.${_t_}) && defined(TOOLS_DEPENDS.${_t_})
|
|
|
|
. for _dep_ in ${TOOLS_DEPENDS.${_t_}}
|
|
|
|
. if empty(${_TOOLS_DEPMETHOD.${_t_}}:C/\:.*$//:M${_dep_:C/\:.*$//})
|
2005-07-15 22:14:02 +02:00
|
|
|
${_TOOLS_DEPMETHOD.${_t_}}+= ${_dep_}
|
2005-07-18 04:33:27 +02:00
|
|
|
. endif
|
|
|
|
. endfor
|
2005-05-19 04:27:38 +02:00
|
|
|
. endif
|
2005-07-25 23:51:19 +02:00
|
|
|
. elif defined(TOOLS_PLATFORM.${_t_}) && !empty(TOOLS_PLATFORM.${_t_})
|
2005-07-18 04:33:27 +02:00
|
|
|
#####
|
|
|
|
##### For each system-supplied tool, break the tool down into a path
|
|
|
|
##### and arguments so that either a symlink or a wrapper will be
|
|
|
|
##### properly created.
|
|
|
|
#####
|
|
|
|
TOOLS_CREATE+= ${_t_}
|
|
|
|
TOOLS_PATH.${_t_}?= \
|
|
|
|
${TOOLS_PLATFORM.${_t_}:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//}
|
|
|
|
TOOLS_ARGS.${_t_}?= \
|
|
|
|
${TOOLS_PLATFORM.${_t_}:C/^/_asdf_/1:N_asdf_*}
|
|
|
|
. endif
|
|
|
|
###
|
|
|
|
### For each tool, TOOLS_CMDLINE.<tool> is the full command (path and
|
|
|
|
### arguments) that should be run to properly execute the tool.
|
|
|
|
###
|
2005-07-18 23:40:55 +02:00
|
|
|
. if defined(TOOLS_PATH.${_t_}) && !empty(TOOLS_PATH.${_t_})
|
|
|
|
. if defined(TOOLS_ARGS.${_t_}) && !empty(TOOLS_ARGS.${_t_})
|
2005-07-18 04:33:27 +02:00
|
|
|
TOOLS_CMDLINE.${_t_}?= ${TOOLS_PATH.${_t_}} ${TOOLS_ARGS.${_t_}}
|
2005-07-18 23:40:55 +02:00
|
|
|
. else
|
|
|
|
TOOLS_CMDLINE.${_t_}?= ${TOOLS_PATH.${_t_}}
|
|
|
|
. endif
|
2005-07-18 04:33:27 +02:00
|
|
|
. endif
|
|
|
|
###
|
|
|
|
### If a "TOOL" name is associated with the tool, then export two
|
|
|
|
### variables:
|
|
|
|
###
|
|
|
|
### (1) The "TOOLS_TOOL" name for each tool points to the path
|
|
|
|
### to the real command, e.g. TOOLS_TBL, TOOLS_YACC, etc.
|
|
|
|
###
|
|
|
|
### (2) The "TOOLS_CMDLINE_TOOL" name for each tool to point to the
|
|
|
|
### full command, e.g. TOOLS_CMDLINE_TBL, TOOLS_CMDLINE_YACC,
|
|
|
|
### etc.
|
|
|
|
###
|
|
|
|
. if defined(_TOOLS_VARNAME.${_t_})
|
|
|
|
. if defined(TOOLS_PATH.${_t_})
|
|
|
|
TOOLS_${_TOOLS_VARNAME.${_t_}}= ${TOOLS_PATH.${_t_}}
|
|
|
|
. endif
|
|
|
|
. if defined(TOOLS_CMDLINE.${_t_})
|
|
|
|
TOOLS_CMDLINE_${_TOOLS_VARNAME.${_t_}}= ${TOOLS_CMDLINE.${_t_}}
|
|
|
|
. for _v_ in ${_TOOLS_VARNAME.${_t_}}
|
|
|
|
${_v_}?= ${TOOLS_CMDLINE_${_TOOLS_VARNAME.${_t_}}}
|
|
|
|
. endfor
|
|
|
|
. endif
|
2005-04-28 05:01:11 +02:00
|
|
|
. endif
|
|
|
|
.endfor
|
|
|
|
|
Initial commit of the new tools framework. This is currently designed
to be a drop-in replacement for mk/tools.mk, but isn't yet enabled
pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk
instead of tools.mk.
The major changes from the old tools framework are:
(1) The new interface to using the tools framework is through setting
USE_TOOLS in the package Makefile, e.g.,
USE_TOOLS+= autoconf gmake yacc
(2) Bison/yacc handling is improved. Instead of adding checks for
/usr/bin/yacc to the package Makefile and explicitly setting YACC,
e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS.
If bison is explicitly required, then add "bison" to USE_TOOLS
instead.
(3) GNU auto* tools are handled differently. "autoconf", "aclocal",
"automake", etc. will be tools in ${TOOLS_DIR} that point to the
correct versions of the auto* tools. Instead of patching Makefiles
or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct
versions of the tools will be called if they are invoked simply
by their bare names. This is selected by adding either "autoconf"
or "autoconf213", or "automake" or "automake14" to USE_TOOLS.
The new tools framework will deprecate the following variables:
ACLOCAL AUTORECONF
AUTOCONF BUILD_USES_GETTEXT_M4
AUTOHEADER USE_GNU_TOOLS
AUTOMAKE USE_TBL
The new tools framework will deprecate the following *.mk files:
mk/autoconf.mk
mk/automake.mk
mk/tools.mk
Additional documentation on how to use bsd.tools.mk to create new tools
under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
|
|
|
######################################################################
|
|
|
|
|
2005-07-17 00:33:18 +02:00
|
|
|
# For each tool that pkgsrc requires, make sure that the "TOOL" name
|
|
|
|
# points to the real command, e.g., AWK, SED, etc., provided that
|
|
|
|
# "TOOL" has been associated with <tool>.
|
2005-05-11 07:05:03 +02:00
|
|
|
#
|
2005-07-17 00:33:18 +02:00
|
|
|
.for _t_ in ${USE_TOOLS:M*\:pkgsrc:C/:.*//:O:u}
|
2005-05-11 07:05:03 +02:00
|
|
|
_TOOLS_USE_PKGSRC.${_t_}?= no
|
|
|
|
. if defined(_TOOLS_VARNAME.${_t_})
|
|
|
|
. if !empty(_TOOLS_USE_PKGSRC.${_t_}:M[nN][oO])
|
|
|
|
. if defined(TOOLS_PLATFORM.${_t_}) && !empty(TOOLS_PLATFORM.${_t_})
|
2005-05-13 23:57:13 +02:00
|
|
|
${_TOOLS_VARNAME.${_t_}}= ${TOOLS_PLATFORM.${_t_}}
|
2005-05-11 07:05:03 +02:00
|
|
|
. endif
|
|
|
|
. else
|
2005-05-13 23:57:13 +02:00
|
|
|
${_TOOLS_VARNAME.${_t_}}= ${TOOLS_${_TOOLS_VARNAME.${_t_}}}
|
2005-05-11 07:05:03 +02:00
|
|
|
. endif
|
|
|
|
. endif
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
######################################################################
|
|
|
|
|
2005-07-19 06:18:51 +02:00
|
|
|
# For packages that use GNU configure scripts, pass the appropriate
|
|
|
|
# environment variables to ensure the proper command is invoked for
|
|
|
|
# each tool. We do this since these paths may be hardcoded into
|
|
|
|
# package scripts, and if they're not pre-specified, then they'll be
|
|
|
|
# searched for in the PATH, which would find the ones in ${TOOLS_DIR}.
|
|
|
|
#
|
|
|
|
# The value passed via the shell environment is stored in
|
|
|
|
# TOOLS_VALUE_GNU.<tool>, which defaults to just the path to the
|
|
|
|
# tool.
|
2005-05-22 01:09:36 +02:00
|
|
|
#
|
2005-07-19 06:18:51 +02:00
|
|
|
.for _t_ in ${_USE_TOOLS}
|
|
|
|
. if defined(GNU_CONFIGURE)
|
2005-05-22 03:56:27 +02:00
|
|
|
. if defined(TOOLS_${_TOOLS_VARNAME.${_t_}})
|
2005-07-19 06:18:51 +02:00
|
|
|
TOOLS_VALUE_GNU.${_t_}?= ${TOOLS_PATH.${_t_}}
|
|
|
|
. endif
|
|
|
|
. if defined(TOOLS_VALUE_GNU.${_t_})
|
2005-05-22 03:56:27 +02:00
|
|
|
. for _v_ in ${_TOOLS_VARNAME_GNU.${_t_}}
|
2005-07-19 06:18:51 +02:00
|
|
|
CONFIGURE_ENV+= ${_v_}=${TOOLS_VALUE_GNU.${_t_}:Q}
|
2005-05-22 03:56:27 +02:00
|
|
|
. endfor
|
2005-05-22 01:09:36 +02:00
|
|
|
. endif
|
2005-07-19 06:18:51 +02:00
|
|
|
. endif
|
|
|
|
.endfor
|