Gentoo Archives: gentoo-commits

From: "Robin H. Johnson (robbat2)" <robbat2@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-apps/linux-misc-apps: metadata.xml ChangeLog linux-misc-apps-3.1.ebuild
Date: Tue, 01 Nov 2011 09:06:21
Message-Id: 20111101090605.6EC232004B@flycatcher.gentoo.org
1 robbat2 11/11/01 09:06:05
2
3 Added: metadata.xml ChangeLog linux-misc-apps-3.1.ebuild
4 Log:
5 Initial commit.
6
7 (Portage version: 2.2.0_alpha70/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.1 sys-apps/linux-misc-apps/metadata.xml
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/linux-misc-apps/metadata.xml?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/linux-misc-apps/metadata.xml?rev=1.1&content-type=text/plain
14
15 Index: metadata.xml
16 ===================================================================
17 <?xml version="1.0" encoding="UTF-8"?>
18 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
19 <pkgmetadata>
20 <maintainer>
21 <email>robbat2@g.o</email>
22 </maintainer>
23 </pkgmetadata>
24
25
26
27 1.1 sys-apps/linux-misc-apps/ChangeLog
28
29 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/linux-misc-apps/ChangeLog?rev=1.1&view=markup
30 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/linux-misc-apps/ChangeLog?rev=1.1&content-type=text/plain
31
32 Index: ChangeLog
33 ===================================================================
34 # ChangeLog for sys-apps/linux-misc-apps
35 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
36 # $Header: /var/cvsroot/gentoo-x86/sys-apps/linux-misc-apps/ChangeLog,v 1.1 2011/11/01 09:06:05 robbat2 Exp $
37
38 *linux-misc-apps-3.1 (01 Nov 2011)
39
40 01 Nov 2011; Robin H. Johnson <robbat2@g.o>
41 +linux-misc-apps-3.1.ebuild, +metadata.xml:
42 Initial commit.
43
44
45
46
47 1.1 sys-apps/linux-misc-apps/linux-misc-apps-3.1.ebuild
48
49 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/linux-misc-apps/linux-misc-apps-3.1.ebuild?rev=1.1&view=markup
50 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/linux-misc-apps/linux-misc-apps-3.1.ebuild?rev=1.1&content-type=text/plain
51
52 Index: linux-misc-apps-3.1.ebuild
53 ===================================================================
54 # Copyright 1999-2011 Gentoo Foundation
55 # Distributed under the terms of the GNU General Public License v2
56 # $Header: /var/cvsroot/gentoo-x86/sys-apps/linux-misc-apps/linux-misc-apps-3.1.ebuild,v 1.1 2011/11/01 09:06:05 robbat2 Exp $
57
58 EAPI=4
59
60 inherit versionator eutils toolchain-funcs linux-info
61
62 DESCRIPTION="Misc tools bundled with kernel sources"
63 HOMEPAGE="http://kernel.org/"
64
65 LICENSE="GPL-2"
66 SLOT="0"
67 KEYWORDS="~amd64 ~x86 ~ppc"
68 IUSE=""
69
70 MY_PV="${PV/_/-}"
71 MY_PV="${MY_PV/-pre/-git}"
72
73 LINUX_V=$(get_version_component_range 1-2)
74
75 if [ ${PV/_rc} != ${PV} ]; then
76 LINUX_VER=$(get_version_component_range 1-2).$(($(get_version_component_range 3)-1))
77 PATCH_VERSION=$(get_version_component_range 1-3)
78 LINUX_PATCH=patch-${PV//_/-}.bz2
79 SRC_URI="mirror://kernel/linux/kernel/v${LINUX_V}/testing/${LINUX_PATCH}
80 mirror://kernel/linux/kernel/v${LINUX_V}/testing/v${PATCH_VERSION}/${LINUX_PATCH}"
81 elif [ $(get_version_component_count) == 4 ]; then
82 # stable-release series
83 LINUX_VER=$(get_version_component_range 1-3)
84 LINUX_PATCH=patch-${PV}.bz2
85 SRC_URI="mirror://kernel/linux/kernel/v${LINUX_V}/${LINUX_PATCH}"
86 else
87 LINUX_VER=${PV}
88 fi
89
90 LINUX_SOURCES=linux-${LINUX_VER}.tar.bz2
91 SRC_URI="${SRC_URI} mirror://kernel/linux/kernel/v${LINUX_V}/${LINUX_SOURCES}"
92
93 RDEPEND="sys-apps/pciutils" # pciutils for cpupower
94 DEPEND="${RDEPEND}"
95
96 S="${WORKDIR}/linux-${LINUX_VER}"
97
98 # All of these are integrated with the kernel build system,
99 # No make install, and ideally build with with the root Makefile
100 TARGETS_SIMPLE=(
101 Documentation/accounting/getdelays.c
102 Documentation/cgroups/cgroup_event_listener.c
103 Documentation/laptops/dslm.c
104 Documentation/laptops/hpfall.c
105 Documentation/networking/timestamping/timestamping.c
106 Documentation/virtual/lguest/lguest.c
107 Documentation/vm/page-types.c
108 Documentation/watchdog/src/watchdog-simple.c
109 drivers/staging/hv/tools/hv_kvp_daemon.c
110 tools/slub/slabinfo.c
111 usr/gen_init_cpio.c
112 )
113 # Documentation/networking/ifenslave.c - obsolete
114 # Documentation/ptp/testptp.c - pending linux-headers-3.0
115 # tools/hv/hv_kvp_daemon.c - pending linux-3.2
116
117 # These have a broken make install, no DESTDIR
118 TARGET_MAKE_SIMPLE=(
119 tools/firewire:nosy-dump
120 tools/power/x86/turbostat:turbostat
121 tools/power/x86/x86_energy_perf_policy:x86_energy_perf_policy
122 )
123 # tools/perf - covered by dev-utils/perf
124 # tools/usb - testcases only
125 # tools/virtio - testcaes only
126
127 #for _pattern in {Documentation,scripts,tools,usr,include,lib,"arch/*/include",Makefile,Kbuild,Kconfig}; do
128 src_unpack() {
129 unpack ${LINUX_SOURCES}
130
131 MY_A=
132 for _AFILE in ${A}; do
133 [[ ${_AFILE} == ${LINUX_SOURCES} ]] && continue
134 [[ ${_AFILE} == ${LINUX_PATCH} ]] && continue
135 MY_A="${MY_A} ${_AFILE}"
136 done
137 [[ -n ${MY_A} ]] && unpack ${MY_A}
138 }
139
140 src_prepare() {
141 if [[ -n ${LINUX_PATCH} ]]; then
142 epatch "${DISTDIR}"/${LINUX_PATCH}
143 fi
144 libs="-lcpupower -lrt -lpci"
145 sed -i \
146 -e "/$libs/{ s,${libs},,g; s,\$, ${libs},g;}" \
147 "${S}"/tools/power/cpupower/Makefile
148 }
149
150 cpupower_make() {
151 emake ${makeargs} \
152 CC="$(tc-getCC)" AR="$(tc-getAR)" \
153 docdir="/usr/share/doc/${PF}/cpupower" \
154 mandir="/usr/share/man" \
155 libdir="/usr/$(get_libdir)" \
156 OPTIMIZATION="${CFLAGS}" \
157 LDFLAGS="${LDFLAGS}" \
158 CPUFREQ_BENCH=/bin/false \
159 DEBUG=/bin/false \
160 STRIP=/bin/true \
161 "$@" || die
162 }
163
164 kernel_asm_arch() {
165 a="${1:${ARCH}}"
166 case ${a} in
167 # Merged arches
168 x86|amd64) echo x86 ;;
169 ppc*) echo powerpc ;;
170 # Non-merged
171 alpha|arm|ia64|m68k|mips|sh|sparc*) echo ${1} ;;
172 *) die "TODO: Update the code for your asm-ARCH symlink" ;;
173 esac
174 }
175
176 src_compile() {
177 local karch=$(kernel_asm_arch "${ARCH}")
178 # This is the minimal amount needed to start building host binaries.
179 #emake allmodconfig ARCH=${karch} || die
180 #emake prepare modules_prepare ARCH=${karch} || die
181 #touch Module.symvers
182
183 # Now we can start building
184 for s in ${TARGETS_SIMPLE[@]} ; do
185 dir=$(dirname $s) src=$(basename $s) bin=${src%.c}
186 einfo "Building $s => $bin"
187 emake -f /dev/null M=${dir} ARCH=${karch} ${s%.c} || die
188 done
189
190 for t in ${TARGET_MAKE_SIMPLE[@]} ; do
191 einfo "Building $dir => $target"
192 dir=${t/:*} target=${t/*:}
193 emake -C $dir ARCH=${karch} $target || die
194 done
195
196 # cpupower is special
197 einfo "Buildling cpupower"
198 cd "${S}"/tools/power/cpupower
199 cpupower_make ARCH=${karch} all || die
200 }
201
202 src_install() {
203 into /usr
204 for s in ${TARGETS_SIMPLE[@]} ; do
205 dir=$(dirname $s) src=$(basename $s) bin=${src%.c}
206 dosbin ${dir}/${bin} || die "Failed to install ${bin}"
207 done
208
209 for t in ${TARGET_MAKE_SIMPLE[@]} ; do
210 dir=${t/:*} target=${t/*:}
211 dosbin ${dir}/${target} || die
212 done
213
214 local karch=$(kernel_asm_arch "${ARCH}")
215 cd "${S}"/tools/power/cpupower
216 cpupower_make ARCH=${karch} DESTDIR="${D}" install || die
217 }