1 |
# Copyright 1999-2014 Gentoo Foundation |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: /var/cvsroot/gentoo-x86/net-misc/bfgminer/bfgminer-3.2.9.ebuild,v 1.1 2014/01/01 23:46:40 blueness Exp $ |
4 |
|
5 |
EAPI="4" |
6 |
|
7 |
inherit eutils |
8 |
|
9 |
DESCRIPTION="Modular Bitcoin ASIC/FPGA/GPU/CPU miner in C" |
10 |
HOMEPAGE="https://bitcointalk.org/?topic=168174" |
11 |
SRC_URI="http://luke.dashjr.org/programs/bitcoin/files/${PN}/${PV}/${P}.tbz2" |
12 |
|
13 |
LICENSE="GPL-3" |
14 |
SLOT="0" |
15 |
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" |
16 |
|
17 |
# Waiting for dev-libs/hidapi to be keyworded |
18 |
#KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~x86" |
19 |
|
20 |
IUSE="+adl avalon bitforce cpumining examples hardened icarus lm_sensors modminer ncurses +opencl proxy scrypt +udev unicode x6500 ztex" |
21 |
REQUIRED_USE=" |
22 |
|| ( avalon bitforce cpumining icarus modminer opencl proxy x6500 ztex ) |
23 |
adl? ( opencl ) |
24 |
lm_sensors? ( opencl ) |
25 |
scrypt? ( || ( cpumining opencl ) ) |
26 |
unicode? ( ncurses ) |
27 |
" |
28 |
|
29 |
DEPEND=" |
30 |
net-misc/curl |
31 |
ncurses? ( |
32 |
sys-libs/ncurses[unicode?] |
33 |
) |
34 |
>=dev-libs/jansson-2 |
35 |
net-libs/libblkmaker |
36 |
udev? ( |
37 |
virtual/udev |
38 |
) |
39 |
lm_sensors? ( |
40 |
sys-apps/lm_sensors |
41 |
) |
42 |
proxy? ( |
43 |
net-libs/libmicrohttpd |
44 |
) |
45 |
x6500? ( |
46 |
virtual/libusb:1 |
47 |
) |
48 |
ztex? ( |
49 |
virtual/libusb:1 |
50 |
) |
51 |
" |
52 |
RDEPEND="${DEPEND} |
53 |
opencl? ( |
54 |
virtual/opencl |
55 |
) |
56 |
" |
57 |
DEPEND="${DEPEND} |
58 |
virtual/pkgconfig |
59 |
>=dev-libs/uthash-1.9.2 |
60 |
sys-apps/sed |
61 |
cpumining? ( |
62 |
amd64? ( |
63 |
>=dev-lang/yasm-1.0.1 |
64 |
) |
65 |
x86? ( |
66 |
>=dev-lang/yasm-1.0.1 |
67 |
) |
68 |
) |
69 |
" |
70 |
|
71 |
src_configure() { |
72 |
local CFLAGS="${CFLAGS}" |
73 |
local with_curses |
74 |
use hardened && CFLAGS="${CFLAGS} -nopie" |
75 |
|
76 |
if use ncurses; then |
77 |
if use unicode; then |
78 |
with_curses='--with-curses=ncursesw' |
79 |
else |
80 |
with_curses='--with-curses=ncurses' |
81 |
fi |
82 |
else |
83 |
with_curses='--without-curses' |
84 |
fi |
85 |
|
86 |
CFLAGS="${CFLAGS}" \ |
87 |
econf \ |
88 |
--docdir="/usr/share/doc/${PF}" \ |
89 |
$(use_enable adl) \ |
90 |
$(use_enable avalon) \ |
91 |
$(use_enable bitforce) \ |
92 |
$(use_enable cpumining) \ |
93 |
$(use_enable icarus) \ |
94 |
$(use_enable modminer) \ |
95 |
$(use_enable opencl) \ |
96 |
$(use_enable scrypt) \ |
97 |
--with-system-libblkmaker \ |
98 |
$with_curses \ |
99 |
$(use_with udev libudev) \ |
100 |
$(use_with lm_sensors sensors) \ |
101 |
$(use_with proxy libmicrohttpd) \ |
102 |
$(use_enable x6500) \ |
103 |
$(use_enable ztex) |
104 |
} |
105 |
|
106 |
src_install() { |
107 |
emake install DESTDIR="$D" |
108 |
if ! use examples; then |
109 |
rm -r "${D}/usr/share/doc/${PF}/rpc-examples" |
110 |
fi |
111 |
} |