summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Maunier2019-04-23 10:11:46 +0200
committerFlorian Maunier2019-04-23 10:11:46 +0200
commit74c2e124010ef211f16c2e59adf9e0f39c84c68c (patch)
treec359d203a560ed4495cc66a56bd50c2818060ad7
parent98a29ed3bb8423aa36d44450fedda049e3bdd49a (diff)
downloadaur-74c2e124010ef211f16c2e59adf9e0f39c84c68c.tar.gz
Include libhostfxr.so
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD17
-rw-r--r--fix-install.patch63
-rw-r--r--fixed-build-version.patch40
4 files changed, 60 insertions, 67 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 6c4e83518b6..88a87114a97 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,14 +1,15 @@
pkgbase = msbuild
pkgver = 16.0+xamarinxplat.2019.04.08.19.19
- pkgrel = 3
+ pkgrel = 4
url = https://github.com/mono/msbuild
arch = x86_64
license = MIT
- makedepends = libcurl-gnutls
source = https://download.mono-project.com/sources/msbuild/msbuild-16.0+xamarinxplat.2019.04.08.19.19.tar.xz
source = fix-install.patch
+ source = fixed-build-version.patch
sha256sums = 0d425603281ae84d3cf560ea4f9e2b2159e7764f71406035070a7fe27878ec49
- sha256sums = 8780925e01d4e5bdf8f93c439fe92da7a64f14099b60382499b477a512b56dca
+ sha256sums = d1bcae69de63a967514f47ddfcc5996b6d1ddb64f955270c42d48dd5407df2da
+ sha256sums = 4acf88ec981bc687be8eb2aa7c000db21e6fb98fa68727c21cb6db3395f4b4df
pkgname = msbuild
pkgdesc = Xamarin implementation of the Microsoft build system
diff --git a/PKGBUILD b/PKGBUILD
index f97dfcdd21b..8b19f5db343 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,25 +3,28 @@
pkgbase=msbuild
pkgname=('msbuild' 'msbuild-sdkresolver')
pkgver=16.0+xamarinxplat.2019.04.08.19.19
-pkgrel=3
+pkgrel=4
arch=('x86_64')
-makedepends=('libcurl-gnutls')
url="https://github.com/mono/msbuild"
license=('MIT')
source=("https://download.mono-project.com/sources/msbuild/msbuild-${pkgver}.tar.xz"
- 'fix-install.patch')
+ 'fix-install.patch'
+ 'fixed-build-version.patch')
sha256sums=('0d425603281ae84d3cf560ea4f9e2b2159e7764f71406035070a7fe27878ec49'
- '8780925e01d4e5bdf8f93c439fe92da7a64f14099b60382499b477a512b56dca')
+ 'd1bcae69de63a967514f47ddfcc5996b6d1ddb64f955270c42d48dd5407df2da'
+ '4acf88ec981bc687be8eb2aa7c000db21e6fb98fa68727c21cb6db3395f4b4df')
prepare() {
cd "${pkgname}-${pkgver%+*}"
patch --forward --strip=1 --input="${srcdir}/fix-install.patch"
+ patch --forward --strip=1 --input="${srcdir}/fixed-build-version.patch"
}
build() {
cd "${pkgname}-${pkgver%+*}"
- make
- ./install-mono-prefix.sh "/usr" /p:StagingDir="${srcdir}/target/usr" /p:TargetMSBuildToolsVersion="15.0"
+ ./eng/cibuild_bootstrapped_msbuild.sh --host_type mono --configuration Release --skip_tests /p:DisableNerdbankVersioning=true
+ ./artifacts/mono-msbuild/msbuild mono/build/install.proj /p:MonoInstallPrefix=$srcdir/target/usr /p:Configuration=Release-MONO /p:IgnoreDiffFailure=true /p:TargetMSBuildToolsVersion="15.0"
+ sed -i "s@${srcdir}/target@@g" $srcdir/target/usr/bin/msbuild
find $srcdir/target/usr/lib/mono/ -name Microsoft.DiaSymReader.Native.*dll -delete
find $srcdir/target/usr/lib/mono/ -name *.dylib -delete
}
@@ -36,8 +39,10 @@ package_msbuild() {
package_msbuild-sdkresolver() {
pkgdesc="Xamarin implementation of the Microsoft build system (SDK resolver)"
+ makedepends=('dotnet-host')
depends=('msbuild')
mkdir -p "${pkgdir}"/usr/lib/mono/msbuild/15.0/bin/SdkResolvers/
cp -dr --no-preserve='ownership' $srcdir/target/usr/lib/mono/msbuild/15.0/bin/SdkResolvers/Microsoft.DotNet.MSBuildSdkResolver "${pkgdir}"/usr/lib/mono/msbuild/15.0/bin/SdkResolvers/
+ cp -dr --no-preserve='ownership' $(pacman -Ql dotnet-host | grep libhostfxr.so | cut -d' ' -f2) "${pkgdir}"/usr/lib/mono/msbuild/15.0/bin/SdkResolvers/Microsoft.DotNet.MSBuildSdkResolver/
}
diff --git a/fix-install.patch b/fix-install.patch
index 97cadf01199..f9143fe9432 100644
--- a/fix-install.patch
+++ b/fix-install.patch
@@ -1,74 +1,21 @@
-diff --unified --recursive --text msbuild.orig/install-mono-prefix.sh msbuild.new/install-mono-prefix.sh
---- msbuild.orig/install-mono-prefix.sh 2019-04-09 01:19:48.000000000 +0200
-+++ msbuild.new/install-mono-prefix.sh 2019-04-17 14:25:43.891524294 +0200
-@@ -19,4 +19,4 @@
- MONO_PREFIX=$1
- shift
-
--msbuild mono/build/install.proj /p:MonoInstallPrefix=$MONO_PREFIX /p:Configuration=$CONFIG "$@"
-+artifacts/mono-msbuild/msbuild mono/build/install.proj /p:MonoInstallPrefix=$MONO_PREFIX /p:Configuration=$CONFIG "$@"
diff --unified --recursive --text msbuild.orig/mono/build/install.proj msbuild.new/mono/build/install.proj
--- msbuild.orig/mono/build/install.proj 2019-04-09 01:19:48.000000000 +0200
-+++ msbuild.new/mono/build/install.proj 2019-04-17 15:08:05.452683170 +0200
-@@ -4,16 +4,17 @@
-
- <Target Name="Install">
- <Error Text="%24(MonoInstallPrefix) cannot be empty. Set with /p:MonoInstallPrefix=&lt;directory&gt;" Condition="'$(MonoInstallPrefix)' == ''" />
-+ <Error Text="%24(StagingDir) cannot be empty. Set with /p:StagingDir=&lt;directory&gt;" Condition="'$(StagingDir)' == ''" />
- <Error Text="%24(Configuration) cannot be empty. Set with /p:Configuration=&lt;Debug-MONO|Release-MONO&gt;" Condition="'$(Configuration)' == ''" />
- <Error Text="%24(TargetMSBuildToolsVersion) cannot be empty." Condition="'$(TargetMSBuildToolsVersion)' == ''" />
-
- <PropertyGroup>
-- <MSBuildInstallBinDir>$(MonoInstallPrefix)\lib\mono\msbuild\$(TargetMSBuildToolsVersion)\bin</MSBuildInstallBinDir>
-+ <MSBuildInstallBinDir>$(StagingDir)\lib\mono\msbuild\$(TargetMSBuildToolsVersion)\bin</MSBuildInstallBinDir>
-
- <!-- Roslyn still installs to 15.0 -->
-- <RoslynInstallBinDir>$(MonoInstallPrefix)\lib\mono\msbuild\15.0\bin\Roslyn</RoslynInstallBinDir>
-+ <RoslynInstallBinDir>$(StagingDir)\lib\mono\msbuild\15.0\bin\Roslyn</RoslynInstallBinDir>
-
-- <XBuildDir>$(MonoInstallPrefix)\lib\mono\xbuild</XBuildDir>
-+ <XBuildDir>$(StagingDir)\lib\mono\xbuild</XBuildDir>
-
- <MSBuildBinSrcDir>$(RepoRoot)artifacts\2\bin\MSBuild.Bootstrap\$(Configuration)\net472\</MSBuildBinSrcDir>
-
-@@ -100,13 +101,13 @@
++++ msbuild.new/mono/build/install.proj 2019-04-19 16:14:17.165327157 +0200
+@@ -100,13 +100,13 @@
<Exec
WorkingDirectory="$(XBuildDir)"
- Command="ln -sfh Current 15.0" />
+ Command="ln -sfn $(TargetMSBuildToolsVersion) Current" />
<Exec
-- WorkingDirectory="$(MonoInstallPrefix)\lib\mono\msbuild"
+ WorkingDirectory="$(MonoInstallPrefix)\lib\mono\msbuild"
- Command="ln -s Current 15.0" />
-+ WorkingDirectory="$(StagingDir)\lib\mono\msbuild"
+ Command="ln -s $(TargetMSBuildToolsVersion) Current" />
<ItemGroup>
- <CopiedFiles Include="$(MonoInstallPrefix)\bin\msbuild\15.0" />
- <CopiedFiles Include="$(XBuildDir)\15.0" />
-+ <CopiedFiles Include="$(StagingDir)\bin\msbuild\Current" />
-+ <CopiedFiles Include="$(XBuildDir)\Current" />
++ <CopiedFiles Include="$(MonoInstallPrefix)\bin\msbuild\$(TargetMSBuildToolsVersion)" />
++ <CopiedFiles Include="$(XBuildDir)\$(TargetMSBuildToolsVersion)" />
</ItemGroup>
<Copy SourceFiles="@(MSBuildFiles)" DestinationFolder="$(MSBuildInstallBinDir)">
-@@ -157,17 +158,17 @@
- <CopiedFiles Include="$(MSBuildInstallBinDir)\System.Reflection.Metadata.dll" />
- </ItemGroup>
-
-- <Exec Command="$(RepoRoot)\mono\build\gen_msbuild_wrapper.sh $(MonoInstallPrefix) $(MonoInstallPrefix)\bin" />
-+ <Exec Command="$(RepoRoot)\mono\build\gen_msbuild_wrapper.sh $(MonoInstallPrefix) $(StagingDir)\bin" />
- <ItemGroup>
-- <CopiedFiles Include="$(MonoInstallPrefix)\bin\msbuild" />
-+ <CopiedFiles Include="$(StagingDir)\bin\msbuild" />
- </ItemGroup>
-
-- <Copy SourceFiles="$(RepoRoot)\mono\msbuild.1" DestinationFolder="$(MonoInstallPrefix)\share\man\man1">
-+ <Copy SourceFiles="$(RepoRoot)\mono\msbuild.1" DestinationFolder="$(StagingDir)\share\man\man1">
- <Output TaskParameter="CopiedFiles" ItemName="CopiedFiles" />
- </Copy>
-
- <ItemGroup>
-- <_CopiedFiles_Relative_Tmp Include="@(CopiedFiles -> '$([MSBuild]::MakeRelative('$(MonoInstallPrefix)', %(CopiedFiles.Identity)))' )" />
-+ <_CopiedFiles_Relative_Tmp Include="@(CopiedFiles -> '$([MSBuild]::MakeRelative('$(StagingDir)', %(CopiedFiles.Identity)))' )" />
- <CopiedFiles_Relative Include="@(_CopiedFiles_Relative_Tmp -> Distinct())" />
- </ItemGroup>
-
diff --git a/fixed-build-version.patch b/fixed-build-version.patch
new file mode 100644
index 00000000000..1923db26f0f
--- /dev/null
+++ b/fixed-build-version.patch
@@ -0,0 +1,40 @@
+Index: xamarin-pkg-msbuild/src/Build.OM.UnitTests/Definition/ProjectCollection_Tests.cs
+===================================================================
+--- xamarin-pkg-msbuild.orig/src/Build.OM.UnitTests/Definition/ProjectCollection_Tests.cs
++++ xamarin-pkg-msbuild/src/Build.OM.UnitTests/Definition/ProjectCollection_Tests.cs
+@@ -1422,10 +1422,14 @@ namespace Microsoft.Build.UnitTests.OM.D
+ [Fact]
+ public void ProjectCollectionVersionIsCorrect()
+ {
++ ProjectCollection.Version.ShouldNotBe(new Version(0, 0, 0, 0));
++
++#if THISASSEMBLY
+ Version expectedVersion = new Version(ThisAssembly.AssemblyFileVersion);
+
+ ProjectCollection.Version.Major.ShouldBe(expectedVersion.Major);
+ ProjectCollection.Version.Minor.ShouldBe(expectedVersion.Minor);
++#endif
+ }
+
+ /// <summary>
+Index: xamarin-pkg-msbuild/src/Directory.Build.targets
+===================================================================
+--- xamarin-pkg-msbuild.orig/src/Directory.Build.targets
++++ xamarin-pkg-msbuild/src/Directory.Build.targets
+@@ -107,6 +107,16 @@
+
+ <Import Project="$([System.IO.Path]::Combine('$(RepoRoot)', 'eng', 'GetBuildVersionStub.proj'))" Condition="'$(DisableNerdbankVersioning)' == 'true'" />
+
++ <Target Name="OverrideRepoToolsetVersions"
++ AfterTargets="_InitializeAssemblyVersion"
++ Condition="'$(DisableNerdbankVersioning)' == 'true'">
++ <PropertyGroup>
++ <AssemblyVersion>15.1.0.0</AssemblyVersion>
++ <FileVersion>16.0.0.0</FileVersion>
++ <InformationalVersion>$(FileVersion)-mono</InformationalVersion>
++ </PropertyGroup>
++ </Target>
++
+ <Target Name="GetNuGetPackageVersionEx"
+ BeforeTargets="GenerateNuspec"
+ DependsOnTargets="GetBuildVersion"