Add sw64 architecture

Signed-off-by: wzx <wuzx1226@qq.com>
This commit is contained in:
wzx 2022-10-20 10:41:47 +08:00
parent 00e5d35124
commit 526dd6ae36
2 changed files with 50 additions and 1 deletions

45
gnome-desktop-3.38.6-sw.patch Executable file
View File

@ -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 */

View File

@ -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<wuzx1226@qq.com> - 42.2-2
- add sw64 patch
* Wed Jun 8 2022 lin zhang <lin.zhang@turbolinux.com.cn> - 42.2-1
- Upgrade to 42.2