Skip to content
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
/check_build/
/benchmark_images/
/subprojects/*/
!/subprojects/packagefiles
/.vscode/
/.frama-c/
/trash/
Expand Down
16 changes: 16 additions & 0 deletions docs/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,22 @@ ninja
ninja install
```

## Testing

Tests require [libpng](http://libpng.org/pub/png/libpng.html) with Animated PNG (APNG) support,
as of v1.6.39 the APNG feature is an out-of-tree patch.
Some platforms (e.g. Debian) ship `libpng` with APNG support, for other platforms a fallback option is provided.
The fallback option requires Meson 0.63.0 or newer and involves downloading libpng source code and the corresponding Meson build file, the APNG patch included under `subprojects/packagefiles/apng` is applied automatically.
The fallback option is used by default if `libpng` does not include APNG support or can't be found on the system.

The vast majority of tests require `libpng` and is enabled through the `dev_build` option:

```bash
meson build -Ddev_build=true
cd build
meson test
```

## Embedding the source code

The source files `spng.c`/`spng.h` can be embedded in a project without
Expand Down
19 changes: 12 additions & 7 deletions subprojects/libpng.wrap
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
[wrap-file]
directory = libpng-1.6.37
directory = libpng-1.6.39

source_url = https://github.com/glennrp/libpng/archive/v1.6.37.tar.gz
source_filename = libpng-1.6.37.tar.gz
source_hash = ca74a0dace179a8422187671aee97dd3892b53e168627145271cad5b5ac81307
source_url = https://github.com/glennrp/libpng/archive/v1.6.39.tar.gz
source_filename = libpng-1.6.39.tar.gz
source_hash = a00e9d2f2f664186e4202db9299397f851aea71b36a35e74910b8820e380d441

patch_url = https://wrapdb.mesonbuild.com/v1/projects/libpng/1.6.37/1/get_zip
patch_filename = libpng-1.6.37-1-wrap.zip
patch_hash = 9a863ae8a5657315a484c94c51f9f636b1fb9f49a15196cc896b72e5f21d78f0
patch_url = https://wrapdb.mesonbuild.com/v2/libpng_1.6.39-3/get_patch
patch_filename = libpng_1.6.39-3_patch.zip
patch_hash = 6af2a8d464e3f1d2e2832580896323ac7b0b786806c75f0eff0c8ec82dd603ec

diff_files = apng/libpng-1.6.39-apng.patch

[provide]
libpng = libpng_dep
Loading