--- a/Admin/components/components.sha1 Wed Sep 30 18:37:22 2020 +0200
+++ b/Admin/components/components.sha1 Wed Sep 30 23:08:57 2020 +0200
@@ -10,6 +10,7 @@
bb9ef498cd594b4289221b96146d529c899da209 bash_process-1.1.tar.gz
81250148f8b89ac3587908fb20645081d7f53207 bash_process-1.2.1.tar.gz
97b2491382130a841b3bbaebdcf8720c4d4fb227 bash_process-1.2.2.tar.gz
+5c5b7c18cc1dc2a4d22b997dac196da09eaca868 bash_process-1.2.3-1.tar.gz
48b01bd9436e243ffcb7297f08b498d0c0875ed9 bash_process-1.2.3.tar.gz
9e21f447bfa0431ae5097301d553dd6df3c58218 bash_process-1.2.tar.gz
a65ce644b6094d41e9f991ef851cf05eff5dd0a9 bib2xhtml-20171221.tar.gz
@@ -298,6 +299,7 @@
27aeac6a91353d69f0438837798ac4ae6f9ff8c5 sqlite-jdbc-3.23.1.tar.gz
4d17611857fa3a93944c1f159c0fd2a161967aaf sqlite-jdbc-3.27.2.1.tar.gz
806be457eb79408fcc5a72aeca3f64b2d89a6b63 sqlite-jdbc-3.30.1.tar.gz
+cba2b194114216b226d75d49a70d1bd12b141ac8 sqlite-jdbc-3.32.3.2.tar.gz
8d20968603f45a2c640081df1ace6a8b0527452a sqlite-jdbc-3.8.11.2.tar.gz
2369f06e8d095f9ba26df938b1a96000e535afff ssh-java-20161009.tar.gz
a2335d28b5b95d8d26500a53f1a9303fc5beaf36 ssh-java-20190323.tar.gz
--- a/Admin/components/main Wed Sep 30 18:37:22 2020 +0200
+++ b/Admin/components/main Wed Sep 30 23:08:57 2020 +0200
@@ -1,5 +1,5 @@
#main components for everyday use, without big impact on overall build time
-bash_process-1.2.3
+bash_process-1.2.3-1
bib2xhtml-20190409
csdp-6.1-1
cvc4-1.5-5
@@ -17,7 +17,7 @@
scala-2.12.12
smbc-0.4.1
spass-3.8ds-1
-sqlite-jdbc-3.30.1
+sqlite-jdbc-3.32.3.2
ssh-java-20190323
stack-2.1.3
vampire-4.2.2
--- a/lib/scripts/isabelle-platform Wed Sep 30 18:37:22 2020 +0200
+++ b/lib/scripts/isabelle-platform Wed Sep 30 23:08:57 2020 +0200
@@ -12,8 +12,15 @@
case $(uname -s) in
Linux)
ISABELLE_PLATFORM_FAMILY="linux"
- ISABELLE_PLATFORM32=x86-linux
- ISABELLE_PLATFORM64=x86_64-linux
+ case $(uname -m) in
+ aarch64)
+ ISABELLE_PLATFORM64=arm64-linux
+ ;;
+ *)
+ ISABELLE_PLATFORM32=x86-linux
+ ISABELLE_PLATFORM64=x86_64-linux
+ ;;
+ esac
;;
Darwin)
ISABELLE_PLATFORM_FAMILY="macos"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/Pure/Admin/build_sqlite.scala Wed Sep 30 23:08:57 2020 +0200
@@ -0,0 +1,126 @@
+/* Title: Pure/Admin/build_sqlite.scala
+ Author: Makarius
+
+Build Isabelle sqlite-jdbc component from official download.
+*/
+
+package isabelle
+
+
+object Build_SQLite
+{
+ /* build sqlite */
+
+ def build_sqlite(
+ download_url: String,
+ progress: Progress = new Progress,
+ target_dir: Path = Path.current)
+ {
+ val Download_Name = """^.*/([^/]+)\.jar""".r
+ val download_name =
+ download_url match {
+ case Download_Name(download_name) => download_name
+ case _ => error("Malformed jar download URL: " + quote(download_url))
+ }
+
+
+ /* component */
+
+ val component_dir = target_dir + Path.basic(download_name)
+ if (component_dir.is_dir) error("Component directory already exists: " + component_dir)
+ else {
+ progress.echo("Component " + component_dir)
+ Isabelle_System.mkdirs(component_dir)
+ }
+
+
+ /* README */
+
+ File.write(component_dir + Path.basic("README"),
+ "This is " + download_name + " from\n" + download_url +
+ "\n\n Makarius\n " + Date.Format.date(Date.now()) + "\n")
+
+
+ /* settings */
+
+ val etc_dir = component_dir + Path.basic("etc")
+ Isabelle_System.mkdirs(etc_dir)
+
+ File.write(etc_dir + Path.basic("settings"),
+"""# -*- shell-script -*- :mode=shellscript:
+
+ISABELLE_SQLITE_HOME="$COMPONENT"
+
+classpath "$ISABELLE_SQLITE_HOME/""" + download_name + """.jar"
+""")
+
+
+ /* jar */
+
+ val jar = component_dir + Path.basic(download_name).ext("jar")
+ progress.echo("Getting " + quote(download_url))
+ try {
+ Isabelle_System.bash("curl --fail --silent --location " + Bash.string(download_url) +
+ " > " + File.bash_path(jar)).check
+ }
+ catch {
+ case ERROR(msg) => cat_error("Failed to download " + quote(download_url), msg)
+ }
+
+ Isabelle_System.with_tmp_dir("sqlite")(jar_dir =>
+ {
+ progress.echo("Unpacking " + jar)
+ Isabelle_System.bash("isabelle_jdk jar xf " + File.bash_path(jar.absolute),
+ cwd = jar_dir.file).check
+
+ val jar_files =
+ List(
+ "META-INF/maven/org.xerial/sqlite-jdbc/LICENSE" -> ".",
+ "META-INF/maven/org.xerial/sqlite-jdbc/LICENSE.zentus" -> ".",
+ "org/sqlite/native/Linux/aarch64/libsqlitejdbc.so" -> "arm64-linux",
+ "org/sqlite/native/Linux/x86_64/libsqlitejdbc.so" -> "x86_64-linux",
+ "org/sqlite/native/Mac/x86_64/libsqlitejdbc.jnilib" -> "x86_64-darwin",
+ "org/sqlite/native/Windows/x86_64/sqlitejdbc.dll" -> "x86_64-windows")
+
+ for ((file, dir) <- jar_files) {
+ val target = component_dir + Path.explode(dir)
+ Isabelle_System.mkdirs(target)
+ File.copy(jar_dir + Path.explode(file), target)
+ }
+
+ File.set_executable(component_dir + Path.explode("x86_64-windows/sqlitejdbc.dll"), true)
+ })
+ }
+
+
+ /* Isabelle tool wrapper */
+
+ val isabelle_tool =
+ Isabelle_Tool("build_sqlite", "build Isabelle sqlite-jdbc component from official download",
+ args =>
+ {
+ var target_dir = Path.current
+
+ val getopts = Getopts("""
+Usage: isabelle build_sqlite [OPTIONS] DOWNLOAD
+
+ Options are:
+ -D DIR target directory (default ".")
+
+ Build sqlite-jdbc component from the specified download URL (JAR), see also
+ https://github.com/xerial/sqlite-jdbc/releases
+""",
+ "D:" -> (arg => target_dir = Path.explode(arg)))
+
+ val more_args = getopts(args)
+ val download_url =
+ more_args match {
+ case List(download_url) => download_url
+ case _ => getopts.usage()
+ }
+
+ val progress = new Console_Progress()
+
+ build_sqlite(download_url, progress = progress, target_dir = target_dir)
+ })
+}
--- a/src/Pure/System/isabelle_tool.scala Wed Sep 30 18:37:22 2020 +0200
+++ b/src/Pure/System/isabelle_tool.scala Wed Sep 30 23:08:57 2020 +0200
@@ -176,6 +176,7 @@
Build_JDK.isabelle_tool,
Build_PolyML.isabelle_tool1,
Build_PolyML.isabelle_tool2,
+ Build_SQLite.isabelle_tool,
Build_Status.isabelle_tool,
Check_Sources.isabelle_tool,
Components.isabelle_tool,
--- a/src/Pure/System/platform.scala Wed Sep 30 18:37:22 2020 +0200
+++ b/src/Pure/System/platform.scala Wed Sep 30 23:08:57 2020 +0200
@@ -38,11 +38,13 @@
private val X86 = """i.86|x86""".r
private val X86_64 = """amd64|x86_64""".r
+ private val Arm64 = """arm64|aarch64""".r
def cpu_arch: String =
System.getProperty("os.arch", "") match {
case X86() => "x86"
case X86_64() => "x86_64"
+ case Arm64() => "arm64"
case _ => error("Failed to determine CPU architecture")
}
--- a/src/Pure/build-jars Wed Sep 30 18:37:22 2020 +0200
+++ b/src/Pure/build-jars Wed Sep 30 23:08:57 2020 +0200
@@ -19,6 +19,7 @@
src/Pure/Admin/build_log.scala
src/Pure/Admin/build_polyml.scala
src/Pure/Admin/build_release.scala
+ src/Pure/Admin/build_sqlite.scala
src/Pure/Admin/build_status.scala
src/Pure/Admin/check_sources.scala
src/Pure/Admin/ci_profile.scala