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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations) (download)
Mon Aug 6 16:02:58 2012 UTC (23 months, 3 weeks ago) by blueness
Branch: MAIN
Changes since 1.1: +7 -18 lines
Minor code cleanup, switch to virtual/opencl

(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 blueness 1.2 # $Header: /var/cvsroot/gentoo-x86/net-misc/bfgminer/bfgminer-2.5.3.ebuild,v 1.1 2012/07/31 01:57:54 blueness Exp $
4 blueness 1.1
5 blueness 1.2 EAPI="4"
6 blueness 1.1
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 sse2 sse2_4way sse4 +udev ztex"
18 blueness 1.2 REQUIRED_USE="
19 blueness 1.1 || ( bitforce cpumining icarus modminer opencl ztex )
20     adl? ( opencl )
21     altivec? ( cpumining ppc ppc64 )
22     padlock? ( cpumining || ( amd64 x86 ) )
23     sse2? ( cpumining || ( amd64 x86 ) )
24     sse4? ( cpumining amd64 )
25 blueness 1.2 "
26 blueness 1.1
27 blueness 1.2 DEPEND="
28 blueness 1.1 net-misc/curl
29     ncurses? (
30     sys-libs/ncurses
31     )
32     dev-libs/jansson
33     udev? (
34     sys-fs/udev
35     )
36     ztex? (
37     virtual/libusb:1
38     )
39 blueness 1.2 "
40 blueness 1.1 RDEPEND="${DEPEND}"
41     DEPEND="${DEPEND}
42     virtual/pkgconfig
43     sys-apps/sed
44     adl? (
45     x11-libs/amd-adl-sdk
46     )
47     opencl? (
48 blueness 1.2 virtual/opencl
49 blueness 1.1 )
50     sse2? (
51     >=dev-lang/yasm-1.0.1
52     )
53     sse4? (
54     >=dev-lang/yasm-1.0.1
55     )
56     "
57    
58     src_prepare() {
59     sed -i 's/\(^\#define WANT_.*\(SSE\|PADLOCK\|ALTIVEC\)\)/\/\/ \1/' miner.h
60     ln -s /usr/include/ADL/* ADL_SDK/
61     }
62    
63     src_configure() {
64     local CFLAGS="${CFLAGS}"
65     if ! use altivec; then
66     sed -i 's/-faltivec//g' configure
67     else
68     CFLAGS="${CFLAGS} -DWANT_ALTIVEC=1"
69     fi
70     use padlock && CFLAGS="${CFLAGS} -DWANT_VIA_PADLOCK=1"
71     if use sse2; then
72     if use amd64; then
73     CFLAGS="${CFLAGS} -DWANT_X8664_SSE2=1"
74     else
75     CFLAGS="${CFLAGS} -DWANT_X8632_SSE2=1"
76     fi
77     fi
78     use sse2_4way && CFLAGS="${CFLAGS} -DWANT_SSE2_4WAY=1"
79     use sse4 && CFLAGS="${CFLAGS} -DWANT_X8664_SSE4=1"
80     use hardened && CFLAGS="${CFLAGS} -nopie"
81    
82     CFLAGS="${CFLAGS}" \
83     econf \
84     $(use_enable adl) \
85     $(use_enable bitforce) \
86     $(use_enable cpumining) \
87     $(use_enable icarus) \
88     $(use_enable modminer) \
89     $(use_with ncurses curses) \
90     $(use_enable opencl) \
91     $(use_with udev libudev) \
92     $(use_enable ztex)
93     # sanitize directories
94     sed -i 's~^\(\#define CGMINER_PREFIX \).*$~\1"'"${EPREFIX}/usr/lib/bfgminer"'"~' config.h
95     }
96    
97     src_install() {
98     dobin bfgminer
99     dodoc AUTHORS NEWS README API-README
100     if use icarus || use bitforce; then
101     dodoc FPGA-README
102     fi
103     if use modminer; then
104     insinto /usr/lib/bfgminer/modminer
105     doins bitstreams/*.ncd
106     dodoc bitstreams/COPYING_fpgaminer
107     fi
108     if use opencl; then
109     insinto /usr/lib/bfgminer
110     doins *.cl
111     fi
112     if use ztex; then
113     insinto /usr/lib/bfgminer/ztex
114     doins bitstreams/*.bit
115     dodoc bitstreams/COPYING_ztex
116     fi
117     if use examples; then
118     docinto examples
119     dodoc api-example.php miner.php API.java api-example.c
120     fi
121     }

  ViewVC Help
Powered by ViewVC 1.1.20