commit:     67c42e74dcd45c7716bc29be6368e512ded7439a
Author:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 16 09:36:57 2020 +0000
Commit:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
CommitDate: Sun Feb 16 10:34:21 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=67c42e74

dev-libs/libpeas: fix python:3.8 compatibility

Looks like the addition of 3.8 to libpeas and almost all of its
consumers months ago was completely untested; fix it up in
straight-to-stable because all of those consumers already have
3.8 in their stable versions PYTHON_COMPAT.

Closes: https://bugs.gentoo.org/702810
Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Mart Raudsepp <leio <AT> gentoo.org>

 dev-libs/libpeas/files/1.22.0-py38-support.patch   | 29 ++++++++++++++++++++++
 ...s-1.22.0-r1.ebuild => libpeas-1.22.0-r2.ebuild} | 14 +++++------
 2 files changed, 36 insertions(+), 7 deletions(-)

diff --git a/dev-libs/libpeas/files/1.22.0-py38-support.patch 
b/dev-libs/libpeas/files/1.22.0-py38-support.patch
new file mode 100644
index 00000000000..6f4645da61c
--- /dev/null
+++ b/dev-libs/libpeas/files/1.22.0-py38-support.patch
@@ -0,0 +1,29 @@
+From 3571f4b23abbf5c63e38c82d24a1880fa440499e Mon Sep 17 00:00:00 2001
+From: Mart Raudsepp <[email protected]>
+Date: Sat, 15 Feb 2020 23:23:09 +0200
+Subject: [PATCH] Fix python-3.8 compatibility
+
+---
+ configure.ac | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index bd561e2..d3d0073 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -442,7 +442,11 @@ else
+                 found_python3=yes
+                 PYTHON3_BIN="$PYTHON"
+                 PYTHON3_CFLAGS=`${PYTHON3_CONFIG} --includes`
+-                PYTHON3_LIBS=`${PYTHON3_CONFIG} --libs`
++                if $PYTHON3_CONFIG --embed >/dev/null 2>&1; then
++                    PYTHON3_LIBS=`${PYTHON3_CONFIG} --libs --embed`
++                else
++                    PYTHON3_LIBS=`${PYTHON3_CONFIG} --libs`
++                fi
+                 PYTHON3_LDFLAGS=`${PYTHON3_CONFIG} --ldflags`
+                 AC_SUBST(PYTHON3_BIN)
+                 AC_SUBST(PYTHON3_CFLAGS)
+-- 
+2.20.1
+

diff --git a/dev-libs/libpeas/libpeas-1.22.0-r1.ebuild 
b/dev-libs/libpeas/libpeas-1.22.0-r2.ebuild
similarity index 93%
rename from dev-libs/libpeas/libpeas-1.22.0-r1.ebuild
rename to dev-libs/libpeas/libpeas-1.22.0-r2.ebuild
index d2eec7dc531..9918e9e75b8 100644
--- a/dev-libs/libpeas/libpeas-1.22.0-r1.ebuild
+++ b/dev-libs/libpeas/libpeas-1.22.0-r2.ebuild
@@ -3,6 +3,7 @@
 
 EAPI=6
 GNOME2_LA_PUNT="yes"
+GNOME2_EAUTORECONF="yes"
 PYTHON_COMPAT=( python{3_6,3_7,3_8} )
 
 inherit autotools eutils gnome2 multilib python-single-r1 virtualx
@@ -44,17 +45,16 @@ DEPEND="${RDEPEND}
 "
 # eautoreconf needs gobject-introspection-common, gnome-common
 
+PATCHES=(
+       # Gentoo uses unversioned lua - lua.pc instad of lua5.1.pc, 
/usr/bin/lua instead of /usr/bin/lua5.1
+       "${FILESDIR}"/${PN}-1.14.0-lua.pc.patch
+       "${FILESDIR}"/${PV}-py38-support.patch # Fix py3.8 support, bug 702810
+)
+
 pkg_setup() {
        use python && python-single-r1_pkg_setup
 }
 
-src_prepare() {
-       # Gentoo uses unversioned lua - lua.pc instad of lua5.1.pc, 
/usr/bin/lua instead of /usr/bin/lua5.1
-       eapply "${FILESDIR}"/${PN}-1.14.0-lua.pc.patch
-       eautoreconf
-       gnome2_src_prepare
-}
-
 src_configure() {
        # Wtf, --disable-gcov, --enable-gcov=no, --enable-gcov, all enable gcov
        # What do we do about gdb, valgrind, gcov, etc?

Reply via email to