Skip to content

Commit 1d883cd

Browse files
giordanostaticfloat
authored andcommitted
[skip travis] Some improvements to documentation
Also, do not use Zlib in the override example, since you can't override Zlib as it's baked into Julia.
1 parent ab23ef8 commit 1d883cd

File tree

3 files changed

+25
-19
lines changed

3 files changed

+25
-19
lines changed

docs/src/build_tips.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ If your build fails with some errors, look at the [Build Troubleshooting](@ref)
66

77
*If you have additional tips, please submit a PR with suggestions.*
88

9+
## Build strategy
10+
11+
What BinaryBuilder does is to create a tarball containing all files that are found inside the `${prefix}` directory at the end of the build and which don't come from the dependencies listed in the build recipe. Thus, what you want to do in a build script is to install the relevant files under the appropriate directories in `${prefix}` (see the [Automatic environment variables](@ref) section): the libraries in `${libdir}`, the binary executables in `${bindir}`, etc... Most packages come with a build system to automate this process (GNU Autoconf, CMake, Meson, a plain Makefile, etc...), but sometimes you may need to manually move the files as appropriate.
12+
913
## Initiating different shell commands based on target
1014

1115
Sometimes, you need to adapt build scripts based on the target platform. This can be done within the shell script. Here is an example from [`OpenBLAS`](https://github.com/JuliaPackaging/Yggdrasil/blob/685cdcec9f0f0a16f7b90a1671af88326dcf5ab1/O/OpenBLAS/build_tarballs.jl):

docs/src/building.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -380,9 +380,11 @@ and a new JLL version will be generated to provide the function.
380380

381381
## Building a custom JLL package locally
382382

383-
When building a new version of a JLL package, if `--deploy` is passed to `build_tarballs.jl`
384-
then a newly-built JLL package will be deployed to a GitHub repository. (Read the
385-
documentation given by passing `--help` to a `build_tarballs.jl` script for more on
386-
`--deploy` options). If `--deploy=local` is passed, the JLL package will still be built
387-
in the `~/.julia/dev/` directory, but it will not be uploaded anywhere. This is useful
388-
for local testing and validation that the built artifacts are working with your package.
383+
When building a new version of a JLL package, if `--deploy` is passed to
384+
`build_tarballs.jl` then a newly-built JLL package will be deployed to a GitHub
385+
repository. (Read the documentation in the [Command Line](@ref) section or
386+
given by passing `--help` to a `build_tarballs.jl` script for more on `--deploy`
387+
options). If `--deploy=local` is passed, the JLL package will still be built in
388+
the `~/.julia/dev/` directory, but it will not be uploaded anywhere. This is
389+
useful for local testing and validation that the built artifacts are working
390+
with your package.

docs/src/jll.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -237,34 +237,34 @@ for more information on this capability.
237237

238238
### Non-`dev`'ed JLL packages
239239

240-
As an example, in a Linux system you can override the Zlib library provided by
241-
[`Zlib_jll.jl`](https://github.com/JuliaBinaryWrappers/Zlib_jll.jl) and the
240+
As an example, in a Linux system you can override the Fontconfig library provided by
241+
[`Fontconfig_jll.jl`](https://github.com/JuliaBinaryWrappers/Fontconfig_jll.jl) and the
242242
Bzip2 library provided by
243243
[`Bzip2_jll.jl`](https://github.com/JuliaBinaryWrappers/Bzip2_jll.jl)
244-
respectively with `/usr/lib/libz.so` and `/usr/local/lib/libbz2.so` with the
244+
respectively with `/usr/lib/libfontconfig.so` and `/usr/local/lib/libbz2.so` with the
245245
following `Overrides.toml`:
246246
```toml
247-
[83775a58-1f1d-513f-b197-d71354ab007a]
248-
Zlib = "/usr"
247+
[a3f928ae-7b40-5064-980b-68af3947d34b]
248+
Fontconfig = "/usr"
249249

250250
[6e34b625-4abd-537c-b88f-471c36dfa7a0]
251251
Bzip2 = "/usr/local"
252252
```
253253
Some comments about how to write this file:
254254
* The UUIDs are those of the JLL packages,
255-
`83775a58-1f1d-513f-b197-d71354ab007a` for `Zlib_jll.jl` and
255+
`a3f928ae-7b40-5064-980b-68af3947d34b` for `Fontconfig_jll.jl` and
256256
`6e34b625-4abd-537c-b88f-471c36dfa7a0` for `Bzip2_jll.jl`. You can either
257257
find them in the `Project.toml` files of the packages (e.g., see [the
258258
`Project.toml` file of
259-
`Zlib_jll`](https://github.com/JuliaBinaryWrappers/Zlib_jll.jl/blob/5c4fb6dc1eaa812eb0d464cb5cb4450877dfeaf1/Project.toml#L2))
260-
or look it up in the registry (e.g., see [the entry for `Zlib_jll` in the
261-
General
262-
registry](https://github.com/JuliaRegistries/General/blob/13c47161711549e3cd20160194ada4a7cca5102a/Z/Zlib_jll/Package.toml#L2)).
263-
* The artifact provided by JLL packages has the same name as the package,
264-
without the trailing `_jll`, `Zlib` and `Bzip2` in this case.
259+
`Fontconfig_jll`](https://github.com/JuliaBinaryWrappers/Fontconfig_jll.jl/blob/8904cd195ea4131b89cafd7042fd55e6d5dea241/Project.toml#L2))
260+
or look it up in the registry (e.g., see [the entry for `Fontconfig_jll` in
261+
the General
262+
registry](https://github.com/JuliaRegistries/General/blob/caddd31e7878276f6e052f998eac9f41cdf16b89/F/Fontconfig_jll/Package.toml#L2)).
263+
* The artifacts provided by JLL packages have the same name as the packages,
264+
without the trailing `_jll`, `Fontconfig` and `Bzip2` in this case.
265265
* The artifact location is held in the `artifact_dir` variable mentioned above,
266266
which is the "prefix" of the installation of the package. Recall the paths of
267267
the products in the JLL package is relative to `artifact_dir` and the files
268268
you want to use to override the products of the JLL package must have the same
269269
tree structure as the artifact. In our example we need to use `/usr` to
270-
override Zlib and `/usr/local` for Bzip2.
270+
override Fontconfig and `/usr/local` for Bzip2.

0 commit comments

Comments
 (0)