1 |
commit: 663b4a62e4640030d63cace5b9700395149a9b17 |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Dec 2 14:00:20 2017 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Dec 2 14:15:45 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=663b4a62 |
7 |
|
8 |
sys-apps/x86info: Port to EAPI 6 |
9 |
|
10 |
Package-Manager: Portage-2.3.16, Repoman-2.3.6 |
11 |
|
12 |
sys-apps/x86info/Manifest | 2 +- |
13 |
sys-apps/x86info/files/1.21-pic.patch | 5 +- |
14 |
sys-apps/x86info/files/x86info-1.24-pic.patch | 4 +- |
15 |
.../files/x86info-1.29-parallel-make-cleanup.patch | 7 ++- |
16 |
.../files/x86info-1.30-fix-build-system.patch | 12 +++++ |
17 |
sys-apps/x86info/x86info-1.30.ebuild | 61 +++++++++++++--------- |
18 |
6 files changed, 56 insertions(+), 35 deletions(-) |
19 |
|
20 |
diff --git a/sys-apps/x86info/Manifest b/sys-apps/x86info/Manifest |
21 |
index c0ebbfda423..bcc650214b0 100644 |
22 |
--- a/sys-apps/x86info/Manifest |
23 |
+++ b/sys-apps/x86info/Manifest |
24 |
@@ -1 +1 @@ |
25 |
-DIST x86info-1.30.tgz 95727 SHA256 fe3009850e93a9c5fa38ed6bf74d72686043329fead8f1b2be4b5943d4fc9428 SHA512 0b4c9f1be83a737aa26ec14d239d09465608fcf542766ef5b8634d2fe08f75857c0d2bd1969d971ab4b0d55cd3aa3e4e5f58b3b2865865aa68fd751377672e5f WHIRLPOOL 112b91421b8ff3ce8c01f7f22c5b26cad09a9d222fe4259b6644d8f28887a909f94947f1cd94325ae3acab7d440338bbea5693d2ed014f7464c8279a6079a336 |
26 |
+DIST x86info-1.30.tgz 95727 BLAKE2B 6e9e345c6b4d05d4a137b898f1cc8a31e901b25b8a3822c06c103298e2ee60c6fada8e1fc314a5fcec04618b9a8a9ce05a4e631dbf9f03a24c5349f13d1e2301 SHA512 0b4c9f1be83a737aa26ec14d239d09465608fcf542766ef5b8634d2fe08f75857c0d2bd1969d971ab4b0d55cd3aa3e4e5f58b3b2865865aa68fd751377672e5f |
27 |
|
28 |
diff --git a/sys-apps/x86info/files/1.21-pic.patch b/sys-apps/x86info/files/1.21-pic.patch |
29 |
index ddf24b293e1..7bf89240c2c 100644 |
30 |
--- a/sys-apps/x86info/files/1.21-pic.patch |
31 |
+++ b/sys-apps/x86info/files/1.21-pic.patch |
32 |
@@ -1,6 +1,5 @@ |
33 |
-diff -Nuar x86info-1.21.orig/bench/benchmarks.c x86info-1.21/bench/benchmarks.c |
34 |
---- x86info-1.21.orig/bench/benchmarks.c 2007-11-26 17:53:58.278467889 -0800 |
35 |
-+++ x86info-1.21/bench/benchmarks.c 2007-11-26 17:54:32.014318066 -0800 |
36 |
+--- a/bench/benchmarks.c |
37 |
++++ b/bench/benchmarks.c |
38 |
@@ -19,7 +19,10 @@ |
39 |
#ifdef __linux__ |
40 |
TIME(asm volatile("int $0x80" :"=a" (tmp) :"0" (__NR_getppid)), "int 0x80"); |
41 |
|
42 |
diff --git a/sys-apps/x86info/files/x86info-1.24-pic.patch b/sys-apps/x86info/files/x86info-1.24-pic.patch |
43 |
index 5cbd3a586f8..b4098c5c68c 100644 |
44 |
--- a/sys-apps/x86info/files/x86info-1.24-pic.patch |
45 |
+++ b/sys-apps/x86info/files/x86info-1.24-pic.patch |
46 |
@@ -1,7 +1,7 @@ |
47 |
http://bugs.gentoo.org/270388 |
48 |
|
49 |
---- cpuid.c |
50 |
-+++ cpuid.c |
51 |
+--- a/cpuid.c |
52 |
++++ b/cpuid.c |
53 |
@@ -62,12 +62,28 @@ |
54 |
sched_setaffinity(getpid(), sizeof(set), &set); |
55 |
} |
56 |
|
57 |
diff --git a/sys-apps/x86info/files/x86info-1.29-parallel-make-cleanup.patch b/sys-apps/x86info/files/x86info-1.29-parallel-make-cleanup.patch |
58 |
index 54208cab084..a9cec0397fa 100644 |
59 |
--- a/sys-apps/x86info/files/x86info-1.29-parallel-make-cleanup.patch |
60 |
+++ b/sys-apps/x86info/files/x86info-1.29-parallel-make-cleanup.patch |
61 |
@@ -1,12 +1,11 @@ |
62 |
-diff -Nuar x86info-1.29.orig/Makefile x86info-1.29/Makefile |
63 |
---- x86info-1.29.orig/Makefile 2011-04-05 22:54:04.000000000 +0000 |
64 |
-+++ x86info-1.29/Makefile 2011-05-15 18:19:42.204228978 +0000 |
65 |
+--- a/Makefile |
66 |
++++ b/Makefile |
67 |
@@ -12,7 +12,8 @@ |
68 |
LSMSR_TMP_HEADERS=AMD/k8.h AMD/fam10h.h AMD/fam11h.h generic_msr.h |
69 |
|
70 |
%.h: %.regs scripts/createheader.py |
71 |
- python scripts/createheader.py $< `basename $< .regs` >$@ |
72 |
-+ python scripts/createheader.py $< `basename $< .regs` >$@.tmp ; \ |
73 |
++ $(PYTHON) scripts/createheader.py $< `basename $< .regs` >$@.tmp ; \ |
74 |
+ mv $@.tmp $@ |
75 |
|
76 |
LSMSR_SRC = \ |
77 |
|
78 |
diff --git a/sys-apps/x86info/files/x86info-1.30-fix-build-system.patch b/sys-apps/x86info/files/x86info-1.30-fix-build-system.patch |
79 |
new file mode 100644 |
80 |
index 00000000000..21034d99edc |
81 |
--- /dev/null |
82 |
+++ b/sys-apps/x86info/files/x86info-1.30-fix-build-system.patch |
83 |
@@ -0,0 +1,12 @@ |
84 |
+--- a/Makefile |
85 |
++++ b/Makefile |
86 |
+@@ -1,9 +1,5 @@ |
87 |
+ VERSION=1.30 |
88 |
+ |
89 |
+-CFLAGS = -g -O2 -Werror -Wall -Wshadow -Wextra -Wmissing-declarations -Wdeclaration-after-statement -Wredundant-decls |
90 |
+-LDFLAGS = -Wl,-z,relro,-z,now |
91 |
+-CC = gcc |
92 |
+- |
93 |
+ SHELL = /bin/sh |
94 |
+ |
95 |
+ all: x86info test lsmsr |
96 |
|
97 |
diff --git a/sys-apps/x86info/x86info-1.30.ebuild b/sys-apps/x86info/x86info-1.30.ebuild |
98 |
index 7ef0bfa3f20..358f453ebbb 100644 |
99 |
--- a/sys-apps/x86info/x86info-1.30.ebuild |
100 |
+++ b/sys-apps/x86info/x86info-1.30.ebuild |
101 |
@@ -1,9 +1,11 @@ |
102 |
-# Copyright 1999-2012 Gentoo Foundation |
103 |
+# Copyright 1999-2017 Gentoo Foundation |
104 |
# Distributed under the terms of the GNU General Public License v2 |
105 |
|
106 |
-EAPI=2 |
107 |
+EAPI=6 |
108 |
|
109 |
-inherit eutils flag-o-matic linux-info toolchain-funcs |
110 |
+PYTHON_COMPAT=( python2_7 ) |
111 |
+ |
112 |
+inherit flag-o-matic linux-info python-any-r1 toolchain-funcs |
113 |
|
114 |
DESCRIPTION="Dave Jones' handy, informative x86 CPU diagnostic utility" |
115 |
HOMEPAGE="http://www.codemonkey.org.uk/projects/x86info/" |
116 |
@@ -14,48 +16,57 @@ SLOT="0" |
117 |
KEYWORDS="-* amd64 x86" |
118 |
IUSE="" |
119 |
|
120 |
-RDEPEND="sys-apps/pciutils" |
121 |
-DEPEND="${RDEPEND}" |
122 |
+RDEPEND="sys-apps/pciutils:=" |
123 |
+DEPEND=" |
124 |
+ ${PYTHON_DEPS} |
125 |
+ ${RDEPEND}" |
126 |
|
127 |
CONFIG_CHECK="~MTRR ~X86_CPUID" |
128 |
|
129 |
-src_prepare() { |
130 |
- epatch "${FILESDIR}"/1.21-pic.patch |
131 |
- epatch "${FILESDIR}"/${PN}-1.24-pic.patch #270388 |
132 |
- epatch "${FILESDIR}"/${PN}-1.29-parallel-make-cleanup.patch |
133 |
+PATCHES=( |
134 |
+ "${FILESDIR}"/1.21-pic.patch |
135 |
+ "${FILESDIR}"/${PN}-1.24-pic.patch #270388 |
136 |
+ "${FILESDIR}"/${PN}-1.29-parallel-make-cleanup.patch |
137 |
+ "${FILESDIR}"/${PN}-1.30-fix-build-system.patch |
138 |
+) |
139 |
+ |
140 |
+pkg_setup() { |
141 |
+ linux-info_pkg_setup |
142 |
+ python-any-r1_pkg_setup |
143 |
} |
144 |
|
145 |
-src_compile() { |
146 |
+src_configure() { |
147 |
# These flags taken from the 1.29 ebuild |
148 |
- append-flags -Wall -Wshadow -Wextra -Wmissing-declarations -Wdeclaration-after-statement -Wredundant-decls |
149 |
+ append-flags -Wall -Wshadow -Wextra -Wmissing-declarations \ |
150 |
+ -Wdeclaration-after-statement -Wredundant-decls |
151 |
append-ldflags -Wl,-z,relro,-z,now |
152 |
- emake x86info lsmsr \ |
153 |
- CC="$(tc-getCC)" \ |
154 |
- CFLAGS="${CFLAGS} ${CPPFLAGS}" \ |
155 |
- LDFLAGS="${LDFLAGS}" \ |
156 |
- || die "emake failed" |
157 |
+ |
158 |
+ tc-export CC |
159 |
+} |
160 |
+ |
161 |
+src_compile() { |
162 |
+ emake x86info lsmsr |
163 |
} |
164 |
|
165 |
src_install() { |
166 |
- dobin x86info lsmsr || die |
167 |
+ dobin x86info lsmsr |
168 |
|
169 |
insinto /etc/modprobe.d |
170 |
newins "${FILESDIR}"/x86info-modules.conf-rc x86info.conf |
171 |
|
172 |
- dodoc TODO README |
173 |
+ einstalldocs |
174 |
doman x86info.1 lsmsr.8 |
175 |
- insinto /usr/share/doc/${PF} |
176 |
- doins -r results |
177 |
- prepalldocs |
178 |
+ |
179 |
+ dodoc -r results |
180 |
} |
181 |
|
182 |
pkg_preinst() { |
183 |
- if [ -a "${ROOT}"/etc/modules.d/x86info ] && [ ! -a "${ROOT}"/etc/modprobe.d/x86info ] ; then |
184 |
+ if [[ -a "${EROOT%/}"/etc/modules.d/x86info ]] && [[ ! -a "${EROOT%/}"/etc/modprobe.d/x86info ]]; then |
185 |
elog "Moving x86info from /etc/modules.d/ to /etc/modprobe.d/" |
186 |
- mv "${ROOT}"/etc/{modules,modprobe}.d/x86info |
187 |
+ mv "${EROOT%/}"/etc/{modules,modprobe}.d/x86info |
188 |
fi |
189 |
- if [ -a "${ROOT}"/etc/modprobe.d/x86info ] && [ ! -a "${ROOT}"/etc/modprobe.d/x86info.conf ] ; then |
190 |
+ if [[ -a "${EROOT%/}"/etc/modprobe.d/x86info ]] && [[ ! -a "${EROOT%/}"/etc/modprobe.d/x86info.conf ]]; then |
191 |
elog "Adding .conf suffix to x86info in /etc/modprobe.d/" |
192 |
- mv "${ROOT}"/etc/modprobe.d/x86info{,.conf} |
193 |
+ mv "${EROOT%/}"/etc/modprobe.d/x86info{,.conf} |
194 |
fi |
195 |
} |