Skip to content

Commit

Permalink
Changed extract_sufx to extract.sufx
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.macports.org/repository/macports/trunk/base@953 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
Kevin Van Vechten committed Oct 5, 2002
1 parent 949f3fc commit d2b45b3
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions doc/exampleport/Portfile
Expand Up @@ -24,15 +24,15 @@ master_sites http://www.opendarwin.org/~eric/
distname ${portname}-${portversion}

# (Optional) Explicitly set suffix (default: .tar.gz)
#extract_sufx .tar.bz2
#extract.sufx .tar.bz2

# (Optional) Use bzip2 instead of gzip for uncompressing distribution file
#use_bzip2 yes

# List of checksums for files to be fetched
# <file name> <checksum type> <checksum>
# Currently the only supported checksum type is md5
checksums ${distname}${extract_sufx} md5 45627db03b6cf89b8dabae6d815dcd9b
checksums ${distname}${extract.sufx} md5 45627db03b6cf89b8dabae6d815dcd9b

# Any patches which should be applied after extracting this port. These
# should go in the files/ subdirectory of the port.
Expand Down
8 changes: 4 additions & 4 deletions doc/portfile.7
Expand Up @@ -259,7 +259,7 @@ List of sites to fetch ${patchfiles} from
.Sy Example:
.Dl patch_sites ftp://ftp.patchcityrepo.com/pub/magic/patches

.It Ic extract_sufx
.It Ic extract.sufx
Suffix to append to ${distname}
.br
.Sy Type:
Expand All @@ -268,7 +268,7 @@ Suffix to append to ${distname}
.Em .tar.gz
.br
.Sy Example:
.Dl extract_sufx .tgz
.Dl extract.sufx .tgz

.It Ic distfiles
List of distribution files to fetch from ${master_sites}
Expand All @@ -293,7 +293,7 @@ List of patches to fetch and apply
.It Ic use_zip
Use zip.
.br
Sets extract_sufx to: .zip
Sets extract.sufx to: .zip
.br
Sets extract.cmd to: unzip
.br
Expand All @@ -310,7 +310,7 @@ Sets extract.post_args to: "-d $portpath/$workdir"
.It Ic use_bzip2
Use bzip2.
.br
Sets extract_sufx to: .bzip2
Sets extract.sufx to: .bzip2
.br
Sets extract.cmd to: bzip2
.br
Expand Down
4 changes: 2 additions & 2 deletions src/port/port.1
Expand Up @@ -85,9 +85,9 @@ to list all available ports:
.Pp
The following demonstrates invoking
.Nm
with the "extract" target on portdir "textproc/figlet" and extract_sufx set to ".tgz":
with the "extract" target on portdir "textproc/figlet" and extract.sufx set to ".tgz":
.Pp
.Dl "port extract -d textproc/figlet extract_sufx=.tgz"
.Dl "port extract -d textproc/figlet extract.sufx=.tgz"
.Pp
.Sh DIAGNOSTICS
.Ex -std
Expand Down
18 changes: 9 additions & 9 deletions src/port1.0/portfetch.tcl
Expand Up @@ -39,14 +39,14 @@ register com.apple.fetch requires main
register com.apple.fetch deplist depends_fetch

# define options: distname master_sites
options master_sites patch_sites extract_sufx distfiles patchfiles use_zip use_bzip2 dist_subdir fetch.type cvs.module cvs.root cvs.password cvs.tag
options master_sites patch_sites extract.sufx distfiles patchfiles use_zip use_bzip2 dist_subdir fetch.type cvs.module cvs.root cvs.password cvs.tag
# XXX we use the command framework to buy us some useful features,
# but this is not a user-modifiable command
commands cvs
commands fetch

# Defaults
default extract_sufx .tar.gz
default extract.sufx .tar.gz
default fetch.type standard
default cvs.cmd cvs
default cvs.password ""
Expand All @@ -67,16 +67,16 @@ default distfiles {[suffix $distname]}
# Option-executed procedures
namespace eval options { }
proc options::use_bzip2 {args} {
global use_bzip2 extract_sufx
global use_bzip2 extract.sufx
if [tbool use_bzip2] {
set extract_sufx .tar.bz2
set extract.sufx .tar.bz2
}
}

proc options::use_zip {args} {
global use_zip extract_sufx
global use_zip extract.sufx
if [tbool use_zip] {
set extract_sufx .zip
set extract.sufx .zip
}
}

Expand All @@ -86,9 +86,9 @@ namespace eval portfetch { }

set UI_PREFIX "---> "

# Given a distname, return a suffix based on the use_zip / use_bzip2 / extract_sufx options
# Given a distname, return a suffix based on the use_zip / use_bzip2 / extract.sufx options
proc suffix {distname} {
global extract_sufx use_bzip2 use_zip fetch.type
global extract.sufx use_bzip2 use_zip fetch.type
if {"${fetch.type}" == "cvs"} {
return ""
}
Expand All @@ -97,7 +97,7 @@ proc suffix {distname} {
} elseif {[tbool use_zip]} {
return ${distname}.zip
} else {
return ${distname}${extract_sufx}
return ${distname}${extract.sufx}
}
}

Expand Down

0 comments on commit d2b45b3

Please sign in to comment.