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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Fri Apr 27 10:16:47 2012 UTC (6 years, 6 months ago) by blueness
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
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-2"
17 SLOT="0"
18 KEYWORDS="~x86 ~amd64"
19
20 IUSE="+adl altivec bitforce +cpumining examples hardened icarus ncurses +opencl padlock sse2 sse2_4way sse4"
21 REQUIRED_USE="
22 || ( bitforce cpumining icarus opencl )
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 "
40 RDEPEND="${DEPEND}"
41 DEPEND="${DEPEND}
42 dev-util/pkgconfig
43 sys-apps/sed
44 adl? (
45 x11-libs/amd-adl-sdk
46 )
47 sse2? (
48 >=dev-lang/yasm-1.0.1
49 )
50 sse4? (
51 >=dev-lang/yasm-1.0.1
52 )
53 "
54
55 src_prepare() {
56 sed -i 's/\(^\#define WANT_.*\(SSE\|PADLOCK\|ALTIVEC\)\)/\/\/ \1/' miner.h
57 ln -s /usr/include/ADL/* ADL_SDK/
58 }
59
60 src_configure() {
61 local CFLAGS="${CFLAGS}"
62 if ! use altivec; then
63 sed -i 's/-faltivec//g' configure
64 else
65 CFLAGS="${CFLAGS} -DWANT_ALTIVEC=1"
66 fi
67 use padlock && CFLAGS="${CFLAGS} -DWANT_VIA_PADLOCK=1"
68 if use sse2; then
69 if use amd64; then
70 CFLAGS="${CFLAGS} -DWANT_X8664_SSE2=1"
71 else
72 CFLAGS="${CFLAGS} -DWANT_X8632_SSE2=1"
73 fi
74 fi
75 use sse2_4way && CFLAGS="${CFLAGS} -DWANT_SSE2_4WAY=1"
76 use sse4 && CFLAGS="${CFLAGS} -DWANT_X8664_SSE4=1"
77 use hardened && CFLAGS="${CFLAGS} -nopie"
78
79 CFLAGS="${CFLAGS}" \
80 econf \
81 $(use_enable adl) \
82 $(use_enable bitforce) \
83 $(use_enable cpumining) \
84 $(use_enable icarus) \
85 $(use_with ncurses curses) \
86 $(use_enable opencl)
87 if use opencl; then
88 # sanitize directories
89 sed -i 's/^(\#define CGMINER_PREFIX ).*$/\1"'"${EPREFIX}/usr/share/cgminer"'"/' config.h
90 fi
91 }
92
93 src_install() {
94 dobin cgminer
95 dodoc AUTHORS NEWS README
96 if use opencl; then
97 insinto /usr/share/cgminer
98 doins *.cl
99 fi
100 if use examples; then
101 docinto examples
102 dodoc api-example.php miner.php API.java api-example.c
103 fi
104 }

  ViewVC Help
Powered by ViewVC 1.1.20