From 64b64fac141a31ed4dabc2790c495f2197393214 Mon Sep 17 00:00:00 2001 From: Pacho Ramos Date: Sun, 24 Jun 2018 15:12:16 +0200 Subject: dev-python/hiredis: Fix linking (#653790 by Ștefan Talpalaru) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Package-Manager: Portage-2.3.40, Repoman-2.3.9 --- .../files/hiredis-0.2.0-r1-system-libs.patch | 26 +++++++++++++++++++++ dev-python/hiredis/hiredis-0.2.0-r1.ebuild | 27 ++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 dev-python/hiredis/files/hiredis-0.2.0-r1-system-libs.patch create mode 100644 dev-python/hiredis/hiredis-0.2.0-r1.ebuild (limited to 'dev-python/hiredis') diff --git a/dev-python/hiredis/files/hiredis-0.2.0-r1-system-libs.patch b/dev-python/hiredis/files/hiredis-0.2.0-r1-system-libs.patch new file mode 100644 index 000000000000..19d4bd8598ff --- /dev/null +++ b/dev-python/hiredis/files/hiredis-0.2.0-r1-system-libs.patch @@ -0,0 +1,26 @@ +diff -ur hiredis-0.2.0.orig/setup.py hiredis-0.2.0/setup.py +--- hiredis-0.2.0.orig/setup.py 2015-04-03 16:08:45.000000000 +0200 ++++ hiredis-0.2.0/setup.py 2018-04-22 16:57:15.966520939 +0200 +@@ -40,12 +40,11 @@ + # supported Python versions is worse... + # + # Also see: https://github.com/pietern/hiredis-py/issues/15 +-lib = ("hiredis_for_hiredis_py", { +- "sources": ["vendor/hiredis/%s.c" % src for src in ("read", "sds")]}) + + ext = Extension("hiredis.hiredis", + sources=glob.glob("src/*.c"), +- include_dirs=["vendor"]) ++ libraries=["hiredis"], ++) + + setup( + name="hiredis", +@@ -57,7 +56,6 @@ + keywords=["Redis"], + license="BSD", + packages=["hiredis"], +- libraries=[lib], + ext_modules=[ext], + + # Override "install_lib" command diff --git a/dev-python/hiredis/hiredis-0.2.0-r1.ebuild b/dev-python/hiredis/hiredis-0.2.0-r1.ebuild new file mode 100644 index 000000000000..c3bd60743801 --- /dev/null +++ b/dev-python/hiredis/hiredis-0.2.0-r1.ebuild @@ -0,0 +1,27 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} ) + +inherit distutils-r1 + +DESCRIPTION="Python extension that wraps hiredis" +HOMEPAGE="https://github.com/pietern/hiredis-py" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="" + +DEPEND=">=dev-libs/hiredis-0.13.1" +RDEPEND="${DEPEND}" + +PATCHES=( "${FILESDIR}"/${P}-r1-system-libs.patch ) + +python_compile() { + python_is_python3 || local -x CFLAGS="${CFLAGS} -fno-strict-aliasing" + + distutils-r1_python_compile +} -- cgit v1.2.3-65-gdbad