@@ -256,8 +256,7 @@ function build_tarballs(ARGS, src_name, src_version, sources, script,
256
256
# If the user passed in a platform (or a few, comma-separated) on the
257
257
# command-line, use that instead of our default platforms
258
258
if length (ARGS ) > 0
259
- parse_platform (p:: AbstractString ) = p == " any" ? AnyPlatform () : parse (Platform, p; validate_strict= true )
260
- platforms = parse_platform .(split (ARGS [1 ], " ," ))
259
+ platforms = BinaryBuilderBase. parse_platform .(split (ARGS [1 ], " ," ))
261
260
end
262
261
263
262
# Check to make sure we have the necessary environment stuff
@@ -713,8 +712,10 @@ function autobuild(dir::AbstractString,
713
712
default_host_platform;
714
713
verbose= verbose,
715
714
)
716
- host_artifact_paths = setup_dependencies (prefix, Pkg. Types. PackageSpec[getpkg (d) for d in dependencies if is_host_dependency (d)], default_host_platform; verbose= verbose)
717
- target_artifact_paths = setup_dependencies (prefix, Pkg. Types. PackageSpec[getpkg (d) for d in dependencies if is_target_dependency (d)], concrete_platform; verbose= verbose)
715
+ setup_deps (f, prefix, dependencies, platform, verbose) =
716
+ setup_dependencies (prefix, Pkg. Types. PackageSpec[getpkg (d) for d in filter_platforms (dependencies, platform) if f (d)], platform; verbose)
717
+ host_artifact_paths = setup_deps (is_host_dependency, prefix, dependencies, default_host_platform, verbose)
718
+ target_artifact_paths = setup_deps (is_target_dependency, prefix, dependencies, concrete_platform, verbose)
718
719
719
720
# Create a runner to work inside this workspace with the nonce built-in
720
721
ur = preferred_runner ()(
@@ -1162,7 +1163,7 @@ function build_jll_package(src_name::String,
1162
1163
export $(join (sort (variable_name .(first .(collect (products_info)))), " , " ))
1163
1164
""" )
1164
1165
end
1165
- for dep in dependencies
1166
+ for dep in filter_platforms ( dependencies, platform)
1166
1167
println (io, " using $(getname (dep)) " )
1167
1168
end
1168
1169
@@ -1193,7 +1194,7 @@ function build_jll_package(src_name::String,
1193
1194
1194
1195
print (io, """
1195
1196
function __init__()
1196
- JLLWrappers.@generate_init_header($(join (getname .(dependencies), " , " )) )
1197
+ JLLWrappers.@generate_init_header($(join (getname .(filter_platforms ( dependencies, platform) ), " , " )) )
1197
1198
""" )
1198
1199
1199
1200
for (p, p_info) in sort (products_info)
@@ -1284,7 +1285,7 @@ function build_jll_package(src_name::String,
1284
1285
# In this case we can easily add a direct link to the repo
1285
1286
println (io, " * [`" , depname, " `](https://github.com/JuliaBinaryWrappers/" , depname, " .jl)" )
1286
1287
else
1287
- println (io, " * `" , depname, " ) `" )
1288
+ println (io, " * `" , depname, " `" )
1288
1289
end
1289
1290
end
1290
1291
print_product (io, p:: Product ) = println (io, " * `" , typeof (p), " `: `" , variable_name (p), " `" )
@@ -1320,6 +1321,8 @@ function build_jll_package(src_name::String,
1320
1321
for p in sort (collect (platforms), by = triplet)
1321
1322
println (io, " * `" , p, " ` (`" , triplet (p), " `)" )
1322
1323
end
1324
+ # Note: here we list _all_ runtime dependencies, including those that may be
1325
+ # required only for some platforms.
1323
1326
if length (dependencies) > 0
1324
1327
println (io)
1325
1328
println (io, """
@@ -1370,7 +1373,8 @@ function build_jll_package(src_name::String,
1370
1373
# We used to have a duplicate license file, remove it.
1371
1374
rm (joinpath (code_dir, " LICENSE.md" ); force= true )
1372
1375
1373
- # Add a Project.toml
1376
+ # Add a Project.toml. Note: here we list _all_ runtime dependencies, including those
1377
+ # that may be required only for some platforms.
1374
1378
project = build_project_dict (src_name, build_version, dependencies, julia_compat; lazy_artifacts= lazy_artifacts)
1375
1379
open (joinpath (code_dir, " Project.toml" ), " w" ) do io
1376
1380
Pkg. TOML. print (io, project)
0 commit comments