[packages/ldc] - added patch for dmd version detection as bootstrap alternative (but i686 ldc crashes)

qboosh qboosh at pld-linux.org
Sat Dec 14 13:46:42 CET 2024


commit 54018ae0c7ae5063d1ab994fbb1678e7cc7fbf57
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Dec 14 12:56:20 2024 +0100

    - added patch for dmd version detection as bootstrap alternative (but i686 ldc crashes)

 ldc-dmd.patch | 11 +++++++++++
 ldc.spec      |  2 ++
 2 files changed, 13 insertions(+)
---
diff --git a/ldc.spec b/ldc.spec
index 2adfd3c..aef97d8 100644
--- a/ldc.spec
+++ b/ldc.spec
@@ -21,6 +21,7 @@ Source1:	https://github.com/ldc-developers/ldc/releases/download/v%{bootstrap_ve
 Source3:	macros.%{name}
 Patch0:		%{name}-include-path.patch
 Patch1:		%{name}-no-default-rpath.patch
+Patch2:		%{name}-dmd.patch
 URL:		https://github.com/ldc-developers/ldc
 # for llvm < 16
 #BuildRequires:	SPIRV-LLVM-Translator-devel
@@ -119,6 +120,7 @@ Obsługa automatycznego dopełniania dla biblioteki Phobos w IDE geany.
 %setup -q -n %{name}-%{version}-%{subver}-src
 %patch -P0 -p1
 %patch -P1 -p1
+%patch -P2 -p1
 
 %if %{with geany}
 # temp geany config directory for allow geany to generate tags
diff --git a/ldc-dmd.patch b/ldc-dmd.patch
new file mode 100644
index 0000000..78b7a6a
--- /dev/null
+++ b/ldc-dmd.patch
@@ -0,0 +1,11 @@
+--- ldc-1.40.0-beta6-src/cmake/Modules/FindDCompiler.cmake.orig	2024-12-08 20:46:09.000000000 +0100
++++ ldc-1.40.0-beta6-src/cmake/Modules/FindDCompiler.cmake	2024-12-14 12:24:59.212337142 +0100
+@@ -64,7 +64,7 @@ if (D_COMPILER)
+                         OUTPUT_QUIET)
+         string(REGEX MATCH "^[^\r\n:]*" D_COMPILER_FE_VERSION "${D_COMPILER_FE_VERSION}")
+     else()
+-        string(REGEX MATCH " (D Compiler|based on DMD) v([0-9]+)\\.([0-9]+)" D_COMPILER_FE_VERSION "${D_COMPILER_VERSION_STRING}")
++        string(REGEX MATCH " (D Compiler|based on DMD) v?([0-9]+)\\.([0-9]+)" D_COMPILER_FE_VERSION "${D_COMPILER_VERSION_STRING}")
+         math(EXPR D_COMPILER_FE_VERSION ${CMAKE_MATCH_2}*1000+${CMAKE_MATCH_3}) # e.g., 2079
+     endif()
+     string(REGEX MATCH "^[^\r\n:]*" D_COMPILER_VERSION_STRING "${D_COMPILER_VERSION_STRING}")
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ldc.git/commitdiff/54018ae0c7ae5063d1ab994fbb1678e7cc7fbf57



More information about the pld-cvs-commit mailing list