[packages/gnome-snapshot] - added x32 patch, disable debugsource packages
qboosh
qboosh at pld-linux.org
Sun Sep 17 13:36:32 CEST 2023
commit aac023847a647a54fd062114b71e9483e15003aa
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Sep 17 12:43:00 2023 +0200
- added x32 patch, disable debugsource packages
gnome-snapshot.spec | 13 +++++++++++++
snapshot-x32.patch | 19 +++++++++++++++++++
2 files changed, 32 insertions(+)
---
diff --git a/gnome-snapshot.spec b/gnome-snapshot.spec
index f52c6b8..21c6843 100644
--- a/gnome-snapshot.spec
+++ b/gnome-snapshot.spec
@@ -8,6 +8,7 @@ License: GPL v3+
Group: X11/Applications/Graphics
Source0: https://download.gnome.org/sources/snapshot/44/snapshot-%{version}.tar.xz
# Source0-md5: b9f8b08abe7390f74383840ae9bd2f8b
+Patch0: snapshot-x32.patch
URL: https://gitlab.gnome.org/GNOME/snapshot
BuildRequires: appstream-glib
BuildRequires: cargo
@@ -33,6 +34,9 @@ Requires: gtk4 >= 4.9.0
Requires: libadwaita >= 1.4
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+# debugsource packages don't support rust (or require adding some flags to rust/cargo)
+%define _debugsource_packages 0
+
%description
GNOME application to take pictures and videos.
@@ -41,8 +45,14 @@ Aplikacja GNOME to robienia zdjęć i nagrywania filmów.
%prep
%setup -q -n snapshot-%{version}
+%ifarch x32
+%patch0 -p1
+%endif
%build
+%ifarch x32
+export PKG_CONFIG_ALLOW_CROSS=1
+%endif
%meson build
%ninja_build -C build
@@ -50,6 +60,9 @@ Aplikacja GNOME to robienia zdjęć i nagrywania filmów.
%install
rm -rf $RPM_BUILD_ROOT
+%ifarch x32
+export PKG_CONFIG_ALLOW_CROSS=1
+%endif
%ninja_install -C build
%find_lang snapshot
diff --git a/snapshot-x32.patch b/snapshot-x32.patch
new file mode 100644
index 0000000..334c039
--- /dev/null
+++ b/snapshot-x32.patch
@@ -0,0 +1,19 @@
+--- snapshot-44.2/src/meson.build.orig 2023-09-17 11:38:59.362481895 +0200
++++ snapshot-44.2/src/meson.build 2023-09-17 12:00:10.559840728 +0200
+@@ -20,6 +20,7 @@ run_command(
+ )
+
+ cargo_options = [ '--manifest-path', meson.project_source_root() / 'Cargo.toml' ]
++cargo_options += [ '--target', 'x86_64-unknown-linux-gnux32' ]
+ cargo_options += [ '--target-dir', meson.project_build_root() / 'src' ]
+
+ if get_option('profile') == 'default'
+@@ -48,7 +49,7 @@ cargo_build = 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-snapshot.git/commitdiff/aac023847a647a54fd062114b71e9483e15003aa
More information about the pld-cvs-commit
mailing list