Skip to content

Commit

Permalink
depends: sodium: update to 1.0.19
Browse files Browse the repository at this point in the history
  • Loading branch information
tobtoht committed Nov 28, 2023
1 parent 617ccf0 commit 204cdde
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 2 deletions.
6 changes: 4 additions & 2 deletions contrib/depends/packages/sodium.mk
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package=sodium
$(package)_version=1.0.18
$(package)_version=1.0.19
$(package)_download_path=https://download.libsodium.org/libsodium/releases/
$(package)_file_name=libsodium-$($(package)_version).tar.gz
$(package)_sha256_hash=6f504490b342a4f8a4c4a02fc9b866cbef8622d5df4e5452b46be121e46636c1
$(package)_sha256_hash=018d79fe0a045cca07331d37bd0cb57b2e838c51bc48fd837a1472e50068bbea
$(package)_patches += fix-blake2b-symbol-naming.patch

define $(package)_set_vars
$(package)_config_opts=--enable-static --disable-shared
Expand All @@ -11,6 +12,7 @@ endef

define $(package)_preprocess_cmds
cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub build-aux/ && \
patch -p1 -i $($(package)_patch_dir)/fix-blake2b-symbol-naming.patch && \
autoconf
endef

Expand Down
39 changes: 39 additions & 0 deletions contrib/depends/patches/sodium/fix-blake2b-symbol-naming.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
From 86d419f9989613a0f046ca1613b005efac942095 Mon Sep 17 00:00:00 2001
From: tobtoht <[email protected]>
Date: Tue, 28 Nov 2023 01:00:38 +0100
Subject: [PATCH] fix blake2b symbol naming

---
.../crypto_generichash/blake2b/ref/blake2.h | 16 ++++++++++++++++
1 file changed, 16 insertions(+)

diff --git a/src/libsodium/crypto_generichash/blake2b/ref/blake2.h b/src/libsodium/crypto_generichash/blake2b/ref/blake2.h
index edfc99a2..eff55b4d 100644
--- a/src/libsodium/crypto_generichash/blake2b/ref/blake2.h
+++ b/src/libsodium/crypto_generichash/blake2b/ref/blake2.h
@@ -23,6 +23,22 @@
#include "crypto_generichash_blake2b.h"
#include "export.h"

+#define blake2b _sodium_blake2b
+#define blake2b_compress_avx2 _sodium_blake2b_compress_avx2
+#define blake2b_compress_ref _sodium_blake2b_compress_ref
+#define blake2b_compress_sse41 _sodium_blake2b_compress_sse41
+#define blake2b_compress_ssse3 _sodium_blake2b_compress_ssse3
+#define blake2b_final _sodium_blake2b_final
+#define blake2b_init _sodium_blake2b_init
+#define blake2b_init_key _sodium_blake2b_init_key
+#define blake2b_init_key_salt_personal _sodium_blake2b_init_key_salt_personal
+#define blake2b_init_param _sodium_blake2b_init_param
+#define blake2b_init_salt_personal _sodium_blake2b_init_salt_personal
+#define blake2b_long _sodium_blake2b_long
+#define blake2b_pick_best_implementation _sodium_blake2b_pick_best_implementation
+#define blake2b_salt_personal _sodium_blake2b_salt_personal
+#define blake2b_update _sodium_blake2b_update
+
enum blake2b_constant {
BLAKE2B_BLOCKBYTES = 128,
BLAKE2B_OUTBYTES = 64,
--
2.43.0

0 comments on commit 204cdde

Please sign in to comment.