aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Wagner <stw@bit-strickerei.de>2018-08-06 15:10:02 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2018-08-07 07:08:57 +0000
commit632d2b398fbceda04d6f530604e42b7470399587 (patch)
tree1b40094a58a63b4a50cc7dc6ba11c4c734218e60
parentbd72bf801a4621ff2b22b81ae0fae02219427321 (diff)
downloadaports-632d2b398fbceda04d6f530604e42b7470399587.tar.gz
aports-632d2b398fbceda04d6f530604e42b7470399587.tar.bz2
aports-632d2b398fbceda04d6f530604e42b7470399587.tar.xz
testing/py-m2crypto: upgrade to 0.30.1; fix libressl
-rw-r--r--testing/py-m2crypto/APKBUILD42
-rw-r--r--testing/py-m2crypto/libressl.patch24
2 files changed, 47 insertions, 19 deletions
diff --git a/testing/py-m2crypto/APKBUILD b/testing/py-m2crypto/APKBUILD
index 1206fa5f65..9c2354a43e 100644
--- a/testing/py-m2crypto/APKBUILD
+++ b/testing/py-m2crypto/APKBUILD
@@ -2,45 +2,49 @@
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py-m2crypto
_pkgname=M2Crypto
-pkgver=0.27.0
-pkgrel=1
+pkgver=0.30.1
+pkgrel=0
pkgdesc="A crypto and SSL toolkit for Python"
url="https://pypi.python.org/pypi/M2Crypto/"
arch="all"
license="BSD"
-makedepends="python2-dev py-setuptools libressl-dev swig"
-# Note: This library is not compatible with Python 3 yet,
-# see https://gitlab.com/m2crypto/m2crypto/issues/114.
-subpackages="py2-${pkgname#py-}:_py2"
-source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
+depends="py-typing"
+makedepends="python2-dev python3-dev py-setuptools libressl-dev swig"
+subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
+source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz
+ libressl.patch
+ "
builddir="$srcdir/$_pkgname-$pkgver"
build() {
cd "$builddir"
python2 setup.py build
+ python3 setup.py build
}
package() {
mkdir -p "$pkgdir"
}
-_py2() {
- depends="py2-typing"
- replaces="$pkgname"
- _py python2
-}
-
-_py3() {
- _py python3
-}
-
_py() {
local python="$1"
- pkgdesc="$pkgdesc (for $python)"
+ pkgdesc="$pkgdesc ${python#python}"
+ depends="$depends $python"
install_if="$pkgname=$pkgver-r$pkgrel $python"
cd "$builddir"
$python setup.py install --prefix=/usr --root="$subpkgdir"
}
-sha512sums="df0f6b16f7d00a19fafbb5da5a3ececff6b4627accd00ca65e0d6f9e752a97f41016d0072c8e681475fe1d87c89b7474067068c0bfce6c68a30baddeb31bfac2 M2Crypto-0.27.0.tar.gz"
+_py2() {
+ depends="${depends//py-/py2-}"
+ _py python2
+}
+
+_py3() {
+ depends="${depends//py-/py3-}"
+ _py python3
+}
+
+sha512sums="c85b6350d8b6b4a14e9c76b755cdc1a88d7ba63ae75ebfbb32d42389225c0a3cf9d530f95c2651ff3811c755cd9bbb482f81fdb0dcf670d7a0015320622725b2 M2Crypto-0.30.1.tar.gz
+a95d7c1bd3b3bfa336ef97777e6ddde7ce3f2ccc7356bbd6285ddf614eec5cdb6097ee44e36d0fa3996bee29f6a642c6abd707c5b76ce6ed55ccd667ac470ddb libressl.patch"
diff --git a/testing/py-m2crypto/libressl.patch b/testing/py-m2crypto/libressl.patch
new file mode 100644
index 0000000000..b564c2bbc7
--- /dev/null
+++ b/testing/py-m2crypto/libressl.patch
@@ -0,0 +1,24 @@
+--- a/SWIG/_bio.i
++++ b/SWIG/_bio.i
+@@ -9,6 +9,10 @@
+
+ %{
+ #include <openssl/bio.h>
++
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
++#define BIO_get_init(b) (b)->init
++#endif
+ %}
+
+ %apply Pointer NONNULL { BIO * };
+--- a/SWIG/_lib11_compat.i
++++ b/SWIG/_lib11_compat.i
+@@ -8,7 +8,7 @@
+ */
+
+ %{
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+
+ #include <string.h>
+ #include <openssl/engine.h>