Skip to content

Commit

Permalink
Windows: fix coqdep for coq 8.19.2 and enable coq-quickick for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
MSoegtropIMC committed Oct 3, 2024
1 parent ff62d7a commit 57ab9a2
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
From 2b93006118401884a50d62013ce02cb1b7663c22 Mon Sep 17 00:00:00 2001
From: Michael Soegtrop <[email protected]>
Date: Thu, 3 Oct 2024 10:21:47 +0200
Subject: [PATCH] Windows: fix path normalization in coqdep

---
tools/coqdep/lib/file_util.ml | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tools/coqdep/lib/file_util.ml b/tools/coqdep/lib/file_util.ml
index 17d8622d78..77e9553810 100644
--- a/tools/coqdep/lib/file_util.ml
+++ b/tools/coqdep/lib/file_util.ml
@@ -10,8 +10,9 @@

let to_relative_path : string -> string = fun full_path ->
if Filename.is_relative full_path then full_path else
- let cwd = String.split_on_char '/' (Sys.getcwd ()) in
- let path = String.split_on_char '/' full_path in
+ let re_delim = if Sys.win32 then "[/\\]" else "/" in
+ let cwd = Str.split_delim (Str.regexp re_delim) (Sys.getcwd ()) in
+ let path = Str.split_delim (Str.regexp re_delim) full_path in
let rec remove_common_prefix l1 l2 =
match (l1, l2) with
| (x1 :: l1, x2 :: l2) when x1 = x2 -> remove_common_prefix l1 l2
--
2.45.1

5 changes: 4 additions & 1 deletion opam/opam-repository/packages/coq-core/coq-core.8.19.2/opam
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ conflicts: [
]
depopts: ["coq-native" "memprof-limits"]
dev-repo: "git+https://github.com/coq/coq.git"
patches: [ "PR19247-ported-Fix-coqide-compilation-with-lablgtk-3.1.5-on-windows.patch" ]
patches: [
"PR19247-ported-Fix-coqide-compilation-with-lablgtk-3.1.5-on-windows.patch"
"0001-Windows-fix-path-normalization-in-coqdep.patch"
]
build: [
["dune" "subst"] {dev}
[ "./configure"
Expand Down
5 changes: 1 addition & 4 deletions package_picks/package-pick-8.19~2024.01+beta1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,7 @@ then
PACKAGES="${PACKAGES} coq-mtac2.1.4+8.19" # build issues on Windows
PACKAGES="${PACKAGES} elpi.1.18.2 coq-elpi.2.1.0"
PACKAGES="${PACKAGES} coq-hierarchy-builder.1.7.0"
if [[ "$OSTYPE" != cygwin ]]
then
PACKAGES="${PACKAGES} coq-quickchick.2.0.3" # build issues on Windows
fi
PACKAGES="${PACKAGES} coq-quickchick.2.0.3" # build issues on Windows
PACKAGES="${PACKAGES} coq-hammer-tactics.1.3.2+8.19"
if [[ "$OSTYPE" != cygwin ]]
then
Expand Down

0 comments on commit 57ab9a2

Please sign in to comment.