[packages/libguestfs] - give rust bindings a chance to build on x32 when upstream decides it's time to add install target

baggins baggins at pld-linux.org
Mon Feb 28 09:08:34 CET 2022


commit ebef088ad51e8db92e7fb75ddb667706a134fcfb
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Mon Feb 28 09:07:16 2022 +0100

    - give rust bindings a chance to build on x32 when upstream decides it's time to add install target to the Makfile

 libguestfs.spec |  7 +++----
 x32.patch       | 11 +++++++++++
 2 files changed, 14 insertions(+), 4 deletions(-)
---
diff --git a/libguestfs.spec b/libguestfs.spec
index 57b5649..a19d38c 100644
--- a/libguestfs.spec
+++ b/libguestfs.spec
@@ -40,7 +40,8 @@ Source0:	http://libguestfs.org/download/1.46-stable/%{name}-%{version}.tar.gz
 # Source0-md5:	3d6f99ed705206d11904c67e69ba64da
 Patch0:		ncurses.patch
 Patch1:		augeas-libxml2.patch
-Patch3:		%{name}-completionsdir.patch
+Patch2:		%{name}-completionsdir.patch
+Patch3:		x32.patch
 URL:		http://libguestfs.org/
 BuildRequires:	acl-devel
 BuildRequires:	attr-devel
@@ -411,6 +412,7 @@ Bashowe uzupełnianie argumentów dla narzędzi libguestfs.
 %setup -q
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 %patch3 -p1
 
 %build
@@ -421,9 +423,6 @@ Bashowe uzupełnianie argumentów dla narzędzi libguestfs.
 %{__autoheader}
 %{__automake}
 %configure \
-%ifarch x32
-▸       RUST_TARGET=x86_64-unknown-linux-gnux32 \
-%endif
 	vmchannel_test=no \
 	DB_DUMP=/usr/bin/db_dump \
 	DB_LOAD=/usr/bin/db_load \
diff --git a/x32.patch b/x32.patch
new file mode 100644
index 0000000..cd6b7f1
--- /dev/null
+++ b/x32.patch
@@ -0,0 +1,11 @@
+--- libguestfs-1.46.0/rust/Makefile.am~	2020-03-06 20:31:08.000000000 +0100
++++ libguestfs-1.46.0/rust/Makefile.am	2022-02-28 09:04:00.888944491 +0100
+@@ -33,7 +33,7 @@
+ if HAVE_RUST
+ 
+ all: $(srcdir)/src/lib.rs
+-	$(top_builddir)/run $(CARGO) build --release
++	PKG_CONFIG_ALLOW_CROSS=1 $(top_builddir)/run $(CARGO) build --release --target x86_64-unknown-linux-gnux32
+ 
+ TESTS = run-bindtests run-tests
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libguestfs.git/commitdiff/ebef088ad51e8db92e7fb75ddb667706a134fcfb



More information about the pld-cvs-commit mailing list