/[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.5 - (hide annotations) (download)
Mon Apr 8 00:24:47 2013 UTC (17 months, 1 week ago) by blueness
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +1 -1 lines
FILE REMOVED
Version bumps and cleanup

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

1 blueness 1.1 # Copyright 1999-2012 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 blueness 1.5 # $Header: /var/cvsroot/gentoo-x86/net-misc/bfgminer/bfgminer-2.5.3.ebuild,v 1.4 2012/12/03 02:26:16 ssuominen 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 ssuominen 1.4 virtual/udev
35 blueness 1.1 )
36     ztex? (
37     virtual/libusb:1
38     )
39 blueness 1.2 "
40 blueness 1.3 RDEPEND="${DEPEND}
41     opencl? (
42     virtual/opencl
43     )
44     "
45 blueness 1.1 DEPEND="${DEPEND}
46     virtual/pkgconfig
47     sys-apps/sed
48     adl? (
49     x11-libs/amd-adl-sdk
50     )
51     sse2? (
52     >=dev-lang/yasm-1.0.1
53     )
54     sse4? (
55     >=dev-lang/yasm-1.0.1
56     )
57     "
58    
59     src_prepare() {
60     sed -i 's/\(^\#define WANT_.*\(SSE\|PADLOCK\|ALTIVEC\)\)/\/\/ \1/' miner.h
61     ln -s /usr/include/ADL/* ADL_SDK/
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 bitforce) \
87     $(use_enable cpumining) \
88     $(use_enable icarus) \
89     $(use_enable modminer) \
90     $(use_with ncurses curses) \
91     $(use_enable opencl) \
92     $(use_with udev libudev) \
93     $(use_enable ztex)
94     # sanitize directories
95     sed -i 's~^\(\#define CGMINER_PREFIX \).*$~\1"'"${EPREFIX}/usr/lib/bfgminer"'"~' config.h
96     }
97    
98     src_install() {
99     dobin bfgminer
100     dodoc AUTHORS NEWS README API-README
101     if use icarus || use bitforce; then
102     dodoc FPGA-README
103     fi
104     if use modminer; then
105     insinto /usr/lib/bfgminer/modminer
106     doins bitstreams/*.ncd
107     dodoc bitstreams/COPYING_fpgaminer
108     fi
109     if use opencl; then
110     insinto /usr/lib/bfgminer
111     doins *.cl
112     fi
113     if use ztex; then
114     insinto /usr/lib/bfgminer/ztex
115     doins bitstreams/*.bit
116     dodoc bitstreams/COPYING_ztex
117     fi
118     if use examples; then
119     docinto examples
120     dodoc api-example.php miner.php API.java api-example.c
121     fi
122     }

  ViewVC Help
Powered by ViewVC 1.1.20