1 |
commit: 62664c3963b4b47b916e7ebbf084ca6b98020e55 |
2 |
Author: orbea <orbea <AT> riseup <DOT> net> |
3 |
AuthorDate: Wed May 11 04:27:22 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri May 13 20:12:37 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=62664c39 |
7 |
|
8 |
sys-apps/fwts: Add 22.03.00 |
9 |
|
10 |
This adds two patches to fix the build with slibtool and to remove |
11 |
-Werror. |
12 |
|
13 |
Bug: https://bugs.gentoo.org/780372 |
14 |
Upstream-ML: https://lists.ubuntu.com/archives/fwts-devel/2022-May/013515.html |
15 |
Signed-off-by: orbea <orbea <AT> riseup.net> |
16 |
Closes: https://github.com/gentoo/gentoo/pull/25434 |
17 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
18 |
|
19 |
sys-apps/fwts/Manifest | 1 + |
20 |
sys-apps/fwts/files/fwts-22.03.00-slibtool.patch | 155 +++++++++++++++++++++++ |
21 |
sys-apps/fwts/files/fwts-22.03.00-werror.patch | 65 ++++++++++ |
22 |
sys-apps/fwts/fwts-22.03.00.ebuild | 51 ++++++++ |
23 |
4 files changed, 272 insertions(+) |
24 |
|
25 |
diff --git a/sys-apps/fwts/Manifest b/sys-apps/fwts/Manifest |
26 |
index 76af3596efb7..b330c0790e85 100644 |
27 |
--- a/sys-apps/fwts/Manifest |
28 |
+++ b/sys-apps/fwts/Manifest |
29 |
@@ -1 +1,2 @@ |
30 |
DIST fwts_20.11.00.orig.tar.gz 3845548 BLAKE2B 3d08bf3dd339543fc67984f5da081a4ac4a0e1b413431bb0836ec2a99130f76cd717ff61128b09e9e7c24cb275b52cd2503c34daa273c8328cee7eb2453706ea SHA512 650fa21ceb4528a6d7fa40ae44c3258e01208186328fce8ca889df2809f82abf9b966c76c99791b3f40b17e5c2efda5b15dd2def4aaf494004778337f5074b55 |
31 |
+DIST fwts_22.03.00.orig.tar.gz 3900335 BLAKE2B 2e36392f69140b1a2d3b77cc8d57740f66ea016063644916e69bb738e20191a780a9d2ed275cfd8b871ad8c3455f96c8ae26ab7c1574c0cc8efdbbb20f4cc785 SHA512 88f183293da4f6ebc1cefc382c9b5e1b378ac7d03e0c577937db89be9e8417e0ffdf0952cdffda57ac21787c3fe02c5254ec7ce61e100e78555ffa92d6a30dc2 |
32 |
|
33 |
diff --git a/sys-apps/fwts/files/fwts-22.03.00-slibtool.patch b/sys-apps/fwts/files/fwts-22.03.00-slibtool.patch |
34 |
new file mode 100644 |
35 |
index 000000000000..bc66006bf674 |
36 |
--- /dev/null |
37 |
+++ b/sys-apps/fwts/files/fwts-22.03.00-slibtool.patch |
38 |
@@ -0,0 +1,155 @@ |
39 |
+Upstream-ML: https://lists.ubuntu.com/archives/fwts-devel/2022-May/013515.html |
40 |
+ |
41 |
+From 47bc82375865e2548edcb1607ca52ec60d632123 Mon Sep 17 00:00:00 2001 |
42 |
+From: orbea <orbea@××××××.net> |
43 |
+Date: Tue, 10 May 2022 20:35:01 -0700 |
44 |
+Subject: [PATCH 1/2] build: Improve linking |
45 |
+ |
46 |
+This improves the linking enough to get the build to complete |
47 |
+with slibtool and GNU libtool. |
48 |
+--- |
49 |
+ configure.ac | 2 ++ |
50 |
+ src/Makefile.am | 20 ++++++++++---------- |
51 |
+ src/lib/src/Makefile.am | 18 ++++++++++-------- |
52 |
+ src/libfwtsacpica/Makefile.am | 7 ++----- |
53 |
+ src/libfwtsiasl/Makefile.am | 4 ++-- |
54 |
+ 5 files changed, 26 insertions(+), 25 deletions(-) |
55 |
+ |
56 |
+diff --git a/configure.ac b/configure.ac |
57 |
+index f40c367..7ee5604 100644 |
58 |
+--- a/configure.ac |
59 |
++++ b/configure.ac |
60 |
+@@ -64,6 +64,8 @@ |
61 |
+ AC_CHECK_HEADERS([asm/opal-prd.h]) |
62 |
+ AC_CHECK_HEADERS([mtd/mtd-abi.h]) |
63 |
+ AC_CHECK_HEADERS([pci/pci.h]) |
64 |
++ PKG_CHECK_MODULES([GIO], [gio-2.0]) |
65 |
++ PKG_CHECK_MODULES([GLIB], [glib-2.0]) |
66 |
+ AM_CONDITIONAL([HAVE_ASM_OPAL_PRD_H], |
67 |
+ [test "x$ac_cv_header_asm_opal_prd_h" = "xyes"]) |
68 |
+ AM_CONDITIONAL([HAVE_MTD_ABI_H], |
69 |
+diff --git a/src/Makefile.am b/src/Makefile.am |
70 |
+index 9a26af8..e2180e7 100644 |
71 |
+--- a/src/Makefile.am |
72 |
++++ b/src/Makefile.am |
73 |
+@@ -12,7 +12,7 @@ AM_CPPFLAGS = \ |
74 |
+ -I$(top_srcdir)/src/acpica/source/compiler \ |
75 |
+ -I$(top_srcdir)/efi_runtime \ |
76 |
+ -I$(top_srcdir)/smccc_test \ |
77 |
+- -pthread `pkg-config --cflags glib-2.0 gio-2.0` \ |
78 |
++ -pthread \ |
79 |
+ -Wall -Werror -Wextra \ |
80 |
+ -Wno-address-of-packed-member \ |
81 |
+ -Wfloat-equal -Wmissing-declarations \ |
82 |
+@@ -23,7 +23,11 @@ AM_CPPFLAGS = \ |
83 |
+ |
84 |
+ bin_PROGRAMS = fwts |
85 |
+ |
86 |
+-fwts_CPPFLAGS = $(AM_CPPFLAGS) -DACPI_DEBUG_OUTPUT |
87 |
++fwts_CPPFLAGS = \ |
88 |
++ $(AM_CPPFLAGS) \ |
89 |
++ @GIO_CFLAGS@ \ |
90 |
++ @GLIB_CFLAGS@ \ |
91 |
++ -DACPI_DEBUG_OUTPUT |
92 |
+ |
93 |
+ if HAVE_LIBFDT |
94 |
+ dt_tests = \ |
95 |
+@@ -207,16 +211,12 @@ fwts_SOURCES = main.c \ |
96 |
+ $(power_mgmt_tests) \ |
97 |
+ $(dt_tests) |
98 |
+ |
99 |
+-fwts_LDFLAGS = -lm -lbsd `pkg-config --libs glib-2.0 gio-2.0` |
100 |
++fwts_LDFLAGS = -no-undefined |
101 |
+ |
102 |
+ fwts_LDADD = \ |
103 |
+- -lfwts \ |
104 |
+- -L$(top_builddir)/src \ |
105 |
+- -L$(top_builddir)/src/acpica \ |
106 |
+- -L$(top_builddir)/src/libfwtsiasl \ |
107 |
+- -L$(top_builddir)/src/libfwtsacpica \ |
108 |
+- -L$(top_builddir)/src/lib/src \ |
109 |
+- -lfwtsacpica |
110 |
++ $(top_builddir)/src/lib/src/libfwts.la \ |
111 |
++ $(top_builddir)/src/libfwtsiasl/libfwtsiasl.la \ |
112 |
++ $(top_builddir)/src/libfwtsacpica/libfwtsacpica.la |
113 |
+ |
114 |
+ man_MANS = ../doc/fwts.1 ../doc/fwts-collect.1 ../doc/fwts-frontend-text.1 |
115 |
+ |
116 |
+diff --git a/src/lib/src/Makefile.am b/src/lib/src/Makefile.am |
117 |
+index 0a39882..94bfcdf 100644 |
118 |
+--- a/src/lib/src/Makefile.am |
119 |
++++ b/src/lib/src/Makefile.am |
120 |
+@@ -21,22 +21,24 @@ AM_CPPFLAGS = \ |
121 |
+ -I$(top_srcdir)/src/libfwtsiasl \ |
122 |
+ -I$(top_srcdir)/src/acpica/source/include \ |
123 |
+ -I$(top_srcdir)/src/acpica/source/compiler \ |
124 |
+- `pkg-config --silence-errors --cflags json` \ |
125 |
+- `pkg-config --silence-errors --cflags json-c` \ |
126 |
+- `pkg-config --cflags glib-2.0 gio-2.0` \ |
127 |
+ -DDATAROOTDIR=\"$(datarootdir)\" \ |
128 |
+ -Wall -Werror -Wextra \ |
129 |
+ -Wno-address-of-packed-member |
130 |
+ |
131 |
+ pkglib_LTLIBRARIES = libfwts.la |
132 |
+ |
133 |
+-libfwts_la_LDFLAGS = \ |
134 |
++libfwts_la_LDFLAGS = -version-info 1:0:0 |
135 |
++ |
136 |
++libfwts_la_LIBADD = \ |
137 |
+ -lm -lpthread -lbsd \ |
138 |
+- -version-info 1:0:0 \ |
139 |
+- -L$(top_builddir)/src/libfwtsiasl \ |
140 |
+- -lfwtsiasl `pkg-config --libs glib-2.0 gio-2.0` |
141 |
++ @GIO_LIBS@ \ |
142 |
++ @GLIB_LIBS@ |
143 |
+ |
144 |
+-libfwts_la_CPPFLAGS = $(AM_CPPFLAGS) -DACPI_DEBUG_OUTPUT |
145 |
++libfwts_la_CPPFLAGS = \ |
146 |
++ $(AM_CPPFLAGS) \ |
147 |
++ @GIO_CFLAGS@ \ |
148 |
++ @GLIB_CFLAGS@ \ |
149 |
++ -DACPI_DEBUG_OUTPUT |
150 |
+ |
151 |
+ if HAVE_LIBFDT |
152 |
+ dt_sources = \ |
153 |
+diff --git a/src/libfwtsacpica/Makefile.am b/src/libfwtsacpica/Makefile.am |
154 |
+index f37f585..62f0d8c 100644 |
155 |
+--- a/src/libfwtsacpica/Makefile.am |
156 |
++++ b/src/libfwtsacpica/Makefile.am |
157 |
+@@ -74,7 +74,8 @@ CLEANFILES = osunixxf_munged.c \ |
158 |
+ |
159 |
+ pkglib_LTLIBRARIES = libfwtsacpica.la |
160 |
+ |
161 |
+-libfwtsacpica_la_LDFLAGS = -lpthread -version-info 1:0:0 |
162 |
++libfwtsacpica_la_LDFLAGS = -version-info 1:0:0 |
163 |
++libfwtsacpica_la_LIBADD = -lpthread |
164 |
+ libfwtsacpica_la_CPPFLAGS = $(AM_CPPFLAGS) |
165 |
+ |
166 |
+ # |
167 |
+@@ -280,8 +281,4 @@ libfwtsacpica_la_SOURCES = \ |
168 |
+ ../../src/acpica/source/tools/acpiexec/aeinstall.c \ |
169 |
+ ../../src/acpica/source/os_specific/service_layers/osgendbg.c |
170 |
+ |
171 |
+-libfwtsacpica_la_LIBADD = \ |
172 |
+- -L../../src/lib/src -lfwts -lrt |
173 |
+- |
174 |
+- |
175 |
+ -include ../../git.mk |
176 |
+diff --git a/src/libfwtsiasl/Makefile.am b/src/libfwtsiasl/Makefile.am |
177 |
+index 328134c..2728780 100644 |
178 |
+--- a/src/libfwtsiasl/Makefile.am |
179 |
++++ b/src/libfwtsiasl/Makefile.am |
180 |
+@@ -104,8 +104,8 @@ BUILT_SOURCES = aslcompiler.y \ |
181 |
+ # |
182 |
+ # Just export fwts specific API so we don't clash with core ACPICA library |
183 |
+ # |
184 |
+-libfwtsiasl_la_LDFLAGS = -export-symbols-regex "fwts_.*" -lpthread -version-info 1:0:0 |
185 |
+- |
186 |
++libfwtsiasl_la_LDFLAGS = -export-symbols-regex "fwts_.*" -version-info 1:0:0 |
187 |
++libfwtsiasl_la_LIBADD = -lpthread |
188 |
+ CLEANFILES = $(BUILT_SOURCES) |
189 |
+ |
190 |
+ libfwtsiasl_la_CPPFLAGS = $(AM_CPPFLAGS) |
191 |
+-- |
192 |
+2.35.1 |
193 |
+ |
194 |
|
195 |
diff --git a/sys-apps/fwts/files/fwts-22.03.00-werror.patch b/sys-apps/fwts/files/fwts-22.03.00-werror.patch |
196 |
new file mode 100644 |
197 |
index 000000000000..6502c75b7413 |
198 |
--- /dev/null |
199 |
+++ b/sys-apps/fwts/files/fwts-22.03.00-werror.patch |
200 |
@@ -0,0 +1,65 @@ |
201 |
+From 85f27bc6dcd8c7f1479dce259713540f1d1a888c Mon Sep 17 00:00:00 2001 |
202 |
+From: orbea <orbea@××××××.net> |
203 |
+Date: Tue, 10 May 2022 21:11:29 -0700 |
204 |
+Subject: [PATCH 2/2] build: Remove -Werror |
205 |
+ |
206 |
+--- |
207 |
+ configure.ac | 2 +- |
208 |
+ src/Makefile.am | 2 +- |
209 |
+ src/lib/src/Makefile.am | 2 +- |
210 |
+ src/utilities/Makefile.am | 2 +- |
211 |
+ 4 files changed, 4 insertions(+), 4 deletions(-) |
212 |
+ |
213 |
+diff --git a/configure.ac b/configure.ac |
214 |
+index 7ee5604..4d2960e 100644 |
215 |
+--- a/configure.ac |
216 |
++++ b/configure.ac |
217 |
+@@ -1,5 +1,5 @@ |
218 |
+ AC_INIT([fwts],[0.1],[fwts-devel@××××××××××××.com]) |
219 |
+- AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects]) |
220 |
++ AM_INIT_AUTOMAKE([-Wall foreign subdir-objects]) |
221 |
+ m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) |
222 |
+ AC_CANONICAL_HOST |
223 |
+ AC_CONFIG_MACRO_DIR([m4]) |
224 |
+diff --git a/src/Makefile.am b/src/Makefile.am |
225 |
+index e2180e7..eee8b49 100644 |
226 |
+--- a/src/Makefile.am |
227 |
++++ b/src/Makefile.am |
228 |
+@@ -13,7 +13,7 @@ AM_CPPFLAGS = \ |
229 |
+ -I$(top_srcdir)/efi_runtime \ |
230 |
+ -I$(top_srcdir)/smccc_test \ |
231 |
+ -pthread \ |
232 |
+- -Wall -Werror -Wextra \ |
233 |
++ -Wall -Wextra \ |
234 |
+ -Wno-address-of-packed-member \ |
235 |
+ -Wfloat-equal -Wmissing-declarations \ |
236 |
+ -Wno-long-long -Wredundant-decls -Wshadow \ |
237 |
+diff --git a/src/lib/src/Makefile.am b/src/lib/src/Makefile.am |
238 |
+index 94bfcdf..390326a 100644 |
239 |
+--- a/src/lib/src/Makefile.am |
240 |
++++ b/src/lib/src/Makefile.am |
241 |
+@@ -22,7 +22,7 @@ AM_CPPFLAGS = \ |
242 |
+ -I$(top_srcdir)/src/acpica/source/include \ |
243 |
+ -I$(top_srcdir)/src/acpica/source/compiler \ |
244 |
+ -DDATAROOTDIR=\"$(datarootdir)\" \ |
245 |
+- -Wall -Werror -Wextra \ |
246 |
++ -Wall -Wextra \ |
247 |
+ -Wno-address-of-packed-member |
248 |
+ |
249 |
+ pkglib_LTLIBRARIES = libfwts.la |
250 |
+diff --git a/src/utilities/Makefile.am b/src/utilities/Makefile.am |
251 |
+index a7d9b9c..2356af3 100644 |
252 |
+--- a/src/utilities/Makefile.am |
253 |
++++ b/src/utilities/Makefile.am |
254 |
+@@ -16,7 +16,7 @@ |
255 |
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
256 |
+ # |
257 |
+ |
258 |
+-AM_CPPFLAGS = -Wall -Werror -Wextra -DDATAROOTDIR=\"$(datarootdir)\" \ |
259 |
++AM_CPPFLAGS = -Wall -Wextra -DDATAROOTDIR=\"$(datarootdir)\" \ |
260 |
+ -I$(srcdir)/../lib/include |
261 |
+ |
262 |
+ bin_PROGRAMS = kernelscan |
263 |
+-- |
264 |
+2.35.1 |
265 |
+ |
266 |
|
267 |
diff --git a/sys-apps/fwts/fwts-22.03.00.ebuild b/sys-apps/fwts/fwts-22.03.00.ebuild |
268 |
new file mode 100644 |
269 |
index 000000000000..a5bfacb685c1 |
270 |
--- /dev/null |
271 |
+++ b/sys-apps/fwts/fwts-22.03.00.ebuild |
272 |
@@ -0,0 +1,51 @@ |
273 |
+# Copyright 1999-2022 Gentoo Authors |
274 |
+# Distributed under the terms of the GNU General Public License v2 |
275 |
+ |
276 |
+EAPI=8 |
277 |
+ |
278 |
+inherit autotools |
279 |
+ |
280 |
+DESCRIPTION="Firmware Test Suite" |
281 |
+HOMEPAGE="https://kernel.ubuntu.com/git/hwe/fwts.git" |
282 |
+SRC_URI="https://launchpad.net/ubuntu/+archive/primary/+files/${PN}_${PV}.orig.tar.gz" |
283 |
+ |
284 |
+LICENSE="GPL-2" |
285 |
+SLOT="0" |
286 |
+KEYWORDS="~amd64" |
287 |
+ |
288 |
+DEPEND="dev-libs/glib:2 |
289 |
+ >=dev-libs/json-c-0.10-r1 |
290 |
+ dev-libs/libbsd |
291 |
+ dev-libs/libpcre |
292 |
+ sys-apps/dmidecode |
293 |
+ sys-apps/dtc |
294 |
+ sys-apps/pciutils |
295 |
+ sys-power/iasl |
296 |
+ sys-power/pmtools |
297 |
+" |
298 |
+RDEPEND="${DEPEND}" |
299 |
+BDEPEND="virtual/pkgconfig" |
300 |
+ |
301 |
+S=${WORKDIR} |
302 |
+ |
303 |
+PATCHES=( |
304 |
+ "${FILESDIR}/${P}-slibtool.patch" # 780372 |
305 |
+ "${FILESDIR}/${P}-werror.patch" |
306 |
+) |
307 |
+ |
308 |
+src_prepare() { |
309 |
+ default |
310 |
+ |
311 |
+ sed -e 's:/usr/bin/lspci:'$(type -p lspci)':' \ |
312 |
+ -e 's:/usr/sbin/dmidecode:'$(type -p dmidecode)':' \ |
313 |
+ -e 's:/usr/bin/iasl:'$(type -p iasl)':' \ |
314 |
+ -i src/lib/include/fwts_binpaths.h || die |
315 |
+ |
316 |
+ eautoreconf |
317 |
+} |
318 |
+ |
319 |
+src_install() { |
320 |
+ default |
321 |
+ |
322 |
+ find "${ED}" -name '*.la' -delete || die |
323 |
+} |