Ticket #13185: libfuse.diff

File libfuse.diff, 4.1 KB (added by takanori@…, 16 years ago)
  • Portfile

     
    33PortSystem 1.0
    44
    55name                libfuse
    6 version             2.6.5
    7 revision            1
     6version             2.7.1
     7set macfuse_version 1.0.0
    88categories          fuse devel
    99platforms           darwin
    1010maintainers         eridius@macports.org
     
    1313
    1414homepage            http://fuse.sourceforge.net/
    1515
    16 distname            fuse-${version}
    17 master_sites        sourceforge:fuse
    18 checksums           ${distfiles} md5 66bd30503df55a87b9868835ca5a45bc \
    19                                  sha1 bbb6baa147ff9057b66a64f10e5027434468c0aa
     16master_sites        macports:fusefs
     17distname            macfuse-${macfuse_version}
     18checksums           md5 721e9527b03563a6bed4f918bae83e2b \
     19                    sha1 2259cfa93a7d6537c1b3b925454543a66d76752b
    2020
    21 livecheck.distname  fuse-2.X
     21platform darwin 8 {}
    2222
    23 depends_lib         port:pkgconfig
    24 
    25 platform darwin {
    26     depends_run         port:fusefs
    27     patch_sites         http://macfuse.googlecode.com/svn/tags/macfuse-0.4.0/libfuse/
    28     patchfiles          fuse-2.6.5-macosx.patch
    29     checksums-append    fuse-2.6.5-macosx.patch md5 96c27b9d8c5d719ff7db99064c21ec87 \
    30                                                 sha1 edbf8769809eea32f9f83e7fa7e8b791e6cbe106
    31    
    32     configure.post_args-append CFLAGS="-D__FreeBSD__=10 -D_POSIX_C_SOURCE=200112L"
    33    
    34     # override patch.pre_args since it defaults to -p0
    35     patch.pre_args -p1
     23if {[variant_isset darwin_8]} {
     24    set product_version 10.4
     25} else {
     26    set product_version 10.5
    3627}
    3728
     29worksrcdir          ${distname}/core/${product_version}/${name}/fuse-${version}
     30
     31#livecheck.distname  fuse-2.X
     32
     33use_bzip2           yes
     34
     35depends_lib         port:pkgconfig
     36depends_run         port:fusefs
     37
    3838pre-fetch {
    3939    # LibFUSE currently only works on OS X
    4040    # so error out if attempting to install elsewhere
    41     if {![variant_isset darwin]} {
     41    if {${os.platform} != "darwin"} {
    4242        return -code error "LibFUSE is only supported for Mac OS X"
    4343    }
    44    
    45     if {[variant_isset darwin]} {
    46         patch_checksum
    47     }
    4844}
    4945
    50 proc patch_checksum {} {
    51     global checksums_array UI_PREFIX
    52     # assume we only have one patchfile, because at the moment that's true
    53     set patchfile [option patchfiles]
    54     # do our own checksumming of an existing $patchfile because URL changes between revisions
    55     # if the checksum fails, delete the patchfile
    56     # a lot of this code is copied from checksum_main
    57     # Eventually this technique should be replaced with a patchfile dist subdir
    58     if {[file exists [option distpath]/$patchfile]} {
    59         ui_info "$UI_PREFIX $patchfile exists, checksumming to detect URL change"
    60         if {[parse_checksums [option checksums]] == "yes"} {
    61             ui_info "$UI_PREFIX [format [msgcat::mc "Checksumming %s"] $patchfile]"
    62             set fullpath [file join [option distpath] $patchfile]
    63             if {[info exists checksums_array($patchfile)]} {
    64                 set checksums $checksums_array($patchfile)
    65                
    66                 foreach {type sum} $checksums {
    67                     set calculated_sum [calc_$type $fullpath]
    68                     if {![string equal $sum $calculated_sum]} {
    69                         ui_debug "Checksum mismatch for $patchfile"
    70                         delete $fullpath
    71                         break
    72                     }
    73                 }
    74             }
    75         } else {
    76             return -code error "Unable to parse checksum string"
    77         }
    78     }
    79 }
    80  No newline at end of file
     46post-extract {
     47    system "cd ${workpath}/${distname}/core/${product_version}/${name} && gzip -dc fuse-current.tar.gz | tar --no-same-owner -xf -"
     48    system "cd ${worksrcpath} && patch -p1 < ../fuse-current-macosx.patch"
     49}
     50
     51patch {
     52    reinplace "s|--prefix=/usr/local|--prefix=${prefix}|" ${worksrcpath}/darwin_configure.sh
     53}
     54
     55configure {
     56    system "cd ${worksrcpath} && /bin/sh ./darwin_configure.sh ${workpath}/${distname}/core/${product_version}/fusefs"
     57}