[packages/python-ctypesgen] - added x32 patch (adjust library search path on x32)

qboosh qboosh at pld-linux.org
Sun Jul 4 07:53:02 CEST 2021


commit d3adbc4e915d85631a0e98a0c7ca1d180f88c38c
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Jul 4 07:56:10 2021 +0200

    - added x32 patch (adjust library search path on x32)

 python-ctypesgen-x32.patch | 11 +++++++++++
 python-ctypesgen.spec      |  2 ++
 2 files changed, 13 insertions(+)
---
diff --git a/python-ctypesgen.spec b/python-ctypesgen.spec
index f2b4bdb..62bf48a 100644
--- a/python-ctypesgen.spec
+++ b/python-ctypesgen.spec
@@ -16,6 +16,7 @@ Group:		Libraries/Python
 #Source0Download: https://github.com/davidjamesca/ctypesgen/releases
 Source0:	https://github.com/davidjamesca/ctypesgen/archive/ctypesgen-%{version}/%{module}-%{version}.tar.gz
 # Source0-md5:	0928ef10a1f0323a82d55d6a0dfac8ff
+Patch0:		%{name}-x32.patch
 URL:		https://github.com/davidjamesca/ctypesgen
 %if %{with python2}
 BuildRequires:	python >= 1:2.3
@@ -61,6 +62,7 @@ nagłówkowych w C.
 
 %prep
 %setup -q -n %{module}-%{module}-%{version}
+%patch0 -p1
 
 %build
 %if %{with python2}
diff --git a/python-ctypesgen-x32.patch b/python-ctypesgen-x32.patch
new file mode 100644
index 0000000..6d6c8ec
--- /dev/null
+++ b/python-ctypesgen-x32.patch
@@ -0,0 +1,11 @@
+--- ctypesgen-ctypesgen-1.0.2/ctypesgen/libraryloader.py.orig	2019-12-08 00:24:44.000000000 +0100
++++ ctypesgen-ctypesgen-1.0.2/ctypesgen/libraryloader.py	2021-07-04 07:46:45.360836111 +0200
+@@ -262,6 +262,8 @@
+         if bitage.startswith("64"):
+             # prefer 64 bit if that is our arch
+             unix_lib_dirs_list += ["/lib64", "/usr/lib64"]
++        elif bitage.startswith("32") and platform.machine() == "x86_64":
++            unix_lib_dirs_list += ["/libx32", "/usr/libx32"]
+ 
+         # must include standard libs, since those paths are also used by 64 bit
+         # installs
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-ctypesgen.git/commitdiff/d3adbc4e915d85631a0e98a0c7ca1d180f88c38c



More information about the pld-cvs-commit mailing list