Use https by default
[gentoo.git] / sys-apps / intel-performance-counter-monitor / intel-performance-counter-monitor-2.8.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6
7 inherit versionator fcaps
8
9 MY_PN="IntelPerformanceCounterMonitor"
10 MY_PV="V2.8"
11 MY_P="${MY_PN}${MY_PV}.zip"
12
13 DESCRIPTION="Intel Performance Counter Monitor - A better way to measure CPU utilization"
14 HOMEPAGE="https://software.intel.com/en-us/articles/intel-performance-counter-monitor-a-better-way-to-measure-cpu-utilization"
15 SRC_URI="https://dev.gentoo.org/~dlan/distfiles/${MY_P}"
16
17 LICENSE="BSD"
18 SLOT="0"
19 KEYWORDS="~amd64"
20
21 RDEPEND=">=sys-devel/gcc-4:*"
22
23 DEPEND="${RDEPEND}
24         sys-apps/sed"
25
26 CONFIG_CHECK="~X86_MSR ~PERF_EVENTS"
27 ERROR_X86_MSR="Intel Performance Counter Monitor, requires X86_MSR to be set in kernel config."
28
29 S="${WORKDIR}/IntelPerformanceCounterMonitor${MY_PV}"
30
31 src_prepare() {
32         sed -i 's/^#CXXFLAGS += -DPCM_USE_PERF/CXXFLAGS += -DPCM_USE_PERF/'  Makefile || die
33 }
34
35 src_install() {
36         exeinto /usr/bin
37                 newexe pcm.x pcm
38                 newexe pcm-memory.x pcm-memory
39                 newexe pcm-msr.x pcm-msr
40                 newexe pcm-numa.x pcm-numa
41                 newexe pcm-pcie.x pcm-pcie
42                 newexe pcm-power.x pcm-power
43                 newexe pcm-sensor.x pcm-sensor
44                 newexe pcm-tsx.x pcm-tsx
45 }
46
47 pkg_postinst() {
48         fcaps CAP_SYS_RAWIO usr/bin/pcm
49         fcaps CAP_SYS_RAWIO usr/bin/pcm-{memory,msr,numa,pcie,power,tsx}
50 }