diff options
author | David Seifert <soap@gentoo.org> | 2017-12-02 15:00:20 +0100 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2017-12-02 15:15:45 +0100 |
commit | 663b4a62e4640030d63cace5b9700395149a9b17 (patch) | |
tree | 1943b38541e1e4885654526481dda4af4902686f /sys-apps | |
parent | sys-apps/xmbmon: Port to EAPI 6 (diff) | |
download | gentoo-663b4a62e4640030d63cace5b9700395149a9b17.tar.gz gentoo-663b4a62e4640030d63cace5b9700395149a9b17.tar.bz2 gentoo-663b4a62e4640030d63cace5b9700395149a9b17.zip |
sys-apps/x86info: Port to EAPI 6
Package-Manager: Portage-2.3.16, Repoman-2.3.6
Diffstat (limited to 'sys-apps')
-rw-r--r-- | sys-apps/x86info/Manifest | 2 | ||||
-rw-r--r-- | sys-apps/x86info/files/1.21-pic.patch | 5 | ||||
-rw-r--r-- | sys-apps/x86info/files/x86info-1.24-pic.patch | 4 | ||||
-rw-r--r-- | sys-apps/x86info/files/x86info-1.29-parallel-make-cleanup.patch | 7 | ||||
-rw-r--r-- | sys-apps/x86info/files/x86info-1.30-fix-build-system.patch | 12 | ||||
-rw-r--r-- | sys-apps/x86info/x86info-1.30.ebuild | 61 |
6 files changed, 56 insertions, 35 deletions
diff --git a/sys-apps/x86info/Manifest b/sys-apps/x86info/Manifest index c0ebbfda4233..bcc650214b00 100644 --- a/sys-apps/x86info/Manifest +++ b/sys-apps/x86info/Manifest @@ -1 +1 @@ -DIST x86info-1.30.tgz 95727 SHA256 fe3009850e93a9c5fa38ed6bf74d72686043329fead8f1b2be4b5943d4fc9428 SHA512 0b4c9f1be83a737aa26ec14d239d09465608fcf542766ef5b8634d2fe08f75857c0d2bd1969d971ab4b0d55cd3aa3e4e5f58b3b2865865aa68fd751377672e5f WHIRLPOOL 112b91421b8ff3ce8c01f7f22c5b26cad09a9d222fe4259b6644d8f28887a909f94947f1cd94325ae3acab7d440338bbea5693d2ed014f7464c8279a6079a336 +DIST x86info-1.30.tgz 95727 BLAKE2B 6e9e345c6b4d05d4a137b898f1cc8a31e901b25b8a3822c06c103298e2ee60c6fada8e1fc314a5fcec04618b9a8a9ce05a4e631dbf9f03a24c5349f13d1e2301 SHA512 0b4c9f1be83a737aa26ec14d239d09465608fcf542766ef5b8634d2fe08f75857c0d2bd1969d971ab4b0d55cd3aa3e4e5f58b3b2865865aa68fd751377672e5f diff --git a/sys-apps/x86info/files/1.21-pic.patch b/sys-apps/x86info/files/1.21-pic.patch index ddf24b293e14..7bf89240c2c0 100644 --- a/sys-apps/x86info/files/1.21-pic.patch +++ b/sys-apps/x86info/files/1.21-pic.patch @@ -1,6 +1,5 @@ -diff -Nuar x86info-1.21.orig/bench/benchmarks.c x86info-1.21/bench/benchmarks.c ---- x86info-1.21.orig/bench/benchmarks.c 2007-11-26 17:53:58.278467889 -0800 -+++ x86info-1.21/bench/benchmarks.c 2007-11-26 17:54:32.014318066 -0800 +--- a/bench/benchmarks.c ++++ b/bench/benchmarks.c @@ -19,7 +19,10 @@ #ifdef __linux__ TIME(asm volatile("int $0x80" :"=a" (tmp) :"0" (__NR_getppid)), "int 0x80"); diff --git a/sys-apps/x86info/files/x86info-1.24-pic.patch b/sys-apps/x86info/files/x86info-1.24-pic.patch index 5cbd3a586f8e..b4098c5c68c2 100644 --- a/sys-apps/x86info/files/x86info-1.24-pic.patch +++ b/sys-apps/x86info/files/x86info-1.24-pic.patch @@ -1,7 +1,7 @@ http://bugs.gentoo.org/270388 ---- cpuid.c -+++ cpuid.c +--- a/cpuid.c ++++ b/cpuid.c @@ -62,12 +62,28 @@ sched_setaffinity(getpid(), sizeof(set), &set); } 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 index 54208cab0843..a9cec0397fac 100644 --- a/sys-apps/x86info/files/x86info-1.29-parallel-make-cleanup.patch +++ b/sys-apps/x86info/files/x86info-1.29-parallel-make-cleanup.patch @@ -1,12 +1,11 @@ -diff -Nuar x86info-1.29.orig/Makefile x86info-1.29/Makefile ---- x86info-1.29.orig/Makefile 2011-04-05 22:54:04.000000000 +0000 -+++ x86info-1.29/Makefile 2011-05-15 18:19:42.204228978 +0000 +--- a/Makefile ++++ b/Makefile @@ -12,7 +12,8 @@ LSMSR_TMP_HEADERS=AMD/k8.h AMD/fam10h.h AMD/fam11h.h generic_msr.h %.h: %.regs scripts/createheader.py - python scripts/createheader.py $< `basename $< .regs` >$@ -+ python scripts/createheader.py $< `basename $< .regs` >$@.tmp ; \ ++ $(PYTHON) scripts/createheader.py $< `basename $< .regs` >$@.tmp ; \ + mv $@.tmp $@ LSMSR_SRC = \ 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 new file mode 100644 index 000000000000..21034d99edc5 --- /dev/null +++ b/sys-apps/x86info/files/x86info-1.30-fix-build-system.patch @@ -0,0 +1,12 @@ +--- a/Makefile ++++ b/Makefile +@@ -1,9 +1,5 @@ + VERSION=1.30 + +-CFLAGS = -g -O2 -Werror -Wall -Wshadow -Wextra -Wmissing-declarations -Wdeclaration-after-statement -Wredundant-decls +-LDFLAGS = -Wl,-z,relro,-z,now +-CC = gcc +- + SHELL = /bin/sh + + all: x86info test lsmsr diff --git a/sys-apps/x86info/x86info-1.30.ebuild b/sys-apps/x86info/x86info-1.30.ebuild index 7ef0bfa3f20b..358f453ebbbe 100644 --- a/sys-apps/x86info/x86info-1.30.ebuild +++ b/sys-apps/x86info/x86info-1.30.ebuild @@ -1,9 +1,11 @@ -# Copyright 1999-2012 Gentoo Foundation +# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -EAPI=2 +EAPI=6 -inherit eutils flag-o-matic linux-info toolchain-funcs +PYTHON_COMPAT=( python2_7 ) + +inherit flag-o-matic linux-info python-any-r1 toolchain-funcs DESCRIPTION="Dave Jones' handy, informative x86 CPU diagnostic utility" HOMEPAGE="http://www.codemonkey.org.uk/projects/x86info/" @@ -14,48 +16,57 @@ SLOT="0" KEYWORDS="-* amd64 x86" IUSE="" -RDEPEND="sys-apps/pciutils" -DEPEND="${RDEPEND}" +RDEPEND="sys-apps/pciutils:=" +DEPEND=" + ${PYTHON_DEPS} + ${RDEPEND}" CONFIG_CHECK="~MTRR ~X86_CPUID" -src_prepare() { - epatch "${FILESDIR}"/1.21-pic.patch - epatch "${FILESDIR}"/${PN}-1.24-pic.patch #270388 - epatch "${FILESDIR}"/${PN}-1.29-parallel-make-cleanup.patch +PATCHES=( + "${FILESDIR}"/1.21-pic.patch + "${FILESDIR}"/${PN}-1.24-pic.patch #270388 + "${FILESDIR}"/${PN}-1.29-parallel-make-cleanup.patch + "${FILESDIR}"/${PN}-1.30-fix-build-system.patch +) + +pkg_setup() { + linux-info_pkg_setup + python-any-r1_pkg_setup } -src_compile() { +src_configure() { # These flags taken from the 1.29 ebuild - append-flags -Wall -Wshadow -Wextra -Wmissing-declarations -Wdeclaration-after-statement -Wredundant-decls + append-flags -Wall -Wshadow -Wextra -Wmissing-declarations \ + -Wdeclaration-after-statement -Wredundant-decls append-ldflags -Wl,-z,relro,-z,now - emake x86info lsmsr \ - CC="$(tc-getCC)" \ - CFLAGS="${CFLAGS} ${CPPFLAGS}" \ - LDFLAGS="${LDFLAGS}" \ - || die "emake failed" + + tc-export CC +} + +src_compile() { + emake x86info lsmsr } src_install() { - dobin x86info lsmsr || die + dobin x86info lsmsr insinto /etc/modprobe.d newins "${FILESDIR}"/x86info-modules.conf-rc x86info.conf - dodoc TODO README + einstalldocs doman x86info.1 lsmsr.8 - insinto /usr/share/doc/${PF} - doins -r results - prepalldocs + + dodoc -r results } pkg_preinst() { - if [ -a "${ROOT}"/etc/modules.d/x86info ] && [ ! -a "${ROOT}"/etc/modprobe.d/x86info ] ; then + if [[ -a "${EROOT%/}"/etc/modules.d/x86info ]] && [[ ! -a "${EROOT%/}"/etc/modprobe.d/x86info ]]; then elog "Moving x86info from /etc/modules.d/ to /etc/modprobe.d/" - mv "${ROOT}"/etc/{modules,modprobe}.d/x86info + mv "${EROOT%/}"/etc/{modules,modprobe}.d/x86info fi - if [ -a "${ROOT}"/etc/modprobe.d/x86info ] && [ ! -a "${ROOT}"/etc/modprobe.d/x86info.conf ] ; then + if [[ -a "${EROOT%/}"/etc/modprobe.d/x86info ]] && [[ ! -a "${EROOT%/}"/etc/modprobe.d/x86info.conf ]]; then elog "Adding .conf suffix to x86info in /etc/modprobe.d/" - mv "${ROOT}"/etc/modprobe.d/x86info{,.conf} + mv "${EROOT%/}"/etc/modprobe.d/x86info{,.conf} fi } |