Skip to content

Commit 1d85bf0

Browse files
authored
Merge pull request #435 from MSoegtropIMC/windows-fix-coqdep
Windows: fix coqdep for coq 8.19.2 and enable coq-quickick for Windows
2 parents 4205af8 + 57ab9a2 commit 1d85bf0

File tree

3 files changed

+33
-5
lines changed

3 files changed

+33
-5
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
From 2b93006118401884a50d62013ce02cb1b7663c22 Mon Sep 17 00:00:00 2001
2+
From: Michael Soegtrop <[email protected]>
3+
Date: Thu, 3 Oct 2024 10:21:47 +0200
4+
Subject: [PATCH] Windows: fix path normalization in coqdep
5+
6+
---
7+
tools/coqdep/lib/file_util.ml | 5 +++--
8+
1 file changed, 3 insertions(+), 2 deletions(-)
9+
10+
diff --git a/tools/coqdep/lib/file_util.ml b/tools/coqdep/lib/file_util.ml
11+
index 17d8622d78..77e9553810 100644
12+
--- a/tools/coqdep/lib/file_util.ml
13+
+++ b/tools/coqdep/lib/file_util.ml
14+
@@ -10,8 +10,9 @@
15+
16+
let to_relative_path : string -> string = fun full_path ->
17+
if Filename.is_relative full_path then full_path else
18+
- let cwd = String.split_on_char '/' (Sys.getcwd ()) in
19+
- let path = String.split_on_char '/' full_path in
20+
+ let re_delim = if Sys.win32 then "[/\\]" else "/" in
21+
+ let cwd = Str.split_delim (Str.regexp re_delim) (Sys.getcwd ()) in
22+
+ let path = Str.split_delim (Str.regexp re_delim) full_path in
23+
let rec remove_common_prefix l1 l2 =
24+
match (l1, l2) with
25+
| (x1 :: l1, x2 :: l2) when x1 = x2 -> remove_common_prefix l1 l2
26+
--
27+
2.45.1
28+

opam/opam-repository/packages/coq-core/coq-core.8.19.2/opam

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@ conflicts: [
3737
]
3838
depopts: ["coq-native" "memprof-limits"]
3939
dev-repo: "git+https://github.com/coq/coq.git"
40-
patches: [ "PR19247-ported-Fix-coqide-compilation-with-lablgtk-3.1.5-on-windows.patch" ]
40+
patches: [
41+
"PR19247-ported-Fix-coqide-compilation-with-lablgtk-3.1.5-on-windows.patch"
42+
"0001-Windows-fix-path-normalization-in-coqdep.patch"
43+
]
4144
build: [
4245
["dune" "subst"] {dev}
4346
[ "./configure"

package_picks/package-pick-8.19~2024.01+beta1.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,7 @@ then
129129
PACKAGES="${PACKAGES} coq-mtac2.1.4+8.19" # build issues on Windows
130130
PACKAGES="${PACKAGES} elpi.1.18.2 coq-elpi.2.1.0"
131131
PACKAGES="${PACKAGES} coq-hierarchy-builder.1.7.0"
132-
if [[ "$OSTYPE" != cygwin ]]
133-
then
134-
PACKAGES="${PACKAGES} coq-quickchick.2.0.3" # build issues on Windows
135-
fi
132+
PACKAGES="${PACKAGES} coq-quickchick.2.0.3" # build issues on Windows
136133
PACKAGES="${PACKAGES} coq-hammer-tactics.1.3.2+8.19"
137134
if [[ "$OSTYPE" != cygwin ]]
138135
then

0 commit comments

Comments
 (0)