/[gentoo-x86]/net-misc/bfgminer/bfgminer-3.0.10.ebuild
Gentoo

Contents of /net-misc/bfgminer/bfgminer-3.0.10.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Sun Oct 27 16:30:15 2013 UTC (8 months, 2 weeks ago) by blueness
Branch: MAIN
Version bumps

(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 0xF52D4BBA)

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.0.9.ebuild,v 1.1 2013/10/22 16:25:24 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 altivec avalon bitforce +cpumining examples hardened icarus modminer ncurses +opencl padlock scrypt sse2 sse2_4way sse4 +udev x6500 ztex"
18 REQUIRED_USE="
19 || ( avalon bitforce cpumining icarus modminer opencl x6500 ztex )
20 adl? ( opencl )
21 altivec? ( cpumining ppc ppc64 )
22 padlock? ( cpumining || ( amd64 x86 ) )
23 scrypt? ( || ( cpumining opencl ) )
24 sse2? ( cpumining || ( amd64 x86 ) )
25 sse4? ( cpumining amd64 )
26 "
27
28 DEPEND="
29 net-misc/curl
30 ncurses? (
31 sys-libs/ncurses
32 )
33 >=dev-libs/jansson-2
34 net-libs/libblkmaker
35 udev? (
36 virtual/udev
37 )
38 x6500? (
39 virtual/libusb:1
40 )
41 ztex? (
42 virtual/libusb:1
43 )
44 "
45 RDEPEND="${DEPEND}
46 opencl? (
47 virtual/opencl
48 )
49 "
50 DEPEND="${DEPEND}
51 virtual/pkgconfig
52 sys-apps/sed
53 sse2? (
54 >=dev-lang/yasm-1.0.1
55 )
56 sse4? (
57 >=dev-lang/yasm-1.0.1
58 )
59 "
60
61 src_prepare() {
62 sed -i 's/\(^\#define WANT_.*\(SSE\|PADLOCK\|ALTIVEC\)\)/\/\/ \1/' miner.h
63 }
64
65 src_configure() {
66 local CFLAGS="${CFLAGS}"
67 if ! use altivec; then
68 sed -i 's/-faltivec//g' configure
69 else
70 CFLAGS="${CFLAGS} -DWANT_ALTIVEC=1"
71 fi
72 use padlock && CFLAGS="${CFLAGS} -DWANT_VIA_PADLOCK=1"
73 if use sse2; then
74 if use amd64; then
75 CFLAGS="${CFLAGS} -DWANT_X8664_SSE2=1"
76 else
77 CFLAGS="${CFLAGS} -DWANT_X8632_SSE2=1"
78 fi
79 fi
80 use sse2_4way && CFLAGS="${CFLAGS} -DWANT_SSE2_4WAY=1"
81 use sse4 && CFLAGS="${CFLAGS} -DWANT_X8664_SSE4=1"
82 use hardened && CFLAGS="${CFLAGS} -nopie"
83
84 CFLAGS="${CFLAGS}" \
85 econf \
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_with ncurses curses) \
93 $(use_enable opencl) \
94 $(use_enable scrypt) \
95 --with-system-libblkmaker \
96 $(use_with udev libudev) \
97 $(use_enable x6500) \
98 $(use_enable ztex)
99 # sanitize directories
100 sed -i 's~^\(\#define CGMINER_PREFIX \).*$~\1"'"${EPREFIX}/usr/lib/bfgminer"'"~' config.h
101 }
102
103 src_install() {
104 dobin bfgminer
105 dobin bfgminer-rpc
106 dodoc AUTHORS HACKING NEWS README README.RPC
107 if use scrypt; then
108 dodoc README.scrypt
109 fi
110 if use icarus || use bitforce; then
111 dodoc README.FPGA
112 fi
113 if use bitforce; then
114 dobin bitforce-firmware-flash
115 fi
116 if use modminer || use x6500; then
117 insinto /usr/lib/bfgminer/bitstreams
118 doins bitstreams/fpgaminer*.bit
119 dodoc bitstreams/COPYING_fpgaminer
120 fi
121 if use opencl; then
122 insinto /usr/lib/bfgminer
123 doins *.cl
124 fi
125 if use ztex; then
126 insinto /usr/lib/bfgminer/ztex
127 doins bitstreams/ztex*.bit
128 dodoc bitstreams/COPYING_ztex
129 fi
130 if use examples; then
131 docinto examples
132 dodoc api-example.php miner.php api-example.c api-example.py
133 fi
134 }

  ViewVC Help
Powered by ViewVC 1.1.20