From 526dd6ae36a125487a47448ee83a6089bb3e43a0 Mon Sep 17 00:00:00 2001 From: wzx Date: Thu, 20 Oct 2022 10:41:47 +0800 Subject: [PATCH] Add sw64 architecture Signed-off-by: wzx --- gnome-desktop-3.38.6-sw.patch | 45 +++++++++++++++++++++++++++++++++++ gnome-desktop3.spec | 6 ++++- 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100755 gnome-desktop-3.38.6-sw.patch diff --git a/gnome-desktop-3.38.6-sw.patch b/gnome-desktop-3.38.6-sw.patch new file mode 100755 index 0000000..8352017 --- /dev/null +++ b/gnome-desktop-3.38.6-sw.patch @@ -0,0 +1,45 @@ +diff -Naur gnome-desktop-3.38.6.org/libgnome-desktop/gnome-desktop-thumbnail-script.c gnome-desktop-3.38.6.sw/libgnome-desktop/gnome-desktop-thumbnail-script.c +--- gnome-desktop-3.38.6.org/libgnome-desktop/gnome-desktop-thumbnail-script.c 2022-08-19 15:09:31.100000000 +0000 ++++ gnome-desktop-3.38.6.sw/libgnome-desktop/gnome-desktop-thumbnail-script.c 2022-08-19 15:11:51.660000000 +0000 +@@ -152,7 +152,7 @@ + } + + /* From https://github.com/flatpak/flatpak/blob/master/common/flatpak-utils.c */ +-#if !defined(__i386__) && !defined(__x86_64__) && !defined(__aarch64__) && !defined(__arm__) ++#if !defined(__i386__) && !defined(__x86_64__) && !defined(__aarch64__) && !defined(__arm__) && !defined(__sw_64__) + static const char * + flatpak_get_kernel_arch (void) + { +@@ -226,6 +226,8 @@ + return "x86_64"; + #elif defined(__aarch64__) + return "aarch64"; ++#elif defined(__sw_64__) ++ return "sw_64"; + #elif defined(__arm__) + #if G_BYTE_ORDER == G_LITTLE_ENDIAN + return "arm"; +@@ -243,6 +245,9 @@ + #ifdef SCMP_ARCH_AARCH64 + static const guint32 seccomp_aarch64_extra_arches[] = { SCMP_ARCH_ARM, 0 }; + #endif ++#ifdef SCMP_ARCH_SW_64 ++static const guint32 seccomp_sw_64_extra_arches[] = { SCMP_ARCH_SW_64, 0 }; ++#endif + + static inline void + cleanup_seccomp (void *p) +@@ -402,6 +407,13 @@ + extra_arches = seccomp_aarch64_extra_arches; + } + #endif ++#ifdef SCMP_ARCH_SW_64 ++ else if (strcmp (arch, "sw_64") == 0) ++ { ++ arch_id = SCMP_ARCH_SW_64; ++ extra_arches = seccomp_sw_64_extra_arches; ++ } ++#endif + + /* We only really need to handle arches on multiarch systems. + * If only one arch is supported the default is fine */ diff --git a/gnome-desktop3.spec b/gnome-desktop3.spec index 469234d..ddfabf2 100644 --- a/gnome-desktop3.spec +++ b/gnome-desktop3.spec @@ -7,7 +7,7 @@ Name: gnome-desktop3 Version: 42.2 -Release: 1 +Release: 2 Summary: GNOME is designed to help you use your computer in control. License: GPLv2+ and LGPLv2+ URL: https://gitlab.gnome.org/GNOME/gnome-desktop @@ -19,6 +19,7 @@ Source4: eog-defaults.list Source5: evince-defaults.list Patch0: make-inscript2-default-for-indic-languages.patch +Patch1: gnome-desktop-3.38.6-sw.patch BuildRequires: gcc gettext itstool meson BuildRequires: pkgconfig(libudev) pkgconfig(iso-codes) @@ -107,6 +108,9 @@ cat %SOURCE5 >> $RPM_BUILD_ROOT/%{_datadir}/applications/gnome-mimeapps.list %{_datadir}/installed-tests %changelog +* Thu Oct 20 2022 wuzx - 42.2-2 +- add sw64 patch + * Wed Jun 8 2022 lin zhang - 42.2-1 - Upgrade to 42.2