--- /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_fuse_osxfuse/osxfuse/work/osxfuse-osxfuse-7b0d8d3/build.sh	2014-08-08 09:08:55.000000000 +0200
+++ build.sh	2014-08-06 10:58:04.000000000 +0200
@@ -93,6 +93,9 @@
 declare M_XCODE51=""
 declare M_XCODE51_VERSION=5.1
 readonly M_XCODE51_COMPILER="com.apple.compilers.llvm.clang.1_0"
+declare M_XCODE60=""
+declare M_XCODE60_VERSION=6.0
+readonly M_XCODE60_COMPILER="com.apple.compilers.llvm.clang.1_0"
 
 declare M_ACTUAL_PLATFORM=""
 declare M_PLATFORMS=""
@@ -130,6 +133,12 @@
 declare M_SDK_109_XCODE=""
 declare M_SDK_109_COMPILER=""
 
+# SDK 10.10
+readonly M_SDK_1010_ARCHS="x86_64"
+declare M_SDK_1010=""
+declare M_SDK_1010_XCODE=""
+declare M_SDK_1010_COMPILER=""
+
 readonly M_FSBUNDLE_NAME="osxfusefs.fs"
 readonly M_INSTALL_RESOURCES_DIR="Install_resources"
 readonly M_KEXT_ID="com.github.osxfuse.filesystems.osxfusefs"
@@ -333,6 +342,13 @@
         m_compiler="$M_SDK_109_COMPILER"
         m_archs="$M_SDK_109_ARCHS"
     ;;
+    10.10*)
+        m_osname="Yosemite"
+        m_xcode_dir="$M_SDK_1010_XCODE"
+        m_usdk_dir="$M_SDK_1010"
+        m_compiler="$M_SDK_1010_COMPILER"
+        m_archs="$M_SDK_1010_ARCHS"
+    ;;
     *)
         m_osname="Unknown"
         m_xcode_dir=""
@@ -690,6 +706,9 @@
     elif [ -n "$M_SDK_109" ]
     then
         m_platform="10.9"
+    elif [ -n "$M_SDK_1010" ]
+    then
+        m_platform="10.10"
     else
         false
         m_exit_on_error "no supported SDK found"
@@ -1313,6 +1332,26 @@
   <array>
 __END_RULES_PLIST
 
+    if [[ "$M_PLATFORMS" =~ "10.10" ]]
+    then
+cat >> "$md_rules_plist" <<__END_RULES_PLIST
+    <dict>
+      <key>ProductID</key>
+      <string>$M_OSXFUSE_PRODUCT_ID</string>
+      <key>Predicate</key>
+      <string>SystemVersion.ProductVersion beginswith "10.10" AND Ticket.version != "$m_release_full"</string>
+      <key>Version</key>
+      <string>$m_release_full</string>
+      <key>Codebase</key>
+      <string>$md_download_url</string>
+      <key>Hash</key>
+      <string>$md_dmg_hash</string>
+      <key>Size</key>
+      <string>$md_dmg_size</string>
+    </dict>
+__END_RULES_PLIST
+    fi
+
     if [[ "$M_PLATFORMS" =~ "10.9" ]]
     then
 cat >> "$md_rules_plist" <<__END_RULES_PLIST
@@ -1870,7 +1909,7 @@
 
     m_log "building OSXFUSE kernel extension and tools"
 
-    xcodebuild -configuration "$m_configuration" -target All GCC_VERSION="$m_compiler" ARCHS="x86_64" SDKROOT="$m_usdk_dir" MACOSX_DEPLOYMENT_TARGET="$m_platform" >$m_stdout 2>$m_stderr
+    xcodebuild -configuration "$m_configuration" -target All GCC_VERSION="$m_compiler" ARCHS="$m_archs" SDKROOT="$m_usdk_dir" MACOSX_DEPLOYMENT_TARGET="$m_platform" >$m_stdout 2>$m_stderr
 
     m_exit_on_error "xcodebuild cannot build configuration $m_configuration."
 
@@ -2343,7 +2382,8 @@
                     M_XCODE50_VERSION=$m_xcode_version
                 fi
                 ;;
-            5.1*|[6789]*)
+#            5.1*|[6789]*)
+            5.1)
                 m_version_compare $M_XCODE51_VERSION $m_xcode_version
                 if [[ $? != 2 ]]
                 then
@@ -2351,6 +2391,14 @@
                     M_XCODE51_VERSION=$m_xcode_version
                 fi
                 ;;
+            6.0*)
+                m_version_compare $M_XCODE60_VERSION $m_xcode_version
+                if [[ $? != 2 ]]
+                then
+                    M_XCODE60="$m_xcode_root"
+                    M_XCODE60_VERSION=$m_xcode_version
+                fi
+                ;;
             *)
                 m_log "skip unsupported Xcode version in '$m_xcode_root'."
                 ;;
@@ -2515,6 +2563,24 @@
         M_SDK_109_COMPILER="$M_XCODE51_COMPILER"
         m_platform_realistic_add "10.9"
     fi
+    if [[ -n "$M_XCODE60" ]]
+    then
+        m_xcode_latest="$M_XCODE60"
+
+        M_SDK_108="$M_XCODE60/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk"
+        M_SDK_108_XCODE="$M_XCODE60"
+        M_SDK_108_COMPILER="$M_XCODE60_COMPILER"
+        m_platform_realistic_add "10.10"
+
+        m_version_compare $M_XCODE60_VERSION "6.0"
+        if [[ $? != 1 ]]
+        then
+            M_SDK_1010="$M_XCODE60/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk"
+            M_SDK_1010_XCODE="$M_XCODE60"
+            M_SDK_1010_COMPILER="$M_XCODE60_COMPILER"
+            m_platform_realistic_add "10.10"
+        fi
+    fi
 
     m_read_input "$@"
 
