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

Contents of /net-misc/cgminer/cgminer-2.3.1.2.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.1.2.ebuild,v 1.1 2012/02/24 22:00:33 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 +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 sys-libs/ncurses
33 dev-libs/jansson
34 opencl? (
35 virtual/opencl
36 )
37 "
38 RDEPEND="${DEPEND}"
39 DEPEND="${DEPEND}
40 dev-util/pkgconfig
41 sys-apps/sed
42 adl? (
43 x11-libs/amd-adl-sdk
44 )
45 sse2? (
46 >=dev-lang/yasm-1.0.1
47 )
48 sse4? (
49 >=dev-lang/yasm-1.0.1
50 )
51 "
52
53 src_prepare() {
54 sed -i 's/\(^\#define WANT_.*\(SSE\|PADLOCK\|ALTIVEC\)\)/\/\/ \1/' miner.h
55 ln -s /usr/include/ADL/* ADL_SDK/
56 }
57
58 src_configure() {
59 local CFLAGS="${CFLAGS}"
60 if ! use altivec; then
61 sed -i 's/-faltivec//g' configure
62 else
63 CFLAGS="${CFLAGS} -DWANT_ALTIVEC=1"
64 fi
65 use padlock && CFLAGS="${CFLAGS} -DWANT_VIA_PADLOCK=1"
66 if use sse2; then
67 if use amd64; then
68 CFLAGS="${CFLAGS} -DWANT_X8664_SSE2=1"
69 else
70 CFLAGS="${CFLAGS} -DWANT_X8632_SSE2=1"
71 fi
72 fi
73 use sse2_4way && CFLAGS="${CFLAGS} -DWANT_SSE2_4WAY=1"
74 use sse4 && CFLAGS="${CFLAGS} -DWANT_X8664_SSE4=1"
75 use hardened && CFLAGS="${CFLAGS} -nopie"
76
77 CFLAGS="${CFLAGS}" \
78 econf \
79 $(use_enable adl) \
80 $(use_enable bitforce) \
81 $(use_enable cpumining) \
82 $(use_enable icarus) \
83 $(use_enable opencl)
84 if use opencl; then
85 # sanitize directories
86 sed -i 's/^(\#define CGMINER_PREFIX ).*$/\1"'"${EPREFIX}/usr/share/cgminer"'"/' config.h
87 fi
88 }
89
90 src_install() {
91 dobin cgminer
92 dodoc AUTHORS NEWS README
93 if use opencl; then
94 insinto /usr/share/cgminer
95 doins *.cl
96 fi
97 if use examples; then
98 docinto examples
99 dodoc api-example.php miner.php API.java api-example.c
100 fi
101 }

  ViewVC Help
Powered by ViewVC 1.1.20