Changeset 56


Ignore:
Timestamp:
Aug 2, 2002, 7:12:29 AM (17 years ago)
Author:
landonf
Message:

slowly moving towards library API

Location:
trunk/base
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/Install/darwinports1.0/darwinports.tcl

    r55 r56  
    6969                set portpath [darwinports::bootstrap]
    7070                # Register standard darwinports package options
    71                 globals darwinports::options portpath distdir prefix
    72                 options darwinports::options portpath distdir prefix
     71                globals darwinports::options portpath distdir portdir prefix
     72                options darwinports::options portpath distdir portdir prefix
    7373                # Register defaults
    7474                default darwinports::options portpath $portpath
     
    7878                return
    7979        }
     80
     81# XXX incomplete. Waiting for kevin's dependancy related submissions
     82        proc build {portdir} {
     83                if [file isdirectory $portdir] {
     84                        cd $portdir
     85                        setval darwinports::options portdir [pwd]
     86                        # XXX These must execute at a global scope
     87                        uplevel #0 source Portfile
     88                        uplevel #0 eval_depend portutil::targets
     89                } else {
     90                        return -code error "Portdir $portdir does not exist"
     91                }
     92        }
    8093}
  • trunk/base/bin/portbuild

    r6 r56  
    44
    55# globals
    6 set invoice Portfile
     6set portdir .
    77
    88# Standard procedures
     
    2222        print_usage
    2323} elseif {$argc == 1} {
    24         set invoice [lindex $argv 0]
     24        set portdir [lindex $argv 0]
    2525}
    2626
    2727darwinports::init
    28 
    29 if [file isfile $invoice] {
    30         source $invoice
    31 } else {
    32         fatal invoice file '$invoice' is not a file or does not exist
    33 }
    34 eval_depend portutil::targets
     28darwinports::build $portdir
Note: See TracChangeset for help on using the changeset viewer.