pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk/extract it is not necessary to have a variable _EXT...
details: https://anonhg.NetBSD.org/pkgsrc/rev/68897c8efd9b
branches: trunk
changeset: 517698:68897c8efd9b
user: schwarz <schwarz%pkgsrc.org@localhost>
date: Sat Aug 19 20:32:28 2006 +0000
description:
it is not necessary to have a variable _EXTRACT_PATTERNS that contains
${EXTRACT_SUFX}, so one can directly use EXTRACT_ONLY instead.
EXTRACT_ONLY defaults to ${DISTFILES} which in turn defaults to
${DISTNAME}${EXTRACT_SUFX}. So if EXTRACT_SUFX is relevant for determining
which tools are needed this can only happen if neither DISTFILES nor
EXTRACT_ONLY have been set by the package, in which case the relevant
variable EXTRACT_ONLY would contain EXTRACT_SUFX.
diffstat:
mk/extract/bsd.extract-vars.mk | 63 +++++++++++++++++++----------------------
1 files changed, 29 insertions(+), 34 deletions(-)
diffs (88 lines):
diff -r 868709d9ab06 -r 68897c8efd9b mk/extract/bsd.extract-vars.mk
--- a/mk/extract/bsd.extract-vars.mk Sat Aug 19 20:06:57 2006 +0000
+++ b/mk/extract/bsd.extract-vars.mk Sat Aug 19 20:32:28 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.extract-vars.mk,v 1.3 2006/08/19 20:06:57 schwarz Exp $
+# $NetBSD: bsd.extract-vars.mk,v 1.4 2006/08/19 20:32:28 schwarz Exp $
#
# This Makefile fragment is included separately by bsd.pkg.mk and
# defines some variables which must be defined earlier than where
@@ -18,50 +18,45 @@
EXTRACT_ONLY?= ${DISTFILES}
EXTRACT_SUFX?= .tar.gz
-.if !empty(EXTRACT_ONLY)
-
###
### Discover which tools we need based on the file extensions of the
### distfiles.
###
-_EXTRACT_PATTERNS= ${EXTRACT_ONLY} ${EXTRACT_SUFX}
-
-. if !empty(_EXTRACT_PATTERNS:M*.tar) || \
- !empty(_EXTRACT_PATTERNS:M*.tar.*) || \
- !empty(_EXTRACT_PATTERNS:M*.tbz) || \
- !empty(_EXTRACT_PATTERNS:M*.tbz2) || \
- !empty(_EXTRACT_PATTERNS:M*.tgz) || \
- !empty(_EXTRACT_PATTERNS:M*-tar.gz) || \
- !empty(_EXTRACT_PATTERNS:M*_tar.gz)
-. if !empty(EXTRACT_USING:Mgtar)
+.if !empty(EXTRACT_ONLY:M*.tar) || \
+ !empty(EXTRACT_ONLY:M*.tar.*) || \
+ !empty(EXTRACT_ONLY:M*.tbz) || \
+ !empty(EXTRACT_ONLY:M*.tbz2) || \
+ !empty(EXTRACT_ONLY:M*.tgz) || \
+ !empty(EXTRACT_ONLY:M*-tar.gz) || \
+ !empty(EXTRACT_ONLY:M*_tar.gz)
+. if !empty(EXTRACT_USING:Mgtar)
USE_TOOLS+= gtar
-. elif !empty(EXTRACT_USING:Mnbtar)
+. elif !empty(EXTRACT_USING:Mnbtar)
USE_TOOLS+= tar
-. else
+. else
USE_TOOLS+= pax
-. endif
-. endif
-. if !empty(_EXTRACT_PATTERNS:M*.bz2) || \
- !empty(_EXTRACT_PATTERNS:M*.tbz) || \
- !empty(_EXTRACT_PATTERNS:M*.tbz2)
+. endif
+.endif
+.if !empty(EXTRACT_ONLY:M*.bz2) || \
+ !empty(EXTRACT_ONLY:M*.tbz) || \
+ !empty(EXTRACT_ONLY:M*.tbz2)
USE_TOOLS+= bzcat
-. endif
-. if !empty(_EXTRACT_PATTERNS:M*.zip)
+.endif
+.if !empty(EXTRACT_ONLY:M*.zip)
USE_TOOLS+= unzip
-. endif
-. if !empty(_EXTRACT_PATTERNS:M*.lzh) || \
- !empty(_EXTRACT_PATTERNS:M*.lha)
+.endif
+.if !empty(EXTRACT_ONLY:M*.lzh) || \
+ !empty(EXTRACT_ONLY:M*.lha)
USE_TOOLS+= lha
-. endif
-. if !empty(_EXTRACT_PATTERNS:M*.gz) || \
- !empty(_EXTRACT_PATTERNS:M*.tgz) || \
- !empty(_EXTRACT_PATTERNS:M*.Z)
+.endif
+.if !empty(EXTRACT_ONLY:M*.gz) || \
+ !empty(EXTRACT_ONLY:M*.tgz) || \
+ !empty(EXTRACT_ONLY:M*.Z)
USE_TOOLS+= gzcat
-. endif
-. if !empty(_EXTRACT_PATTERNS:M*.zoo)
+.endif
+.if !empty(EXTRACT_ONLY:M*.zoo)
USE_TOOLS+= unzoo
-. endif
-. if !empty(_EXTRACT_PATTERNS:M*.rar)
+.endif
+.if !empty(EXTRACT_ONLY:M*.rar)
USE_TOOLS+= unrar
-. endif
.endif
Home |
Main Index |
Thread Index |
Old Index