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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Tue Jul 31 01:45:24 2012 UTC (7 years, 2 months ago) by blueness
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +1 -1 lines
FILE REMOVED
Punt older 2.3.x and 2.4.x

(Portage version: 2.1.10.65/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-misc/bfgminer/bfgminer-2.3.4.ebuild,v 1.5 2012/06/16 09:03:02 blueness Exp $
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 ncurses +opencl padlock sse2 sse2_4way sse4 +udev ztex"
18 REQUIRED_USE="
19 || ( bitforce cpumining icarus opencl ztex )
20 adl? ( opencl )
21 altivec? ( cpumining ppc ppc64 )
22 opencl? ( ncurses )
23 padlock? ( cpumining || ( amd64 x86 ) )
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 virtual/opencl
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 epatch "${FILESDIR}/Bugfix-Fix-building-without-OpenCL-support.patch"
63 }
64
65 src_configure() {
66 local CFLAGS="${CFLAGS}"
67 ./autogen.sh
68 if ! use altivec; then
69 sed -i 's/-faltivec//g' configure
70 else
71 CFLAGS="${CFLAGS} -DWANT_ALTIVEC=1"
72 fi
73 use padlock && CFLAGS="${CFLAGS} -DWANT_VIA_PADLOCK=1"
74 if use sse2; then
75 if use amd64; then
76 CFLAGS="${CFLAGS} -DWANT_X8664_SSE2=1"
77 else
78 CFLAGS="${CFLAGS} -DWANT_X8632_SSE2=1"
79 fi
80 fi
81 use sse2_4way && CFLAGS="${CFLAGS} -DWANT_SSE2_4WAY=1"
82 use sse4 && CFLAGS="${CFLAGS} -DWANT_X8664_SSE4=1"
83 use hardened && CFLAGS="${CFLAGS} -nopie"
84
85 CFLAGS="${CFLAGS}" \
86 econf \
87 $(use_enable adl) \
88 $(use_enable bitforce) \
89 $(use_enable cpumining) \
90 $(use_enable icarus) \
91 $(use_with ncurses curses) \
92 $(use_enable opencl) \
93 $(use_with udev libudev) \
94 $(use_enable ztex)
95 if use opencl; then
96 # sanitize directories
97 sed -i 's~^\(\#define CGMINER_PREFIX \).*$~\1"'"${EPREFIX}/usr/lib/bfgminer/opencl"'"~' config.h
98 fi
99 if use ztex; then
100 sed -i 's~bitstreams/~'"${EPREFIX}"'/usr/lib/bfgminer/ztex/~' libztex.c
101 fi
102 }
103
104 src_install() {
105 dobin bfgminer
106 dodoc AUTHORS NEWS README
107 if use opencl; then
108 insinto /usr/lib/bfgminer/opencl
109 doins *.cl
110 fi
111 if use ztex; then
112 insinto /usr/lib/bfgminer/ztex
113 doins bitstreams/*.bit
114 fi
115 if use examples; then
116 docinto examples
117 dodoc api-example.php miner.php API.java api-example.c
118 fi
119 }

  ViewVC Help
Powered by ViewVC 1.1.20