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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Wed Jun 26 17:09:41 2013 UTC (13 months, 3 weeks ago) by blueness
Branch: MAIN
Changes since 1.1: +2 -2 lines
Version bump, restore arm ppc ppc64 keywords

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

  ViewVC Help
Powered by ViewVC 1.1.20