@@ -178,6 +178,8 @@ supported ones. A few additional keyword arguments are accept:
178178 Since the generated JLL package is named according to `src_name`, this should
179179 only be set to `false` if you _really_ know what you're doing.
180180
181+ * `compression_format`: the compression format used for the generated tarballs.
182+
181183!!! note
182184
183185 The `init_block` and `augment_platform_block` keyword arguments are experimental
@@ -187,7 +189,9 @@ supported ones. A few additional keyword arguments are accept:
187189function build_tarballs (ARGS , src_name, src_version, sources, script,
188190 platforms, products, dependencies;
189191 julia_compat:: String = DEFAULT_JULIA_VERSION_SPEC,
190- validate_name:: Bool = true , kwargs... )
192+ validate_name:: Bool = true ,
193+ compression_format:: String = " gzip" ,
194+ kwargs... )
191195 @nospecialize
192196 # See if someone has passed in `--help`, and if so, give them the
193197 # assistance they so clearly long for
@@ -196,6 +200,10 @@ function build_tarballs(ARGS, src_name, src_version, sources, script,
196200 return nothing
197201 end
198202
203+ if compression_format != " gzip" && minimum_compat (julia_compat) < v " 1.6"
204+ error (" Compression formats different from gzip are supported only from Julia v1.6, increase the Julia compat if you want to use a non-default format" )
205+ end
206+
199207 if validate_name && ! Base. isidentifier (src_name)
200208 error (" Package name \" $(src_name) \" is not a valid identifier" )
201209 end
@@ -379,6 +387,7 @@ function build_tarballs(ARGS, src_name, src_version, sources, script,
379387 verbose,
380388 debug,
381389 skip_audit,
390+ compression_format,
382391 kwargs... ,
383392 )
384393 end
733742 skip_audit = false, ignore_audit_errors = true,
734743 autofix = true, code_dir = nothing,
735744 meta_json_file = nothing, require_license = true,
736- dont_dlopen = false, kwargs...)
745+ dont_dlopen = false,
746+ compression_format = "gzip",
747+ kwargs...)
737748
738749Runs the boiler plate code to download, build, and package a source package
739750for a list of platforms. This method takes a veritable truckload of arguments,
@@ -781,6 +792,8 @@ here are the relevant actors, broken down in brief:
781792 the generated JLL loading the library at run time, and only prevents
782793 BinaryBuilder from doing so during JLL generation.
783794
795+ * `compression_format`: the compression format used for the generated tarballs.
796+
784797"""
785798function autobuild (dir:: AbstractString ,
786799 src_name:: AbstractString ,
@@ -798,6 +811,7 @@ function autobuild(dir::AbstractString,
798811 code_dir:: Union{String,Nothing} = nothing ,
799812 require_license:: Bool = true ,
800813 dont_dlopen:: Bool = false ,
814+ compression_format:: String = " gzip" ,
801815 kwargs... )
802816 @nospecialize
803817
@@ -1020,6 +1034,7 @@ function autobuild(dir::AbstractString,
10201034 platform= platform,
10211035 verbose= verbose,
10221036 force= true ,
1037+ compression_format,
10231038 # Do not include logs into the main tarball
10241039 filter= exclude_logs,
10251040 )
@@ -1031,6 +1046,7 @@ function autobuild(dir::AbstractString,
10311046 platform= platform,
10321047 verbose= verbose,
10331048 force= true ,
1049+ compression_format,
10341050 filter= only_logs,
10351051 )
10361052 timer. end_package = time ()
@@ -1062,7 +1078,7 @@ end
10621078
10631079function download_github_release (download_dir, repo, tag; gh_auth= Wizard. github_auth (), verbose:: Bool = false )
10641080 release = gh_get_json (DEFAULT_API, " /repos/$(repo) /releases/tags/$(tag) " , auth= gh_auth)
1065- assets = [a for a in release[" assets" ] if endswith (a[" name" ], " .tar.gz " )]
1081+ assets = [a for a in release[" assets" ] if endswith (a[" name" ], r" \ . tar\. (gz|xz|bz2) " )]
10661082
10671083 for asset in assets
10681084 if verbose
0 commit comments