[55127] trunk/dports/fuse/spotlightfs

snc at macports.org snc at macports.org
Thu Aug 6 18:31:44 PDT 2009


Revision: 55127
          http://trac.macports.org/changeset/55127
Author:   snc at macports.org
Date:     2009-08-06 18:31:44 -0700 (Thu, 06 Aug 2009)
Log Message:
-----------
remove hardcoded /opt/local, fix lint

Modified Paths:
--------------
    trunk/dports/fuse/spotlightfs/Portfile

Added Paths:
-----------
    trunk/dports/fuse/spotlightfs/files/patch-writable-dirs.diff

Removed Paths:
-------------
    trunk/dports/fuse/spotlightfs/files/patch-writable-dirs

Modified: trunk/dports/fuse/spotlightfs/Portfile
===================================================================
--- trunk/dports/fuse/spotlightfs/Portfile	2009-08-07 01:30:35 UTC (rev 55126)
+++ trunk/dports/fuse/spotlightfs/Portfile	2009-08-07 01:31:44 UTC (rev 55127)
@@ -28,7 +28,7 @@
                                            sha1 99752396411e3b44728436d15d6cb76bd1966e1f
 
 # this patch needs to be removed next time there's a SpotlightFS release
-patchfiles          patch-writable-dirs
+patchfiles          patch-writable-dirs.diff
 
 use_bzip2           yes
 
@@ -38,10 +38,10 @@
 
 xcode.target            SpotlightFS
 xcode.configuration     Release
