diff --git a/99.patch b/99.patch new file mode 100644 index 0000000..3b43e24 --- /dev/null +++ b/99.patch @@ -0,0 +1,23 @@ +From 12ffaa89e589a47d0b29b32997cb3623d231d920 Mon Sep 17 00:00:00 2001 +From: "Benjamin A. Beasley" +Date: Thu, 1 Feb 2024 15:14:00 -0500 +Subject: [PATCH] Fix AlphaMap definition in cdatrie.pxd + +Fixes failure to compile on GCC with `-Werror=incompatible-pointer-types`. +--- + src/cdatrie.pxd | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/cdatrie.pxd b/src/cdatrie.pxd +index b80ce99..e609d1c 100644 +--- a/src/cdatrie.pxd ++++ b/src/cdatrie.pxd +@@ -9,7 +9,7 @@ cdef extern from "../libdatrie/datrie/triedefs.h": + + cdef extern from "../libdatrie/datrie/alpha-map.h": + +- struct AlphaMap: ++ ctypedef struct AlphaMap: + pass + + AlphaMap * alpha_map_new() diff --git a/python-datrie.changes b/python-datrie.changes index a29d44e..e05c962 100644 --- a/python-datrie.changes +++ b/python-datrie.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue May 28 08:57:59 UTC 2024 - John Paul Adrian Glaubitz + +- Cherry-pick upstream patch to fix build with GCC 14 + * https://github.com/pytries/datrie/pull/99.patch + ------------------------------------------------------------------- Thu Feb 29 03:08:48 UTC 2024 - Steve Kowalik diff --git a/python-datrie.spec b/python-datrie.spec index ea0c210..f61e20a 100644 --- a/python-datrie.spec +++ b/python-datrie.spec @@ -24,6 +24,8 @@ License: LGPL-2.1-or-later URL: https://github.com/kmike/datrie Source: https://files.pythonhosted.org/packages/source/d/datrie/datrie-%{version}.tar.gz Patch0: datrie-bigendian.patch +# PATCH-FIX-UPSTREAM - Fix AlphaMap definition in cdatrie.pxd +Patch1: https://github.com/pytries/datrie/pull/99.patch BuildRequires: %{python_module Cython >= 0.26.1} BuildRequires: %{python_module devel} BuildRequires: %{python_module hypothesis}