summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarien Zwart <marienz@gentoo.org>2012-06-13 11:20:28 +0000
committerMarien Zwart <marienz@gentoo.org>2012-06-13 11:20:28 +0000
commit2367ccbfcb0d5991717e6d93cd744110330b2eb2 (patch)
tree2282af3fa61dd1fab828950bf648d512783e57f2 /dev-python/pycurl
parentBump to latest release. Remove older which is actually newer and put directly... (diff)
downloadgentoo-2-2367ccbfcb0d5991717e6d93cd744110330b2eb2.tar.gz
gentoo-2-2367ccbfcb0d5991717e6d93cd744110330b2eb2.tar.bz2
gentoo-2-2367ccbfcb0d5991717e6d93cd744110330b2eb2.zip
Improve handling of curl ssl backends (#408821, #329987), restrict pypy.
(Portage version: 2.2.0_alpha110/cvs/Linux x86_64)
Diffstat (limited to 'dev-python/pycurl')
-rw-r--r--dev-python/pycurl/ChangeLog8
-rw-r--r--dev-python/pycurl/files/pycurl-7.19.0-linking-v2.patch55
-rw-r--r--dev-python/pycurl/pycurl-7.19.0-r1.ebuild59
3 files changed, 121 insertions, 1 deletions
diff --git a/dev-python/pycurl/ChangeLog b/dev-python/pycurl/ChangeLog
index a938b762862a..5f4f9d109ea6 100644
--- a/dev-python/pycurl/ChangeLog
+++ b/dev-python/pycurl/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-python/pycurl
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/pycurl/ChangeLog,v 1.69 2012/04/18 21:41:41 neurogeek Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/pycurl/ChangeLog,v 1.70 2012/06/13 11:20:28 marienz Exp $
+
+*pycurl-7.19.0-r1 (13 Jun 2012)
+
+ 13 Jun 2012; Marien Zwart <marienz@gentoo.org>
+ +files/pycurl-7.19.0-linking-v2.patch, +pycurl-7.19.0-r1.ebuild:
+ Improve handling of curl ssl backends (#408821, #329987), restrict pypy.
18 Apr 2012; Jesus Rivero <neurogeek@gentoo.org>
files/pycurl-7.19.0-linking.patch:
diff --git a/dev-python/pycurl/files/pycurl-7.19.0-linking-v2.patch b/dev-python/pycurl/files/pycurl-7.19.0-linking-v2.patch
new file mode 100644
index 000000000000..4d85778786fd
--- /dev/null
+++ b/dev-python/pycurl/files/pycurl-7.19.0-linking-v2.patch
@@ -0,0 +1,55 @@
+* Ignore curl-config --static-libs, as we should link dynamically.
+* Only initialize gcrypt if we are using an older gnutls that needs this.
+ This is necessary to support newer gnutls linked to libnettle instead of libgcrypt.
+* Mark NSS as supported, as it does not require the application to initialize threading.
+
+--- setup.py
++++ setup.py
+@@ -96,9 +96,7 @@
+ include_dirs.append(e[2:])
+ else:
+ extra_compile_args.append(e)
+- libs = split_quoted(
+- os.popen("'%s' --libs" % CURL_CONFIG).read()+\
+- os.popen("'%s' --static-libs" % CURL_CONFIG).read())
++ libs = split_quoted(os.popen("'%s' --libs" % CURL_CONFIG).read())
+ for e in libs:
+ if e[:2] == "-l":
+ libraries.append(e[2:])
+@@ -106,6 +104,8 @@
+ define_macros.append(('HAVE_CURL_OPENSSL', 1))
+ if e[2:] == 'gnutls':
+ define_macros.append(('HAVE_CURL_GNUTLS', 1))
++ if e[2:] == 'ssl3':
++ define_macros.append(('HAVE_CURL_NSS', 1))
+ elif e[:2] == "-L":
+ library_dirs.append(e[2:])
+ else:
+
+--- src/pycurl.c
++++ src/pycurl.c
+@@ -78,15 +78,18 @@
+ # define PYCURL_NEED_OPENSSL_TSL
+ # include <openssl/crypto.h>
+ # elif defined(HAVE_CURL_GNUTLS)
+-# define PYCURL_NEED_SSL_TSL
+-# define PYCURL_NEED_GNUTLS_TSL
+-# include <gcrypt.h>
+-# else
++# include <gnutls/gnutls.h>
++# if GNUTLS_VERSION_NUMBER <= 0x020b00
++# define PYCURL_NEED_SSL_TSL
++# define PYCURL_NEED_GNUTLS_TSL
++# include <gcrypt.h>
++# endif
++# elif !defined(HAVE_CURL_NSS)
+ # warning \
+ "libcurl was compiled with SSL support, but configure could not determine which " \
+ "library was used; thus no SSL crypto locking callbacks will be set, which may " \
+ "cause random crashes on SSL requests"
+-# endif /* HAVE_CURL_OPENSSL || HAVE_CURL_GNUTLS */
++# endif /* HAVE_CURL_OPENSSL || HAVE_CURL_GNUTLS || HAVE_CURL_NSS */
+ #endif /* HAVE_CURL_SSL */
+
+ #if defined(PYCURL_NEED_SSL_TSL)
+
diff --git a/dev-python/pycurl/pycurl-7.19.0-r1.ebuild b/dev-python/pycurl/pycurl-7.19.0-r1.ebuild
new file mode 100644
index 000000000000..42c481545005
--- /dev/null
+++ b/dev-python/pycurl/pycurl-7.19.0-r1.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/pycurl/pycurl-7.19.0-r1.ebuild,v 1.1 2012/06/13 11:20:28 marienz Exp $
+
+EAPI="4"
+PYTHON_DEPEND="2"
+SUPPORT_PYTHON_ABIS="1"
+# The selftests fail with pypy, and urlgrabber segfaults for me.
+RESTRICT_PYTHON_ABIS="3.* *-jython *-pypy-*"
+
+inherit distutils eutils
+
+DESCRIPTION="python binding for curl/libcurl"
+HOMEPAGE="http://pycurl.sourceforge.net/ http://pypi.python.org/pypi/pycurl"
+SRC_URI="http://pycurl.sourceforge.net/download/${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-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="examples"
+# Copied from the curl ebuild. Keep in sync.
+IUSE="${IUSE} curl_ssl_axtls curl_ssl_cyassl curl_ssl_gnutls curl_ssl_nss +curl_ssl_openssl curl_ssl_polarssl"
+
+# Depend on a curl with curl_ssl_* USE flags.
+# libcurl must not be using an ssl backend we do not support.
+# If the libcurl ssl backend changes pycurl should be recompiled.
+# If curl uses gnutls, depend on at least gnutls 2.11.0 so that pycurl
+# does not need to initialize gcrypt threading and we do not need to
+# explicitly link to libgcrypt.
+DEPEND=">=net-misc/curl-7.25.0-r1[curl_ssl_gnutls=,curl_ssl_openssl=,curl_ssl_nss=,-curl_ssl_axtls,-curl_ssl_cyassl,-curl_ssl_polarssl]
+ curl_ssl_gnutls? ( >=net-libs/gnutls-2.11.0 )"
+RDEPEND="${DEPEND}"
+
+PYTHON_MODNAME="curl"
+
+src_prepare() {
+ distutils_src_prepare
+ epatch "${FILESDIR}/${P}-linking-v2.patch"
+}
+
+src_test() {
+ testing() {
+ PYTHONPATH="$(ls -d build-${PYTHON_ABI}/lib.*)" "$(PYTHON)" tests/test_internals.py -q
+ }
+ python_execute_function testing
+}
+
+src_install() {
+ sed -e "/data_files=/d" -i setup.py || die "sed in setup.py failed"
+
+ distutils_src_install
+
+ dohtml -r doc/*
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r examples tests
+ fi
+}