diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-apps/x86info | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.xz |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sys-apps/x86info')
-rw-r--r-- | sys-apps/x86info/Manifest | 1 | ||||
-rw-r--r-- | sys-apps/x86info/files/1.21-pic.patch | 15 | ||||
-rw-r--r-- | sys-apps/x86info/files/x86info-1.24-pic.patch | 33 | ||||
-rw-r--r-- | sys-apps/x86info/files/x86info-1.29-parallel-make-cleanup.patch | 13 | ||||
-rw-r--r-- | sys-apps/x86info/files/x86info-modules.conf-rc | 9 | ||||
-rw-r--r-- | sys-apps/x86info/metadata.xml | 8 | ||||
-rw-r--r-- | sys-apps/x86info/x86info-1.30.ebuild | 62 |
7 files changed, 141 insertions, 0 deletions
diff --git a/sys-apps/x86info/Manifest b/sys-apps/x86info/Manifest new file mode 100644 index 00000000000..e138b652a43 --- /dev/null +++ b/sys-apps/x86info/Manifest @@ -0,0 +1 @@ +DIST x86info-1.30.tgz 95727 RMD160 38a5502d4364b45fcf610bbbdf7ac4e0d05cf498 SHA1 a5c63b1f4b2bf70db0919316198f6871d940fc0c SHA256 fe3009850e93a9c5fa38ed6bf74d72686043329fead8f1b2be4b5943d4fc9428 diff --git a/sys-apps/x86info/files/1.21-pic.patch b/sys-apps/x86info/files/1.21-pic.patch new file mode 100644 index 00000000000..ddf24b293e1 --- /dev/null +++ b/sys-apps/x86info/files/1.21-pic.patch @@ -0,0 +1,15 @@ +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 +@@ -19,7 +19,10 @@ + #ifdef __linux__ + TIME(asm volatile("int $0x80" :"=a" (tmp) :"0" (__NR_getppid)), "int 0x80"); + #endif +- TIME(asm volatile("cpuid": : :"ax", "dx", "cx", "bx"), "cpuid"); ++ TIME(asm volatile("movl %%ebx,%%edi\n" ++ "cpuid\n" ++ "movl %%edi,%%ebx\n" ++ : : :"%eax", "%edx", "%ecx", "%edi"), "cpuid"); + + TIME(asm volatile("addl $1,0(%esp)"), "addl"); + TIME(asm volatile("lock ; addl $1,0(%esp)"), "locked add"); diff --git a/sys-apps/x86info/files/x86info-1.24-pic.patch b/sys-apps/x86info/files/x86info-1.24-pic.patch new file mode 100644 index 00000000000..5cbd3a586f8 --- /dev/null +++ b/sys-apps/x86info/files/x86info-1.24-pic.patch @@ -0,0 +1,33 @@ +http://bugs.gentoo.org/270388 + +--- cpuid.c ++++ cpuid.c +@@ -62,12 +62,28 @@ + sched_setaffinity(getpid(), sizeof(set), &set); + } + ++#ifdef __PIC__ ++ /* GCC on i386 bitches if you clobber ebx. So hide it behind ++ * gcc's back. */ ++ asm( ++ "movl %%ebx,%%edi\n" ++ "cpuid\n" ++ "movl %%ebx,%1\n" ++ "movl %%edi,%%ebx\n" ++ : "=a" (a), ++ "=m" (b), ++ "+c" (c), ++ "=d" (d) ++ : "0" ((unsigned int)idx) ++ : "edi"); ++#else + asm("cpuid" + : "=a" (a), + "=b" (b), + "+c" (c), + "=d" (d) + : "0" ((unsigned int)idx)); ++#endif + + if (eax!=NULL) + *eax = a; 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 new file mode 100644 index 00000000000..54208cab084 --- /dev/null +++ b/sys-apps/x86info/files/x86info-1.29-parallel-make-cleanup.patch @@ -0,0 +1,13 @@ +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 +@@ -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 ; \ ++ mv $@.tmp $@ + + LSMSR_SRC = \ + lsmsr.c \ diff --git a/sys-apps/x86info/files/x86info-modules.conf-rc b/sys-apps/x86info/files/x86info-modules.conf-rc new file mode 100644 index 00000000000..58f11200720 --- /dev/null +++ b/sys-apps/x86info/files/x86info-modules.conf-rc @@ -0,0 +1,9 @@ +# $Id$ +# +# Aliases needed for x86info to probe data +# these are so the modules auto-load as needed +# +alias char-major-202 msr +alias char-major-203 cpuid +alias /dev/cpu/*/msr msr +alias /dev/cpu/*/cpuid cpuid diff --git a/sys-apps/x86info/metadata.xml b/sys-apps/x86info/metadata.xml new file mode 100644 index 00000000000..e2a0d741c0f --- /dev/null +++ b/sys-apps/x86info/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>base-system</herd> + <maintainer> + <email>robbat2@gentoo.org</email> + </maintainer> +</pkgmetadata> diff --git a/sys-apps/x86info/x86info-1.30.ebuild b/sys-apps/x86info/x86info-1.30.ebuild new file mode 100644 index 00000000000..15eb5d9c390 --- /dev/null +++ b/sys-apps/x86info/x86info-1.30.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=2 + +inherit eutils flag-o-matic linux-info toolchain-funcs + +DESCRIPTION="Dave Jones' handy, informative x86 CPU diagnostic utility" +HOMEPAGE="http://www.codemonkey.org.uk/projects/x86info/" +SRC_URI="http://www.codemonkey.org.uk/projects/x86info/${P}.tgz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="-* amd64 x86" +IUSE="" + +RDEPEND="sys-apps/pciutils" +DEPEND="${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 +} + +src_compile() { + # These flags taken from the 1.29 ebuild + 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" +} + +src_install() { + dobin x86info lsmsr || die + + insinto /etc/modprobe.d + newins "${FILESDIR}"/x86info-modules.conf-rc x86info.conf + + dodoc TODO README + doman x86info.1 lsmsr.8 + insinto /usr/share/doc/${PF} + doins -r results + prepalldocs +} + +pkg_preinst() { + if [ -a "${ROOT}"/etc/modules.d/x86info ] && [ ! -a "${ROOT}"/etc/modprobe.d/x86info ] ; then + elog "Moving x86info from /etc/modules.d/ to /etc/modprobe.d/" + mv "${ROOT}"/etc/{modules,modprobe}.d/x86info + fi + if [ -a "${ROOT}"/etc/modprobe.d/x86info ] && [ ! -a "${ROOT}"/etc/modprobe.d/x86info.conf ] ; then + elog "Adding .conf suffix to x86info in /etc/modprobe.d/" + mv "${ROOT}"/etc/modprobe.d/x86info{,.conf} + fi +} |