tags 961986 +patch
thanks

Some googling of the error message led me via a few links to an upstream patch 
at

https://github.com/Abscissa/SDLang-D/pull/70/commits/90e5bdad1d803a507b34d46c5ecf82cb1feb7cd4

I extracted the commit as a patch, tweaked the paths so it would apply to the 
Debian lix package and I was able to get succesful builds in debian sid amd64 
and raspbian bullseye-staging

My fix has been uploaded to raspbian, a debdiff is attached to this mail. No 
intent to NMU in Debian.

(note: the pull request was squashed and merged and the other commit in the 
pull request did not seem relevant, so I used the commit from the pull request 
rather than the one from the main repo).

diff -Nru lix-0.9.29/debian/changelog lix-0.9.29/debian/changelog
--- lix-0.9.29/debian/changelog 2019-12-10 08:02:16.000000000 +0000
+++ lix-0.9.29/debian/changelog 2020-06-05 22:49:20.000000000 +0000
@@ -1,3 +1,10 @@
+lix (0.9.29-1+rpi1) bullseye-staging; urgency=medium
+
+  * Add patch from upstream pull request to fix build with new libphobos
+    (Closes: 961986)
+
+ -- Peter Michael Green <plugw...@raspbian.org>  Fri, 05 Jun 2020 22:49:20 
+0000
+
 lix (0.9.29-1) unstable; urgency=medium
 
   * New upstream version. (Closes: #941390)
diff -Nru lix-0.9.29/debian/patches/phobos-2.091.patch 
lix-0.9.29/debian/patches/phobos-2.091.patch
--- lix-0.9.29/debian/patches/phobos-2.091.patch        1970-01-01 
00:00:00.000000000 +0000
+++ lix-0.9.29/debian/patches/phobos-2.091.patch        2020-06-05 
22:48:24.000000000 +0000
@@ -0,0 +1,39 @@
+Patch taken from 
https://github.com/Abscissa/SDLang-D/pull/70/commits/90e5bdad1d803a507b34d46c5ecf82cb1feb7cd4
+with paths adjusted to apply to the Debian lix package.
+
+commit 90e5bdad1d803a507b34d46c5ecf82cb1feb7cd4
+Author: Steven Schveighoffer <schvei...@yahoo.com>
+Date:   Fri Mar 20 17:26:58 2020 -0400
+
+    Remove FracSec usage if not available in Phobos (2.091+) Fixes #68.
+
+diff --git a/sdlang-d-0.10.4/sdlang-d/src/sdlang/token.d 
b/sdlang-d-0.10.4/sdlang-d/src/sdlang/token.d
+index 593746c..074c705 100644
+--- a/sdlang-d-0.10.4/sdlang-d/src/sdlang/token.d
++++ b/sdlang-d-0.10.4/sdlang-d/src/sdlang/token.d
+@@ -24,9 +24,11 @@ struct DateTimeFrac
+ {
+       DateTime dateTime;
+       Duration fracSecs;
+-      deprecated("Use fracSecs instead.") {
++      static if(is(FracSec)) {
++          deprecated("Use fracSecs instead.") {
+               @property FracSec fracSec() const { return 
FracSec.from!"hnsecs"(fracSecs.total!"hnsecs"); }
+               @property void fracSec(FracSec v) { fracSecs = v.hnsecs.hnsecs; 
}
++          }
+       }
+ }
+ 
+@@ -44,9 +46,11 @@ struct DateTimeFracUnknownZone
+ {
+       DateTime dateTime;
+       Duration fracSecs;
+-      deprecated("Use fracSecs instead.") {
++      static if(is(FracSec)) {
++          deprecated("Use fracSecs instead.") {
+               @property FracSec fracSec() const { return 
FracSec.from!"hnsecs"(fracSecs.total!"hnsecs"); }
+               @property void fracSec(FracSec v) { fracSecs = v.hnsecs.hnsecs; 
}
++          }
+       }
+       string timeZone;
+ 
diff -Nru lix-0.9.29/debian/patches/series lix-0.9.29/debian/patches/series
--- lix-0.9.29/debian/patches/series    2018-12-04 09:55:25.000000000 +0000
+++ lix-0.9.29/debian/patches/series    2020-06-05 22:45:25.000000000 +0000
@@ -1 +1,2 @@
 dub-i-dub-i-dub-dub-dub
+phobos-2.091.patch

Reply via email to