diff --git a/0001-Use-python3-embed-as-dependency-on-Python-3.8.patch b/0001-Use-python3-embed-as-dependency-on-Python-3.8.patch new file mode 100644 index 0000000..acf3683 --- /dev/null +++ b/0001-Use-python3-embed-as-dependency-on-Python-3.8.patch @@ -0,0 +1,39 @@ +From 1329f3ed35e2f7c2d20b92b4df9a2f24123c7575 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Wed, 17 Jul 2019 12:46:58 +1000 +Subject: [PATCH libratbag] Use python3-embed as dependency on Python 3.8 + +Python 3.8 no longer links to libpython, resulting in undefined references to +Python API. + +But it provides a python3-embed.pc now, so let's try using that first and only +fall back on the normal case if that fails. + +See https://github.com/mesonbuild/meson/issues/5629 +--- + meson.build | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index 468bdfa3..34804919 100644 +--- a/meson.build ++++ b/meson.build +@@ -549,8 +549,14 @@ swig_gen = generator( + '@INPUT@'], + ) + ++# From python 3.8 we neeed python3-embed ++dep_python3 = dependency('python3-embed', required: false) ++if not dep_python3.found() ++ dep_python3 = dependency('python3') ++endif ++ + wrapper_deps = [ +- dependency('python3'), ++ dep_python3, + dep_libratbag, + dep_libshared, + ] +-- +2.21.0 + diff --git a/libratbag.spec b/libratbag.spec index 4b629f1..9e0fe0e 100644 --- a/libratbag.spec +++ b/libratbag.spec @@ -2,12 +2,14 @@ Name: libratbag Version: 0.9.905 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Programmable input device library License: MIT URL: https://github.com/libratbag/libratbag Source0: https://github.com/libratbag/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz +Patch01: 0001-Use-python3-embed-as-dependency-on-Python-3.8.patch + BuildRequires: git gcc gcc-c++ BuildRequires: meson pkgconfig BuildRequires: libevdev-devel @@ -96,6 +98,10 @@ developing applications that use liblur. %{_libdir}/pkgconfig/liblur.pc %changelog +* Wed Jul 17 2019 Peter Hutterer 0.9.905-3 +- Use python3-embed as dependency where available. Fixes FTBFS with python + 3.8 (#1718290) + * Thu Feb 28 2019 Peter Hutterer 0.9.905-2 - Fix meson options