1 |
commit: 3a193fa7dd4c98a4004a87aac61ce46414efa237 |
2 |
Author: WANG Xuerui <xen0n <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Apr 26 02:57:35 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Apr 26 04:03:06 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3a193fa7 |
7 |
|
8 |
sys-apps/diffutils: avoid invoking autoconf |
9 |
|
10 |
Normally we'd just eautoreconf, but this is base-system and we cannot |
11 |
depend on autoconf, so we have to patch the generated files ourselves. |
12 |
This can go away once the loong fix patch is no longer necessary. |
13 |
|
14 |
Fixes: 1bff2846eaa ("sys-apps/diffutils: fix build on loong") |
15 |
Signed-off-by: WANG Xuerui <xen0n <AT> gentoo.org> |
16 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
17 |
|
18 |
sys-apps/diffutils/diffutils-3.8.ebuild | 10 ++++++++++ |
19 |
sys-apps/diffutils/files/loong-fix-build.patch | 18 +++++++++++------- |
20 |
2 files changed, 21 insertions(+), 7 deletions(-) |
21 |
|
22 |
diff --git a/sys-apps/diffutils/diffutils-3.8.ebuild b/sys-apps/diffutils/diffutils-3.8.ebuild |
23 |
index 53a9433ee899..fe16ee36331a 100644 |
24 |
--- a/sys-apps/diffutils/diffutils-3.8.ebuild |
25 |
+++ b/sys-apps/diffutils/diffutils-3.8.ebuild |
26 |
@@ -28,6 +28,16 @@ PATCHES=( |
27 |
"${FILESDIR}/loong-fix-build.patch" |
28 |
) |
29 |
|
30 |
+src_prepare() { |
31 |
+ default |
32 |
+ |
33 |
+ # touch generated files after patching m4, to avoid activating maintainer |
34 |
+ # mode |
35 |
+ # remove when loong-fix-build.patch is no longer necessary |
36 |
+ touch ./aclocal.m4 lib/config.hin ./configure || die |
37 |
+ find . -name Makefile.in -exec touch {} + || die |
38 |
+} |
39 |
+ |
40 |
src_configure() { |
41 |
use static && append-ldflags -static |
42 |
|
43 |
|
44 |
diff --git a/sys-apps/diffutils/files/loong-fix-build.patch b/sys-apps/diffutils/files/loong-fix-build.patch |
45 |
index cd06fa8df5e4..2b16b47b7ee7 100644 |
46 |
--- a/sys-apps/diffutils/files/loong-fix-build.patch |
47 |
+++ b/sys-apps/diffutils/files/loong-fix-build.patch |
48 |
@@ -1,16 +1,10 @@ |
49 |
-From 34add045fd2ec3f1031dee961c4d9cc4285486a7 Mon Sep 17 00:00:00 2001 |
50 |
+[xen0n: this is https://github.com/sunhaiyong1978/CLFS-for-LoongArch/blob/1.0/patches/stack-direction-add-loongarch.patch with change to generated file added as well.] |
51 |
From: Sun Haiyong <youbest@××××.com> |
52 |
Date: Tue, 31 Aug 2021 11:11:52 +0800 |
53 |
Subject: [PATCH] stack-direction: Add support for loongarch CPU |
54 |
|
55 |
* m4/stack-direction.m4 (SV_STACK_DIRECTION): When the CPU is loongarch, |
56 |
set "sv_cv_stack_direction" to "-1" . |
57 |
---- |
58 |
- m4/stack-direction.m4 | 1 + |
59 |
- 1 file changed, 1 insertion(+) |
60 |
- |
61 |
-diff --git a/m4/stack-direction.m4 b/m4/stack-direction.m4 |
62 |
-index 93287254b..e6c3284ce 100644 |
63 |
--- a/m4/stack-direction.m4 |
64 |
+++ b/m4/stack-direction.m4 |
65 |
@@ -32,6 +32,7 @@ AC_DEFUN([SV_STACK_DIRECTION], |
66 |
@@ -21,6 +15,16 @@ index 93287254b..e6c3284ce 100644 |
67 |
m32r | \ |
68 |
m68* | \ |
69 |
m88k | \ |
70 |
+--- a/configure |
71 |
++++ b/configure |
72 |
+@@ -34088,6 +34088,7 @@ else $as_nop |
73 |
+ i?86 | x86_64 | \ |
74 |
+ i860 | \ |
75 |
+ ia64 | \ |
76 |
++ loongarch* | \ |
77 |
+ m32r | \ |
78 |
+ m68* | \ |
79 |
+ m88k | \ |
80 |
-- |
81 |
2.17.2 |