--- a/Admin/components/components.sha1 Sat Jan 20 20:24:04 2024 +0100
+++ b/Admin/components/components.sha1 Sat Jan 20 22:18:29 2024 +0100
@@ -485,6 +485,7 @@
12cb90b265bc2308858c63f00d5ecbfb80603dbd sqlite-jdbc-3.41.0.0.tar.gz
68b1b61cffb1e6d4f5821cd6c3bebf2a74af6a97 sqlite-jdbc-3.42.0.0-1.tar.gz
3535a04b8612cb1d98f0f7e41a0668e41667ec8b sqlite-jdbc-3.42.0.0.tar.gz
+9b223d9453d654500616922231a7850fc927dcb7 sqlite-jdbc-3.45.0.0.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 Sat Jan 20 20:24:04 2024 +0100
+++ b/Admin/components/main Sat Jan 20 22:18:29 2024 +0100
@@ -33,7 +33,7 @@
scala-3.3.0
smbc-0.4.1
spass-3.8ds-2
-sqlite-jdbc-3.42.0.0-1
+sqlite-jdbc-3.45.0.0
stack-2.13.1
vampire-4.8
verit-2021.06.2-rmx
--- a/src/Pure/Admin/component_sqlite.scala Sat Jan 20 20:24:04 2024 +0100
+++ b/src/Pure/Admin/component_sqlite.scala Sat Jan 20 22:18:29 2024 +0100
@@ -10,32 +10,46 @@
object Component_SQLite {
/* build sqlite */
- val default_download_url =
- "https://repo1.maven.org/maven2/org/xerial/sqlite-jdbc/3.42.0.0/sqlite-jdbc-3.42.0.0.jar"
+ val default_main_url =
+ "https://repo1.maven.org/maven2/org/xerial/sqlite-jdbc/3.45.0.0/sqlite-jdbc-3.45.0.0.jar"
+
+ val default_logger_url =
+ "https://repo1.maven.org/maven2/org/slf4j/slf4j-api/1.7.36/slf4j-api-1.7.36.jar"
+
+ private def jar_name(url: String): String = {
+ Url.get_base_name(url, suffix = ".jar") getOrElse
+ error("Malformed jar URL: " + quote(url))
+ }
+
+ private def nop_name(s: String): String = s.replace("-api", "-nop")
def build_sqlite(
- download_url: String = default_download_url,
+ main_url: String = default_main_url,
+ logger_url: String = default_logger_url,
progress: Progress = new Progress,
target_dir: Path = Path.current
): Unit = {
- 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))
- }
+ val main_name = jar_name(main_url)
+ val logger_name = jar_name(logger_url)
/* component */
val component_dir =
- Components.Directory(target_dir + Path.basic(download_name)).create(progress = progress)
+ Components.Directory(target_dir + Path.basic(main_name)).create(progress = progress)
+
+ def download(url: String): Path = {
+ val path = component_dir.lib + Path.basic(Url.get_base_name(url).get)
+ Isabelle_System.download_file(url, path, progress = progress)
+ path
+ }
/* README */
File.write(component_dir.README,
- "This is " + download_name + " from\n" + download_url +
+ "This is " + main_name + " from\n" + main_url +
+ "\ntogether with " + logger_name + " from\n" + logger_url +
"\n\n Makarius\n " + Date.Format.date(Date.now()) + "\n")
@@ -44,15 +58,16 @@
component_dir.write_settings("""
ISABELLE_SQLITE_HOME="$COMPONENT"
-classpath "$ISABELLE_SQLITE_HOME/lib/""" + download_name + """.jar"
+classpath "$ISABELLE_SQLITE_HOME/lib/""" + main_name + """.jar"
+classpath "$ISABELLE_SQLITE_HOME/lib/""" + logger_name + """.jar"
+classpath "$ISABELLE_SQLITE_HOME/lib/""" + nop_name(logger_name) + """.jar"
""")
- /* jar */
+ /* main jar */
- val jar = component_dir.lib + Path.basic(download_name).jar
- Isabelle_System.make_directory(jar.dir)
- Isabelle_System.download_file(download_url, jar, progress = progress)
+ Isabelle_System.make_directory(component_dir.lib)
+ val jar = download(main_url)
Isabelle_System.with_tmp_dir("build") { jar_dir =>
Isabelle_System.extract(jar, jar_dir)
@@ -63,8 +78,8 @@
"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/aarch64/libsqlitejdbc.jnilib" -> "arm64-darwin",
- "org/sqlite/native/Mac/x86_64/libsqlitejdbc.jnilib" -> "x86_64-darwin",
+ "org/sqlite/native/Mac/aarch64/libsqlitejdbc.dylib" -> "arm64-darwin",
+ "org/sqlite/native/Mac/x86_64/libsqlitejdbc.dylib" -> "x86_64-darwin",
"org/sqlite/native/Windows/x86_64/sqlitejdbc.dll" -> "x86_64-windows")
for ((file, dir) <- jar_files) {
@@ -74,6 +89,12 @@
File.set_executable(component_dir.path + Path.explode("x86_64-windows/sqlitejdbc.dll"))
}
+
+
+ /* logger jars */
+
+ download(logger_url)
+ download(nop_name(logger_url))
}
@@ -84,28 +105,33 @@
Scala_Project.here,
{ args =>
var target_dir = Path.current
- var download_url = default_download_url
+ var main_url = default_main_url
+ var logger_url = default_logger_url
val getopts = Getopts("""
Usage: isabelle component_sqlite [OPTIONS] DOWNLOAD
Options are:
-D DIR target directory (default ".")
- -U URL download URL
- (default: """" + default_download_url + """")
+ -U URL main URL
+ (default: """" + default_main_url + """")
+ -V URL logger URL
+ (default: """" + default_logger_url + """")
Build sqlite-jdbc component from the specified download URL (JAR), see also
https://github.com/xerial/sqlite-jdbc and
https://oss.sonatype.org/content/repositories/releases/org/xerial/sqlite-jdbc
""",
"D:" -> (arg => target_dir = Path.explode(arg)),
- "U:" -> (arg => download_url = arg))
+ "U:" -> (arg => main_url = arg),
+ "V:" -> (arg => logger_url = arg))
val more_args = getopts(args)
if (more_args.nonEmpty) getopts.usage()
val progress = new Console_Progress()
- build_sqlite(download_url = download_url, progress = progress, target_dir = target_dir)
+ build_sqlite(main_url = main_url, logger_url = logger_url,
+ progress = progress, target_dir = target_dir)
})
}