summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2020-12-25 14:16:33 +0100
committerLars Wendler <polynomial-c@gentoo.org>2020-12-25 14:16:40 +0100
commit84a391d6e374314b5497e0027d87a5af62415989 (patch)
tree8fb1202310683a2e0028294ac1ecebf905433400
parentnet-im/prosody: fix luajit slot (diff)
downloadgentoo-84a391d6e374314b5497e0027d87a5af62415989.tar.gz
gentoo-84a391d6e374314b5497e0027d87a5af62415989.tar.bz2
gentoo-84a391d6e374314b5497e0027d87a5af62415989.zip
net-irc/hexchat: Fixed python plugins with python-3.8
Closes: https://bugs.gentoo.org/758758 Package-Manager: Portage-3.0.12, Repoman-3.0.2 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
-rw-r--r--net-irc/hexchat/files/hexchat-2.14.3-python38.patch28
-rw-r--r--net-irc/hexchat/hexchat-2.14.3-r100.ebuild6
2 files changed, 33 insertions, 1 deletions
diff --git a/net-irc/hexchat/files/hexchat-2.14.3-python38.patch b/net-irc/hexchat/files/hexchat-2.14.3-python38.patch
new file mode 100644
index 000000000000..fdfc74f94344
--- /dev/null
+++ b/net-irc/hexchat/files/hexchat-2.14.3-python38.patch
@@ -0,0 +1,28 @@
+From 5deb69591992d4fede9090b60d3dc847612a4d60 Mon Sep 17 00:00:00 2001
+From: Patrick Griffis <tingping@tingping.se>
+Date: Wed, 11 Mar 2020 11:07:56 -0700
+Subject: [PATCH] build: Better support building against python 3.8+
+
+Closes #2441
+---
+ plugins/python/meson.build | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/plugins/python/meson.build b/plugins/python/meson.build
+index 2ad5128e5..eb762134a 100644
+--- a/plugins/python/meson.build
++++ b/plugins/python/meson.build
+@@ -1,6 +1,12 @@
+ python_opt = get_option('with-python')
+ if python_opt.startswith('python3')
+- python_dep = dependency(python_opt, version: '>= 3.3')
++ # Python 3.8 introduced a new -embed variant
++ if not python_opt.endswith('-embed')
++ python_dep = dependency(python_opt + '-embed', version: '>= 3.3', required: false)
++ endif
++ if not python_dep.found()
++ python_dep = dependency(python_opt, version: '>= 3.3')
++ endif
+ else
+ python_dep = dependency(python_opt, version: '>= 2.7')
+ endif
diff --git a/net-irc/hexchat/hexchat-2.14.3-r100.ebuild b/net-irc/hexchat/hexchat-2.14.3-r100.ebuild
index 77c0bc72368c..27f07d1dedaf 100644
--- a/net-irc/hexchat/hexchat-2.14.3-r100.ebuild
+++ b/net-irc/hexchat/hexchat-2.14.3-r100.ebuild
@@ -4,7 +4,7 @@
EAPI=7
LUA_COMPAT=( lua5-{1..4} luajit )
-PYTHON_COMPAT=( python3_{6,7,8} )
+PYTHON_COMPAT=( python3_{6..9} )
inherit lua-single meson mono-env python-single-r1 xdg
@@ -62,6 +62,10 @@ BDEPEND="
virtual/pkgconfig
"
+PATCHES=(
+ "${FILESDIR}/${P}-python38.patch" #758758
+)
+
pkg_setup() {
use lua && lua-single_pkg_setup
use python && python-single-r1_pkg_setup