[121711] trunk/base/src
jmr at macports.org
jmr at macports.org
Fri Jul 4 11:20:06 PDT 2014
Revision: 121711
https://trac.macports.org/changeset/121711
Author: jmr at macports.org
Date: 2014-07-04 11:20:06 -0700 (Fri, 04 Jul 2014)
Log Message:
-----------
use parallel bzip2 if available
Modified Paths:
--------------
trunk/base/src/package1.0/portunarchive.tcl
trunk/base/src/port1.0/portextract.tcl
trunk/base/src/port1.0/portinstall.tcl
trunk/base/src/registry2.0/portimage.tcl
Modified: trunk/base/src/package1.0/portunarchive.tcl
===================================================================
--- trunk/base/src/package1.0/portunarchive.tcl 2014-07-04 16:44:17 UTC (rev 121710)
+++ trunk/base/src/package1.0/portunarchive.tcl 2014-07-04 18:20:06 UTC (rev 121711)
@@ -173,7 +173,13 @@
if {[regexp {z2?$} ${unarchive.type}]} {
set unarchive.args {-}
if {[regexp {bz2?$} ${unarchive.type}]} {
- set gzip "bzip2"
+ if {![catch {binaryInPath lbzip2}]} {
+ set gzip "lbzip2"
+ } elseif {![catch {binaryInPath pbzip2}]} {
+ set gzip "pbzip2"
+ } else {
+ set gzip "bzip2"
+ }
} elseif {[regexp {lz$} ${unarchive.type}]} {
set gzip "lzma"
} elseif {[regexp {xz$} ${unarchive.type}]} {
Modified: trunk/base/src/port1.0/portextract.tcl
===================================================================
--- trunk/base/src/port1.0/portextract.tcl 2014-07-04 16:44:17 UTC (rev 121710)
+++ trunk/base/src/port1.0/portextract.tcl 2014-07-04 18:20:06 UTC (rev 121711)
@@ -90,7 +90,11 @@
set extract.dir ${worksrcpath}
}
if {[tbool use_bzip2]} {
- option extract.cmd [findBinary bzip2 ${portutil::autoconf::bzip2_path}]
+ if {![catch {findBinary lbzip2} result]} {
+ option extract.cmd $result
+ } else {
+ option extract.cmd [findBinary bzip2 ${portutil::autoconf::bzip2_path}]
+ }
} elseif {[tbool use_lzma]} {
option extract.cmd [findBinary lzma ${portutil::autoconf::lzma_path}]
} elseif {[tbool use_xz]} {
Modified: trunk/base/src/port1.0/portinstall.tcl
===================================================================
--- trunk/base/src/port1.0/portinstall.tcl 2014-07-04 16:44:17 UTC (rev 121710)
+++ trunk/base/src/port1.0/portinstall.tcl 2014-07-04 18:20:06 UTC (rev 121711)
@@ -122,7 +122,13 @@
set archive.pre_args {-cvf}
if {[regexp {z2?$} ${archive.type}]} {
if {[regexp {bz2?$} ${archive.type}]} {
- set gzip "bzip2"
+ if {![catch {binaryInPath lbzip2}]} {
+ set gzip "lbzip2"
+ } elseif {![catch {binaryInPath pbzip2}]} {
+ set gzip "pbzip2"
+ } else {
+ set gzip "bzip2"
+ }
set level 9
} elseif {[regexp {lz$} ${archive.type}]} {
set gzip "lzma"
Modified: trunk/base/src/registry2.0/portimage.tcl
===================================================================
--- trunk/base/src/registry2.0/portimage.tcl 2014-07-04 16:44:17 UTC (rev 121710)
+++ trunk/base/src/registry2.0/portimage.tcl 2014-07-04 18:20:06 UTC (rev 121711)
@@ -344,7 +344,13 @@
if {[regexp {z2?$} ${unarchive.type}]} {
set unarchive.args {-}
if {[regexp {bz2?$} ${unarchive.type}]} {
- set gzip "bzip2"
+ if {![catch {macports::binaryInPath lbzip2}]} {
+ set gzip "lbzip2"
+ } elseif {![catch {macports::binaryInPath pbzip2}]} {
+ set gzip "pbzip2"
+ } else {
+ set gzip "bzip2"
+ }
} elseif {[regexp {lz$} ${unarchive.type}]} {
set gzip "lzma"
} elseif {[regexp {xz$} ${unarchive.type}]} {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140704/d858b8a1/attachment.html>
More information about the macports-changes
mailing list