dev-python/m2crypto: Fix crossdev
authorGábor Oszkár Dénes <gaboroszkar@protonmail.com>
Sun, 24 Mar 2019 22:11:52 +0000 (23:11 +0100)
committerMike Gilbert <floppym@gentoo.org>
Thu, 18 Apr 2019 15:10:11 +0000 (11:10 -0400)
Fix crossdev in version 0.31.0-r2.

Closes: https://bugs.gentoo.org/665544
Closes: https://github.com/gentoo/gentoo/pull/11484
Package-Manager: Portage-2.3.62, Repoman-2.3.11
Signed-off-by: Gábor Oszkár Dénes <gaboroszkar@protonmail.com>
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
dev-python/m2crypto/files/m2crypto-crossdev-0.31.0.patch [new file with mode: 0644]
dev-python/m2crypto/m2crypto-0.31.0-r2.ebuild

diff --git a/dev-python/m2crypto/files/m2crypto-crossdev-0.31.0.patch b/dev-python/m2crypto/files/m2crypto-crossdev-0.31.0.patch
new file mode 100644 (file)
index 0000000..ff83889
--- /dev/null
@@ -0,0 +1,12 @@
+--- a/setup.py
++++ b/setup.py
+@@ -50,7 +50,8 @@
+                                 '*Visual*', 'VC', 'include')
+         err = glob.glob(globmask)
+     else:
+-        pid = subprocess.Popen(['cpp', '-Wp,-v', '-'],
++        pid = subprocess.Popen(os.environ.get('CPP', 'cpp').split() +
++                               ['-Wp,-v', '-'],
+                                stdin=open(os.devnull, 'r'),
+                                stdout=subprocess.PIPE,
+                                stderr=subprocess.PIPE)
index 3d907ecee378fe8bc05c7126b22ce9d9a1ff0c8e..e3435d80ceb0b4d388eda2ce7e21a4de621a30fe 100644 (file)
@@ -25,7 +25,8 @@ RDEPEND="
        libressl? ( dev-libs/libressl:0= )
        virtual/python-typing[${PYTHON_USEDEP}]
 "
-DEPEND="${RDEPEND}
+DEPEND="${RDEPEND}"
+BDEPEND="
        >=dev-lang/swig-2.0.9
        dev-python/setuptools[${PYTHON_USEDEP}]
 "
@@ -37,18 +38,18 @@ RESTRICT=test
 
 PATCHES=(
        "${FILESDIR}/${PN}-libressl-${PV}.patch"
+       "${FILESDIR}/${PN}-crossdev-${PV}.patch"
 )
 
 python_compile() {
        # setup.py looks at platform.machine() to determine swig options.
        # For exotic ABIs, we need to give swig a hint.
        # https://bugs.gentoo.org/617946
-       # TODO: Fix cross-compiles
        local -x SWIG_FEATURES=
        case ${ABI} in
                x32) SWIG_FEATURES="-D__ILP32__" ;;
        esac
-       distutils-r1_python_compile --openssl="${EPREFIX}"/usr
+       distutils-r1_python_compile --openssl="${ESYSROOT}"/usr
 }
 
 python_test() {