From 42ee32fc0bce343a71142b198e838cc89d3a333a Mon Sep 17 00:00:00 2001 From: geliwei <5633293+geliwei@user.noreply.gitee.com> Date: Tue, 7 Dec 2021 04:59:28 +0000 Subject: [PATCH] build: support loongarch64 platform --- 1000-anolis-emacs-support-loongarch64.patch | 32 +++++++++++++++++++++ emacs.spec | 11 ++++++- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 1000-anolis-emacs-support-loongarch64.patch diff --git a/1000-anolis-emacs-support-loongarch64.patch b/1000-anolis-emacs-support-loongarch64.patch new file mode 100644 index 0000000..f3923c7 --- /dev/null +++ b/1000-anolis-emacs-support-loongarch64.patch @@ -0,0 +1,32 @@ +diff -Nur emacs-26.1/build-aux/config.guess emacs-26.1.new/build-aux/config.guess +--- emacs-26.1/build-aux/config.guess 2018-04-23 22:17:34.000000000 +0800 ++++ emacs-26.1.new/build-aux/config.guess 2021-12-06 13:19:16.684000000 +0800 +@@ -893,6 +893,9 @@ + aarch64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; ++ loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*) ++ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" ++ exit ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} +diff -Nur emacs-26.1/build-aux/config.sub emacs-26.1.new/build-aux/config.sub +--- emacs-26.1/build-aux/config.sub 2018-04-23 22:17:34.000000000 +0800 ++++ emacs-26.1.new/build-aux/config.sub 2021-12-06 13:19:48.160000000 +0800 +@@ -245,6 +245,7 @@ + 1750a | 580 \ + | a29k \ + | aarch64 | aarch64_be \ ++ | loongarch32 | loongarch64 | loongarchx32 \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ +@@ -369,6 +370,7 @@ + 580-* \ + | a29k-* \ + | aarch64-* | aarch64_be-* \ ++ | loongarch32-* | loongarch64-* | loongarchx32-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ diff --git a/emacs.spec b/emacs.spec index 9d844b8..5d84348 100644 --- a/emacs.spec +++ b/emacs.spec @@ -1,3 +1,4 @@ +%define anolis_release .0.1 %global _hardened_build 1 # This file is encoded in UTF-8. -*- coding: utf-8 -*- @@ -5,7 +6,7 @@ Summary: GNU Emacs text editor Name: emacs Epoch: 1 Version: 26.1 -Release: 7%{?dist} +Release: 7%{anolis_release}%{?dist} License: GPLv3+ and CC0-1.0 URL: http://www.gnu.org/software/emacs/ Group: Applications/Editors @@ -25,6 +26,10 @@ Source10: package-keyring.gpg Patch1: emacs-spellchecker.patch Patch2: emacs-system-crypto-policies.patch +# Add by Anolis +Patch1000: 1000-anolis-emacs-support-loongarch64.patch +# End of Anolis + BuildRequires: atk-devel BuildRequires: cairo-devel BuildRequires: freetype-devel @@ -178,6 +183,7 @@ packages that add functionality to Emacs. %patch1 -p1 -b .spellchecker %patch2 -p1 -b .system-crypto-policies +%patch1000 -p1 autoconf # We prefer our emacs.desktop file @@ -464,6 +470,9 @@ fi %dir %{_datadir}/emacs/site-lisp/site-start.d %changelog +* Mon Dec 6 2021 Liwei Ge - 1:26.1-7.0.1 +- Support loongarch64 platform + * Thu Aug 5 2021 Jacek Migacz - 1:26.1-7 - provide gating.yaml for CI -- Gitee