Skip to content

Commit

Permalink
coq: update libdir paths a la ocaml-findlib
Browse files Browse the repository at this point in the history
See coq/coq#15663 (comment) and
coq/coq#15635 (comment) and
coq/coq#18439.  Coq lib files must be
installed to the same location as ocaml-findlib lib files in order for
plugins to be buildable.

An alternative as per
coq/coq#15452 (comment) might be
```diff
diff --git a/Formula/c/coq.rb b/Formula/c/coq.rb
index 580810fc3ed..ed8f82f230b 100644
--- a/Formula/c/coq.rb
+++ b/Formula/c/coq.rb
@@ -36,7 +36,7 @@ class Coq < Formula
     ENV.prepend_path "OCAMLPATH", Formula["ocaml-findlib"].opt_lib/"ocaml"
     system "./configure", "-prefix", prefix,
                           "-mandir", man,
-                          "-libdir", HOMEBREW_PREFIX/"lib/ocaml/coq",
+                          "-libdir", HOMEBREW_PREFIX/"lib/coq",
                           "-docdir", pkgshare/"latex"
     system "make", "dunestrap"
     system "dune", "build", "-p", "coq-core,coq-stdlib,coqide-server,coq"
@@ -44,9 +44,12 @@ class Coq < Formula
                               "--mandir=#{man}",
                               "--libdir=#{lib}/ocaml",
                               "coq-core",
-                              "coq-stdlib",
                               "coqide-server",
                               "coq"
+    system "dune", "install", "--prefix=#{prefix}",
+                              "--mandir=#{man}",
+                              "--libdir=#{lib}/coq",
+                              "coq-stdlib"
   end

   test do
```

Bump revision on coq to force a rebuild.
  • Loading branch information
JasonGross committed Feb 27, 2024
1 parent 6b885d7 commit 06ebb43
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Formula/c/coq.rb
Expand Up @@ -5,6 +5,7 @@ class Coq < Formula
sha256 "17e5c10fadcd3cda7509d822099a892fcd003485272b56a45abd30390f6a426f"
license "LGPL-2.1-only"
head "https://github.com/coq/coq.git", branch: "master"
revision 1

livecheck do
url :stable
Expand Down Expand Up @@ -35,11 +36,13 @@ def install
ENV.prepend_path "OCAMLPATH", Formula["ocaml-findlib"].opt_lib/"ocaml"
system "./configure", "-prefix", prefix,
"-mandir", man,
"-libdir", HOMEBREW_PREFIX/"lib/ocaml/coq",
"-docdir", pkgshare/"latex"
system "make", "dunestrap"
system "dune", "build", "-p", "coq-core,coq-stdlib,coqide-server,coq"
system "dune", "install", "--prefix=#{prefix}",
"--mandir=#{man}",
"--libdir=#{lib}/ocaml",
"coq-core",
"coq-stdlib",
"coqide-server",
Expand Down

0 comments on commit 06ebb43

Please sign in to comment.