summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGleb Popov <arrowd@FreeBSD.org>2026-01-07 22:43:09 +0300
committerGleb Popov <arrowd@FreeBSD.org>2026-01-07 22:48:33 +0300
commitfcba9981b64961685c34670c20f19933a6ec4787 (patch)
tree654f157542221faadb081cf671a5e1ac35d74416
parent015745398487980bc10cb822a5e66fb2529c3f31 (diff)
lang/dotnet: Fix build in year 2026
Relevant issue: https://github.com/dotnet/dotnet/issues/4037 (cherry picked from commit ef0eaf43025ef37daabc8c1ac4ace3d348096b62)
-rw-r--r--lang/dotnet/Makefile7
-rw-r--r--lang/dotnet/files/0002-Fix-assembly-version-calculation-in-2026.patch43
2 files changed, 50 insertions, 0 deletions
diff --git a/lang/dotnet/Makefile b/lang/dotnet/Makefile
index 6c6e03003135..4320ffa5ef5c 100644
--- a/lang/dotnet/Makefile
+++ b/lang/dotnet/Makefile
@@ -84,6 +84,13 @@ PLIST_SUB+= VXSORT=
PLIST_SUB+= VXSORT="@comment "
.endif
+# https://github.com/dotnet/dotnet/issues/4037
+.if !target(post-patch)
+post-patch:
+ ${CP} ${PATCHDIR}/0002-Fix-assembly-version-calculation-in-2026.patch \
+ ${WRKSRC}/src/source-build-externals/patches/azure-activedirectory-identitymodel-extensions-for-dotnet/
+.endif
+
post-extract:
${CP} ${DISTDIR}/${DIST_SUBDIR}/release.json-${PORTVERSION} ${WRKSRC}/release.json
diff --git a/lang/dotnet/files/0002-Fix-assembly-version-calculation-in-2026.patch b/lang/dotnet/files/0002-Fix-assembly-version-calculation-in-2026.patch
new file mode 100644
index 000000000000..d10d6d3072ce
--- /dev/null
+++ b/lang/dotnet/files/0002-Fix-assembly-version-calculation-in-2026.patch
@@ -0,0 +1,43 @@
+From 22c9a70c8e0fe6a30190430d93f12fa29a304288 Mon Sep 17 00:00:00 2001
+From: Viktor Hofer <viktor.hofer@microsoft.com>
+Date: Mon, 5 Jan 2026 11:43:26 +0100
+Subject: [PATCH] Fix FileVersion calculation in 2026
+
+Issue: https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/issues/3388
+
+---
+ build/common.props | 19 ++++++++++++++++++-
+ 1 file changed, 18 insertions(+), 1 deletion(-)
+
+diff --git a/build/common.props b/build/common.props
+index efd7e90e..e5f6f3ed 100644
+--- a/build/common.props
++++ b/build/common.props
+@@ -42,7 +42,24 @@
+ <VersionSuffix Condition="'$(WilsonVersion)' == ''">$(PreviewVersionSuffix)</VersionSuffix>
+ <VersionPrefix Condition="'$(WilsonVersion)' == ''">$(WilsonCurrentVersion)</VersionPrefix>
+ <FileVersion Condition="'$(WilsonVersion)' != '' and '$(IsCustomPreview)' != 'true' ">$(WilsonVersion).$([System.DateTime]::Now.AddYears(-2019).Year)$([System.DateTime]::Now.ToString("MMdd"))</FileVersion>
+- <FileVersion Condition="'$(WilsonVersion)' == ''">$(WilsonCurrentVersion).$([System.DateTime]::Now.AddYears(-2019).Year)$([System.DateTime]::Now.ToString("MMdd"))</FileVersion>
++ <!-- TODO: Makes sure that the revision is higher than what's in already shipped packages (> 61231).
++ This will overflow in 2029 though and needs a long term fix. -->
++ <FileVersion Condition="'$(WilsonVersion)' == ''">$(WilsonCurrentVersion).$([MSBuild]::Add(
++ 61232,
++ $([MSBuild]::Add(
++ $([MSBuild]::Add(
++ $([MSBuild]::Multiply(
++ $([System.DateTime]::Now.AddYears(-2019).Year),
++ 416
++ )),
++ $([MSBuild]::Multiply(
++ $([System.DateTime]::Now.ToString("MM")),
++ 32
++ ))
++ )),
++ $([System.DateTime]::Now.ToString("dd"))
++ ))
++ ))</FileVersion>
+ </PropertyGroup>
+
+ <PropertyGroup>
+--
+2.52.0.windows.1