summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2010-07-12 14:05:17 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2010-07-12 14:05:17 +0000
commit891c5be991f7a53cb0636a313b87d9422281a814 (patch)
tree52896bffb16a658acd946e465563be3902c20198 /dev-python/pyopenssl
parentRestored ~ppc64 for newer versions as we have ppc64 binaries for latest ghc. (diff)
downloadgentoo-2-891c5be991f7a53cb0636a313b87d9422281a814.tar.gz
gentoo-2-891c5be991f7a53cb0636a313b87d9422281a814.tar.bz2
gentoo-2-891c5be991f7a53cb0636a313b87d9422281a814.zip
Fix "assignment discards qualifiers from pointer target type" warning caused by missing const in usage of SSL_METHOD with OpenSSL >= 1.0.0 wrt #326637.
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'dev-python/pyopenssl')
-rw-r--r--dev-python/pyopenssl/ChangeLog10
-rw-r--r--dev-python/pyopenssl/files/pyopenssl-0.10-openssl-1.patch14
-rw-r--r--dev-python/pyopenssl/pyopenssl-0.10-r1.ebuild76
3 files changed, 99 insertions, 1 deletions
diff --git a/dev-python/pyopenssl/ChangeLog b/dev-python/pyopenssl/ChangeLog
index 99def548a5a3..0659d4ff4ff4 100644
--- a/dev-python/pyopenssl/ChangeLog
+++ b/dev-python/pyopenssl/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for dev-python/pyopenssl
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/pyopenssl/ChangeLog,v 1.51 2010/04/30 15:13:41 grobian Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/pyopenssl/ChangeLog,v 1.52 2010/07/12 14:05:16 ssuominen Exp $
+
+*pyopenssl-0.10-r1 (12 Jul 2010)
+
+ 12 Jul 2010; Samuli Suominen <ssuominen@gentoo.org>
+ +pyopenssl-0.10-r1.ebuild, +files/pyopenssl-0.10-openssl-1.patch:
+ Fix "assignment discards qualifiers from pointer target type" warning
+ caused by missing const in usage of SSL_METHOD with OpenSSL >= 1.0.0 wrt
+ #326637.
30 Apr 2010; Fabian Groffen <grobian@gentoo.org> pyopenssl-0.10.ebuild:
Marked ~x64-macos and ~ppc-macos
diff --git a/dev-python/pyopenssl/files/pyopenssl-0.10-openssl-1.patch b/dev-python/pyopenssl/files/pyopenssl-0.10-openssl-1.patch
new file mode 100644
index 000000000000..c813034837d3
--- /dev/null
+++ b/dev-python/pyopenssl/files/pyopenssl-0.10-openssl-1.patch
@@ -0,0 +1,14 @@
+--- src/ssl/context.c
++++ src/ssl/context.c
+@@ -1095,7 +1095,11 @@
+ */
+ static ssl_ContextObj*
+ ssl_Context_init(ssl_ContextObj *self, int i_method) {
++ #if OPENSSL_VERSION_NUMBER >= 0x10000000L
++ const SSL_METHOD *method;
++ #else
+ SSL_METHOD *method;
++ #endif
+
+ switch (i_method) {
+ case ssl_SSLv2_METHOD:
diff --git a/dev-python/pyopenssl/pyopenssl-0.10-r1.ebuild b/dev-python/pyopenssl/pyopenssl-0.10-r1.ebuild
new file mode 100644
index 000000000000..cc3e5e47f2ec
--- /dev/null
+++ b/dev-python/pyopenssl/pyopenssl-0.10-r1.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/pyopenssl/pyopenssl-0.10-r1.ebuild,v 1.1 2010/07/12 14:05:16 ssuominen Exp $
+
+EAPI="2"
+SUPPORT_PYTHON_ABIS="1"
+
+inherit distutils eutils
+
+MY_PN="pyOpenSSL"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Python interface to the OpenSSL library"
+HOMEPAGE="http://pyopenssl.sourceforge.net/ http://pypi.python.org/pypi/pyOpenSSL"
+SRC_URI="http://pypi.python.org/packages/source/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz
+ mirror://sourceforge/pyopenssl/${MY_P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris"
+IUSE="doc"
+
+RDEPEND=">=dev-libs/openssl-0.9.6g"
+DEPEND="${RDEPEND}
+ doc? ( >=dev-tex/latex2html-2002.2 )"
+RESTRICT_PYTHON_ABIS="3.*"
+
+S="${WORKDIR}/${MY_P}"
+
+PYTHON_MODNAME="OpenSSL"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-openssl-1.patch
+}
+
+src_compile() {
+ distutils_src_compile
+ if use doc; then
+ addwrite /var/cache/fonts
+ # This one seems to be unnecessary with a recent tetex, but
+ # according to bugs it was definitely necessary in the past,
+ # so leaving it in.
+ addwrite /usr/share/texmf/fonts/pk
+
+ cd doc
+ make html ps dvi
+ fi
+}
+
+src_test() {
+ test_package() {
+ pushd test > /dev/null
+ local test
+ for test in test_*.py; do
+ echo -e "\e[1;31mRunning ${test}...\e[0m"
+ PYTHONPATH="$(ls -d ../build-${PYTHON_ABI}/lib.*)" "$(PYTHON)" "${test}" || die "${test} failed with Python ${PYTHON_ABI}"
+ done
+ popd > /dev/null
+ }
+ python_execute_function test_package
+}
+
+src_install() {
+ distutils_src_install
+
+ if use doc; then
+ dohtml doc/html/*
+ dodoc doc/pyOpenSSL.*
+ fi
+
+ # Install examples
+ docinto examples
+ dodoc examples/*
+ docinto examples/simple
+ dodoc examples/simple/*
+}