ASR_BASE

Change-Id: Icf3719cc0afe3eeb3edc7fa80a2eb5199ca9dda1
diff --git a/external/subpack/lang/python/python-pynacl/Makefile b/external/subpack/lang/python/python-pynacl/Makefile
new file mode 100644
index 0000000..72d8deb
--- /dev/null
+++ b/external/subpack/lang/python/python-pynacl/Makefile
@@ -0,0 +1,37 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-pynacl
+PKG_VERSION:=1.5.0
+PKG_RELEASE:=3
+
+PYPI_NAME:=PyNaCl
+PKG_HASH:=8ac7448f09ab85811607bdd21ec2464495ac8b7c66d146bf545b0f08fb9220ba
+
+PKG_MAINTAINER:=Javier Marcet <javier@marcet.info>
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_BUILD_DEPENDS:=libffi/host python-cffi/host  # cffi>=1.4.1
+
+PYTHON3_PKG_BUILD_VARS:=SODIUM_INSTALL=system
+
+include ../pypi.mk
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-pynacl
+  CATEGORY:=Languages
+  SECTION:=lang
+  SUBMENU:=Python
+  TITLE:=Python binding to the libsodium library
+  URL:=https://github.com/pyca/pynacl/
+  DEPENDS:=+libsodium +python3-light +python3-cffi +python3-six
+endef
+
+define Package/python3-pynacl/description
+  PyNaCl is a Python binding to libsodium, which is a fork of the Networking and Cryptography library.
+endef
+
+$(eval $(call Py3Package,python3-pynacl))
+$(eval $(call BuildPackage,python3-pynacl))
+$(eval $(call BuildPackage,python3-pynacl-src))
diff --git a/external/subpack/lang/python/python-pynacl/patches/001-always-compile-ed25519.patch b/external/subpack/lang/python/python-pynacl/patches/001-always-compile-ed25519.patch
new file mode 100644
index 0000000..274f1ab
--- /dev/null
+++ b/external/subpack/lang/python/python-pynacl/patches/001-always-compile-ed25519.patch
@@ -0,0 +1,22 @@
+--- 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;
+--- a/src/bindings/minimal/crypto_core.h
++++ b/src/bindings/minimal/crypto_core.h
+@@ -13,7 +13,7 @@
+  * limitations under the License.
+  */
+ 
+-#ifdef SODIUM_LIBRARY_MINIMAL
++#if 0
+ static const int PYNACL_HAS_CRYPTO_CORE_ED25519 = 0;
+ 
+ size_t (*crypto_core_ed25519_bytes)() = NULL;