[31028] trunk/base/src/port1.0/portextract.tcl
source_changes at macosforge.org
source_changes at macosforge.org
Wed Nov 14 03:11:11 PST 2007
Revision: 31028
http://trac.macosforge.org/projects/macports/changeset/31028
Author: mww at macports.org
Date: 2007-11-14 03:11:10 -0800 (Wed, 14 Nov 2007)
Log Message:
-----------
add option 'extract.mkdir [no|yes]' which can be used instead of:
pre-extract {
file mkdir ${worksrcpath}
}
extract.dir ${worksrcpath}
This is a common pattern for distfiles which do not have a main directory but extract files directly to ${workpath}
Modified Paths:
--------------
trunk/base/src/port1.0/portextract.tcl
Modified: trunk/base/src/port1.0/portextract.tcl
===================================================================
--- trunk/base/src/port1.0/portextract.tcl 2007-11-14 10:34:44 UTC (rev 31027)
+++ trunk/base/src/port1.0/portextract.tcl 2007-11-14 11:11:10 UTC (rev 31028)
@@ -3,6 +3,7 @@
# $Id$
#
# Copyright (c) 2002 - 2003 Apple Computer, Inc.
+# Copyright (c) 2007 Markus W. Weissmann <mww at macports.org>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -40,7 +41,7 @@
target_prerun ${org.macports.extract} extract_start
# define options
-options extract.only
+options extract.only extract.mkdir
commands extract
# Set up defaults
@@ -52,12 +53,21 @@
default extract.cmd gzip
default extract.pre_args -dc
default extract.post_args {"| ${portutil::autoconf::tar_command} -xf -"}
+default extract.mkdir no
set_ui_prefix
proc extract_init {args} {
- global extract.only extract.dir extract.cmd extract.pre_args extract.post_args distfiles use_bzip2 use_zip workpath
-
+ global extract.only extract.dir extract.cmd extract.pre_args extract.post_args extract.mkdir distfiles use_bzip2 use_zip workpath
+
+ # should the distfiles be extracted to worksrcpath instead?
+ if {[tbool extract.mkdir]} {
+ global worksrcpath
+ ui_debug "Extracting to subdirectory worksrcdir"
+ file mkdir ${worksrcpath}
+ set extract.dir ${worksrcpath}
+ }
+
if {[tbool use_bzip2]} {
option extract.cmd [binaryInPath "bzip2"]
} elseif {[tbool use_zip]} {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20071114/71f5c4b2/attachment.html
More information about the macports-changes
mailing list