1 |
# Copyright 1999-2015 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.10.3.ebuild,v 1.1 2014/06/12 14:35:32 blueness Exp $ |
4 |
|
5 |
EAPI=5 |
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 ~arm ~mips ~ppc ~ppc64 ~x86" |
16 |
|
17 |
# TODO: knc (needs i2c-tools header) |
18 |
IUSE="+adl antminer avalon bifury bitforce bfsb bigpic bitfury cpumining drillbit examples hardened hashbuster hashbuster2 hashfast icarus klondike +libusb littlefury lm_sensors metabank modminer nanofury ncurses +opencl proxy proxy_getwork proxy_stratum screen scrypt twinfury +udev unicode x6500 ztex" |
19 |
REQUIRED_USE=' |
20 |
|| ( antminer avalon bfsb bifury bigpic bitforce bitfury cpumining drillbit hashbuster hashbuster2 hashfast icarus klondike littlefury metabank modminer nanofury opencl proxy twinfury x6500 ztex ) |
21 |
adl? ( opencl ) |
22 |
bfsb? ( bitfury ) |
23 |
bigpic? ( bitfury ) |
24 |
drillbit? ( bitfury ) |
25 |
hashbuster? ( bitfury ) |
26 |
hashbuster2? ( bitfury libusb ) |
27 |
klondike? ( libusb ) |
28 |
littlefury? ( bitfury ) |
29 |
lm_sensors? ( opencl ) |
30 |
metabank? ( bitfury ) |
31 |
nanofury? ( bitfury ) |
32 |
scrypt? ( || ( cpumining opencl proxy ) ) |
33 |
twinfury? ( bitfury ) |
34 |
unicode? ( ncurses ) |
35 |
proxy? ( || ( proxy_getwork proxy_stratum ) ) |
36 |
proxy_getwork? ( proxy ) |
37 |
proxy_stratum? ( proxy ) |
38 |
x6500? ( libusb ) |
39 |
ztex? ( libusb ) |
40 |
' |
41 |
|
42 |
DEPEND=' |
43 |
net-misc/curl |
44 |
ncurses? ( |
45 |
sys-libs/ncurses[unicode?] |
46 |
) |
47 |
>=dev-libs/jansson-2 |
48 |
net-libs/libblkmaker:= |
49 |
udev? ( |
50 |
virtual/udev |
51 |
) |
52 |
hashbuster? ( |
53 |
dev-libs/hidapi |
54 |
) |
55 |
libusb? ( |
56 |
virtual/libusb:1 |
57 |
) |
58 |
lm_sensors? ( |
59 |
sys-apps/lm_sensors |
60 |
) |
61 |
nanofury? ( |
62 |
dev-libs/hidapi |
63 |
) |
64 |
proxy_getwork? ( |
65 |
net-libs/libmicrohttpd |
66 |
) |
67 |
proxy_stratum? ( |
68 |
dev-libs/libevent |
69 |
) |
70 |
screen? ( |
71 |
app-misc/screen |
72 |
|| ( |
73 |
>=sys-apps/coreutils-8.15 |
74 |
sys-freebsd/freebsd-bin |
75 |
app-misc/realpath |
76 |
) |
77 |
) |
78 |
' |
79 |
RDEPEND="${DEPEND} |
80 |
opencl? ( |
81 |
|| ( |
82 |
virtual/opencl |
83 |
virtual/opencl-sdk |
84 |
dev-util/ati-stream-sdk |
85 |
dev-util/ati-stream-sdk-bin |
86 |
dev-util/amdstream |
87 |
dev-util/amd-app-sdk |
88 |
dev-util/amd-app-sdk-bin |
89 |
dev-util/nvidia-cuda-sdk[opencl] |
90 |
dev-util/intel-opencl-sdk |
91 |
) |
92 |
) |
93 |
" |
94 |
DEPEND="${DEPEND} |
95 |
virtual/pkgconfig |
96 |
>=dev-libs/uthash-1.9.7 |
97 |
sys-apps/sed |
98 |
cpumining? ( |
99 |
amd64? ( |
100 |
>=dev-lang/yasm-1.0.1 |
101 |
) |
102 |
x86? ( |
103 |
>=dev-lang/yasm-1.0.1 |
104 |
) |
105 |
) |
106 |
" |
107 |
|
108 |
src_configure() { |
109 |
local CFLAGS="${CFLAGS}" |
110 |
local with_curses |
111 |
use hardened && CFLAGS="${CFLAGS} -nopie" |
112 |
|
113 |
if use ncurses; then |
114 |
if use unicode; then |
115 |
with_curses='--with-curses=ncursesw' |
116 |
else |
117 |
with_curses='--with-curses=ncurses' |
118 |
fi |
119 |
else |
120 |
with_curses='--without-curses' |
121 |
fi |
122 |
|
123 |
CFLAGS="${CFLAGS}" \ |
124 |
econf \ |
125 |
--docdir="/usr/share/doc/${PF}" \ |
126 |
$(use_enable adl) \ |
127 |
$(use_enable antminer) \ |
128 |
$(use_enable avalon) \ |
129 |
$(use_enable bifury) \ |
130 |
$(use_enable bitforce) \ |
131 |
$(use_enable bfsb) \ |
132 |
$(use_enable bigpic) \ |
133 |
$(use_enable bitfury) \ |
134 |
$(use_enable cpumining) \ |
135 |
$(use_enable drillbit) \ |
136 |
$(use_enable hashbuster) \ |
137 |
$(use_enable hashbuster2 hashbusterusb) \ |
138 |
$(use_enable hashfast) \ |
139 |
$(use_enable icarus) \ |
140 |
$(use_enable klondike) \ |
141 |
$(use_enable littlefury) \ |
142 |
$(use_enable metabank) \ |
143 |
$(use_enable modminer) \ |
144 |
$(use_enable nanofury) \ |
145 |
$(use_enable opencl) \ |
146 |
$(use_enable scrypt) \ |
147 |
$(use_enable twinfury) \ |
148 |
--with-system-libblkmaker \ |
149 |
$with_curses \ |
150 |
$(use_with udev libudev) \ |
151 |
$(use_with lm_sensors sensors) \ |
152 |
$(use_with proxy_getwork libmicrohttpd) \ |
153 |
$(use_with proxy_stratum libevent) \ |
154 |
$(use_enable x6500) \ |
155 |
$(use_enable ztex) |
156 |
} |
157 |
|
158 |
src_install() { |
159 |
emake install DESTDIR="$D" |
160 |
if ! use examples; then |
161 |
rm -r "${D}/usr/share/doc/${PF}/rpc-examples" |
162 |
fi |
163 |
if ! use screen; then |
164 |
rm "${D}/usr/bin/start-bfgminer.sh" |
165 |
fi |
166 |
} |