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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Fri Apr 27 10:16:47 2012 UTC (2 years, 4 months ago) by blueness
Branch: MAIN
Version bump, remove older unstable

(Portage version: 2.1.10.49/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/cgminer/cgminer-2.3.3.ebuild,v 1.1 2012/04/15 16:21:13 blueness Exp $
4
5 EAPI="4"
6
7 inherit versionator
8
9 MY_PV="$(replace_version_separator 3 -)"
10 S="${WORKDIR}/${PN}-${MY_PV}"
11
12 DESCRIPTION="Bitcoin CPU/GPU/FPGA miner in C"
13 HOMEPAGE="https://bitcointalk.org/index.php?topic=28402.0"
14 SRC_URI="http://ck.kolivas.org/apps/${PN}/${PN}-${MY_PV}.tar.bz2"
15
16 LICENSE="GPL-3"
17 SLOT="0"
18 KEYWORDS="~x86 ~amd64"
19
20 IUSE="+adl altivec bitforce +cpumining examples hardened icarus ncurses +opencl padlock sse2 sse2_4way sse4 +udev ztex"
21 REQUIRED_USE="
22 || ( bitforce cpumining icarus opencl ztex )
23 adl? ( opencl )
24 altivec? ( cpumining ppc ppc64 )
25 padlock? ( cpumining || ( amd64 x86 ) )
26 sse2? ( cpumining || ( amd64 x86 ) )
27 sse4? ( cpumining amd64 )
28 "
29
30 DEPEND="
31 net-misc/curl
32 ncurses? (
33 sys-libs/ncurses
34 )
35 dev-libs/jansson
36 opencl? (
37 virtual/opencl
38 )
39 udev? (
40 sys-fs/udev
41 )
42 ztex? (
43 dev-libs/libusb:1
44 )
45 "
46 RDEPEND="${DEPEND}"
47 DEPEND="${DEPEND}
48 dev-util/pkgconfig
49 sys-apps/sed
50 adl? (
51 x11-libs/amd-adl-sdk
52 )
53 sse2? (
54 >=dev-lang/yasm-1.0.1
55 )
56 sse4? (
57 >=dev-lang/yasm-1.0.1
58 )
59 "
60
61 src_prepare() {
62 sed -i 's/\(^\#define WANT_.*\(SSE\|PADLOCK\|ALTIVEC\)\)/\/\/ \1/' miner.h
63 ln -s /usr/include/ADL/* ADL_SDK/
64 }
65
66 src_configure() {
67 local CFLAGS="${CFLAGS}"
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/cgminer/opencl"'"~' config.h
98 fi
99 if use ztex; then
100 sed -i 's~bitstreams/~'"${EPREFIX}"'/usr/lib/cgminer/ztex/~' libztex.c
101 fi
102 }
103
104 src_install() {
105 dobin cgminer
106 dodoc AUTHORS NEWS README
107 if use opencl; then
108 insinto /usr/lib/cgminer/opencl
109 doins *.cl
110 fi
111 if use ztex; then
112 insinto /usr/lib/cgminer/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