source: trunk/dports/fuse/macfuse/Portfile @ 36749

Last change on this file since 36749 was 36749, checked in by eridius@…, 12 years ago

Bump MacFUSE to 1.5

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.4 KB
Line 
1# $Id: Portfile 36749 2008-05-14 04:56:13Z eridius@macports.org $
2
3PortSystem 1.0
4
5name                macfuse
6version             1.5
7categories          fuse devel
8platforms           darwin
9maintainers         eridius@macports.org
10description         A FUSE-Compliant File System Implementation Mechanism for Mac OS X
11long_description    MacFUSE implements a mechanism that makes it possible to implement \
12                    a fully functional file system in a user-space program on Mac OS X \
13                    (10.4 and above). It aims to be API-compliant with the FUSE \
14                    (File-system in USErspace) mechanism that originated on Linux. \
15                    Therefore, many existing FUSE file systems become readily usable on \
16                    Mac OS X. The core of MacFUSE is in a dynamically loadable kernel extension.
17
18homepage            http://code.google.com/p/macfuse/
19master_sites        macports
20distname            macfuse-${version}
21worksrcdir          macfuse-core
22checksums           md5 ad13b08cfeb573e130a47aba070885ae \
23                    sha1 6012a79a73c90285ed5dd6282f6ec74fb23a8dd0
24
25patchfiles          patch-10.4-project.pbxproj patch-10.5-project.pbxproj
26
27livecheck.distname  MacFUSE-Core-(.*).dmg
28livecheck.version   10.5-${version}.1
29
30use_bzip2           yes
31
32use_configure       no
33
34destroot.violate_mtree yes
35
36# patchfiles          patch-project.pbxproj
37
38platform darwin 8 {
39    # dummy for pre-fetch
40}
41platform darwin 9 {
42    # dummy for pre-fetch
43}
44
45variant universal {
46    # provide a dummy variant since the script will actually build universal
47    # and we don't want to error out if someone says +universal
48}
49
50# ensure that user is running OS X 10.4 or higher
51pre-fetch {
52    if {![variant_isset darwin_8] && ![variant_isset darwin_9]} {
53        return -code error "MacFUSE requires at least Mac OS X 10.4 to run"
54    }
55}
56
57build {
58    system "cd ${worksrcpath} && ./build_macfuse.sh | sed -ne '/^created: /h;p;$\{g;s/^created: //
59                w ../dmgname
60            \}'; exit $\{PIPESTATUS\[0\]\}"
61}
62
63destroot {
64    set dmgname [exec cat ${workpath}/dmgname]
65    # we know the build script generates a .tar.bz2 right next to the dmg
66    set tarname [string tolower [string replace $dmgname end-2 end "tar.bz2"]]
67    system "tar -xjf $tarname -C ${destpath}"
68    delete ${destpath}/opt
69    file rename ${destpath}/usr ${destpath}/opt
70    foreach f [list "pkgconfig/fuse.pc" "libfuse.la" "libulockmgr.la"] {
71        set path "${destpath}/opt/local/lib/${f}"
72        reinplace s,/usr/local,/opt/local, $path
73    }
74    foreach lib [list "libulockmgr.0" "libfuse.0"] {
75        set libpath "/opt/local/lib/${lib}.dylib"
76        system "install_name_tool -id ${libpath} ${destpath}${libpath}"
77    }
78    system "install_name_tool -change /usr/local/lib/libfuse.0.dylib /opt/local/lib/libfuse.0.dylib ${destpath}/Library/Frameworks/MacFUSE.framework/Versions/A/MacFUSE"
79    # delete the whole directory the build script creates
80    # when updating this Portfile DOUBLE CHECK THIS LINE
81    delete [file dirname $dmgname]
82}
83
84post-activate {
85    if {[string length [exec kextstat -lb com.google.filesystems.fusefs]] > 0} {
86        ui_msg "********************************************************"
87        ui_msg "*  fusefs is already loaded. You may need to restart.  *"
88        ui_msg "*  Alternatively, if feeling adventurous, you can run  *"
89        ui_msg "*  `sudo kextunload -b com.google.filesystems.fusefs`  *"
90        ui_msg "********************************************************"
91    }
92}
Note: See TracBrowser for help on using the repository browser.