@@ -282,3 +282,35 @@ Some comments about how to write this file:
282282 you want to use to override the products of the JLL package must have the same
283283 tree structure as the artifact. In our example we need to use ` /usr ` to
284284 override Fontconfig and ` /usr/local ` for Bzip2.
285+
286+ ### Overriding specific products
287+
288+ Instead of overriding the entire artifact, you can override a particular product
289+ (library, executable, or file) within a JLL using
290+ [ Preferences.jl] ( https://github.com/JuliaPackaging/Preferences.jl ) .
291+
292+ !!! compat
293+ This section requires Julia 1.6 or later.
294+
295+ For example, to override our ` libbz2 ` example:
296+ ``` julia
297+ using Preferences
298+ set_preferences! (
299+ " LocalPreferences.toml" ,
300+ " Bzip2_jll" ,
301+ " libbzip2_path" => " /usr/local/lib/libbz2.so" ,
302+ )
303+ ```
304+ Note that the product name is ` libbzip2 ` , but we use ` libbzip2_path ` .
305+
306+ !!! warning
307+ There are two common cases where this will not work:
308+ 1. The JLL is part of the [ Julia stdlib] ( https://github.com/JuliaLang/julia/tree/master/stdlib ) ,
309+ for example ` Zlib_jll `
310+ 2. The JLL has not been compiled with [ JLLWrappers.jl] ( https://github.com/JuliaPackaging/JLLWrappers.jl )
311+ as a dependency. In this case, it means that the last build of the JLL
312+ pre-dates the introduction of the JLLWrappers package and needs a fresh
313+ build. Please open an issue on [ Yggdrasil] ( https://github.com/JuliaPackaging/Yggdrasil/ )
314+ requesting a new build, or make a pull request to update the relevant
315+ ` build_tarballs.jl ` script.
316+
0 commit comments