source: trunk/base/src/port1.0/portmain.tcl @ 4422

Last change on this file since 4422 was 4422, checked in by fkr, 17 years ago

Bug:
Submitted by:
Reviewed by:
Approved by: jkh@
Obtained from:

as discussed on darwinports@, filedir should be (for consistency) be filesdir

  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 3.9 KB
Line 
1# et:ts=4
2# portmain.tcl
3#
4# Copyright (c) 2002 - 2003 Apple Computer, Inc.
5# All rights reserved.
6#
7# Redistribution and use in source and binary forms, with or without
8# modification, are permitted provided that the following conditions
9# are met:
10# 1. Redistributions of source code must retain the above copyright
11#    notice, this list of conditions and the following disclaimer.
12# 2. Redistributions in binary form must reproduce the above copyright
13#    notice, this list of conditions and the following disclaimer in the
14#    documentation and/or other materials provided with the distribution.
15# 3. Neither the name of Apple Computer, Inc. nor the names of its contributors
16#    may be used to endorse or promote products derived from this software
17#    without specific prior written permission.
18#
19# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
23# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29# POSSIBILITY OF SUCH DAMAGE.
30#
31
32# the 'main' target is provided by this package
33# main is a magic target and should not be replaced
34
35package provide portmain 1.0
36package require portutil 1.0
37
38set com.apple.main [target_new com.apple.main main]
39target_provides ${com.apple.main} main
40
41# define options
42options prefix name version revision epoch categories maintainers
43options long_description description homepage
44options workdir worksrcdir filedir filesdir distname portdbpath libpath distpath sources_conf os.platform os.version os.arch os.endian platforms default_variants
45
46# Export options via PortInfo
47options_export name version revision epoch categories maintainers platforms description long_description homepage
48
49# Assign option procedure to default_variants
50option_proc default_variants handle_default_variants
51
52# Hard coded version number for resource location
53default portresourcepath {[file join $portsharepath resources/port1.0]}
54default distpath {[file join $portdbpath distfiles]}
55default workdir work
56default workpath {[file join $portpath $workdir]}
57default prefix /opt/local
58default x11prefix /usr/X11R6
59default destdir destroot
60default destpath {${workpath}/${destdir}}
61# destroot is provided as a clearer name for the "destpath" variable
62default destroot {${destpath}}
63default filesdir files
64default revision 0
65default epoch 0
66default distname {${portname}-${portversion}}
67default worksrcdir {$distname}
68default filespath {[file join $portpath $filesdir]}
69default worksrcpath {[file join $workpath $worksrcdir]}
70
71# Compatibility namespace
72default portname {$name}
73default portversion {$version}
74default portrevision {$revision}
75default portepoch {$epoch}
76
77# Platform Settings
78set os_arch $tcl_platform(machine)
79if {$os_arch == "Power Macintosh"} { set os_arch "powerpc" }
80
81default os.platform {[string tolower $tcl_platform(os)]}
82default os.version {$tcl_platform(osVersion)}
83default os.arch {$os_arch}
84# Remove trailing "Endian"
85default os.endian {[string range $tcl_platform(byteOrder) 0 [expr [string length $tcl_platform(byteOrder)] - 7]]}
86
87# Select implicit variants
88if {[info exists os.platform] && ![info exists variations(${os.platform})]} { variant_set ${os.platform}}
89if {[info exists os.arch] && ![info exists variations(${os.arch})]} { variant_set ${os.arch} }
90
91# deprecate options here
92option_deprecate filedir filesdir
93
94proc main {args} {
95    return 0
96}
Note: See TracBrowser for help on using the repository browser.