provide cvc5-1.1.1 for testing --- still inactive;
authorwenzelm
Thu, 29 Feb 2024 22:52:45 +0100
changeset 79750 f8fb4384180e
parent 79749 a861b0df74b4
child 79751 05088f901e21
provide cvc5-1.1.1 for testing --- still inactive;
Admin/components/components.sha1
src/Pure/Admin/component_cvc5.scala
--- a/Admin/components/components.sha1	Thu Feb 29 21:06:50 2024 +0100
+++ b/Admin/components/components.sha1	Thu Feb 29 22:52:45 2024 +0100
@@ -44,6 +44,7 @@
 03aec2ec5757301c9df149f115d1f4f1d2cafd9e cvc4-1.5pre.tar.gz
 e99560d0b7cb9bafde2b0ec1a3a95af315918a25 cvc4-1.8.tar.gz
 9e0d91f9f3bc0b69e60e50ca683cfcdcbfee6d62 cvc5-1.0.2.tar.gz
+fb4dce7e622c5e3daf56e7db190e05c34985c9f6 cvc5-1.1.1.tar.gz
 842d9526f37b928cf9e22f141884365129990d63 cygwin-20130110.tar.gz
 cb3b0706d208f104b800267697204f6d82f7b48a cygwin-20130114.tar.gz
 3b44cca04855016d5f8cfb5101b2e0579ab80197 cygwin-20130117.tar.gz
--- a/src/Pure/Admin/component_cvc5.scala	Thu Feb 29 21:06:50 2024 +0100
+++ b/src/Pure/Admin/component_cvc5.scala	Thu Feb 29 22:52:45 2024 +0100
@@ -19,16 +19,16 @@
 
   val platforms: List[Download_Platform] =
     List(
-      Download_Platform("arm64-darwin", "cvc5-macOS-arm64"),
-      Download_Platform("x86_64-darwin", "cvc5-macOS"),
-      Download_Platform("x86_64-linux", "cvc5-Linux"),
-      Download_Platform("x86_64-windows", "cvc5-Win64.exe"))
+      Download_Platform("arm64-darwin", "cvc5-macOS-arm64-static.zip"),
+      Download_Platform("x86_64-darwin", "cvc5-macOS-static.zip"),
+      Download_Platform("x86_64-linux", "cvc5-Linux-static.zip"),
+      Download_Platform("x86_64-windows", "cvc5-Win64-static.zip"))
 
 
   /* build cvc5 */
 
   val default_url = "https://github.com/cvc5/cvc5/releases/download"
-  val default_version = "1.0.2"
+  val default_version = "1.1.1"
 
   def build_cvc5(
     base_url: String = default_url,
@@ -46,18 +46,28 @@
     /* download executables */
 
     for (platform <- platforms) {
-      val url = base_url + "/cvc5-" + version + "/" + platform.download_name
+      Isabelle_System.with_tmp_dir("download") { download_dir =>
+        val download = base_url + "/cvc5-" + version + "/" + platform.download_name
+
+        val archive_name =
+          Url.get_base_name(platform.download_name) getOrElse
+            error("Malformed download name " + quote(platform.download_name))
+        val archive_path = download_dir + Path.basic(archive_name)
 
-      val platform_dir = component_dir.path + Path.explode(platform.platform_name)
-      val platform_exe = platform_dir + Path.explode("cvc5").exe_if(platform.is_windows)
+        val platform_dir = component_dir.path + Path.explode(platform.platform_name)
+        Isabelle_System.make_directory(platform_dir)
+
+        val exe_path = Path.explode("cvc5").exe_if(platform.is_windows)
 
-      Isabelle_System.make_directory(platform_dir)
-      Isabelle_System.download_file(url, platform_exe, progress = progress)
-      File.set_executable(platform_exe)
+        Isabelle_System.download_file(download, archive_path, progress = progress)
+        Isabelle_System.extract(archive_path, download_dir, strip = true)
+        Isabelle_System.copy_file(download_dir + Path.basic("bin") + exe_path, platform_dir)
+        File.set_executable(platform_dir + exe_path)
+      }
     }
 
 
-    /* settings */
+  /* settings */
 
     component_dir.write_settings("""
 CVC5_HOME="$COMPONENT/${ISABELLE_WINDOWS_PLATFORM64:-${ISABELLE_APPLE_PLATFORM64:-$ISABELLE_PLATFORM64}}"
@@ -80,8 +90,6 @@
 Linux, and Windows. There is native support for macOS ARM64, but
 Linux ARM64 is missing.
 
-The oldest supported version of macOS is 10.14 Mojave.
-
 The downloaded files were renamed and made executable.