[packages/papers] - added x32 support

qboosh qboosh at pld-linux.org
Sat Oct 5 14:24:07 CEST 2024


commit 25eb0b6451acf803594a9fe63dad2d4328c11789
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Oct 5 13:39:21 2024 +0200

    - added x32 support

 papers-x32.patch | 19 +++++++++++++++++++
 papers.spec      | 10 ++++++++++
 2 files changed, 29 insertions(+)
---
diff --git a/papers.spec b/papers.spec
index d76e7bb..fc97917 100644
--- a/papers.spec
+++ b/papers.spec
@@ -19,6 +19,7 @@ Source0:	https://download.gnome.org/sources/papers/47/%{name}-%{version}.tar.xz
 # tar cJf ../packages/papers/papers-vendor-%{version}.tar.xz papers-%{version}/shell-rs/vendor
 Source1:	%{name}-vendor-%{version}.tar.xz
 # Source1-md5:	ff54d6120e209e48e426737331aee833
+Patch0:		%{name}-x32.patch
 URL:		https://gitlab.gnome.org/GNOME/papers
 BuildRequires:	appstream-glib
 BuildRequires:	cairo-devel >= 1.14.0
@@ -181,6 +182,9 @@ To rozszerzenie pokazuje właściwości dokumentu Papers w Nautilusie.
 
 %prep
 %setup -q -b1
+%ifarch x32
+%patch0 -p1
+%endif
 
 # use offline registry
 CARGO_HOME="$(pwd)/.cargo"
@@ -195,6 +199,9 @@ directory = '$PWD/shell-rs/vendor'
 EOF
 
 %build
+%ifarch x32
+export PKG_CONFIG_ALLOW_CROSS=1
+%endif
 %meson build \
 	%{!?with_apidocs:-Ddocumentation=false} \
 	%{!?with_nautilus:-Dnautilus=false} \
@@ -205,6 +212,9 @@ EOF
 %install
 rm -rf $RPM_BUILD_ROOT
 
+%ifarch x32
+export PKG_CONFIG_ALLOW_CROSS=1
+%endif
 %ninja_install -C build
 
 %if %{with apidocs}
diff --git a/papers-x32.patch b/papers-x32.patch
new file mode 100644
index 0000000..a13734c
--- /dev/null
+++ b/papers-x32.patch
@@ -0,0 +1,19 @@
+--- papers-47.0/shell-rs/src/meson.build.orig	2024-09-14 23:47:13.000000000 +0200
++++ papers-47.0/shell-rs/src/meson.build	2024-10-05 12:48:42.470149342 +0200
+@@ -10,6 +10,7 @@ source_root = meson.current_source_dir()
+ cargo = find_program('cargo', required: true)
+ 
+ cargo_options = [ '--manifest-path', shell_rs_root / 'Cargo.toml' ]
++cargo_options += [ '--target', 'x86_64-unknown-linux-gnux32' ]
+ cargo_options += [ '--target-dir', meson.current_build_dir() ]
+ 
+ if get_option('profile') == 'devel'
+@@ -69,7 +70,7 @@ copy_binary = custom_target(
+   output: meson.project_name(),
+   command: [
+     'cp',
+-    meson.current_build_dir() / rust_target / meson.project_name(),
++    meson.current_build_dir() / 'x86_64-unknown-linux-gnux32' / rust_target / meson.project_name(),
+     '@OUTPUT@',
+   ],
+ )
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/papers.git/commitdiff/25eb0b6451acf803594a9fe63dad2d4328c11789



More information about the pld-cvs-commit mailing list