-xcode.build.settings    LIBRARY_SEARCH_PATHS='/opt/local/lib /usr/local/lib' \
-                        HEADER_SEARCH_PATHS='/opt/local/include /usr/local/include'
-xcode.destroot.settings LIBRARY_SEARCH_PATHS='/opt/local/lib /usr/local/lib' \
-                        HEADER_SEARCH_PATHS='/opt/local/include /usr/local/include'
+xcode.build.settings    LIBRARY_SEARCH_PATHS='${prefix}/lib /usr/local/lib' \
+                        HEADER_SEARCH_PATHS='${prefix}/include /usr/local/include'
+xcode.destroot.settings LIBRARY_SEARCH_PATHS='${prefix}/lib /usr/local/lib' \
+                        HEADER_SEARCH_PATHS='${prefix}/include /usr/local/include'
 platform i386 {
     xcode.build.settings-append ARCHS='i386'
     xcode.destroot.settings-append ARCHS='i386'

Deleted: trunk/dports/fuse/spotlightfs/files/patch-writable-dirs
===================================================================
--- trunk/dports/fuse/spotlightfs/files/patch-writable-dirs	2009-08-07 01:30:35 UTC (rev 55126)
+++ trunk/dports/fuse/spotlightfs/files/patch-writable-dirs	2009-08-07 01:31:44 UTC (rev 55127)
@@ -1,76 +0,0 @@
-Index: Source/SpotlightFS.m
-===================================================================
---- Source/SpotlightFS.m	(.../tags/macfuse-0.4.0/filesystems-objc/SpotlightFS)	(revision 445)
-+++ Source/SpotlightFS.m	(.../trunk/filesystems-objc/SpotlightFS)	(revision 445)
-@@ -129,6 +129,25 @@
-   return userCreatedFolders;
- }
- 
-+// -isUserCreatedFolder:
-+//
-+// Returns YES if the specified folder is a user created folder. Also try
-+// prepending a leading slash to the user created folders, incase |path| starts
-+// with a slash.
-+//
-+- (BOOL)isUserCreatedFolder:(NSString *)path {
-+  NSArray *folders = [self userCreatedFolders];
-+  NSString *folder = nil;
-+  NSEnumerator *folderEnumerator = [folders objectEnumerator];
-+  while ((folder = [folderEnumerator nextObject])) {
-+    if ([folder isEqualToString:path])
-+      return YES;
-+    if ([[@"/" stringByAppendingPathComponent:folder] isEqualToString:path])
-+      return YES;
-+  }
-+  return NO;
-+}
-+
- // -setUserCreatedFolders:
- //
- // Sets the folder names to use for the top-level user-created folders.
-@@ -341,20 +360,27 @@
-   return NO;
- }
- 
-+// By default, directories are not writeable, with the notable exceptions below:
-+// - Slash is writable
-+// - User created directories in slash are writable
- - (NSDictionary *)fileAttributesAtPath:(NSString *)path {
-   if (!path)
-     return nil;
-   
-   NSMutableDictionary *attr = nil;
-+  int mode = 0500;
-   
-   NSString *pathdir = [path stringByDeletingLastPathComponent];
-   NSString *smarter = [@"/" stringByAppendingString:kSmarterFolder];
-   
--  if ([pathdir isEqualToString:@"/"]
--      || [pathdir isEqualToString:smarter]) {
-+  if ([pathdir isEqualToString:@"/"] || [pathdir isEqualToString:smarter]) {
-     
-+    if ([path isEqualToString:@"/"] || [self isUserCreatedFolder:path]) {
-+      mode = 0700;
-+    }
-+    
-     attr = [NSDictionary dictionaryWithObjectsAndKeys:
--      [NSNumber numberWithInt:0500], NSFilePosixPermissions,
-+      [NSNumber numberWithInt:mode], NSFilePosixPermissions,
-       [NSNumber numberWithInt:geteuid()], NSFileOwnerAccountID,
-       [NSNumber numberWithInt:getegid()], NSFileGroupOwnerAccountID,
-       [NSDate date], NSFileCreationDate,
-Index: Source/SpotlightFS.h
-===================================================================
---- Source/SpotlightFS.h	(.../tags/macfuse-0.4.0/filesystems-objc/SpotlightFS)	(revision 445)
-+++ Source/SpotlightFS.h	(.../trunk/filesystems-objc/SpotlightFS)	(revision 445)
-@@ -45,6 +45,10 @@
- //
- - (NSArray *)userCreatedFolders;
- 
-+// Returns YES if |path| is a user created folder.
-+//
-+- (BOOL)isUserCreatedFolder:(NSString *)path;
-+
- // Sets the full user-created folders array.
- //
- - (void)setUserCreatedFolders:(NSArray *)folders;

Copied: trunk/dports/fuse/spotlightfs/files/patch-writable-dirs.diff (from rev 55118, trunk/dports/fuse/spotlightfs/files/patch-writable-dirs)
===================================================================
--- trunk/dports/fuse/spotlightfs/files/patch-writable-dirs.diff	                        (rev 0)
+++ trunk/dports/fuse/spotlightfs/files/patch-writable-dirs.diff	2009-08-07 01:31:44 UTC (rev 55127)
@@ -0,0 +1,76 @@
+Index: Source/SpotlightFS.m
+===================================================================
+--- Source/SpotlightFS.m	(.../tags/macfuse-0.4.0/filesystems-objc/SpotlightFS)	(revision 445)
++++ Source/SpotlightFS.m	(.../trunk/filesystems-objc/SpotlightFS)	(revision 445)
+@@ -129,6 +129,25 @@
+   return userCreatedFolders;
+ }
+ 
++// -isUserCreatedFolder:
++//
++// Returns YES if the specified folder is a user created folder. Also try
++// prepending a leading slash to the user created folders, incase |path| starts
++// with a slash.
++//
++- (BOOL)isUserCreatedFolder:(NSString *)path {
++  NSArray *folders = [self userCreatedFolders];
++  NSString *folder = nil;
++  NSEnumerator *folderEnumerator = [folders objectEnumerator];
++  while ((folder = [folderEnumerator nextObject])) {
++    if ([folder isEqualToString:path])
++      return YES;
++    if ([[@"/" stringByAppendingPathComponent:folder] isEqualToString:path])
++      return YES;
++  }
++  return NO;
++}
++
+ // -setUserCreatedFolders:
+ //
+ // Sets the folder names to use for the top-level user-created folders.
+@@ -341,20 +360,27 @@
+   return NO;
+ }
+ 
++// By default, directories are not writeable, with the notable exceptions below:
++// - Slash is writable
++// - User created directories in slash are writable
+ - (NSDictionary *)fileAttributesAtPath:(NSString *)path {
+   if (!path)
+     return nil;
+   
+   NSMutableDictionary *attr = nil;
++  int mode = 0500;
+   
+   NSString *pathdir = [path stringByDeletingLastPathComponent];
+   NSString *smarter = [@"/" stringByAppendingString:kSmarterFolder];
+   
+-  if ([pathdir isEqualToString:@"/"]
+-      || [pathdir isEqualToString:smarter]) {
++  if ([pathdir isEqualToString:@"/"] || [pathdir isEqualToString:smarter]) {
+     
++    if ([path isEqualToString:@"/"] || [self isUserCreatedFolder:path]) {
++      mode = 0700;
++    }
++    
+     attr = [NSDictionary dictionaryWithObjectsAndKeys:
+-      [NSNumber numberWithInt:0500], NSFilePosixPermissions,
++      [NSNumber numberWithInt:mode], NSFilePosixPermissions,
+       [NSNumber numberWithInt:geteuid()], NSFileOwnerAccountID,
+       [NSNumber numberWithInt:getegid()], NSFileGroupOwnerAccountID,
+       [NSDate date], NSFileCreationDate,
+Index: Source/SpotlightFS.h
+===================================================================
+--- Source/SpotlightFS.h	(.../tags/macfuse-0.4.0/filesystems-objc/SpotlightFS)	(revision 445)
++++ Source/SpotlightFS.h	(.../trunk/filesystems-objc/SpotlightFS)	(revision 445)
+@@ -45,6 +45,10 @@
+ //
+ - (NSArray *)userCreatedFolders;
+ 
++// Returns YES if |path| is a user created folder.
++//
++- (BOOL)isUserCreatedFolder:(NSString *)path;
++
+ // Sets the full user-created folders array.
+ //
+ - (void)setUserCreatedFolders:(NSArray *)folders;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090806/1d943b78/attachment-0001.html>


More information about the macports-changes mailing list