2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2013-04-29 10:57:48 +02:00
|
|
|
#
|
|
|
|
# python-m2crypto
|
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2013-04-29 10:57:48 +02:00
|
|
|
|
2015-12-06 17:35:29 +01:00
|
|
|
PYTHON_M2CRYPTO_VERSION = 0.22.5
|
2013-04-29 10:57:48 +02:00
|
|
|
PYTHON_M2CRYPTO_SITE = http://pypi.python.org/packages/source/M/M2Crypto
|
|
|
|
PYTHON_M2CRYPTO_SOURCE = M2Crypto-$(PYTHON_M2CRYPTO_VERSION).tar.gz
|
2013-12-11 21:26:42 +01:00
|
|
|
PYTHON_M2CRYPTO_SETUP_TYPE = setuptools
|
|
|
|
HOST_PYTHON_M2CRYPTO_DEPENDENCIES = host-openssl host-swig
|
2013-04-29 10:57:48 +02:00
|
|
|
|
2014-03-05 23:04:44 +01:00
|
|
|
# We need to use python2 because m2crypto is not python3 compliant.
|
|
|
|
HOST_PYTHON_M2CRYPTO_NEEDS_HOST_PYTHON = python2
|
|
|
|
|
2015-12-09 09:55:16 +01:00
|
|
|
# The --openssl option that allows to specify a custom path to OpenSSL
|
|
|
|
# can only be used with the non-default build_ext setup.py command,
|
|
|
|
# and calling this command directly fails. To work around this, simply
|
|
|
|
# hardcode the path to OpenSSL in setup.py.
|
|
|
|
# Bug reported at https://gitlab.com/m2crypto/m2crypto/issues/89
|
|
|
|
define HOST_PYTHON_M2CRYPTO_SET_OPENSSL_PATH
|
|
|
|
$(SED) "s%self.openssl = '/usr'%self.openssl = '$(HOST_DIR)/usr'%" \
|
|
|
|
$(@D)/setup.py
|
2013-04-29 10:57:48 +02:00
|
|
|
endef
|
|
|
|
|
2015-12-09 09:55:16 +01:00
|
|
|
HOST_PYTHON_M2CRYPTO_POST_PATCH_HOOKS += HOST_PYTHON_M2CRYPTO_SET_OPENSSL_PATH
|
|
|
|
|
2013-12-11 21:26:42 +01:00
|
|
|
$(eval $(host-python-package))
|