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

Last change on this file since 1231 was 1231, checked in by landonf (Landon Fuller), 18 years ago

Switch from destroot to destdir.
Reversing the destroot change I proposed earlier. Sorry Kevin

  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 3.4 KB
Line 
1# ex:ts=4
2# portmain.tcl
3#
4# Copyright (c) 2002 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]
39${com.apple.main} provides main
40
41# define options
42options prefix name version revision categories maintainers workdir worksrcdir filedir distname portdbpath libpath distpath sources_conf os.platform os.version os.arch os.endian platforms default_variants
43
44# Export options via PortInfo
45options_export name version revision categories maintainers platforms
46
47# Assign option procedure to default_variants
48option_proc default_variants handle_default_variants
49
50# Remove trailing "Endian"
51
52default distpath {[file join $portdbpath distfiles]}
53default workdir work
54default workpath {[file join $portpath $workdir]}
55default prefix /opt/local
56default destdir {${workpath}/destdir}
57default filedir files
58default revision 0
59default distname {${portname}-${portversion}}
60default worksrcdir {$distname}
61default filesdir {files}
62default filespath {[file join $portpath $filesdir]}
63default worksrcpath {[file join $workpath $worksrcdir]}
64
65# Compatibility namespace
66default portname {$name}
67default portversion {$version}
68default portrevision {$revision}
69
70# Platform Settings
71set os_arch $tcl_platform(machine)
72if {$os_arch == "Power Macintosh"} { set os_arch "powerpc" }
73
74set os_endian $tcl_platform(byteOrder)
75default os.platform {[string tolower $tcl_platform(os)]}
76default os.version {$tcl_platform(osVersion)}
77default os.arch {$os_arch}
78default os.endian {[string range $os_endian 0 [expr [string length $os_endian] - 7]]}
79
80
81# Select implicit variants
82if {[info exists os.platform] && ![info exists variations(${os.platform})]} { variant_set ${os.platform}}
83if {[info exists os.arch] && ![info exists variations(${os.arch})]} { variant_set ${os.arch} }
84
85proc main {args} {
86    return 0
87}
Note: See TracBrowser for help on using the repository browser.