Ticket #141: portconfigure.tcl.diff

File portconfigure.tcl.diff, 1.9 KB (added by jpm@…, 22 years ago)

diff that adds configure_update primitive

  • base/src/port1.0/portconfigure.tcl

    RCS file: /Volumes/src/cvs/od/proj/darwinports/base/src/port1.0/portconfigure.tcl,v
    retrieving revision 1.21
    diff -u -d -b -w -r1.21 portconfigure.tcl
     
    3232package provide portconfigure 1.0
    3333package require portutil 1.0
    3434
     35#define options
     36options configure_update
     37# Export options via PortInfo
     38options_export configure_update
     39
    3540set com.apple.configure [target_new com.apple.configure configure_main]
    3641${com.apple.configure} provides configure
    3742${com.apple.configure} requires main fetch extract checksum patch
     
    4954default xmkmf.cmd xmkmf
    5055default xmkmf.dir {${worksrcpath}}
    5156default use_configure yes
     57default configure_update no
    5258
    5359set UI_PREFIX "---> "
    5460
     
    6167proc configure_main {args} {
    6268    global [info globals]
    6369    global global configure configure.args configure.dir automake automake.env automake.args automake.dir autoconf autoconf.env autoconf.args autoconf.dir xmkmf libtool portname worksrcpath prefix workpath UI_PREFIX use_configure use_autoconf use_automake use_xmkmf
     70    global configure_update os.platform
     71
     72        if [tbool configure_update] {
     73            if {${os.platform} == "darwin"} {
     74                file copy -force /usr/share/libtool/config.guess \
     75                        ${worksrcpath}/config.guess   
     76                file copy -force /usr/share/libtool/config.sub \
     77                        ${worksrcpath}/config.sub
     78            } else {
     79                # XXX configure_update is only available for darwin, add more support here
     80                ui_warning "WARNING: configure_update is not implemented on ${os.platform}."
     81                ui_warning "Configure scripts were not updated."       
     82            } 
     83    }
    6484
    6585    if [tbool use_automake] {
    6686        # XXX depend on automake