pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk Consider ${TAR} differently from ${GTAR}. Currentl...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/fbb88b2fd9b6
branches:  trunk
changeset: 493780:fbb88b2fd9b6
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Sat May 14 21:15:07 2005 +0000

description:
Consider ${TAR} differently from ${GTAR}.  Currently, mark pkgsrc down
as needing both (no impact since they're both satisfied by the tar
binary installed by the bootstrap kit).  There's some funniness in
the extraction code where we check for pax or GNU tar that needs to
be resolved.  Remove the TAR=${GTAR} hack since it's no longer needed
after these changes.

XXX Later, a sweep needs to be made to see where we actually need GTAR
XXX and where we only need TAR, probably triggered by whether we call it
XXX with the "z" option or not.  Packages that need GTAR should explicitly
XXX add USE_TOOLS+=gtar to the package Makefile.

diffstat:

 mk/bsd.pkg.mk               |   6 +++---
 mk/tools/bootstrap.mk       |  41 +++++++++++++++++++++++++++--------------
 mk/tools/defaults.mk        |   8 ++------
 mk/tools/replace.mk         |  31 +++++++++++++++++++++----------
 mk/tools/tools.AIX.mk       |   3 ++-
 mk/tools/tools.BSDOS.mk     |   7 ++++++-
 mk/tools/tools.Darwin.mk    |   3 ++-
 mk/tools/tools.DragonFly.mk |   3 ++-
 mk/tools/tools.FreeBSD.mk   |   3 ++-
 mk/tools/tools.Linux.mk     |   3 ++-
 mk/tools/tools.NetBSD.mk    |  13 +++++++------
 mk/tools/tools.OSF1.mk      |   3 ++-
 mk/tools/tools.OpenBSD.mk   |  13 +++++++------
 13 files changed, 85 insertions(+), 52 deletions(-)

diffs (truncated from 412 to 300 lines):

diff -r f72ad8eb4944 -r fbb88b2fd9b6 mk/bsd.pkg.mk
--- a/mk/bsd.pkg.mk     Sat May 14 20:50:02 2005 +0000
+++ b/mk/bsd.pkg.mk     Sat May 14 21:15:07 2005 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.pkg.mk,v 1.1651 2005/05/14 19:37:53 jlam Exp $
+#      $NetBSD: bsd.pkg.mk,v 1.1652 2005/05/14 21:15:07 jlam Exp $
 #
 # This file is in the public domain.
 #
