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

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

Update MacFUSE to 1.3. This involved obsoleting the fusefs and libfuse ports and introducing a new macfuse port.
Note that all fuse ports (besides sshfs) need to be updated for this change

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.3 KB
Line 
1# $Id: Portfile 36271 2008-04-25 11:30:48Z eridius@macports.org $
2
3PortSystem 1.0
4
5name                macfuse
6version             1.3
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 fd80b07221174f1636502c0062c43690 \
23                    sha1 d840ba3dbd56850b6b9d10a3937fb2cbdacbffbc
24
25livecheck.distname  MacFUSE-Core-(.*).dmg
26livecheck.version   10.5-${version}.1
27
28use_bzip2           yes
29
30use_configure       no
31
32destroot.violate_mtree yes
33
34# patchfiles          patch-project.pbxproj
35
36platform darwin 8 {
37    # dummy for pre-fetch
38}
39platform darwin 9 {
40    # dummy for pre-fetch
41}
42
43variant universal {
44    # provide a dummy variant since the script will actually build universal
45    # and we don't want to error out if someone says +universal
46}
47
48# ensure that user is running OS X 10.4 or higher
49pre-fetch {
50    if {![variant_isset darwin_8] && ![variant_isset darwin_9]} {
51        return -code error "MacFUSE requires at least Mac OS X 10.4 to run"
52    }
53}
54
55build {
56    system "cd ${worksrcpath} && ./build_macfuse.sh | sed -ne '/^created: /h;p;$\{g;s/^created: //
57                w ../dmgname
58            \}'; exit $\{PIPESTATUS\[0\]\}"
59}
60
61destroot {
62    set dmgname [exec cat ${workpath}/dmgname]
63    # we know the build script generates a .tar.bz2 right next to the dmg
64    set tarname [string replace $dmgname end-2 end "tar.bz2"]
65    system "tar -xjf $tarname -C ${destpath}"
66    delete ${destpath}/opt
67    file rename ${destpath}/usr ${destpath}/opt
68    foreach f [list "pkgconfig/fuse.pc" "libfuse.la" "libulockmgr.la"] {
69        set path "${destpath}/opt/local/lib/${f}"
70        reinplace s,/usr/local,/opt/local, $path
71    }
72    foreach lib [list "libulockmgr.0" "libfuse.0"] {
73        set libpath "/opt/local/lib/${lib}.dylib"
74        system "install_name_tool -id ${libpath} ${destpath}${libpath}"
75    }
76    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"
77    # delete the whole directory the build script creates
78    # when updating this Portfile DOUBLE CHECK THIS LINE
79    delete [file dirname $dmgname]
80}
81
82post-activate {
83    if {[string length [exec kextstat -lb com.google.filesystems.fusefs]] > 0} {
84        ui_msg "********************************************************"
85        ui_msg "*  fusefs is already loaded. You may need to restart.  *"
86        ui_msg "*  Alternatively, if feeling adventurous, you can run  *"
87        ui_msg "*  `sudo kextunload -b com.google.filesystems.fusefs`  *"
88        ui_msg "********************************************************"
89    }
90}
Note: See TracBrowser for help on using the repository browser.