public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Conrad Kostecki" <conikost@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: www-client/elinks/, www-client/elinks/files/
Date: Tue, 16 Jul 2024 21:28:38 +0000 (UTC)	[thread overview]
Message-ID: <1721165095.2d9fa2ef2f89fb72275dab73204ad2404b22d666.conikost@gentoo> (raw)

commit:     2d9fa2ef2f89fb72275dab73204ad2404b22d666
Author:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 16 21:24:55 2024 +0000
Commit:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Tue Jul 16 21:24:55 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2d9fa2ef

www-client/elinks: fix python3.12 support

Closes: https://bugs.gentoo.org/929876
Bug: https://bugs.gentoo.org/919372
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>

 www-client/elinks/elinks-0.16.1.1-r3.ebuild        |  2 ++
 ...-0.16.1.1-ecmascript-implicit-declaration.patch | 36 ++++++++++++++++++++++
 .../elinks/files/elinks-0.16.1.1-python-3.12.patch | 26 ++++++++++++++++
 3 files changed, 64 insertions(+)

diff --git a/www-client/elinks/elinks-0.16.1.1-r3.ebuild b/www-client/elinks/elinks-0.16.1.1-r3.ebuild
index bef5b7bb9a45..a56703fb7e56 100644
--- a/www-client/elinks/elinks-0.16.1.1-r3.ebuild
+++ b/www-client/elinks/elinks-0.16.1.1-r3.ebuild
@@ -72,7 +72,9 @@ BDEPEND="
 "
 
 PATCHES=(
+	"${FILESDIR}"/${PN}-0.16.1.1-ecmascript-implicit-declaration.patch
 	"${FILESDIR}"/${PN}-0.16.1.1-perl-5.38.patch
+	"${FILESDIR}"/${PN}-0.16.1.1-python-3.12.patch
 )
 
 pkg_setup() {

diff --git a/www-client/elinks/files/elinks-0.16.1.1-ecmascript-implicit-declaration.patch b/www-client/elinks/files/elinks-0.16.1.1-ecmascript-implicit-declaration.patch
new file mode 100644
index 000000000000..58c98cc27da0
--- /dev/null
+++ b/www-client/elinks/files/elinks-0.16.1.1-ecmascript-implicit-declaration.patch
@@ -0,0 +1,36 @@
+--- elinks-0.16.1.1/src/document/html/parser/general.c	2024-06-06 07:10:40.163191871 +0200
++++ elinks-0.16.1.1/src/document/html/parser/general.c	2024-06-06 07:11:45.913711031 +0200
+@@ -38,6 +38,10 @@
+ #include "util/memory.h"
+ #include "util/string.h"
+ 
++#ifdef CONFIG_ECMASCRIPT
++#include "ecmascript/ecmascript.h"
++#endif
++
+ /* Unsafe macros */
+ #include "document/html/internal.h"
+ 
+--- elinks-0.16.1.1/src/document/html/parser/stack.c	2023-05-01 10:45:22.000000000 +0200
++++ elinks-0.16.1.1/src/document/html/parser/stack.c	2024-06-06 07:11:29.892765184 +0200
+@@ -24,6 +24,10 @@
+ #include "util/memory.h"
+ #include "util/string.h"
+ 
++#ifdef CONFIG_ECMASCRIPT
++#include "ecmascript/ecmascript.h"
++#endif
++
+ /* Unsafe macros */
+ #include "document/html/internal.h"
+ 
+--- elinks-0.16.1.1/src/ecmascript/ecmascript.h.orig	2024-06-06 07:18:53.237018842 +0200
++++ elinks-0.16.1.1/src/ecmascript/ecmascript.h	2024-06-06 07:20:04.434093077 +0200
+@@ -26,6 +26,7 @@
+ #include "main/module.h"
+ #include "main/timer.h"
+ #include "util/time.h"
++#include <stdbool.h>
+ 
+ //#define ECMASCRIPT_DEBUG 1
+ 

diff --git a/www-client/elinks/files/elinks-0.16.1.1-python-3.12.patch b/www-client/elinks/files/elinks-0.16.1.1-python-3.12.patch
new file mode 100644
index 000000000000..e6ac9f004463
--- /dev/null
+++ b/www-client/elinks/files/elinks-0.16.1.1-python-3.12.patch
@@ -0,0 +1,26 @@
+From 2577da89420ce2a1d58fadd7f2e6809d2ba70dd8 Mon Sep 17 00:00:00 2001
+From: Witold Filipczyk <witekfl@poczta.onet.pl>
+Date: Mon, 10 Jun 2024 13:07:23 +0200
+Subject: [PATCH] [python] module imp is deprecated. Refs #313
+
+---
+ src/scripting/python/core.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/scripting/python/core.c b/src/scripting/python/core.c
+index 185561108..4a69e4293 100644
+--- a/src/scripting/python/core.c
++++ b/src/scripting/python/core.c
+@@ -138,10 +138,10 @@ hooks_module_exists(void)
+ 	 * indicates that no such module was found; any other exception will
+ 	 * be reported as an error.
+ 	 */
+-	imp_module = PyImport_ImportModule("imp");
++	imp_module = PyImport_ImportModule("importlib.util");
+ 	if (!imp_module) goto python_error;
+ 
+-	result = PyObject_CallMethod(imp_module, "find_module", "s", "hooks");
++	result = PyObject_CallMethod(imp_module, "find_spec", "s", "hooks");
+ 	if (result) {
+ 		found_hooks = 1;
+ 		goto end;


             reply	other threads:[~2024-07-16 21:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-16 21:28 Conrad Kostecki [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-02-16 16:36 [gentoo-commits] repo/gentoo:master commit in: www-client/elinks/, www-client/elinks/files/ Sam James
2025-01-22 23:44 Sam James
2024-10-28 11:42 Sam James
2023-07-03 15:16 Sam James
2022-10-13 19:56 Sam James
2020-09-13 18:39 Sam James
2018-03-26 18:07 Jeroen Roovers
2017-10-22 16:55 Patrice Clement

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1721165095.2d9fa2ef2f89fb72275dab73204ad2404b22d666.conikost@gentoo \
    --to=conikost@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox