commit 728024809ae3e46875b001de5394512be15862b2
Author: Jan Palus <[email protected]>
Date:   Wed Jan 22 00:36:14 2025 +0100

    fix python detection to comply with recent cmake policies
    
    vislcg3 enforces current cmake's version policies...

 python-cmake.patch | 27 +++++++++++++++++++++++++++
 vislcg3.spec       |  4 +++-
 2 files changed, 30 insertions(+), 1 deletion(-)
---
diff --git a/vislcg3.spec b/vislcg3.spec
index fd16cef..11d4e11 100644
--- a/vislcg3.spec
+++ b/vislcg3.spec
@@ -14,6 +14,7 @@ Group:                Applications/Text
 Source0:       
https://github.com/TinoDidriksen/cg3/archive/v%{version}/cg3-%{version}.tar.gz
 # Source0-md5: cbb7cbe0776596f59c5672a3a30219d9
 Patch0:                %{name}-static.patch
+Patch1:                python-cmake.patch
 URL:           http://beta.visl.sdu.dk/cg3.html
 BuildRequires: cmake >= 3.0
 BuildRequires: boost-devel >= 1.63.0-4
@@ -86,7 +87,8 @@ Tryb CG-3 dla Emacsa.
 
 %prep
 %setup -q -n cg3-%{version}
-%patch0 -p1
+%patch -P0 -p1
+%patch -P1 -p1
 
 # not executable
 %{__sed} -i -e '1s,.*/usr/bin/env perl,,' scripts/CG3_External.pm
diff --git a/python-cmake.patch b/python-cmake.patch
new file mode 100644
index 0000000..08426cb
--- /dev/null
+++ b/python-cmake.patch
@@ -0,0 +1,27 @@
+From c22f5572c0946b0d21f4d489308ea0ce9f305ea0 Mon Sep 17 00:00:00 2001
+From: Tino Didriksen <[email protected]>
+Date: Fri, 4 Aug 2023 10:35:23 +0000
+Subject: [PATCH] Use FindPython instead of FindPythonInterp for CMake >=
+ 3.12.0 (fixes https://bugs.debian.org/1042249); Release 1.4.6
+
+---
+ python/CMakeLists.txt | 7 ++++++-
+ src/version.hpp       | 2 +-
+ 2 files changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt
+index 5107e078..122bb798 100644
+--- a/python/CMakeLists.txt
++++ b/python/CMakeLists.txt
+@@ -1,5 +1,10 @@
+ find_package(SWIG 3.0 REQUIRED)
+-find_package(PythonInterp 3.5 REQUIRED)
++if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.12.0")
++      find_package(Python 3.5 REQUIRED)
++      set(PYTHON_EXECUTABLE ${Python_EXECUTABLE})
++else()
++      find_package(PythonInterp 3.5 REQUIRED)
++endif()
+ 
+ set(PYTHON_FILE "constraint_grammar.py")
+ set(CPP_WRAP_FILE "constraint_grammar_wrap.cpp")
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/vislcg3.git/commitdiff/728024809ae3e46875b001de5394512be15862b2

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

Reply via email to