Changeset 22308


Ignore:
Timestamp:
Feb 26, 2007, 2:56:04 AM (13 years ago)
Author:
eridius@…
Message:

Upgrade to MacFUSE 0.2.2
Add a complicated extra checksum step to libfuse to detect patchfile updates despite name not changing

Location:
trunk/dports/fuse
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/fuse/fusefs/Portfile

    r22152 r22308  
    55
    66name                fusefs
    7 version             0.2.1
     7version             0.2.2
    88categories          fuse devel
    99platforms           darwin
     
    2121distname            fusefs-${version}
    2222worksrcdir          fusefs
    23 checksums           md5 5fb7f71918d0f7b859c33aedc49245b7 \
    24                     sha1 06a6158113e228afecedb4f2f58bc9ec97525da3
     23checksums           md5 036e55e7203be82974c55f56504b30a1 \
     24                    sha1 07b782e71e6b30e3181171feb7618052587af592
    2525
    2626use_bzip2           yes
  • trunk/dports/fuse/libfuse/Portfile

    r22152 r22308  
    55name                libfuse
    66version             2.6.3
    7 revision            1
     7revision            2
    88categories          fuse devel
    99platforms           darwin
     
    2323platform darwin {
    2424    depends_run         port:fusefs
    25     patch_sites         http://macfuse.googlecode.com/svn/tags/macfuse-0.2.1/libfuse/
     25    patch_sites         http://macfuse.googlecode.com/svn/tags/macfuse-0.2.2/libfuse/
    2626    patchfiles          fuse-2.6.3-macosx.patch
    27     checksums-append    fuse-2.6.3-macosx.patch md5 56dcf57e1a0c0f36e8a5b20becba5f73 \
    28                                                 sha1 133db78fd18fc0df6b3a93bea658047aa3d402e8
     27    checksums-append    fuse-2.6.3-macosx.patch md5 845d0f7bd9411d50eb41295425570f00 \
     28                                                sha1 b3e366a238930c3bfb6f1b3a4119c289c54e9146
    2929   
    3030    configure.post_args-append CFLAGS="-D__FreeBSD__=10 -D_POSIX_C_SOURCE=200112L"
     
    4040        return -code error "LibFUSE is only supported for Mac OS X"
    4141    }
     42   
     43    if {[variant_isset darwin]} {
     44        patch_checksum
     45    }
    4246}
     47
     48proc patch_checksum {} {
     49    global checksums_array UI_PREFIX
     50    # assume we only have one patchfile, because at the moment that's true
     51    set patchfile [option patchfiles]
     52    # do our own checksumming of an existing $patchfile because URL changes between revisions
     53    # if the checksum fails, delete the patchfile
     54    # a lot of this code is copied from checksum_main
     55    # Eventually this technique should be replaced with a patchfile dist subdir
     56    if {[file exists [option distpath]/$patchfile]} {
     57        ui_info "$UI_PREFIX $patchfile exists, checksumming to detect URL change"
     58        if {[parse_checksums [option checksums]] == "yes"} {
     59            ui_info "$UI_PREFIX [format [msgcat::mc "Checksumming %s"] $patchfile]"
     60            set fullpath [file join [option distpath] $patchfile]
     61            if {[info exists checksums_array($patchfile)]} {
     62                set checksums $checksums_array($patchfile)
     63               
     64                foreach {type sum} $checksums {
     65                    set calculated_sum [calc_$type $fullpath]
     66                    if {![string equal $sum $calculated_sum]} {
     67                        ui_debug "Checksum mismatch for $patchfile"
     68                        delete $fullpath
     69                        break
     70                    }
     71                }
     72            }
     73        } else {
     74            return -code error "Unable to parse checksum string"
     75        }
     76    }
     77}
Note: See TracChangeset for help on using the changeset viewer.