Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / packaging / MacSDK / mono.py
index ed9de8174840f455d66a849a89cb377b9086b268..bbbf8db091da50b49b87fdc1cc623695e46cdb4a 100644 (file)
@@ -63,13 +63,12 @@ class MonoMasterPackage(Package):
             self.sh('patch -p1 < "%{local_sources[' + str(p) + ']}"')
 
     def arch_build(self, arch):
+        Package.profile.arch_build(arch, self)
         if arch == 'darwin-64':  # 64-bit build pass
-            self.local_gcc_flags = ['-m64']
-            self.local_configure_flags = ['--build=x86_64-apple-darwin11.2.0', '--disable-boehm']
+            self.local_configure_flags.extend (['--build=x86_64-apple-darwin11.2.0', '--disable-boehm'])
 
         if arch == 'darwin-32':  # 32-bit build pass
-            self.local_gcc_flags = ['-m32']
-            self.local_configure_flags = ['--build=i386-apple-darwin11.2.0']
+            self.local_configure_flags.extend (['--build=i386-apple-darwin11.2.0'])
 
         self.local_configure_flags.extend(
             ['--cache-file=%s/%s-%s.cache' % (self.profile.bockbuild.build_root, self.name, arch)])
@@ -85,16 +84,16 @@ class MonoMasterPackage(Package):
             "LocalMachine")
         ensure_dir(registry_dir)
 
-        # Add ImportBefore/ImportAfter files from xbuild to the msbuild
-        # directories
+        # Add ImportBefore files from xbuild 14.0 toolsVersion directory to msbuild's
+        # 15.0 directory
         xbuild_dir = os.path.join(self.staged_prefix, 'lib/mono/xbuild')
-        new_xbuild_tv_dir = os.path.join(xbuild_dir, self.version)
+        new_xbuild_tv_dir = os.path.join(xbuild_dir, '15.0')
         os.makedirs(new_xbuild_tv_dir)
 
         self.sh('cp -R %s/14.0/Imports %s' % (xbuild_dir, new_xbuild_tv_dir))
-        self.sh(
-            'cp -R %s/14.0/Microsoft.Common.targets %s' %
-            (xbuild_dir, new_xbuild_tv_dir))
+
+        for dep in glob.glob("%s/Microsoft/NuGet/*" % xbuild_dir):
+            self.sh('ln -s %s %s' % (dep, xbuild_dir))
 
     def deploy(self):
         if bockbuild.cmd_options.arch == 'darwin-universal':