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

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

Fix building macfuse on case-sensitive filesystems

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