1 |
# Copyright 1999-2013 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.3-r1.ebuild,v 1.1 2013/11/07 17:49:02 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 ~arm ~mips ~ppc ~ppc64 ~x86" |
16 |
|
17 |
IUSE="+adl avalon bitforce cpumining examples hardened icarus lm_sensors modminer ncurses +opencl proxy scrypt +udev unicode x6500 ztex" |
18 |
REQUIRED_USE=" |
19 |
|| ( avalon bitforce cpumining icarus modminer opencl proxy x6500 ztex ) |
20 |
adl? ( opencl ) |
21 |
lm_sensors? ( opencl ) |
22 |
scrypt? ( || ( cpumining opencl ) ) |
23 |
unicode? ( ncurses ) |
24 |
" |
25 |
|
26 |
DEPEND=" |
27 |
net-misc/curl |
28 |
ncurses? ( |
29 |
sys-libs/ncurses[unicode?] |
30 |
) |
31 |
>=dev-libs/jansson-2 |
32 |
net-libs/libblkmaker |
33 |
udev? ( |
34 |
virtual/udev |
35 |
) |
36 |
lm_sensors? ( |
37 |
sys-apps/lm_sensors |
38 |
) |
39 |
proxy? ( |
40 |
net-libs/libmicrohttpd |
41 |
) |
42 |
x6500? ( |
43 |
virtual/libusb:1 |
44 |
) |
45 |
ztex? ( |
46 |
virtual/libusb:1 |
47 |
) |
48 |
" |
49 |
RDEPEND="${DEPEND} |
50 |
opencl? ( |
51 |
virtual/opencl |
52 |
) |
53 |
" |
54 |
DEPEND="${DEPEND} |
55 |
virtual/pkgconfig |
56 |
>=dev-libs/uthash-1.9.2 |
57 |
sys-apps/sed |
58 |
cpumining? ( |
59 |
amd64? ( |
60 |
>=dev-lang/yasm-1.0.1 |
61 |
) |
62 |
x86? ( |
63 |
>=dev-lang/yasm-1.0.1 |
64 |
) |
65 |
) |
66 |
" |
67 |
|
68 |
src_configure() { |
69 |
local CFLAGS="${CFLAGS}" |
70 |
local with_curses |
71 |
use hardened && CFLAGS="${CFLAGS} -nopie" |
72 |
|
73 |
if use ncurses; then |
74 |
if use unicode; then |
75 |
with_curses='--with-curses=ncursesw' |
76 |
else |
77 |
with_curses='--with-curses=ncurses' |
78 |
fi |
79 |
else |
80 |
with_curses='--without-curses' |
81 |
fi |
82 |
|
83 |
CFLAGS="${CFLAGS}" \ |
84 |
econf \ |
85 |
--docdir="/usr/share/doc/${PF}" \ |
86 |
$(use_enable adl) \ |
87 |
$(use_enable avalon) \ |
88 |
$(use_enable bitforce) \ |
89 |
$(use_enable cpumining) \ |
90 |
$(use_enable icarus) \ |
91 |
$(use_enable modminer) \ |
92 |
$(use_enable opencl) \ |
93 |
$(use_enable scrypt) \ |
94 |
--with-system-libblkmaker \ |
95 |
$with_curses \ |
96 |
$(use_with udev libudev) \ |
97 |
$(use_with lm_sensors sensors) \ |
98 |
$(use_with proxy libmicrohttpd) \ |
99 |
$(use_enable x6500) \ |
100 |
$(use_enable ztex) |
101 |
} |
102 |
|
103 |
src_install() { |
104 |
emake install DESTDIR="$D" |
105 |
if ! use examples; then |
106 |
rm -r "${D}/usr/share/doc/${PF}/rpc-examples" |
107 |
fi |
108 |
} |