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

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

Update macfuse to 1.7

Also include the patch from #15274 to fix cp->/bin/cp

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