[packages/iguanaIR] - fix python version detection to catch 3.10 correctly, rel 8

baggins baggins at pld-linux.org
Fri Apr 8 09:34:17 CEST 2022


commit 4c2a9f7628db26f7cea3998b02f5266951e1eed3
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Fri Apr 8 09:33:40 2022 +0200

    - fix python version detection to catch 3.10 correctly, rel 8

 iguanaIR.spec        |  4 +++-
 python-version.patch | 11 +++++++++++
 2 files changed, 14 insertions(+), 1 deletion(-)
---
diff --git a/iguanaIR.spec b/iguanaIR.spec
index 1492e42..1108e6c 100644
--- a/iguanaIR.spec
+++ b/iguanaIR.spec
@@ -9,7 +9,7 @@ Name:		iguanaIR
 Version:	1.2.0
 %define	snap	20171020
 %define	gitref	9336f121b4127f4ac494e5b26b82ce9c6b86a0ac
-%define	rel	7
+%define	rel	8
 Release:	1.%{snap}.%{rel}
 License:	GPL v2
 Group:		Applications/Communications
@@ -20,6 +20,7 @@ Source0:	https://github.com/iguanaworks/iguanair/archive/%{gitref}/iguanair-%{sn
 Patch0:		%{name}-opt.patch
 Patch1:		%{name}-pld.patch
 Patch2:		%{name}-lirc.patch
+Patch3:		python-version.patch
 URL:		http://iguanaworks.net/
 BuildRequires:	cmake >= 2.6
 BuildRequires:	libusb-devel >= 1.0
@@ -115,6 +116,7 @@ Sterownik iguanaIR dla LIRC-a.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 %{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+python(\s|$),#!%{__python3}\1,' \
       software/usb_ir/files/python/usr/share/iguanaIR-reflasher/iguanaIR-reflasher
diff --git a/python-version.patch b/python-version.patch
new file mode 100644
index 0000000..50a28aa
--- /dev/null
+++ b/python-version.patch
@@ -0,0 +1,11 @@
+--- iguanair-9336f121b4127f4ac494e5b26b82ce9c6b86a0ac/software/usb_ir/python/CMakeLists.txt~	2017-10-19 03:17:33.000000000 +0200
++++ iguanair-9336f121b4127f4ac494e5b26b82ce9c6b86a0ac/software/usb_ir/python/CMakeLists.txt	2022-04-08 09:29:22.610858641 +0200
+@@ -19,7 +19,7 @@
+   # for cmake < 2.8.8 (without PYTHONLIBS_VERSION_STRING) default to 2.7
+   Set(PYMAJMINVER "2.7")
+   If(NOT "${PYTHONLIBS_VERSION_STRING}" STREQUAL "")
+-    string(SUBSTRING ${PYTHONLIBS_VERSION_STRING} 0 3 PYMAJMINVER)
++    string(REGEX REPLACE "([0-9]+\\.[0-9]+).*" "\\1" PYMAJMINVER ${PYTHONLIBS_VERSION_STRING})
+   EndIf()
+ 
+   # force the .so files into separate directories so we can keep both
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/iguanaIR.git/commitdiff/4c2a9f7628db26f7cea3998b02f5266951e1eed3



More information about the pld-cvs-commit mailing list