[packages/gnome-user-share] - some x32 fixes; fails to compile selinux-sys

qboosh qboosh at pld-linux.org
Sat May 10 08:34:31 CEST 2025


commit 039d418ff60747e33655da397da24270a18f51e5
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat May 10 07:16:53 2025 +0200

    - some x32 fixes; fails to compile selinux-sys

 gnome-user-share-x32.patch | 18 ++++++++++++++++++
 gnome-user-share.spec      | 13 +++++++++++++
 2 files changed, 31 insertions(+)
---
diff --git a/gnome-user-share.spec b/gnome-user-share.spec
index 70766bf..fb287eb 100644
--- a/gnome-user-share.spec
+++ b/gnome-user-share.spec
@@ -11,10 +11,14 @@ Source0:	https://download.gnome.org/sources/gnome-user-share/48/%{name}-%{versio
 Source1:	%{name}-vendor-%{version}.tar.xz
 # Source1-md5:	6d407f9d1be601f00c27f85c90850bff
 Patch0:		%{name}-meson.patch
+Patch1:		%{name}-x32.patch
 URL:		https://gitlab.gnome.org/GNOME/gnome-user-share/
 BuildRequires:	cargo
 # for selinux
 BuildRequires:	clang
+%ifarch x32
+BuildRequires:	clang-libs(x86-x32)
+%endif
 BuildRequires:	gettext-tools
 BuildRequires:	glib2-devel >= 1:2.74.0
 BuildRequires:	libselinux-devel >= 2.8
@@ -51,6 +55,9 @@ GNOME. Używa WebDAV.
 %prep
 %setup -q -b1
 %patch -P0 -p1
+%ifarch x32
+%patch -P1 -p1
+%endif
 
 # use offline registry
 CARGO_HOME="$(pwd)/.cargo"
@@ -65,6 +72,9 @@ directory = '$PWD/vendor'
 EOF
 
 %build
+%ifarch x32
+export PKG_CONFIG_ALLOW_CROSS=1
+%endif
 %meson \
 	-Dhttpd=/usr/sbin/httpd \
 	-Dmodules_path=%{_libdir}/apache
@@ -74,6 +84,9 @@ EOF
 %install
 rm -rf $RPM_BUILD_ROOT
 
+%ifarch x32
+export PKG_CONFIG_ALLOW_CROSS=1
+%endif
 %meson_install
 
 # not supported by glibc (as of 2.40)
diff --git a/gnome-user-share-x32.patch b/gnome-user-share-x32.patch
new file mode 100644
index 0000000..21c7daf
--- /dev/null
+++ b/gnome-user-share-x32.patch
@@ -0,0 +1,18 @@
+--- gnome-user-share-48.0/src/meson.build.orig	2025-03-15 19:05:02.000000000 +0100
++++ gnome-user-share-48.0/src/meson.build	2025-05-10 06:56:36.183473922 +0200
+@@ -16,6 +16,7 @@ run_command(
+ 
+ cargo_options = [ '--manifest-path', meson.project_source_root() / 'Cargo.toml' ]
+ cargo_options += [ '--target-dir', meson.project_build_root() / 'src' ]
++cargo_options += [ '--target', 'x86_64-unknown-linux-gnux32' ]
+ 
+ if get_option('buildtype') == 'release'
+   cargo_options += [ '--release' ]
+@@ -47,6 +48,6 @@ custom_target(
+     cargo, 'build',
+     cargo_options,
+     '&&',
+-    'cp', 'src' / rust_target / meson.project_name(), '@OUTPUT@',
++    'cp', 'src' / 'x86_64-unknown-linux-gnux32' / rust_target / meson.project_name(), '@OUTPUT@',
+   ]
+ )
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/gnome-user-share.git/commitdiff/039d418ff60747e33655da397da24270a18f51e5



More information about the pld-cvs-commit mailing list