[80855] users/dports/ports/fuse

dports at macports.org dports at macports.org
Mon Jul 18 23:28:39 PDT 2011


Revision: 80855
          http://trac.macports.org/changeset/80855
Author:   dports at macports.org
Date:     2011-07-18 23:28:38 -0700 (Mon, 18 Jul 2011)
Log Message:
-----------
fuse4x, fuse4x-kext: install the fuse4x kext into
${prefix}/Library/Extensions rather than /System/Library/Extensions.

The library loads the kext using a setuid program, so it doesn't have
to go into /System/Library/Extensions (or any other particular place,
really.) We might as well keep it in ${prefix}, and avoid violating
mtree.

Modified Paths:
--------------
    users/dports/ports/fuse/fuse4x/Portfile
    users/dports/ports/fuse/fuse4x-kext/Portfile

Added Paths:
-----------
    users/dports/ports/fuse/fuse4x/files/patch-include_fuse_param.h.diff
    users/dports/ports/fuse/fuse4x-kext/files/
    users/dports/ports/fuse/fuse4x-kext/files/patch-common_fuse_param.h.diff

Modified: users/dports/ports/fuse/fuse4x/Portfile
===================================================================
--- users/dports/ports/fuse/fuse4x/Portfile	2011-07-19 06:15:13 UTC (rev 80854)
+++ users/dports/ports/fuse/fuse4x/Portfile	2011-07-19 06:28:38 UTC (rev 80855)
@@ -35,8 +35,22 @@
 fetch.type          git
 git.url             git://github.com/drkp/fuse4x-fuse.git
 git.branch          pu
-patchfiles          patch-configure.in.diff
+patchfiles          patch-configure.in.diff \
+                    patch-include_fuse_param.h.diff
 
+# kext destination: kext will be installed into ${kextdir}/fuse4x.kext.
+#
+# The kext is autoloaded by the library using load_fuse4x, so it
+# doesn't have to go into /System/Library/Extensions. It doesn't
+# matter where we put it, as long as it's kept in sync with the library.
+#
+# If updating the patchfile or ${kextdir}, must also update the
+# corresponding patch in the fuse4x-kext port!
+set kextdir        "${prefix}/Library/Extensions"
+post-patch {
+    reinplace "s|@@KEXTPATH@@|${kextdir}/fuse4x.kext|" ${worksrcpath}/include/fuse_param.h
+}
+
 configure.cflags-append -g -O0
 configure.ldflags   -framework CoreFoundation
 

Added: users/dports/ports/fuse/fuse4x/files/patch-include_fuse_param.h.diff
===================================================================
--- users/dports/ports/fuse/fuse4x/files/patch-include_fuse_param.h.diff	                        (rev 0)
+++ users/dports/ports/fuse/fuse4x/files/patch-include_fuse_param.h.diff	2011-07-19 06:28:38 UTC (rev 80855)
@@ -0,0 +1,11 @@
+--- include/fuse_param.h.orig	2011-07-19 01:54:48.000000000 -0400
++++ include/fuse_param.h	2011-07-19 01:55:59.000000000 -0400
+@@ -16,7 +16,7 @@
+ 
+ /* Paths */
+ 
+-#define FUSE4X_KEXT_PATH                  "/System/Library/Extensions/fuse4x.kext"
++#define FUSE4X_KEXT_PATH                  "@@KEXTPATH@@"
+ #define FUSE4X_LOAD_PROG                  FUSE4X_KEXT_PATH "/Support/load_fuse4x"
+ 
+ /* Device Interface */

Modified: users/dports/ports/fuse/fuse4x-kext/Portfile
===================================================================
--- users/dports/ports/fuse/fuse4x-kext/Portfile	2011-07-19 06:15:13 UTC (rev 80854)
+++ users/dports/ports/fuse/fuse4x-kext/Portfile	2011-07-19 06:28:38 UTC (rev 80855)
@@ -43,18 +43,32 @@
 # binary by default.
 default_variants    +universal
 
+# kext destination: kext will be installed into ${kextdir}/fuse4x.kext.
+#
+# The kext is autoloaded by the library using load_fuse4x, so it
+# doesn't have to go into /System/Library/Extensions. It doesn't
+# matter where we put it, as long as it's kept in sync with the library.
+#
+# If updating the patchfile or ${kextdir}, must also update the
+# corresponding patch in the fuse4x port!
+patchfiles          patch-common_fuse_param.h.diff
+set kextdir        "${prefix}/Library/Extensions"
+post-patch {
+    reinplace "s|@@KEXTPATH@@|${kextdir}/fuse4x.kext|" ${worksrcpath}/common/fuse_param.h
+}
+
 xcode.configuration Release
 
-destroot.violate_mtree  yes
+#destroot.violate_mtree  yes
 destroot.asroot         yes
 
 destroot {
-    xinstall -d ${destroot}/System/Library/Extensions
-    file copy ${worksrcpath}/build/${xcode.configuration}/fuse4x.kext ${destroot}/System/Library/Extensions
-    file attributes ${destroot}/System/Library/Extensions/fuse4x.kext -owner root -group wheel -permissions rwxr-xr-x
+    xinstall -d ${destroot}${kextdir}
+    file copy ${worksrcpath}/build/${xcode.configuration}/fuse4x.kext ${destroot}${kextdir}
+    file attributes ${destroot}${kextdir}/fuse4x.kext -owner root -group wheel -permissions rwxr-xr-x
 
-    xinstall -d ${destroot}/System/Library/Extensions/fuse4x.kext/Support
-    xinstall -o root -m 4755 ${worksrcpath}/build/${xcode.configuration}/load_fuse4x ${destroot}/System/Library/Extensions/fuse4x.kext/Support
+    xinstall -d ${destroot}${kextdir}/fuse4x.kext/Support
+    xinstall -o root -m 4755 ${worksrcpath}/build/${xcode.configuration}/load_fuse4x ${destroot}${kextdir}/fuse4x.kext/Support
 }
 
 post-activate {

Added: users/dports/ports/fuse/fuse4x-kext/files/patch-common_fuse_param.h.diff
===================================================================
--- users/dports/ports/fuse/fuse4x-kext/files/patch-common_fuse_param.h.diff	                        (rev 0)
+++ users/dports/ports/fuse/fuse4x-kext/files/patch-common_fuse_param.h.diff	2011-07-19 06:28:38 UTC (rev 80855)
@@ -0,0 +1,11 @@
+--- common/fuse_param.h.orig	2011-07-19 01:54:48.000000000 -0400
++++ common/fuse_param.h	2011-07-19 01:55:59.000000000 -0400
+@@ -16,7 +16,7 @@
+ 
+ /* Paths */
+ 
+-#define FUSE4X_KEXT_PATH                  "/System/Library/Extensions/fuse4x.kext"
++#define FUSE4X_KEXT_PATH                  "@@KEXTPATH@@"
+ #define FUSE4X_LOAD_PROG                  FUSE4X_KEXT_PATH "/Support/load_fuse4x"
+ 
+ /* Device Interface */
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110718/2b443e9d/attachment.html>


More information about the macports-changes mailing list