commit:     3e8c689377ed99637102efe8f22d140617640a98
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Jun  2 03:18:45 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jun  2 03:18:45 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3e8c6893

app-forensics/afflib: enable py3.12, fix modern C issue

Closes: https://bugs.gentoo.org/921727
Closes: https://bugs.gentoo.org/929318
Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...fflib-3.7.20.ebuild => afflib-3.7.20-r1.ebuild} |  5 ++--
 app-forensics/afflib/files/afflib-3.7.20-c99.patch | 33 ++++++++++++++++++++++
 2 files changed, 36 insertions(+), 2 deletions(-)

diff --git a/app-forensics/afflib/afflib-3.7.20.ebuild 
b/app-forensics/afflib/afflib-3.7.20-r1.ebuild
similarity index 93%
rename from app-forensics/afflib/afflib-3.7.20.ebuild
rename to app-forensics/afflib/afflib-3.7.20-r1.ebuild
index a8d20b77ec2b..9c200d896a8f 100644
--- a/app-forensics/afflib/afflib-3.7.20.ebuild
+++ b/app-forensics/afflib/afflib-3.7.20-r1.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
 
-PYTHON_COMPAT=( python3_{9..11} )
+PYTHON_COMPAT=( python3_{10..12} )
 inherit autotools python-single-r1
 
 MY_PN=AFFLIBv3
@@ -39,6 +39,7 @@ DEPEND="${RDEPEND}"
 
 PATCHES=(
        "${FILESDIR}/${PN}-3.7.19-search-path.patch"
+       "${FILESDIR}/${PN}-3.7.20-c99.patch"
 )
 
 pkg_setup() {

diff --git a/app-forensics/afflib/files/afflib-3.7.20-c99.patch 
b/app-forensics/afflib/files/afflib-3.7.20-c99.patch
new file mode 100644
index 000000000000..faee6c48dd82
--- /dev/null
+++ b/app-forensics/afflib/files/afflib-3.7.20-c99.patch
@@ -0,0 +1,33 @@
+https://bugs.gentoo.org/921727
+https://github.com/sshock/AFFLIBv3/issues/53
+https://github.com/sshock/AFFLIBv3/commit/01210f488410a23838c54fcc22297cf08ac7de66
+
+From 01210f488410a23838c54fcc22297cf08ac7de66 Mon Sep 17 00:00:00 2001
+From: Phillip Hellewell <ssh...@gmail.com>
+Date: Wed, 14 Feb 2024 00:43:56 -0700
+Subject: [PATCH] Fix #53: incompatible pointer types in pyaff.c
+
+--- a/pyaff/afflib.pxd
++++ b/pyaff/afflib.pxd
+@@ -2,7 +2,8 @@ from libc.stdint cimport int64_t, uint32_t, uint64_t
+ from posix.fcntl cimport O_RDONLY
+ 
+ cdef extern from "afflib/afflib.h":
+-    struct AFFILE
++    struct _AFFILE
++    ctypedef _AFFILE AFFILE
+ 
+     enum: AF_MAX_NAME_LEN
+ 
+--- a/pyaff/pyaff.c
++++ b/pyaff/pyaff.c
+@@ -1478,7 +1478,7 @@ struct __pyx_obj_5pyaff_affile;
+  */
+ struct __pyx_obj_5pyaff_affile {
+   PyObject_HEAD
+-  struct AFFILE *af;
++  AFFILE *af;
+   int64_t size;
+ };
+ 
+

Reply via email to