| 1 | package=sodium |
| 2 | $(package)_version=1.0.18 |
| 3 | $(package)_download_path=https://download.libsodium.org/libsodium/releases/ |
| 4 | $(package)_file_name=libsodium-$($(package)_version).tar.gz |
| 5 | $(package)_sha256_hash=6f504490b342a4f8a4c4a02fc9b866cbef8622d5df4e5452b46be121e46636c1 |
| 6 | $(package)_patches=disable-glibc-getrandom-getentropy.patch fix-whitespace.patch |
| 7 | |
| 8 | define $(package)_set_vars |
| 9 | $(package)_config_opts=--enable-static --disable-shared |
| 10 | $(package)_config_opts+=--prefix=$(host_prefix) |
| 11 | endef |
| 12 | |
| 13 | define $(package)_preprocess_cmds |
| 14 | patch -p1 < $($(package)_patch_dir)/disable-glibc-getrandom-getentropy.patch &&\ |
| 15 | autoconf &&\ |
| 16 | patch -p1 < $($(package)_patch_dir)/fix-whitespace.patch |
| 17 | endef |
| 18 | |
| 19 | define $(package)_config_cmds |
| 20 | $($(package)_autoconf) AR_FLAGS=$($(package)_arflags) |
| 21 | endef |
| 22 | |
| 23 | define $(package)_build_cmds |
| 24 | $(MAKE) |
| 25 | endef |
| 26 | |
| 27 | define $(package)_stage_cmds |
| 28 | $(MAKE) DESTDIR=$($(package)_staging_dir) install |
| 29 | endef |
| 30 | |
| 31 | define $(package)_postprocess_cmds |
| 32 | rm lib/*.la |
| 33 | endef |
| 34 |