1 |
commit: 84a391d6e374314b5497e0027d87a5af62415989 |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Dec 25 13:16:33 2020 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Dec 25 13:16:40 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=84a391d6 |
7 |
|
8 |
net-irc/hexchat: Fixed python plugins with python-3.8 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/758758 |
11 |
Package-Manager: Portage-3.0.12, Repoman-3.0.2 |
12 |
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> |
13 |
|
14 |
.../hexchat/files/hexchat-2.14.3-python38.patch | 28 ++++++++++++++++++++++ |
15 |
net-irc/hexchat/hexchat-2.14.3-r100.ebuild | 6 ++++- |
16 |
2 files changed, 33 insertions(+), 1 deletion(-) |
17 |
|
18 |
diff --git a/net-irc/hexchat/files/hexchat-2.14.3-python38.patch b/net-irc/hexchat/files/hexchat-2.14.3-python38.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..fdfc74f9434 |
21 |
--- /dev/null |
22 |
+++ b/net-irc/hexchat/files/hexchat-2.14.3-python38.patch |
23 |
@@ -0,0 +1,28 @@ |
24 |
+From 5deb69591992d4fede9090b60d3dc847612a4d60 Mon Sep 17 00:00:00 2001 |
25 |
+From: Patrick Griffis <tingping@××××××××.se> |
26 |
+Date: Wed, 11 Mar 2020 11:07:56 -0700 |
27 |
+Subject: [PATCH] build: Better support building against python 3.8+ |
28 |
+ |
29 |
+Closes #2441 |
30 |
+--- |
31 |
+ plugins/python/meson.build | 8 +++++++- |
32 |
+ 1 file changed, 7 insertions(+), 1 deletion(-) |
33 |
+ |
34 |
+diff --git a/plugins/python/meson.build b/plugins/python/meson.build |
35 |
+index 2ad5128e5..eb762134a 100644 |
36 |
+--- a/plugins/python/meson.build |
37 |
++++ b/plugins/python/meson.build |
38 |
+@@ -1,6 +1,12 @@ |
39 |
+ python_opt = get_option('with-python') |
40 |
+ if python_opt.startswith('python3') |
41 |
+- python_dep = dependency(python_opt, version: '>= 3.3') |
42 |
++ # Python 3.8 introduced a new -embed variant |
43 |
++ if not python_opt.endswith('-embed') |
44 |
++ python_dep = dependency(python_opt + '-embed', version: '>= 3.3', required: false) |
45 |
++ endif |
46 |
++ if not python_dep.found() |
47 |
++ python_dep = dependency(python_opt, version: '>= 3.3') |
48 |
++ endif |
49 |
+ else |
50 |
+ python_dep = dependency(python_opt, version: '>= 2.7') |
51 |
+ endif |
52 |
|
53 |
diff --git a/net-irc/hexchat/hexchat-2.14.3-r100.ebuild b/net-irc/hexchat/hexchat-2.14.3-r100.ebuild |
54 |
index 77c0bc72368..27f07d1deda 100644 |
55 |
--- a/net-irc/hexchat/hexchat-2.14.3-r100.ebuild |
56 |
+++ b/net-irc/hexchat/hexchat-2.14.3-r100.ebuild |
57 |
@@ -4,7 +4,7 @@ |
58 |
EAPI=7 |
59 |
|
60 |
LUA_COMPAT=( lua5-{1..4} luajit ) |
61 |
-PYTHON_COMPAT=( python3_{6,7,8} ) |
62 |
+PYTHON_COMPAT=( python3_{6..9} ) |
63 |
|
64 |
inherit lua-single meson mono-env python-single-r1 xdg |
65 |
|
66 |
@@ -62,6 +62,10 @@ BDEPEND=" |
67 |
virtual/pkgconfig |
68 |
" |
69 |
|
70 |
+PATCHES=( |
71 |
+ "${FILESDIR}/${P}-python38.patch" #758758 |
72 |
+) |
73 |
+ |
74 |
pkg_setup() { |
75 |
use lua && lua-single_pkg_setup |
76 |
use python && python-single-r1_pkg_setup |