commit: 13ef44bf3be7c4117825edde0add989c3aae86eb Author: Michał Górny <mgorny <AT> gentoo <DOT> org> AuthorDate: Mon May 11 08:46:51 2020 +0000 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> CommitDate: Mon May 11 09:03:56 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=13ef44bf
dev-python/pycurl: Respect CC/*FLAGS in fake-curl Bug: https://bugs.gentoo.org/721270 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> .../pycurl/files/pycurl-7.43.0.5-cc-cflags.patch | 34 ++++++++++++++++++++++ dev-python/pycurl/pycurl-7.43.0.5.ebuild | 5 ++-- 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/dev-python/pycurl/files/pycurl-7.43.0.5-cc-cflags.patch b/dev-python/pycurl/files/pycurl-7.43.0.5-cc-cflags.patch new file mode 100644 index 00000000000..b1e66e0942d --- /dev/null +++ b/dev-python/pycurl/files/pycurl-7.43.0.5-cc-cflags.patch @@ -0,0 +1,34 @@ +From 861ba3143001caf2623ce5d84a1d04a69b502339 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <[email protected]> +Date: Mon, 11 May 2020 08:52:04 +0200 +Subject: [PATCH 1/2] Support overriding CC, respect *FLAGS in fake-curl + +The shipped libraries (obviously) do not work on non-amd64 platforms, +and rebuilding without the correct compiler and flags does not work +on more complex setups such as ppc64 with 32-bit userland. Make +the Makefile permit CC override while preserving the current default, +and use user-provided CFLAGS, CPPFLAGS and LDFLAGS. +--- + tests/fake-curl/libcurl/Makefile | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/tests/fake-curl/libcurl/Makefile b/tests/fake-curl/libcurl/Makefile +index b05bc89..8ece206 100644 +--- a/tests/fake-curl/libcurl/Makefile ++++ b/tests/fake-curl/libcurl/Makefile +@@ -7,8 +7,11 @@ all: \ + + .SUFFIXES: .c .so + ++CC = `curl-config --cc` ++CFLAGS += `curl-config --cflags` ++ + .c.so: +- `curl-config --cc` `curl-config --cflags` -shared -fPIC \ ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -shared -fPIC \ + -Wl,-soname,$@ -o $@ $< + + show-targets: +-- +2.26.2 + diff --git a/dev-python/pycurl/pycurl-7.43.0.5.ebuild b/dev-python/pycurl/pycurl-7.43.0.5.ebuild index 476a879faea..b80f699735d 100644 --- a/dev-python/pycurl/pycurl-7.43.0.5.ebuild +++ b/dev-python/pycurl/pycurl-7.43.0.5.ebuild @@ -6,7 +6,7 @@ EAPI=7 # The selftests fail with pypy, and urlgrabber segfaults for me. PYTHON_COMPAT=( python2_7 python3_{6,7,8} ) -inherit distutils-r1 +inherit distutils-r1 toolchain-funcs DESCRIPTION="python binding for curl/libcurl" HOMEPAGE=" @@ -51,6 +51,7 @@ DISTUTILS_IN_SOURCE_BUILD=1 PATCHES=( "${FILESDIR}"/pycurl-7.43.0.5-telnet-test.patch + "${FILESDIR}"/pycurl-7.43.0.5-cc-cflags.patch ) python_prepare_all() { @@ -66,7 +67,7 @@ python_configure_all() { src_test() { # upstream bundles precompiled amd64 libs rm tests/fake-curl/libcurl/*.so || die - emake -C tests/fake-curl/libcurl + emake -C tests/fake-curl/libcurl CC="$(tc-getCC)" distutils-r1_src_test }
