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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Tue Jul 31 01:57:54 2012 UTC (2 years, 3 months ago) by blueness
Branch: MAIN
Punt older 2.5.x, version bump 2.5.3 and 2.6.1

(Portage version: 2.1.10.65/cvs/Linux x86_64)

1 blueness 1.1 # Copyright 1999-2012 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3     # $Header: $
4    
5     EAPI=4
6    
7     inherit eutils
8    
9     DESCRIPTION="Modular Bitcoin CPU/GPU/FPGA miner in C"
10     HOMEPAGE="https://bitcointalk.org/index.php?topic=78192.0"
11     SRC_URI="http://luke.dashjr.org/programs/bitcoin/files/${PN}/${PV}/${P}.tbz2"
12    
13     LICENSE="GPL-3"
14     SLOT="0"
15     KEYWORDS="~x86 ~amd64"
16    
17     IUSE="+adl altivec bitforce +cpumining examples hardened icarus modminer ncurses +opencl padlock scrypt sse2 sse2_4way sse4 +udev ztex"
18     REQUIRED_USE='
19     || ( bitforce cpumining icarus modminer opencl 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
34     udev? (
35     sys-fs/udev
36     )
37     ztex? (
38     virtual/libusb:1
39     )
40     '
41     RDEPEND="${DEPEND}"
42     DEPEND="${DEPEND}
43     virtual/pkgconfig
44     sys-apps/sed
45     adl? (
46     x11-libs/amd-adl-sdk
47     )
48     opencl? (
49     || (
50     virtual/opencl
51     virtual/opencl-sdk
52     app-admin/eselect-opencl
53     dev-util/ati-stream-sdk
54     dev-util/ati-stream-sdk-bin
55     dev-util/amdstream
56     dev-util/amd-app-sdk
57     dev-util/amd-app-sdk-bin
58     dev-util/nvidia-cuda-sdk[opencl]
59     dev-util/intel-opencl-sdk
60     )
61     )
62     sse2? (
63     >=dev-lang/yasm-1.0.1
64     )
65     sse4? (
66     >=dev-lang/yasm-1.0.1
67     )
68     "
69    
70     src_prepare() {
71     sed -i 's/\(^\#define WANT_.*\(SSE\|PADLOCK\|ALTIVEC\)\)/\/\/ \1/' miner.h
72     ln -s /usr/include/ADL/* ADL_SDK/
73     }
74    
75     src_configure() {
76     local CFLAGS="${CFLAGS}"
77     if ! use altivec; then
78     sed -i 's/-faltivec//g' configure
79     else
80     CFLAGS="${CFLAGS} -DWANT_ALTIVEC=1"
81     fi
82     use padlock && CFLAGS="${CFLAGS} -DWANT_VIA_PADLOCK=1"
83     if use sse2; then
84     if use amd64; then
85     CFLAGS="${CFLAGS} -DWANT_X8664_SSE2=1"
86     else
87     CFLAGS="${CFLAGS} -DWANT_X8632_SSE2=1"
88     fi
89     fi
90     use sse2_4way && CFLAGS="${CFLAGS} -DWANT_SSE2_4WAY=1"
91     use sse4 && CFLAGS="${CFLAGS} -DWANT_X8664_SSE4=1"
92     use hardened && CFLAGS="${CFLAGS} -nopie"
93    
94     CFLAGS="${CFLAGS}" \
95     econf \
96     $(use_enable adl) \
97     $(use_enable bitforce) \
98     $(use_enable cpumining) \
99     $(use_enable icarus) \
100     $(use_enable modminer) \
101     $(use_with ncurses curses) \
102     $(use_enable opencl) \
103     $(use_enable scrypt) \
104     $(use_with udev libudev) \
105     $(use_enable ztex)
106     # sanitize directories
107     sed -i 's~^\(\#define CGMINER_PREFIX \).*$~\1"'"${EPREFIX}/usr/lib/bfgminer"'"~' config.h
108     }
109    
110     src_install() {
111     dobin bfgminer
112     dodoc AUTHORS NEWS README API-README
113     if use scrypt; then
114     dodoc SCRYPT-README
115     fi
116     if use icarus || use bitforce; then
117     dodoc FPGA-README
118     fi
119     if use modminer; then
120     insinto /usr/lib/bfgminer/modminer
121     doins bitstreams/*.ncd
122     dodoc bitstreams/COPYING_fpgaminer
123     fi
124     if use opencl; then
125     insinto /usr/lib/bfgminer
126     doins *.cl
127     fi
128     if use ztex; then
129     insinto /usr/lib/bfgminer/ztex
130     doins bitstreams/*.bit
131     dodoc bitstreams/COPYING_ztex
132     fi
133     if use examples; then
134     docinto examples
135     dodoc api-example.php miner.php API.java api-example.c
136     fi
137     }

  ViewVC Help
Powered by ViewVC 1.1.20