diff mbox

[3/3] python-m2crypto: new package

Message ID 1365532027-13639-3-git-send-email-gustavo@zacarias.com.ar
State Superseded
Headers show

Commit Message

Gustavo Zacarias April 9, 2013, 6:27 p.m. UTC
Add the python-m2crypto, host-variant only, for CRDA.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 package/python-m2crypto/python-m2crypto.mk | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 package/python-m2crypto/python-m2crypto.mk

Comments

Arnout Vandecappelle April 9, 2013, 9:41 p.m. UTC | #1
On 09/04/13 20:27, Gustavo Zacarias wrote:
> Add the python-m2crypto, host-variant only, for CRDA.

  Is there a reason to make it host-only? Seems like this is potentially 
useful on target as well... Or do you expect build difficulties?

  Regards,
  Arnout
Gustavo Zacarias April 9, 2013, 10:21 p.m. UTC | #2
On 04/09/2013 06:41 PM, Arnout Vandecappelle wrote:

>  Is there a reason to make it host-only? Seems like this is potentially
> useful on target as well... Or do you expect build difficulties?

I've hit cross build issues, basically x86_64 for an ARM target isn't nice.
Seems some extra python tricks will be necessary for this one on the target.
Regards.
diff mbox

Patch

diff --git a/package/python-m2crypto/python-m2crypto.mk b/package/python-m2crypto/python-m2crypto.mk
new file mode 100644
index 0000000..80523b8
--- /dev/null
+++ b/package/python-m2crypto/python-m2crypto.mk
@@ -0,0 +1,25 @@ 
+#############################################################
+#
+# python-m2crypto
+#
+#############################################################
+
+PYTHON_M2CRYPTO_VERSION = 0.21.1
+PYTHON_M2CRYPTO_SITE = http://pypi.python.org/packages/source/M/M2Crypto
+PYTHON_M2CRYPTO_SOURCE = M2Crypto-$(PYTHON_M2CRYPTO_VERSION).tar.gz
+HOST_PYTHON_M2CRYPTO_DEPENDENCIES = host-openssl host-python host-python-setuptools host-swig
+
+define HOST_PYTHON_M2CRYPTO_BUILD_CMDS
+	(cd $(@D); \
+		$(HOST_CONFIGURE_OPTS) \
+		PYTHONXCPREFIX="$(HOST_DIR)/usr/" \
+		LDFLAGS="-L$(HOST_DIR)/lib -L$(HOST_DIR)/usr/lib" \
+	$(HOST_DIR)/usr/bin/python setup.py build_ext --openssl=$(HOST_DIR)/usr)
+endef
+
+define HOST_PYTHON_M2CRYPTO_INSTALL_CMDS
+	(cd $(@D); PYTHONPATH=$(HOST_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages \
+	$(HOST_DIR)/usr/bin/python setup.py install --prefix=$(HOST_DIR)/usr)
+endef
+
+$(eval $(host-generic-package))