summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTorge Matthies2019-08-22 17:11:38 +0200
committerTorge Matthies2019-08-22 17:13:03 +0200
commit14d99fb3bccd8b323fc3480769af5cadabada52c (patch)
treed9aecc5f0bde64f14ab023609f81f86cbcf12335
parentb682a5873bbc4f1b9a66f88df717ae2faf4d2d4a (diff)
downloadaur-14d99fb3bccd8b323fc3480769af5cadabada52c.tar.gz
First version of msbuild-git, based on the msbuild AUR package.
-rw-r--r--.SRCINFO26
-rw-r--r--PKGBUILD89
-rw-r--r--fix_dotnet_case.patch11
-rw-r--r--fixed-build-version.patch40
-rw-r--r--license_check_is_case_sensitive.patch (renamed from license_check_is_case_sensitive.diff)0
5 files changed, 126 insertions, 40 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 01788f197b4..03bef91662d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,25 +1,33 @@
-pkgbase = msbuild
- pkgver = 16.3+xamarinxplat.2019.08.08.00.55
+pkgbase = msbuild-git
+ pkgver = 16.3.0.r3318.g8059ecc7
pkgrel = 1
url = https://github.com/mono/msbuild
arch = x86_64
license = MIT
+ makedepends = xmlstarlet
makedepends = unzip
makedepends = dotnet-host
+ makedepends = dotnet-sdk
depends = mono>=6.0.0
- source = https://download.mono-project.com/sources/msbuild/msbuild-16.3+xamarinxplat.2019.08.08.00.55.tar.xz
+ source = git+https://github.com/mono/msbuild.git
source = copy_hostfxr.patch
source = fix_bashisms.patch
- source = license_check_is_case_sensitive.diff
- sha256sums = 2bd5ee0617754a87a311581d62325eda43c0d0b312fe614f60a57e54dc6155a2
+ source = license_check_is_case_sensitive.patch
+ source = fix_dotnet_case.patch
+ sha256sums = SKIP
sha256sums = f08615c058771fe740758d9bd2e23e01a52c5d51fab05a15558622e7f7974f22
sha256sums = a13ecb4125c673372d87a3b7d957fc8716a3c3e74cd08e9e354b5dcf170ed453
sha256sums = 3a12a9c33ad5938e8af24d2985241053602f4efc94a4818a00a17da32ce4aba5
+ sha256sums = 69668675a5db978845a48b01b9b30fae07509683deeaef4dd616aba4acb8e2b5
-pkgname = msbuild
- pkgdesc = Xamarin implementation of the Microsoft build system
+pkgname = msbuild-git
+ pkgdesc = Xamarin implementation of the Microsoft build system (Git version)
+ provides = msbuild
+ conflicts = msbuild
-pkgname = msbuild-sdkresolver
- pkgdesc = Xamarin implementation of the Microsoft build system (SDK resolver)
+pkgname = msbuild-sdkresolver-git
+ pkgdesc = Xamarin implementation of the Microsoft build system (SDK resolver) (Git version)
depends = msbuild
+ provides = msbuild-sdkresolver
+ conflicts = msbuild-sdkresolver
diff --git a/PKGBUILD b/PKGBUILD
index 6c2f58e5e98..efa4a1897dd 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,53 +1,80 @@
-# Maintainer: Florian Maunier <fmauneko@dissidence.ovh>
+# Maintainer: Torge Matthies <openglfreak at googlemail dot com>
+# Contributor: Florian Maunier <fmauneko@dissidence.ovh>
# Contributor: jtmb <packaging at technologicalwizardry dot com>
-pkgbase=msbuild
-pkgname=('msbuild' 'msbuild-sdkresolver')
-pkgver=16.3+xamarinxplat.2019.08.08.00.55
+
+_pkgbase=msbuild
+pkgbase=msbuild-git
+pkgname=('msbuild-git' 'msbuild-sdkresolver-git')
+pkgver=16.3.0.r3318.g8059ecc7
pkgrel=1
arch=('x86_64')
-url="https://github.com/mono/msbuild"
+url='https://github.com/mono/msbuild'
license=('MIT')
depends=('mono>=6.0.0')
-makedepends=('unzip' 'dotnet-host' 'dotnet-sdk')
-source=("https://download.mono-project.com/sources/msbuild/msbuild-${pkgver}.tar.xz"
- 'copy_hostfxr.patch'
- 'fix_bashisms.patch'
- 'license_check_is_case_sensitive.diff')
-sha256sums=('2bd5ee0617754a87a311581d62325eda43c0d0b312fe614f60a57e54dc6155a2'
+makedepends=(xmlstarlet unzip dotnet-host dotnet-sdk)
+source=('git+https://github.com/mono/msbuild.git'
+ copy_hostfxr.patch
+ fix_bashisms.patch
+ license_check_is_case_sensitive.patch
+ fix_dotnet_case.patch)
+sha256sums=('SKIP'
'f08615c058771fe740758d9bd2e23e01a52c5d51fab05a15558622e7f7974f22'
'a13ecb4125c673372d87a3b7d957fc8716a3c3e74cd08e9e354b5dcf170ed453'
- '3a12a9c33ad5938e8af24d2985241053602f4efc94a4818a00a17da32ce4aba5')
+ '3a12a9c33ad5938e8af24d2985241053602f4efc94a4818a00a17da32ce4aba5'
+ '69668675a5db978845a48b01b9b30fae07509683deeaef4dd616aba4acb8e2b5')
+
+pkgver() {
+ local _version _commit
+
+ cd "${srcdir}/${_pkgbase}"
+
+ _version="$(xmlstarlet sel -t -v '/Project/PropertyGroup/VersionPrefix' eng/Versions.props)"
+ _commit="$(git describe --long | sed 's/^.*\(-[0-9]\+\)\(-g[0-9a-f]\+\)\?$/\1\2/;s/-/r/;s/-/./')"
+ echo "${_version}.${_commit}"
+}
prepare() {
- cd "${pkgname}-${pkgver%+*}"
+ cd "${srcdir}/${_pkgbase}"
+
patch --forward --strip=1 --input="${srcdir}/fix_bashisms.patch"
patch --forward --strip=1 --input="${srcdir}/copy_hostfxr.patch"
- patch --forward --strip=1 --input="${srcdir}/license_check_is_case_sensitive.diff"
- cp $(pacman -Ql dotnet-host | grep libhostfxr.so | cut -d' ' -f2) ./mono/SdkResolvers/Microsoft.DotNet.MSBuildSdkResolver/
+ patch --forward --strip=1 --input="${srcdir}/license_check_is_case_sensitive.patch"
+ patch --forward --strip=1 --input="${srcdir}/fix_dotnet_case.patch"
+ #cp $(pacman -Ql dotnet-host | grep -F libhostfxr.so | cut -d' ' -f2) ./mono/SdkResolvers/Microsoft.DotNet.MSBuildSdkResolver/
}
build() {
- cd "${pkgname}-${pkgver%+*}"
- DOTNET_MSBUILD_SDK_RESOLVER_CLI_DIR=/opt/dotnet ./eng/cibuild_bootstrapped_msbuild.sh --host_type mono --configuration Release --skip_tests /p:DisableNerdbankVersioning=true
- ./stage1/mono-msbuild/msbuild mono/build/install.proj /p:MonoInstallPrefix=$srcdir/target/usr /p:Configuration=Release-MONO /p:IgnoreDiffFailure=true
- 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
- find $srcdir/target/usr/lib/mono/ -name *.so -delete
+ local _escaped_srcdir
+
+ cd "${srcdir}/${_pkgbase}"
+
+ DOTNET_MSBUILD_SDK_RESOLVER_CLI_DIR=/opt/dotnet eng/cibuild_bootstrapped_msbuild.sh --host_type mono --configuration Release --skip_tests /p:DisableNerdbankVersioning=true
+ stage1/mono-msbuild/msbuild mono/build/install.proj /p:MonoInstallPrefix="${srcdir}/target/usr" /p:Configuration=Release-MONO /p:IgnoreDiffFailure=true
+ find "${srcdir}/target/usr/lib/mono/" -name 'Microsoft.DiaSymReader.Native.*dll' -delete
+ find "${srcdir}/target/usr/lib/mono/" -name '*.dylib' -delete
+ find "${srcdir}/target/usr/lib/mono/" -name '*.so' -print -delete
+
+ # Stolen from https://stackoverflow.com/a/2705678
+ _escaped_srcdir="$(printf '%s' "${srcdir}" | sed 's/[]@$*.^[]/\\&/g')"
+ sed -i "s@${srcdir}/target@@g" "${srcdir}/target/usr/bin/msbuild"
}
-package_msbuild() {
- pkgdesc="Xamarin implementation of the Microsoft build system"
+package_msbuild-git() {
+ pkgdesc="Xamarin implementation of the Microsoft build system (Git version)"
+ conflicts=('msbuild')
+ provides=('msbuild')
- cp -dr --no-preserve='ownership' $srcdir/target/usr "${pkgdir}"
- rm -rf $pkgdir/usr/lib/mono/msbuild/Current/bin/SdkResolvers/Microsoft.DotNet.MSBuildSdkResolver
+ cp -dr --no-preserve='ownership' "${srcdir}/target/usr" "${pkgdir}/"
+ rm -rf "${pkgdir}/usr/lib/mono/msbuild/Current/bin/SdkResolvers/Microsoft.DotNet.MSBuildSdkResolver"
}
-package_msbuild-sdkresolver() {
- pkgdesc="Xamarin implementation of the Microsoft build system (SDK resolver)"
+package_msbuild-sdkresolver-git() {
+ pkgdesc="Xamarin implementation of the Microsoft build system (SDK resolver) (Git version)"
depends=('msbuild')
+ conflicts=('msbuild-sdkresolver')
+ provides=('msbuild-sdkresolver')
- mkdir -p "${pkgdir}"/usr/lib/mono/msbuild/Current/bin/SdkResolvers/
- cp -dr --no-preserve='ownership' $srcdir/target/usr/lib/mono/msbuild/Current/bin/SdkResolvers/Microsoft.DotNet.MSBuildSdkResolver "${pkgdir}"/usr/lib/mono/msbuild/Current/bin/SdkResolvers/
- #cp -dr --no-preserve='ownership' $(pacman -Ql dotnet-host | grep libhostfxr.so | cut -d' ' -f2) "${pkgdir}"/usr/lib/mono/msbuild/Current/bin/SdkResolvers/Microsoft.DotNet.MSBuildSdkResolver/
+ mkdir -p "${pkgdir}/usr/lib/mono/msbuild/Current/bin/SdkResolvers/"
+ cp -dr --no-preserve=ownership "${srcdir}/target/usr/lib/mono/msbuild/Current/bin/SdkResolvers/Microsoft.DotNet.MSBuildSdkResolver" "${pkgdir}/usr/lib/mono/msbuild/Current/bin/SdkResolvers/"
+ #cp -dr --no-preserve=ownership $(pacman -Ql dotnet-host | grep -F libhostfxr.so | cut -d' ' -f2) "${pkgdir}/usr/lib/mono/msbuild/Current/bin/SdkResolvers/Microsoft.DotNet.MSBuildSdkResolver/"
}
diff --git a/fix_dotnet_case.patch b/fix_dotnet_case.patch
new file mode 100644
index 00000000000..cd67834fc04
--- /dev/null
+++ b/fix_dotnet_case.patch
@@ -0,0 +1,11 @@
+diff --git a/mono/build/update_bundled_bits.proj b/mono/build/update_bundled_bits.proj
+index eb4cee4d..0f9ebd3a 100644
+--- a/mono/build/update_bundled_bits.proj
++++ b/mono/build/update_bundled_bits.proj
+@@ -1,5 +1,5 @@
+ <Project DefaultTargets="FetchAndUpdateSdksAndNuGets">
+- <Import Project="$(MSBuildThisFileDirectory)\DotnetBitsVersions.props" />
++ <Import Project="$(MSBuildThisFileDirectory)\DotNetBitsVersions.props" />
+
+ <Target Name="Build" DependsOnTargets="FetchAndUpdateSdksAndNuGets" />
+
diff --git a/fixed-build-version.patch b/fixed-build-version.patch
new file mode 100644
index 00000000000..f23fde84f45
--- /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>%assemblyVersion%.0.0</AssemblyVersion>
++ <FileVersion>%version%.0.0</FileVersion>
++ <InformationalVersion>$(FileVersion)-mono</InformationalVersion>
++ </PropertyGroup>
++ </Target>
++
+ <Target Name="GetNuGetPackageVersionEx"
+ BeforeTargets="GenerateNuspec"
+ DependsOnTargets="GetBuildVersion"
diff --git a/license_check_is_case_sensitive.diff b/license_check_is_case_sensitive.patch
index a590dcb78ff..a590dcb78ff 100644
--- a/license_check_is_case_sensitive.diff
+++ b/license_check_is_case_sensitive.patch