1 |
commit: 0b6c782b7853ff796d16200301ced0b34e16c594 |
2 |
Author: Mike Frysinger <vapier <AT> chromium <DOT> org> |
3 |
AuthorDate: Wed Jan 10 05:48:35 2018 +0000 |
4 |
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jan 10 05:48:42 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0b6c782b |
7 |
|
8 |
sys-apps/dtc: change dtdiff to use /bin/sh |
9 |
|
10 |
.../dtc/{dtc-9999.ebuild => dtc-1.4.4-r1.ebuild} | 8 +++- |
11 |
sys-apps/dtc/dtc-9999.ebuild | 8 +++- |
12 |
sys-apps/dtc/files/dtc-1.4.4-posix-shell.patch | 48 ++++++++++++++++++++++ |
13 |
3 files changed, 62 insertions(+), 2 deletions(-) |
14 |
|
15 |
diff --git a/sys-apps/dtc/dtc-9999.ebuild b/sys-apps/dtc/dtc-1.4.4-r1.ebuild |
16 |
similarity index 85% |
17 |
copy from sys-apps/dtc/dtc-9999.ebuild |
18 |
copy to sys-apps/dtc/dtc-1.4.4-r1.ebuild |
19 |
index 1dc3915445f..7521eebe76e 100644 |
20 |
--- a/sys-apps/dtc/dtc-9999.ebuild |
21 |
+++ b/sys-apps/dtc/dtc-1.4.4-r1.ebuild |
22 |
@@ -1,4 +1,4 @@ |
23 |
-# Copyright 1999-2016 Gentoo Foundation |
24 |
+# Copyright 1999-2018 Gentoo Foundation |
25 |
# Distributed under the terms of the GNU General Public License v2 |
26 |
|
27 |
EAPI=6 |
28 |
@@ -24,9 +24,15 @@ DEPEND=" |
29 |
sys-devel/flex |
30 |
" |
31 |
DOCS=" |
32 |
+ Documentation/dt-object-internal.txt |
33 |
+ Documentation/dts-format.txt |
34 |
Documentation/manual.txt |
35 |
" |
36 |
|
37 |
+PATCHES=( |
38 |
+ "${FILESDIR}"/${PN}-1.4.4-posix-shell.patch |
39 |
+) |
40 |
+ |
41 |
src_prepare() { |
42 |
default |
43 |
|
44 |
|
45 |
diff --git a/sys-apps/dtc/dtc-9999.ebuild b/sys-apps/dtc/dtc-9999.ebuild |
46 |
index 1dc3915445f..7521eebe76e 100644 |
47 |
--- a/sys-apps/dtc/dtc-9999.ebuild |
48 |
+++ b/sys-apps/dtc/dtc-9999.ebuild |
49 |
@@ -1,4 +1,4 @@ |
50 |
-# Copyright 1999-2016 Gentoo Foundation |
51 |
+# Copyright 1999-2018 Gentoo Foundation |
52 |
# Distributed under the terms of the GNU General Public License v2 |
53 |
|
54 |
EAPI=6 |
55 |
@@ -24,9 +24,15 @@ DEPEND=" |
56 |
sys-devel/flex |
57 |
" |
58 |
DOCS=" |
59 |
+ Documentation/dt-object-internal.txt |
60 |
+ Documentation/dts-format.txt |
61 |
Documentation/manual.txt |
62 |
" |
63 |
|
64 |
+PATCHES=( |
65 |
+ "${FILESDIR}"/${PN}-1.4.4-posix-shell.patch |
66 |
+) |
67 |
+ |
68 |
src_prepare() { |
69 |
default |
70 |
|
71 |
|
72 |
diff --git a/sys-apps/dtc/files/dtc-1.4.4-posix-shell.patch b/sys-apps/dtc/files/dtc-1.4.4-posix-shell.patch |
73 |
new file mode 100644 |
74 |
index 00000000000..b9b0175c0bd |
75 |
--- /dev/null |
76 |
+++ b/sys-apps/dtc/files/dtc-1.4.4-posix-shell.patch |
77 |
@@ -0,0 +1,48 @@ |
78 |
+From 4d9522764985462741c7bb4af1ab231b9251476b Mon Sep 17 00:00:00 2001 |
79 |
+From: Mike Frysinger <vapier@××××××××.org> |
80 |
+Date: Wed, 10 Jan 2018 00:41:43 -0500 |
81 |
+Subject: [PATCH] dtdiff: change to POSIX shell |
82 |
+ |
83 |
+This changes from the bash-specific process substitution feature to |
84 |
+reading with pipes. It relies on /dev/fd or /proc/self/fd existing. |
85 |
+ |
86 |
+URL: https://crbug.com/756559 |
87 |
+Signed-off-by: Mike Frysinger <vapier@××××××××.org> |
88 |
+--- |
89 |
+ dtdiff | 19 +++++++++++++------ |
90 |
+ 1 file changed, 13 insertions(+), 6 deletions(-) |
91 |
+ |
92 |
+diff --git a/dtdiff b/dtdiff |
93 |
+index 5fa772b0ab62..4d1b71756c2f 100644 |
94 |
+--- a/dtdiff |
95 |
++++ b/dtdiff |
96 |
+@@ -1,8 +1,4 @@ |
97 |
+-#! /bin/bash |
98 |
+- |
99 |
+-# This script uses the bash <(...) extension. |
100 |
+-# If you want to change this to work with a generic /bin/sh, make sure |
101 |
+-# you fix that. |
102 |
++#! /bin/sh |
103 |
+ |
104 |
+ |
105 |
+ DTC=dtc |
106 |
+@@ -35,4 +31,15 @@ if [ $# != 2 ]; then |
107 |
+ exit 1 |
108 |
+ fi |
109 |
+ |
110 |
+-diff -u <(source_and_sort "$1") <(source_and_sort "$2") |
111 |
++for dir in /dev/fd /proc/self/fd; do |
112 |
++ if [ -d "${dir}" ]; then |
113 |
++ break |
114 |
++ fi |
115 |
++done |
116 |
++ |
117 |
++source_and_sort "$1" | ( |
118 |
++ # Duplicate current stdin from the first file to fd 3 so we can change fd 0 |
119 |
++ # to the second file. |
120 |
++ exec 3<&0 |
121 |
++ source_and_sort "$2" | diff -u "${dir}/3" "${dir}/0" |
122 |
++) |
123 |
+-- |
124 |
+2.15.1 |
125 |
+ |