commit a2ade3c39c49076ca90c5c81e1ae8cc97b129711
Author: Jan RÄ™korajski <[email protected]>
Date:   Sat Sep 30 13:50:23 2023 +0200

    - build with python3, rel2

 libgnt.spec   |  6 ++++--
 python3.patch | 37 +++++++++++++++++++++++++++++++++++++
 2 files changed, 41 insertions(+), 2 deletions(-)
---
diff --git a/libgnt.spec b/libgnt.spec
index 4711208..26bbdfb 100644
--- a/libgnt.spec
+++ b/libgnt.spec
@@ -2,11 +2,12 @@ Summary:      The GLib Ncurses Toolkit
 Summary(pl.UTF-8):     Biblioteka GLib Ncurses Toolkit
 Name:          libgnt
 Version:       2.14.3
-Release:       1
+Release:       2
 License:       GPL v2+
 Group:         Libraries
 Source0:       
https://downloads.sourceforge.net/pidgin/%{name}-%{version}.tar.xz
 # Source0-md5: 15c5e934fc5dec533a6d974639b54291
+Patch0:                python3.patch
 URL:           https://keep.imfreedom.org/libgnt/libgnt
 BuildRequires: glib2-devel >= 1:2.16.0
 BuildRequires: gtk-doc
@@ -16,7 +17,7 @@ BuildRequires:        ncurses-devel
 BuildRequires: ncurses-ext-devel
 BuildRequires: ninja
 BuildRequires: pkgconfig
-BuildRequires: python-devel >= 1:2.7
+BuildRequires: python3-devel
 BuildRequires: rpm-build >= 4.6
 BuildRequires: rpmbuild(macros) >= 1.736
 BuildRequires: sed >= 4.0
@@ -81,6 +82,7 @@ Dokumentacja API biblioteki GNT.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %{__sed} -i -e 's/ = library(/ = shared_library(/' wms/meson.build
 
diff --git a/python3.patch b/python3.patch
new file mode 100644
index 0000000..460f2a5
--- /dev/null
+++ b/python3.patch
@@ -0,0 +1,37 @@
+diff -r d3ad72913471 meson.build
+--- a/meson.build      Sat Sep 25 22:56:33 2021 -0500
++++ b/meson.build      Sat Sep 30 13:41:27 2023 +0200
+@@ -184,18 +201,22 @@
+ ]
+ 
+ # Check for Python headers
+-python_dep = disabler()
+-if get_option('python2')
+-      python_dep = dependency('python2', required : false)
+-      if not python_dep.found()
+-              python_dep = dependency('python-2.7', required : false)
++_PYTHONS = [
++      ['python-3.10-embed', '>=3.10'],
++      ['python-3.9-embed', '>=3.9'],
++      ['python-3.8-embed', '>=3.8'],
++      ['python3-embed', '>=3.8'],
++      ['python3', '>=3.8'],
++      ['python-3.7', '>=3.7'],
++      ['python-3.7m', '>=3.7'],
++]
++foreach _PYTHON : _PYTHONS
++      python_dep = dependency(_PYTHON[0], version : _PYTHON[1], required: 
false)
++      if python_dep.found()
++              break
+       endif
+-
+-      if not python_dep.found()
+-              error('failed to find python')
+-      endif
+-endif
+-gnt_config.set('USE_PYTHON', get_option('python2'))
++endforeach
++gnt_config.set('USE_PYTHON', python_dep.found())
+ 
+ configure_file(output : 'gntconfig.h',
+     configuration : gnt_config)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libgnt.git/commitdiff/a2ade3c39c49076ca90c5c81e1ae8cc97b129711

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to