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

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

macfuse: change platform to macosx and stop using dummy variants

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