Ticket #2808: portsharepath.diff

File portsharepath.diff, 2.4 KB (added by steffen@…, 20 years ago)

patch adding portsharepath as a ports.conf option

  • base/doc/ports.conf.in

    RCS file: /Volumes/src/cvs/od/proj/darwinports/base/doc/ports.conf.in,v
    retrieving revision 1.8
    diff -u -p -r1.8 ports.conf.in
    sources_conf @PORTCONFIGDIR_EXPANDED@/s 
    77# Where to store ports specific database files
    88portdbpath              @localstatedir_expanded@/db/dports
    99
     10# Where to find the darwinports data files
     11portsharepath           @prefix_expanded@/share/darwinports
     12
    1013# Set the directory in which to install ports
    1114prefix                  @prefix_expanded@
    1215
  • base/src/darwinports1.0/darwinports.tcl

    RCS file: /Volumes/src/cvs/od/proj/darwinports/base/src/darwinports1.0/darwinports.tcl,v
    retrieving revision 1.157
    diff -u -p -r1.157 darwinports.tcl
    package require darwinports_index 1.0 
    3636
    3737namespace eval darwinports {
    3838    namespace export bootstrap_options portinterp_options open_dports
    39     variable bootstrap_options "portdbpath libpath binpath auto_path sources_conf prefix portdbformat portinstalltype portarchivemode portarchivepath portarchivetype portautoclean destroot_umask variants_conf"
     39    variable bootstrap_options "portdbpath libpath binpath auto_path sources_conf prefix portsharepath portdbformat portinstalltype portarchivemode portarchivepath portarchivetype portautoclean destroot_umask variants_conf"
    4040    variable portinterp_options "portdbpath portpath auto_path prefix portsharepath registry.path registry.format registry.installtype portarchivemode portarchivepath portarchivetype portautoclean destroot_umask"
    4141       
    4242    variable open_dports {}
    proc dportinit {args} { 
    252252        # (reading and writing)
    253253        set darwinports::portarchivetype [split $portarchivetype {:,}]
    254254
    255     set portsharepath ${prefix}/share/darwinports
     255    if {![info exists portsharepath]} {
     256        set portsharepath ${prefix}/share/darwinports
     257    }
     258
    256259    if {![file isdirectory $portsharepath]} {
    257260        return -code error "Data files directory '$portsharepath' must exist"
    258261    }
    259262   
    260263    if {![info exists libpath]} {
    261         set libpath "${prefix}/share/darwinports/Tcl"
     264        set libpath "${portsharepath}/Tcl"
    262265    }
    263266
    264267    if {![info exists binpath]} {