pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk Teach the tools framework about the following new t...
details: https://anonhg.NetBSD.org/pkgsrc/rev/7ac76710b84d
branches: trunk
changeset: 515619:7ac76710b84d
user: jlam <jlam%pkgsrc.org@localhost>
date: Wed Jul 05 04:32:10 2006 +0000
description:
Teach the tools framework about the following new tools:
itools, intltool, diff3, sdiff, msgmerge
* Adding USE_TOOLS+=itools to a package Makefile will cause the
tool-directory versions of imake, makedepend, mkdirhier and xmkmf
to point to the ones from the devel/nbitools package.
This change will remove the need for nbitools/buildlink3.mk, which
currently does a bit of hackery to force the "right" imake tools to
be used by packages that need it.
* Adding USE_TOOLS+=intltool to a package Makefile will cause the
local versions of intltool-* inside ${WRKSRC} to be replaced by
copies from the textproc/intltool package. If "intltool" is not
specified as a tool, then we create "broken" intltool-* tools in
the tools directory to help highlight hidden dependencies on the
intltool package.
In addition, modify the tools framework so that if "perl" is not
specified as a tool, then we create a "broken" perl tool in the
tools directory for the same reason as for "intltool".
These two changes together will remove the need for
intltools/buildlink3.mk and should also catch all cases where the
sources' intltools may have been silently used because perl was
found on the system.
* Adding USE_TOOLS+=diff3, USE_TOOLS+=sdiff, or USE_TOOLS+=msgmerge
to a package Makefile will cause the corresponding tool to be pulled
into the tools directory.
These are convenience tools to help simplify dependencies for some
packages.
diffstat:
mk/bsd.pkg.use.mk | 8 ++-
mk/tools/bsd.tools.mk | 3 +-
mk/tools/gettext.mk | 4 +-
mk/tools/imake.mk | 19 +++++++-
mk/tools/intltool.mk | 93 +++++++++++++++++++++++++++++++++++++++++++++
mk/tools/perl.mk | 8 +++-
mk/tools/replace.mk | 16 +++++--
mk/tools/tools.DragonFly.mk | 4 +-
mk/tools/tools.FreeBSD.mk | 4 +-
mk/tools/tools.Linux.mk | 12 +++++-
mk/tools/tools.NetBSD.mk | 4 +-
mk/tools/tools.OpenBSD.mk | 4 +-
mk/tools/tools.SunOS.mk | 12 +++++-
mk/wrapper/bsd.wrapper.mk | 4 +-
14 files changed, 173 insertions(+), 22 deletions(-)
diffs (truncated from 455 to 300 lines):
diff -r 319a8b9d1693 -r 7ac76710b84d mk/bsd.pkg.use.mk
--- a/mk/bsd.pkg.use.mk Wed Jul 05 03:46:22 2006 +0000
+++ b/mk/bsd.pkg.use.mk Wed Jul 05 04:32:10 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.use.mk,v 1.34 2006/06/03 23:11:42 jlam Exp $
+# $NetBSD: bsd.pkg.use.mk,v 1.35 2006/07/05 04:32:10 jlam Exp $
#
# Turn USE_* macros into proper depedency logic. Included near the top of
# bsd.pkg.mk, after bsd.prefs.mk.
@@ -24,8 +24,11 @@
PLIST_SUBST+= IMAKE_MANNEWSUFFIX=${IMAKE_MANNEWSUFFIX:Q}
.endif
+.if defined(USE_IMAKE) && empty(USE_TOOLS:Mitools)
+USE_X11BASE?= implied
+.endif
+
.if defined(USE_IMAKE)
-USE_X11BASE?= implied
MAKE_FLAGS+= CC=${CC:Q} CXX=${CXX:Q}
.endif
@@ -98,6 +101,7 @@
.if (defined(USE_X11BASE) || \
defined(USE_IMAKE) || !empty(USE_TOOLS:Mimake) || \
!empty(USE_TOOLS:Mimake\:*:Nimake\:pkgsrc)) && \
+ empty(USE_TOOLS:Mitools) && \
empty(PKGPATH:Mpkgtools/xpkgwedge) && \
!empty(USE_XPKGWEDGE:M[yY][eE][sS])
BUILD_DEPENDS+= xpkgwedge>=${_XPKGWEDGE_REQD:U1.15}:../../pkgtools/xpkgwedge
diff -r 319a8b9d1693 -r 7ac76710b84d mk/tools/bsd.tools.mk
--- a/mk/tools/bsd.tools.mk Wed Jul 05 03:46:22 2006 +0000
+++ b/mk/tools/bsd.tools.mk Wed Jul 05 04:32:10 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.tools.mk,v 1.37 2006/06/16 19:15:19 jlam Exp $
+# $NetBSD: bsd.tools.mk,v 1.38 2006/07/05 04:32:10 jlam Exp $
#
# Copyright (c) 2005, 2006 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -141,6 +141,7 @@
.include "${PKGSRCDIR}/mk/tools/autoconf.mk"
.include "${PKGSRCDIR}/mk/tools/texinfo.mk"
.include "${PKGSRCDIR}/mk/tools/gettext.mk"
+.include "${PKGSRCDIR}/mk/tools/intltool.mk"
.include "${PKGSRCDIR}/mk/tools/ldconfig.mk"
.include "${PKGSRCDIR}/mk/tools/rpcgen.mk"
.include "${PKGSRCDIR}/mk/tools/strip.mk"
diff -r 319a8b9d1693 -r 7ac76710b84d mk/tools/gettext.mk
--- a/mk/tools/gettext.mk Wed Jul 05 03:46:22 2006 +0000
+++ b/mk/tools/gettext.mk Wed Jul 05 04:32:10 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: gettext.mk,v 1.4 2006/04/15 16:48:12 jlam Exp $
+# $NetBSD: gettext.mk,v 1.5 2006/07/05 04:32:10 jlam Exp $
#
# Copyright (c) 2006 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -39,7 +39,7 @@
# is no native tool available. Don't add "msgfmt" to this list as it's
# treated specially below.
#
-_TOOLS.gettext-tools= gettext xgettext
+_TOOLS.gettext-tools= gettext msgmerge xgettext
_TOOLS_DEP.gettext-tools= {gettext>=0.10.36,gettext-tools>=0.14.5}
.for _t_ in ${_TOOLS.gettext-tools}
diff -r 319a8b9d1693 -r 7ac76710b84d mk/tools/imake.mk
--- a/mk/tools/imake.mk Wed Jul 05 03:46:22 2006 +0000
+++ b/mk/tools/imake.mk Wed Jul 05 04:32:10 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: imake.mk,v 1.17 2005/07/17 21:36:24 jlam Exp $
+# $NetBSD: imake.mk,v 1.18 2006/07/05 04:32:10 jlam Exp $
#
# Copyright (c) 2005 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -63,6 +63,11 @@
USE_TOOLS+= imake xmkmf
.endif
+# itools implies all of the imake tools
+.if !empty(USE_TOOLS:Mitools)
+USE_TOOLS+= imake makedepend mkdirhier xmkmf
+.endif
+
# imake and xmkmf imply each other
.if !empty(USE_TOOLS:Mimake) || !empty(USE_TOOLS:Mxmkmf)
USE_TOOLS+= imake xmkmf
@@ -73,8 +78,16 @@
USE_TOOLS+= ${IMAKE_TOOLS:Nimake}
.endif
-TOOLS_ARGS.imake?= ${IMAKEOPTS}
-TOOLS_ARGS.xmkmf?= ${XMKMF_FLAGS}
+# Ensure that the correct commands are used when using nbitools.
+.if !empty(USE_TOOLS:Mitools)
+CONFIGURE_ENV+= IMAKE_CMD=imake
+MAKE_ENV+= IMAKE_CMD=imake
+SCRIPTS_ENV+= IMAKE_CMD=imake
+TOOLS_ARGS.imake+= -DImakeCmd=imake
+.endif
+
+TOOLS_ARGS.imake+= ${IMAKEOPTS}
+TOOLS_ARGS.xmkmf+= ${XMKMF_FLAGS}
TOOLS_XMKMF= ${${_TOOLS_VARNAME.xmkmf}} -a
XMKMF= ${${_TOOLS_VARNAME.xmkmf}} -a
diff -r 319a8b9d1693 -r 7ac76710b84d mk/tools/intltool.mk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mk/tools/intltool.mk Wed Jul 05 04:32:10 2006 +0000
@@ -0,0 +1,93 @@
+# $NetBSD: intltool.mk,v 1.1 2006/07/05 04:32:10 jlam Exp $
+#
+# Copyright (c) 2006 The NetBSD Foundation, Inc.
+# All rights reserved.
+#
+# This code is derived from software contributed to The NetBSD Foundation
+# by Johnny C. Lam.
+#
+# 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.
+#
+
+# These tools are all supplied by the textproc/intltool package.
+_TOOLS.intltool= intltoolize \
+ intltool-extract intltool-merge \
+ intltool-prepare intltool-update
+
+.if !defined(TOOLS_IGNORE.intltool) && !empty(USE_TOOLS:C/:.*//:Mintltool)
+. if !empty(PKGPATH:Mtextproc/intltool)
+MAKEFLAGS+= TOOLS_IGNORE.intltool
+. else
+USE_TOOLS+= perl
+CONFIGURE_ENV+= INTLTOOL_PERL=${TOOLS_PERL5:Q}
+TOOLS_DEPENDS.intltool?= intltool>=0.34.1:../../textproc/intltool
+. if !empty(USE_TOOLS:Mintltool\:run)
+DEPENDS+= ${TOOLS_DEPENDS.intltool}
+. else
+BUILD_DEPENDS+= ${TOOLS_DEPENDS.intltool}
+. endif
+EVAL_PREFIX+= TOOLS_PREFIX.intltool=intltool
+. for _t_ in ${_TOOLS.intltool}
+TOOLS_DEPENDS.${_t_}= ${TOOLS_DEPENDS.intltool}
+TOOLS_CREATE+= ${_t_}
+TOOLS_PREFIX.${_t_}= ${TOOLS_PREFIX.intltool}
+TOOLS_PATH.${_t_}= ${TOOLS_PREFIX.${_t_}}/bin/${_t_}
+. endfor
+. endif
+.else
+. for _t_ in ${_TOOLS.intltool}
+TOOLS_BROKEN+= ${_t_}
+TOOLS_PATH.${_t_}= ${TOOLS_CMD.${_t_}}
+. endfor
+.endif
+
+# After the GNU configure script has run, replace the generated local
+# versions of intltool-* with copies of the appropriate tools. We copy
+# instead of symlink so that the timestamps on the copied intltool-* are
+# correctly "recent".
+#
+.PHONY: override-intltool override-message-intltool
+post-configure: override-intltool
+override-intltool: override-message-intltool
+override-message-intltool:
+ @${STEP_MSG} "Overriding intltool."
+
+.for _t_ in ${_TOOLS.intltool}
+.PHONY: override-intltool-${_t_}
+override-intltool: override-intltool-${_t_}
+override-intltool-${_t_}:
+ ${_PKG_SILENT}${_PKG_DEBUG}set -e; \
+ cd ${WRKSRC}; for f in ${_t_} */${_t_} */*/${_t_}; do \
+ if ${TEST} -f "$$f"; then \
+ ${RM} -f $$f; \
+ ${CP} -f ${TOOLS_PATH.${_t_}:Q} $$f; \
+ ${CHMOD} +x $$f; \
+ fi; \
+ done
+.endfor
diff -r 319a8b9d1693 -r 7ac76710b84d mk/tools/perl.mk
--- a/mk/tools/perl.mk Wed Jul 05 03:46:22 2006 +0000
+++ b/mk/tools/perl.mk Wed Jul 05 04:32:10 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: perl.mk,v 1.19 2005/08/06 06:18:45 jlam Exp $
+# $NetBSD: perl.mk,v 1.20 2006/07/05 04:32:10 jlam Exp $
#
# Copyright (c) 2005 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -51,6 +51,12 @@
. include "../../lang/perl5/vars.mk"
.else
#
+# If a package doesn't explicitly say it uses perl, then create a "broken"
+# perl in the tools directory.
+#
+TOOLS_BROKEN+= perl
+TOOLS_PATH.perl= ${TOOLS_CMD.perl}
+#
# Some packages want the path to the perl tool, even if they don't have
# dependency on perl, e.g. devel/cvs.
#
diff -r 319a8b9d1693 -r 7ac76710b84d mk/tools/replace.mk
--- a/mk/tools/replace.mk Wed Jul 05 03:46:22 2006 +0000
+++ b/mk/tools/replace.mk Wed Jul 05 04:32:10 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: replace.mk,v 1.170 2006/06/14 16:57:07 jlam Exp $
+# $NetBSD: replace.mk,v 1.171 2006/07/05 04:32:10 jlam Exp $
#
# Copyright (c) 2005 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -879,7 +879,7 @@
# These tools are all supplied by the devel/diffutils package if there is
# no native tool available.
#
-_TOOLS.diffutils= cmp diff
+_TOOLS.diffutils= cmp diff diff3 sdiff
.for _t_ in ${_TOOLS.diffutils}
. if !defined(TOOLS_IGNORE.${_t_}) && !empty(_USE_TOOLS:M${_t_})
@@ -982,11 +982,17 @@
.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)
+. if !empty(PKGPATH:Mdevel/nbitools) || \
+ !empty(PKGPATH:Mx11/XFree86-imake) || \
+ !empty(PKGPATH:Mx11/xorg-imake)
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)
+. if !empty(_USE_TOOLS:Mitools)
+TOOLS_DEPENDS.${_t_}?= nbitools>=6.3nb4:../../devel/nbitools
+TOOLS_FIND_PREFIX+= TOOLS_PREFIX.${_t_}=nbitools
+TOOLS_PATH.${_t_}= ${TOOLS_PREFIX.${_t_}}/libexec/itools/${_t_}
+. elif defined(X11_TYPE) && !empty(X11_TYPE:MXFree86)
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_}
@@ -1006,7 +1012,7 @@
# ${X11BASE}.
#
.if !defined(TOOLS_IGNORE.xmkmf) && !empty(_USE_TOOLS:Mxmkmf)
-. if !empty(USE_XPKGWEDGE:M[yY][eE][sS])
+. if !empty(USE_XPKGWEDGE:M[yY][eE][sS]) && empty(_USE_TOOLS:Mitools)
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.xpkgwedge=xpkgwedge
TOOLS_PATH.xmkmf= ${TOOLS_PREFIX.xpkgwedge}/bin/pkgxmkmf
. endif
diff -r 319a8b9d1693 -r 7ac76710b84d mk/tools/tools.DragonFly.mk
--- a/mk/tools/tools.DragonFly.mk Wed Jul 05 03:46:22 2006 +0000
+++ b/mk/tools/tools.DragonFly.mk Wed Jul 05 04:32:10 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: tools.DragonFly.mk,v 1.26 2006/06/14 16:57:07 jlam Exp $
+# $NetBSD: tools.DragonFly.mk,v 1.27 2006/07/05 04:32:10 jlam Exp $
#
# System-supplied tools for the DragonFly operating system.
@@ -17,6 +17,7 @@
TOOLS_PLATFORM.cut?= /usr/bin/cut
TOOLS_PLATFORM.date?= /bin/date
TOOLS_PLATFORM.diff?= /usr/bin/diff
+TOOLS_PLATFORM.diff3?= /usr/bin/diff3
TOOLS_PLATFORM.dirname?= /usr/bin/dirname
TOOLS_PLATFORM.echo?= echo # shell builtin
TOOLS_PLATFORM.egrep?= /usr/bin/egrep
@@ -62,6 +63,7 @@
TOOLS_PLATFORM.pwd?= /bin/pwd
TOOLS_PLATFORM.rm?= /bin/rm
TOOLS_PLATFORM.rmdir?= /bin/rmdir
+TOOLS_PLATFORM.sdiff?= /usr/bin/sdiff
TOOLS_PLATFORM.sed?= /usr/bin/sed
TOOLS_PLATFORM.sh?= /bin/sh
TOOLS_PLATFORM.shlock?= /usr/bin/shlock
diff -r 319a8b9d1693 -r 7ac76710b84d mk/tools/tools.FreeBSD.mk
--- a/mk/tools/tools.FreeBSD.mk Wed Jul 05 03:46:22 2006 +0000
+++ b/mk/tools/tools.FreeBSD.mk Wed Jul 05 04:32:10 2006 +0000
@@ -1,4 +1,4 @@
Home |
Main Index |
Thread Index |
Old Index