@@ -833,8 +833,8 @@
        [ awk basename cat chgrp chmod chown cmp cp cut date dirname    \
        echo egrep env expr false fgrep file find grep gtar gunzip      \
        gzcat gzip head hostname id install ln ls m4 mkdir mtree mv     \
-       nice pax pwd rm rmdir sed sh sort tail tee test touch tr true   \
-       tsort wc xargs
+       nice pax pwd rm rmdir sed sh sort tail tar tee test touch tr    \
+       true tsort wc xargs
 
 # We need a mail command to send mail to ${PKGSRC_MESSAGE_RECIPIENTS}.
 .if !empty(PKGSRC_MESSAGE_RECIPIENTS)
diff -r f72ad8eb4944 -r fbb88b2fd9b6 mk/tools/bootstrap.mk
--- a/mk/tools/bootstrap.mk     Sat May 14 20:50:02 2005 +0000
+++ b/mk/tools/bootstrap.mk     Sat May 14 21:15:07 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bootstrap.mk,v 1.1 2005/04/27 17:15:13 jlam Exp $
+# $NetBSD: bootstrap.mk,v 1.2 2005/05/14 21:15:07 jlam Exp $
 #
 # bootstrap.mk contains settings matching the contents of
 # pkgsrc/bootstrap/bootstrap.  Where we install the bootstrap versions
@@ -12,81 +12,94 @@
 # 
 
 .if ${OPSYS} == "AIX"
-TOOLS_PLATFORM.gtar?=          ${LOCALBASE}/bin/tar
+TOOLS_PLATFORM.gtar?=          ${TOOLS_PLATFORM.tar}
 TOOLS_PLATFORM.install?=       ${LOCALBASE}/bin/install-sh
 TOOLS_PLATFORM.mtree?=         ${LOCALBASE}/sbin/mtree
 TOOLS_PLATFORM.pax?=           ${LOCALBASE}/bin/pax
 TOOLS_PLATFORM.sed?=           ${LOCALBASE}/bin/nbsed
 TOOLS_PLATFORM.strip?=         ${LOCALBASE}/bin/strip
+TOOLS_PLATFORM.tar?=           ${LOCALBASE}/bin/tar
 
 .elif ${OPSYS} == "Darwin"
-TOOLS_PLATFORM.gtar?=          ${LOCALBASE}/bin/tar
+TOOLS_PLATFORM.gtar?=          ${TOOLS_PLATFORM.tar}
 TOOLS_PLATFORM.pax?=           ${LOCALBASE}/bin/pax
+TOOLS_PLATFORM.tar?=           ${LOCALBASE}/bin/tar
 
 .elif ${OPSYS} == "DragonFly"
-TOOLS_PLATFORM.gtar?=          ${LOCALBASE}/bin/tar
+TOOLS_PLATFORM.gtar?=          ${TOOLS_PLATFORM.tar}
 TOOLS_PLATFORM.pax?=           ${LOCALBASE}/bin/pax
+TOOLS_PLATFORM.tar?=           ${LOCALBASE}/bin/tar
 
 .elif ${OPSYS} == "FreeBSD"
-TOOLS_PLATFORM.gtar?=          ${LOCALBASE}/bin/tar
+TOOLS_PLATFORM.gtar?=          ${TOOLS_PLATFORM.tar}
 TOOLS_PLATFORM.mtree?=         ${LOCALBASE}/sbin/mtree
 TOOLS_PLATFORM.pax?=           ${LOCALBASE}/bin/pax
+TOOLS_PLATFORM.tar?=           ${LOCALBASE}/bin/tar
 
 .elif ${OPSYS} == "HPUX"
-TOOLS_PLATFORM.gtar?=          ${LOCALBASE}/bin/tar
+TOOLS_PLATFORM.gtar?=          ${TOOLS_PLATFORM.tar}
 TOOLS_PLATFORM.mtree?=         ${LOCALBASE}/sbin/mtree
 TOOLS_PLATFORM.pax?=           ${LOCALBASE}/bin/pax
 TOOLS_PLATFORM.sed?=           ${LOCALBASE}/bin/nbsed
+TOOLS_PLATFORM.tar?=           ${LOCALBASE}/bin/tar
 
 .elif ${OPSYS} == "Interix"
-TOOLS_PLATFORM.gtar?=          ${LOCALBASE}/bin/tar
+TOOLS_PLATFORM.gtar?=          ${TOOLS_PLATFORM.tar}
 TOOLS_PLATFORM.install?=       ${LOCALBASE}/bin/install-sh
 TOOLS_PLATFORM.mtree?=         ${LOCALBASE}/sbin/mtree
 TOOLS_PLATFORM.pax?=           ${LOCALBASE}/bin/pax
 TOOLS_PLATFORM.sed?=           ${LOCALBASE}/bin/nbsed
+TOOLS_PLATFORM.tar?=           ${LOCALBASE}/bin/tar
 
 .elif ${OPSYS} == "IRIX"
-TOOLS_PLATFORM.gtar?=          ${LOCALBASE}/bin/tar
+TOOLS_PLATFORM.gtar?=          ${TOOLS_PLATFORM.tar}
 TOOLS_PLATFORM.install?=       ${LOCALBASE}/bin/install-sh
 TOOLS_PLATFORM.mtree?=         ${LOCALBASE}/sbin/mtree
 TOOLS_PLATFORM.pax?=           ${LOCALBASE}/bin/pax
 TOOLS_PLATFORM.sed?=           ${LOCALBASE}/bin/nbsed
+TOOLS_PLATFORM.tar?=           ${LOCALBASE}/bin/tar
 
 .elif ${OPSYS} == "Linux"
-TOOLS_PLATFORM.gtar?=          ${LOCALBASE}/bin/tar
+TOOLS_PLATFORM.gtar?=          ${TOOLS_PLATFORM.tar}
 TOOLS_PLATFORM.mtree?=         ${LOCALBASE}/sbin/mtree
 TOOLS_PLATFORM.pax?=           ${LOCALBASE}/bin/pax
+TOOLS_PLATFORM.tar?=           ${LOCALBASE}/bin/tar
 
 .elif ${OPSYS} == "NetBSD"
 # NetBSD has everything.
 
 .elif ${OPSYS} == "OpenBSD"
-TOOLS_PLATFORM.gtar?=          ${LOCALBASE}/bin/tar
+TOOLS_PLATFORM.gtar?=          ${TOOLS_PLATFORM.tar}
 TOOLS_PLATFORM.pax?=           ${LOCALBASE}/bin/pax
+TOOLS_PLATFORM.tar?=           ${LOCALBASE}/bin/tar
 
 .elif ${OPSYS} == "OSF1"
-TOOLS_PLATFORM.gtar?=          ${LOCALBASE}/bin/tar
+TOOLS_PLATFORM.gtar?=          ${TOOLS_PLATFORM.tar}
 TOOLS_PLATFORM.install?=       ${LOCALBASE}/bin/install-sh
 TOOLS_PLATFORM.mtree?=         ${LOCALBASE}/sbin/mtree
 TOOLS_PLATFORM.pax?=           ${LOCALBASE}/bin/pax
 TOOLS_PLATFORM.sed?=           ${LOCALBASE}/bin/nbsed
+TOOLS_PLATFORM.tar?=           ${LOCALBASE}/bin/tar
 
 .elif ${OPSYS} == "SunOS"
-TOOLS_PLATFORM.gtar?=          ${LOCALBASE}/bin/tar
+TOOLS_PLATFORM.gtar?=          ${TOOLS_PLATFORM.tar}
 TOOLS_PLATFORM.mtree?=         ${LOCALBASE}/sbin/mtree
 TOOLS_PLATFORM.pax?=           ${LOCALBASE}/bin/pax
 TOOLS_PLATFORM.sed?=           ${LOCALBASE}/bin/nbsed
+TOOLS_PLATFORM.tar?=           ${LOCALBASE}/bin/tar
 
 .elif ${OPSYS} == "UnixWare"
-TOOLS_PLATFORM.gtar?=          ${LOCALBASE}/bin/tar
+TOOLS_PLATFORM.gtar?=          ${TOOLS_PLATFORM.tar}
 TOOLS_PLATFORM.mkdir?=         ${LOCALBASE}/sbin/mkdir-sh
 TOOLS_PLATFORM.mtree?=         ${LOCALBASE}/sbin/mtree
 TOOLS_PLATFORM.pax?=           ${LOCALBASE}/bin/pax
 TOOLS_PLATFORM.sed?=           ${LOCALBASE}/bin/nbsed
+TOOLS_PLATFORM.tar?=           ${LOCALBASE}/bin/tar
 
 .else
-TOOLS_PLATFORM.gtar?=          ${LOCALBASE}/bin/tar
+TOOLS_PLATFORM.gtar?=          ${TOOLS_PLATFORM.tar}
 TOOLS_PLATFORM.mtree?=         ${LOCALBASE}/sbin/mtree
 TOOLS_PLATFORM.pax?=           ${LOCALBASE}/bin/pax
 TOOLS_PLATFORM.sed?=           ${LOCALBASE}/bin/nbsed
+TOOLS_PLATFORM.tar?=           ${LOCALBASE}/bin/tar
 .endif
diff -r f72ad8eb4944 -r fbb88b2fd9b6 mk/tools/defaults.mk
--- a/mk/tools/defaults.mk      Sat May 14 20:50:02 2005 +0000
+++ b/mk/tools/defaults.mk      Sat May 14 21:15:07 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: defaults.mk,v 1.13 2005/05/14 20:05:05 jlam Exp $
+# $NetBSD: defaults.mk,v 1.14 2005/05/14 21:15:07 jlam Exp $
 
 .if !defined(TOOLS_DEFAULTS_MK)
 TOOLS_DEFAULTS_MK=     defined
@@ -70,6 +70,7 @@
 _TOOLS_VARNAME.shlock=         SHLOCK
 _TOOLS_VARNAME.sort=           SORT
 _TOOLS_VARNAME.tail=           TAIL
+_TOOLS_VARNAME.tar=            TAR
 _TOOLS_VARNAME.tbl=            TBL
 _TOOLS_VARNAME.tee=            TEE
 _TOOLS_VARNAME.test=           TEST
@@ -104,9 +105,4 @@
 .endfor
 .undef _t_
 
-# XXX Temporarily set this here until we figure out a better way to handle
-# XXX TAR/GTAR in a better way.
-#
-TAR?=  ${GTAR}
-
 .endif # TOOLS_DEFAULTS_MK
diff -r f72ad8eb4944 -r fbb88b2fd9b6 mk/tools/replace.mk
--- a/mk/tools/replace.mk       Sat May 14 20:50:02 2005 +0000
+++ b/mk/tools/replace.mk       Sat May 14 21:15:07 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: replace.mk,v 1.72 2005/05/14 05:57:43 jlam Exp $
+# $NetBSD: replace.mk,v 1.73 2005/05/14 21:15:07 jlam Exp $
 #
 # This Makefile fragment handles "replacements" of system-supplied
 # tools with pkgsrc versions.
@@ -441,20 +441,15 @@
 .endif
 
 .if !defined(TOOLS_IGNORE.gtar) && !empty(_USE_TOOLS:Mgtar)
-.  if !empty(PKGPATH:Marchivers/pax)
+.  if !empty(PKGPATH:Marchivers/gtar-base)
 MAKEFLAGS+=                    TOOLS_IGNORE.gtar=
 .  elif !empty(_TOOLS_USE_PKGSRC.gtar:M[yY][eE][sS])
-#
-# This is installed by pkgsrc bootstrap, and is never registered, so
-# comment out the dependency on it.
-#
-#TOOLS_DEPENDS.gtar?=          pax>=20040802:../../archivers/pax
+TOOLS_DEPENDS.gtar?=           gtar-base>=1.13.25:../../archivers/gtar-base
 TOOLS_CREATE+=                 gtar
-TOOLS_FIND_PREFIX+=            TOOLS_PREFIX.gtar=pax
-TOOLS_REAL_CMD.gtar=           ${TOOLS_PREFIX.gtar}/bin/tar
+TOOLS_FIND_PREFIX+=            TOOLS_PREFIX.gtar=gtar-base
+TOOLS_REAL_CMD.gtar=           ${TOOLS_PREFIX.gtar}/bin/${GNU_PROGRAM_PREFIX}tar
 TOOLS_${_TOOLS_VARNAME.gtar}=  ${TOOLS_REAL_CMD.gtar}
 .  endif
-TOOLS_ALIASES.gtar=            tar
 .endif
 
 .if !defined(TOOLS_IGNORE.gunzip) && !empty(_USE_TOOLS:Mgunzip)
@@ -794,6 +789,22 @@
 .  endif
 .endif
 
+.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
+TOOLS_REAL_CMD.tar=            ${TOOLS_PREFIX.tar}/bin/tar
+TOOLS_${_TOOLS_VARNAME.tar}=   ${TOOLS_REAL_CMD.tar}
+.  endif
+.endif
+
 .if !defined(TOOLS_IGNORE.tbl) && !empty(_USE_TOOLS:Mtbl)
 .  if !empty(PKGPATH:Mtextproc/groff)
 MAKEFLAGS+=                    TOOLS_IGNORE.tbl=
diff -r f72ad8eb4944 -r fbb88b2fd9b6 mk/tools/tools.AIX.mk
--- a/mk/tools/tools.AIX.mk     Sat May 14 20:50:02 2005 +0000
+++ b/mk/tools/tools.AIX.mk     Sat May 14 21:15:07 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: tools.AIX.mk,v 1.7 2005/05/10 19:56:51 jlam Exp $
+# $NetBSD: tools.AIX.mk,v 1.8 2005/05/14 21:15:07 jlam Exp $
 #
 # System-supplied tools for the AIX operating system.
 
@@ -42,6 +42,7 @@
 TOOLS_PLATFORM.shlock?=                /usr/bin/shlock
 TOOLS_PLATFORM.sort?=          /usr/bin/sort
 TOOLS_PLATFORM.tail?=          /usr/bin/tail
+TOOLS_PLATFORM.tar?=           /usr/bin/tar
 TOOLS_PLATFORM.tee?=           /usr/bin/tee
 TOOLS_PLATFORM.test?=          test                    # shell builtin
 TOOLS_PLATFORM.touch?=         /usr/bin/touch
diff -r f72ad8eb4944 -r fbb88b2fd9b6 mk/tools/tools.BSDOS.mk
--- a/mk/tools/tools.BSDOS.mk   Sat May 14 20:50:02 2005 +0000
+++ b/mk/tools/tools.BSDOS.mk   Sat May 14 21:15:07 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: tools.BSDOS.mk,v 1.9 2005/05/10 19:56:51 jlam Exp $
+# $NetBSD: tools.BSDOS.mk,v 1.10 2005/05/14 21:15:07 jlam Exp $
 #
 # System-supplied tools for the BSD/OS operating system.
 
@@ -49,6 +49,11 @@
 TOOLS_PLATFORM.sort?=          /usr/bin/sort
 TOOLS_PLATFORM.strip?=         /usr/bin/strip
 TOOLS_PLATFORM.tail?=          /usr/bin/tail
+.if exists(/bin/tar)
+TOOLS_PLATFORM.tar?=           /bin/tar
+.elif exists(/usr/bin/tar)
+TOOLS_PLATFORM.tar?=           /usr/bin/tar
+.endif
 TOOLS_PLATFORM.tee?=           /usr/bin/tee
 TOOLS_PLATFORM.test?=          test                    # shell builtin
 TOOLS_PLATFORM.touch?=         /usr/bin/touch
diff -r f72ad8eb4944 -r fbb88b2fd9b6 mk/tools/tools.Darwin.mk
--- a/mk/tools/tools.Darwin.mk  Sat May 14 20:50:02 2005 +0000
+++ b/mk/tools/tools.Darwin.mk  Sat May 14 21:15:07 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: tools.Darwin.mk,v 1.9 2005/05/10 19:56:51 jlam Exp $
+# $NetBSD: tools.Darwin.mk,v 1.10 2005/05/14 21:15:07 jlam Exp $
 #
 # System-supplied tools for the Darwin (Mac OS X) operating system.
 
@@ -51,6 +51,7 @@
 TOOLS_PLATFORM.sort?=          /usr/bin/sort
 TOOLS_PLATFORM.strip?=         /usr/bin/strip
 TOOLS_PLATFORM.tail?=          /usr/bin/tail
+TOOLS_PLATFORM.tar?=           /usr/bin/tar
 TOOLS_PLATFORM.tee?=           /usr/bin/tee
 TOOLS_PLATFORM.test?=          test                    # shell builtin
 TOOLS_PLATFORM.touch?=         /usr/bin/touch
diff -r f72ad8eb4944 -r fbb88b2fd9b6 mk/tools/tools.DragonFly.mk
--- a/mk/tools/tools.DragonFly.mk       Sat May 14 20:50:02 2005 +0000
+++ b/mk/tools/tools.DragonFly.mk       Sat May 14 21:15:07 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: tools.DragonFly.mk,v 1.10 2005/05/10 19:56:51 jlam Exp $
+# $NetBSD: tools.DragonFly.mk,v 1.11 2005/05/14 21:15:07 jlam Exp $
 #
 # System-supplied tools for the DragonFly operating system.
 
@@ -53,6 +53,7 @@
 TOOLS_PLATFORM.sort?=          /usr/bin/sort
 TOOLS_PLATFORM.strip?=         /usr/bin/strip
 TOOLS_PLATFORM.tail?=          /usr/bin/tail
+TOOLS_PLATFORM.tar?=           /usr/bin/tar
 TOOLS_PLATFORM.tbl?=           /usr/bin/tbl
 TOOLS_PLATFORM.tee?=           /usr/bin/tee
 TOOLS_PLATFORM.test?=          /bin/test
diff -r f72ad8eb4944 -r fbb88b2fd9b6 mk/tools/tools.FreeBSD.mk
--- a/mk/tools/tools.FreeBSD.mk Sat May 14 20:50:02 2005 +0000
+++ b/mk/tools/tools.FreeBSD.mk Sat May 14 21:15:07 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: tools.FreeBSD.mk,v 1.10 2005/05/10 19:56:51 jlam Exp $
+# $NetBSD: tools.FreeBSD.mk,v 1.11 2005/05/14 21:15:07 jlam Exp $
 #



Home | Main Index | Thread Index | Old Index