python-pynacl: fix build with new libsodium patch
authorAlexandru Ardelean <ardeleanalex@gmail.com>
Wed, 5 Aug 2020 05:39:50 +0000 (08:39 +0300)
committerAlexandru Ardelean <ardeleanalex@gmail.com>
Wed, 5 Aug 2020 05:39:51 +0000 (08:39 +0300)
Fixes https://github.com/openwrt/packages/issues/13016
Patch [1] broke compilation for python-pynacl.

The fix is to patch PyNaCl to consider that
PYNACL_HAS_CRYPTO_SCALARMULT_ED25519 is always available.

[1] https://github.com/openwrt/packages/commit/3ef28a4ab0cb60877c4ec68f5ba8c276021a1ab6

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
lang/python/python-pynacl/Makefile
lang/python/python-pynacl/patches/001-always-compile-scalar-mult-ed25519.patch [new file with mode: 0644]

index 69ed754dd4d126ac24eee99a1a2679e8829d6df5..3d3d02a2e351e4c11ce91d514a11be3d2d031244 100644 (file)
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-pynacl
 PKG_VERSION:=1.4.0
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PYPI_NAME:=PyNaCl
 PKG_HASH:=54e9a2c849c742006516ad56a88f5c74bf2ce92c9f67435187c3c5953b346505
diff --git a/lang/python/python-pynacl/patches/001-always-compile-scalar-mult-ed25519.patch b/lang/python/python-pynacl/patches/001-always-compile-scalar-mult-ed25519.patch
new file mode 100644 (file)
index 0000000..f1920e9
--- /dev/null
@@ -0,0 +1,13 @@
+diff --git a/src/bindings/minimal/crypto_scalarmult.h b/src/bindings/minimal/crypto_scalarmult.h
+index 06ca1ef..9bc3d8e 100644
+--- a/src/bindings/minimal/crypto_scalarmult.h
++++ b/src/bindings/minimal/crypto_scalarmult.h
+@@ -13,7 +13,7 @@
+  * limitations under the License.
+  */
+-#ifdef SODIUM_LIBRARY_MINIMAL
++#if 0
+ static const int PYNACL_HAS_CRYPTO_SCALARMULT_ED25519 = 0;
+ size_t (*crypto_scalarmult_ed25519_bytes)() = NULL;